-
Notifications
You must be signed in to change notification settings - Fork 57
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
Full document serialization #1355
Conversation
# Conflicts: # .github/workflows/issue-needs-attention.yml
# Conflicts: # packages/test-base/src/commonMain/kotlin/io/realm/kotlin/test/util/TypeDescriptor.kt
…`, `put`, `putAll`, `remove` and `clear` (#1219)
# Conflicts: # packages/jni-swig-stub/realm.i
# Conflicts: # packages/library-base/src/commonMain/kotlin/io/realm/kotlin/internal/RealmObjectHelper.kt # packages/library-base/src/commonMain/kotlin/io/realm/kotlin/internal/RealmSetInternal.kt # packages/test-base/src/androidAndroidTest/kotlin/io/realm/kotlin/test/shared/RealmSetTests.kt
… support for Decimal128 in `copyFromRealm` (#1255)
# Conflicts: # packages/external/core # packages/jni-swig-stub/realm.i
# Conflicts: # packages/library-base/src/commonMain/kotlin/io/realm/kotlin/internal/RealmInstantImpl.kt # packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/AppConfiguration.kt # packages/test-base/src/androidAndroidTest/kotlin/io/realm/kotlin/test/shared/SerializationTests.kt # packages/test-base/src/commonMain/kotlin/io/realm/kotlin/entities/SerializableSample.kt
I am a bit confused about the
|
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.
Looking good. Minor comments and awaiting final approval until CI is green.
...ary-base/src/commonMain/kotlin/io/realm/kotlin/annotations/ExperimentalRealmSerializerApi.kt
Outdated
Show resolved
Hide resolved
...ary-base/src/commonMain/kotlin/io/realm/kotlin/annotations/ExperimentalRealmSerializerApi.kt
Outdated
Show resolved
Hide resolved
packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/AppConfiguration.kt
Outdated
Show resolved
Hide resolved
packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/Credentials.kt
Outdated
Show resolved
Hide resolved
packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/ext/FunctionsExt.kt
Outdated
Show resolved
Hide resolved
packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/ext/FunctionsExt.kt
Outdated
Show resolved
Hide resolved
packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/ext/UserExt.kt
Outdated
Show resolved
Hide resolved
...ry-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/CustomEJsonCredentialsImpl.kt
Outdated
Show resolved
Hide resolved
packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/CredentialsImpl.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Christian Melchior <christian@ilios.dk>
…notations/ExperimentalRealmSerializerApi.kt Co-authored-by: Christian Melchior <christian@ilios.dk>
…notations/ExperimentalRealmSerializerApi.kt Co-authored-by: Christian Melchior <christian@ilios.dk>
…ngodb/AppConfiguration.kt Co-authored-by: Christian Melchior <christian@ilios.dk>
…ngodb/internal/CustomEJsonCredentialsImpl.kt Co-authored-by: Christian Melchior <christian@ilios.dk>
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.
Awesome 🚀
packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/ext/FunctionsExt.kt
Outdated
Show resolved
Hide resolved
…ngodb/ext/FunctionsExt.kt Co-authored-by: Christian Melchior <christian@ilios.dk>
Full document serialization enables using any class as argument and return types to:
It uses the new experimental EJson decoder available in Kbson. The decoder is based on
kserializer
and there are some considerations to have into account.It is an experimental feature and it is subject to change.
Custom function credentials are late evaluated when the instance is actually used. This is required because the payload encoding requires access to the EJson instance defined in the App configuration, but because Credentials are decoupled from the App we only can have access to the App instance when the Credentials are actually being used.
Atlas function calls now use a Builder pattern. This is required because
kserializer
does not support runtime serializer lookup, which we are required to do in compile time.Values must be
@Serializable
or a custom serializer must be specified on call.Examples
Credentials
User profile and custom Data
Function call
Pending
closes #994