Skip to content

Conversation

Rexios80
Copy link
Member

@Rexios80 Rexios80 commented Sep 2, 2025

Closes #150

Copy link

codecov bot commented Sep 2, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.14%. Comparing base (dedef14) to head (33b30b7).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Rexios80 Rexios80 requested a review from Copilot September 3, 2025 20:16
Copy link

@Copilot Copilot AI left a 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve handling of Box of custom List and Map types
1 participant