realm / realm-kotlin

Kotlin Multiplatform and Android SDK for the Realm Mobile Database: Build Better Apps Faster.
Apache License 2.0
958 stars 61 forks source link

Mongo Client API's #972

Closed sync-by-unito[bot] closed 5 months ago

sync-by-unito[bot] commented 2 years ago

Similar to Realm Java, we should have support for all the Mongo Client API's here: https://github.com/realm/realm-java/tree/master/realm/realm-library/src/objectServer/java/io/realm/mongodb/mongo

cmelchior commented 1 year ago

Note, that we will probably be moving App Services to a new package, decoupled from Device Sync. This means that these APIs should not be implemented using the C-API, but be done entirely in Kotlin. .NET has already prototyped the approach here: https://github.com/realm/realm-dotnet/blob/main/Realm/Realm/Sync/MongoClient.cs and maybe we can actually pull the logic from the pre-v10 API's in Java, which was also implemented in Java rather than C++.

cmelchior commented 1 year ago

This was the PR introducing it in Java https://github.com/realm/realm-java/pull/6804/files/0d1b58cc5c0c067b2c1afb0331b6633ff11b8593#diff-669a16424fafec0e99c78f1c5ead6f325bf19fe2207c6b6982d5c006f7538e54. I was misremembering things as we never had a pure Java implementation.

This means we need to duplicate the logic found in https://github.com/realm/realm-core/blob/master/src/realm/object-store/sync/mongo_client.hpp and associated classes