-
-
Notifications
You must be signed in to change notification settings - Fork 23
Iterable map getters #188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Iterable map getters #188
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #188 +/- ##
==========================================
+ Coverage 94.04% 94.14% +0.10%
==========================================
Files 56 56
Lines 2349 2392 +43
==========================================
+ Hits 2209 2252 +43
Misses 140 140 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces iterable map getters functionality to the Hive database library, providing convenient methods to retrieve and cast stored values to specific collection types (List, Set, Map) without requiring manual casting after retrieval.
- Adds new getter methods (
getList
,getSet
,getMap
,getListAt
,getSetAt
,getMapAt
) to Box, LazyBox, and IsolatedBox interfaces - Implements these methods across all box implementations with proper type casting
- Updates error messages to guide users toward the new casting methods
- Adds comprehensive test coverage for all new getter methods
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
hive/lib/src/util/type_utils.dart | Adds casting utility functions and updates error messages to reference new getter methods |
hive/lib/src/box/box.dart | Adds abstract method signatures for typed getters to Box interface |
hive/lib/src/box/box_impl.dart | Implements typed getter methods for regular Box using casting utilities |
hive/lib/src/box/lazy_box.dart | Adds abstract method signatures for async typed getters to LazyBox interface |
hive/lib/src/box/lazy_box_impl.dart | Implements async typed getter methods for LazyBox using casting utilities |
hive/lib/src/isolate/isolated_box.dart | Adds abstract method signatures for async typed getters to IsolatedBox interface |
hive/lib/src/isolate/isolated_box_impl/isolated_box_impl_web.dart | Implements async typed getter methods for web-based isolated boxes |
hive/lib/src/isolate/isolated_box_impl/isolated_box_impl_vm.dart | Implements async typed getter methods for VM-based isolated boxes |
hive/test/tests/box/box_impl_test.dart | Adds comprehensive test coverage for typed getter methods in regular boxes |
hive/test/tests/box/lazy_box_impl_test.dart | Adds test coverage for async typed getter methods in lazy boxes and refactors test setup |
hive/test/tests/isolate/isolated_box_test.dart | Adds test coverage for async typed getter methods in isolated boxes |
hive/test/tests/isolate/isolated_lazy_box_test.dart | Adds test coverage for async typed getter methods in isolated lazy boxes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Closes #150