-
Notifications
You must be signed in to change notification settings - Fork 167
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
Refactor RealmMetadata and remove TableHandle #2230
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.
Mostly minor simplification suggestions from me, otherwise should be good to go once the Core PR is merged.
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.
Looks good but probably should be rebased on top of master to get the build fixed.
a18fa20
to
668593c
Compare
668593c
to
6ec51e3
Compare
This reverts commit 998280d.
wrappers/src/shared_realm_cs.cpp
Outdated
const ObjectSchema& object_schema = *realm->schema().find(object_name); | ||
|
||
const TableRef table = get_table(realm, table_key); | ||
|
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.
Are all these new lines needed?
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.
Beside the 2 minuscule comments I had, one more. ObjectKey is renamed to TableKey (plus other changes) and you changed the year on the copyright. I'm not sure what the policy is but I assume all the other files you modified need to be changed, as well? If not, what's the policy about copyrights?
Anyway, beside the very small things mentioned above, PR looks good to me.
@LaPeste agree on both points. Regarding ObjectKey renamed to TableKey... it's just git that thinks that I renamed it. I actually deleted ObjectKey and added TableKey, but because they are similar git thinks I have renamed it, that's why the copyright difference. |
This PR is considered mergeable, once the core changes have been approved (realm/realm-core#4413) and merged to the v11 branch |
The test failures are caused by a change in the Core query syntax. They'll be fixed once #2214 is merged. |
Failing tests seem to be my fault - the AOT dynamic runtime doesn't seem to like my code. |
This PR refactors
RealmMetadata
to create a correspondence between theRealmObject.Metadata
and theTableKey
. Given that with theTableKey
we can get a reference to the table in native,TableHandle
has been removed too.Fixes #2213