realm-kotlin
realm-kotlin copied to clipboard
MongoDB Functions
Similar to Realm Java we should expose MongoDB Functions in the API: https://docs.mongodb.com/realm-sdks/java/latest/io/realm/mongodb/functions/Functions.html
interface io.realm.mongodb.functions.Functions {
val user: User
val app: App
val defaultCodecRegistry: CodecRegistry
suspend fun <ResultT> callFunction(name: String, args: List<Any>, resultDecoder: Decoder<ResultT>)
suspend fun callFunction(name: String, args: List<Any>, resultClass: KClass<ResultT>)
suspend fun callFunction(name: String, args: List<Any>, codecRegistry: CodecRegistry)
}
// Access Functions through the user
val user = app.login(credentials)
val functions = user.functions
Any idea about when functions will be added to the Kotlin SDK?
Unfortunately not. It is on our near term roadmap but depends on #648 being done first.
And now that's it's done? 😁
@jeanbaptistebeau We have a PR with support here: https://github.com/realm/realm-kotlin/pull/1110. It is going through a final review now.