-
Notifications
You must be signed in to change notification settings - Fork 87
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
RDART-941: Add support for collections in RealmValue #1469
Conversation
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.
Did core fix the issues on their side yet? If so, lets merge.
/// Extensions on RealmValue providing convenience conversion operators | ||
extension RealmValueConvenience on RealmValue { | ||
/// Casts [value] to a List<RealmValue>. It will throw an exception if [value] is not a list. | ||
RealmList<RealmValue> asList() { |
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.
We discussed using a getter instead as it is slightly shorter, but it actually goes against https://dart.dev/effective-dart/design#prefer-naming-a-method-as___-if-it-returns-a-different-representation-backed-by-the-original-object, so 👍
There's a series of issues I opened for the query engine - not sure if those are legitimate bugs or things are working as designed, so I'll wait to see what @jedelbo comes back with. |
* Update to Core next-major * Update old-format file, update changelog * Add support for collections in RealmValue (#1469) * Initial stab at collections in mixed * regenerate ffi bindings * Add more tests * Add notification tests * Return the types * Address some PR feedback * Add RealmValueType * Fix some tests * Add query tests * Add tests for indexOf/contains; add tests for sets * Create a symlink for test data inside tests * Add a few more tests * Correct Core issue link * enable notifications tests * Enable some tests * Re-generate ffi * Fix test * Added a changelog entry * Update Core and reenable some tests * Update core submodule * Move cmake presets to root of repo * Move cmake presets back in realm_dart * Update Core * Fix paths * Regenerate ffi bindings * Remove deprecated members (#1526) * Update changelog * Update paths in prepare-release.yml * [Release 2.0.0-alpha.1] (#1527) * [Release 2.0.0-alpha.1] * fix paths * Read package version from the correct file * More release workflow fixes * .. * Remove some symlink removal * tar the correct packages --------- Co-authored-by: nirinchev <[email protected]> Co-authored-by: Nikola Irinchev <[email protected]> * Fixes to the release process * [Release 2.0.0-alpha.2] (#1528) * [Release 2.0.0-alpha.2] * Remove revived symlink --------- Co-authored-by: nirinchev <[email protected]> Co-authored-by: Nikola Irinchev <[email protected]> * Add support for dynamic.getSet/getMap (#1533) * Add support for dynamic.getSet/getMap * Fix test * More test fixes * Apply suggestions from code review Co-authored-by: Kasper Overgård Nielsen <[email protected]> * Regenerate models * Update changelog --------- Co-authored-by: Kasper Overgård Nielsen <[email protected]> --------- Co-authored-by: Realm CI <[email protected]> Co-authored-by: nirinchev <[email protected]> Co-authored-by: Kasper Overgård Nielsen <[email protected]>
Fixes #1505
Fixes #1504
TODO:
results/list.indexOf/contains
Consider moving RealmList/Map to common. Right nowImplemented as extensions inside the realm package..asList
/.asMap
returns the dart list/map, but that doesn't have the extra information RealmList/RealmMap has.Set<RealmValue>
behavior@type = $0
query tests when Allow query substitution for the @type argument realm-core#7289 is addressed.