Add missing path parameter to HiveInterface methods#776
Conversation
|
Why do you think this is needed? If you want to delete box by name you can use If there's special need we've missing please let me know.. |
|
Hi @themisir , Thanks for the quick response! We are using Hive in a way where (some) boxes are saved in a different subpath (let's say on a per-user basis). So we heavily use the path parameter with the I saw the Furthermore The reason I think it is better to go through the Also I check the implementations and it already seems some more logic is present in these methods:
But I didn't think about the web platform to be fair :-) (also see issue #742). |
|
@themisir Could you tell me what you think about our usecases for this? |
Oh thanks for pinging me, I totally forget about that issue. My feelings about the feature is a bit complex cause this is nice to have feature for advanced use cases but might confuse new users (especially the ones that uses Hive for web only). |
|
Sorry for the late response but I don't have enough bandwidth for adding new features to hive. I'm not exactly sure how could new features would affect users or could cause issues + might lead to new feature requests (eg: path will not work on web, so there might be someone requesting that to work). So I'm unsure about merging this feature. What do you think about that? |
|
My main argument for doing this would be consistency. It's kind of weird that you can open a box with path but not delete it. Having the path parameter there but not in the other methods is in my opinion more confusing. I don't think we can solve our case by calling the Other ways to solve it would indeed be to delete the relevant Hive files manually by checking the |
Haven't noticed that openBox supports custom path parameter. So it makes sense to support path parameter for other methods too. |
|
Thank you! |
Hive web uses different implementation (using indexed db) which doesn't relies on file system / so it doesn't uses path parameter.
I'm currently working on fixing pipeline here #806 |
Ensure HiveLists are treated as non-nullable in hive_generator (isar#728) * Replaced ?. operator with . operator Resolves error "The argument type 'HiveList<T>?' can't be assigned to the parameter type 'HiveList<T>'. Closes issue isar#664. * Ensuring nullable HiveLists are properly generated Co-authored-by: Misir Jafarov <misir.ceferov@gmail.com> Updated hive_generator dependencies (isar#765) * Updated dependencies * Changed version dependencies Bump up hive_generator to v1.1.1 Get indexDB selectively based on window property (isar#802) Co-authored-by: Wenhao Wu <wenhao.wu@signanthealth.com> Add missing path parameter to HiveInterface methods (isar#776) Fixes broken CI (isar#806) * Update pubspec.yaml * Migrated from mockito to mocktail * Test on dart 2.14 Don't loose track of box objects if init crashes (isar#846) feat: Add flush method to boxes (isar#852) bump: Update to v2.0.5 Updated hive_generator analyzer dependency (isar#858) bump up hive_generator to v1.1.2 Change pedantic to linter and fix warnings (isar#876)
Adds
String? pathparameters toHiveInterfacemethods