Static
ConnectionStatic
MutableStatic
NumericStatic
SessionStatic
SubscriptionStatic
SubscriptionStatic
SubscriptionStatic
SubscriptionsStatic
downloadThe default behavior settings if you want to wait for downloading a synchronized Realm to complete before opening it.
since v12
Static
openThe default behavior settings if you want to open a synchronized Realm immediately and start working on it. If this is the first time you open the Realm, it will be empty while the server data is being downloaded in the background.
since v12
Static
enableEnable multiplexing multiple sync sessions over a single connection for a Realm app. When having a lot of synchronized realms open the system might run out of file descriptors because of all the open sockets to the server. Session multiplexing is designed to alleviate that, but it might not work with a server configured with fail-over. Only use if you're seeing errors about reaching the file descriptor limit and you know you are using many sync sessions.
Static
getGet all sync sessions for a particular user.
10.0.0
Static
getGet the session associated with a particular user and partition value.
10.0.0
Static
initiateInitiate a client reset. The Realm must be closed prior to the reset.
A synced Realm may need to be reset if the communications with the Atlas Device Sync Server indicate an unrecoverable error that prevents continuing with normal synchronization. The most common reason for this is if a client has been disconnected for too long.
The local copy of the Realm is moved into a recovery directory for safekeeping.
Local writes that were not successfully synchronized to Atlas will be present in the local recovery copy of the Realm file. The re-downloaded Realm will initially contain only the data present at the time the Realm was synchronized up on the server.
An Error if reset is not possible.
{
* // Once you have opened your Realm, you will have to keep a reference to it.
* // In the error handler, this reference is called `realm`
* const config = {
* // schema, etc.
* sync: {
* user,
* partitionValue,
* error: (session, error) => {
* if (error.name === 'ClientReset') {
* let path = realm.path; // realm.path will no be accessible after realm.close()
* realm.close();
* Realm.App.Sync.initiateClientReset(app, path);
* // - open Realm at `error.config.path` (oldRealm)
* // - open Realm with `config` (newRealm)
* // - copy required objects from oldRealm to newRealm
* // - close both Realms
* }
* }
* }
* };
* }
Static
reconnectStatic
setWill be removed in v13.0.0. Please use Realm.setLogLevel.
Static
setWill be removed in v13.0.0. Please use Realm.setLogger.
Static
setSet the application part of the User-Agent string that will be sent to the Realm Object Server when a session is created.
This method can only be called up to the point where the first Realm is opened. After that, the User-Agent can no longer be changed.
Generated using TypeDoc
Deprecated
Please use SubscriptionSetState as a named import