Package io.realm.kotlin.mongodb.ext

Types

CallBuilder
Link copied to clipboard
class CallBuilder<T>

Builder used to construct a call defining serializers for the different arguments and return value.

Functions

call
Link copied to clipboard
inline suspend fun <T> Functions.call(name: String, vararg args: Any?): T

Invokes an Atlas function.

inline suspend fun <T> Functions.call(name: String, callBuilderBlock: CallBuilder<T>.() -> Unit): T

Invokes an Atlas function using the EJson encoder defined in AppConfiguration.ejson.

customData
Link copied to clipboard
inline fun <T> User.customData(): T?
fun <T> User.customData(serializer: <ERROR CLASS><T>): T?

Returns the custom user data associated with the user in the Realm App as T.

customDataAsBsonDocument
Link copied to clipboard
inline fun User.customDataAsBsonDocument(): <ERROR CLASS>?

Return the custom user data associated with the user in the Realm App as BsonDocument.

insert
Link copied to clipboard
fun <ERROR CLASS>.insert(obj: <ERROR CLASS>)

Insert a dynamic version of a AsymmetricRealmObject into a realm. Since asymmetric objects are "write-only", it is not possible to access the managed data after it has been inserted.

fun <T : AsymmetricRealmObject> <ERROR CLASS>.insert(obj: T)

Insert an AsymmetricRealmObject into Realm. Since asymmetric objects are "write-only", it is not possible to access the managed data after it has been inserted.

profile
Link copied to clipboard
inline fun <T> User.profile(): T
fun <T> User.profile(serializer: <ERROR CLASS><T>): T

Returns the profile for this user as a T.

profileAsBsonDocument
Link copied to clipboard
inline fun User.profileAsBsonDocument(): <ERROR CLASS>

Returns the profile for this user as BsonDocument.

subscribe
Link copied to clipboard
suspend fun <T> <ERROR CLASS><T>.subscribe(mode: WaitForSync = WaitForSync.FIRST_TIME, timeout: Duration = Duration.INFINITE): <ERROR CLASS><T>
suspend fun <T> <ERROR CLASS><T>.subscribe(mode: WaitForSync = WaitForSync.FIRST_TIME, timeout: Duration = Duration.INFINITE): <ERROR CLASS><T>

Automatically create an anonymous Subscription from a local query result in the background and return the result of re-running the same query against the Realm file. This behaves the same as creating a named variant by calling subscribe. See this method for details about the exact behavior.

suspend fun <T> <ERROR CLASS><T>.subscribe(name: String, updateExisting: Boolean = false, mode: WaitForSync = WaitForSync.FIRST_TIME, timeout: Duration = Duration.INFINITE): <ERROR CLASS><T>

Automatically create a named Subscription from a query in the background and return the result of running the same query against the local Realm file.

suspend fun <T> <ERROR CLASS><T>.subscribe(name: String, updateExisting: Boolean = false, mode: WaitForSync = WaitForSync.FIRST_TIME, timeout: Duration = Duration.INFINITE): <ERROR CLASS><T>

Automatically create a named Subscription from a local query result in the background and return the result of re-running the same query against the Realm file.