From 4498f2ff7cb6cb2a64f03d70197cf5ea9aa9c2c6 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Tue, 7 May 2024 15:55:12 -0400 Subject: [PATCH 01/63] Scaffold ToC for consolidated SDK docs --- source/frameworks.txt | 31 ++ source/frameworks/dotnet.txt | 14 + source/frameworks/electron.txt | 14 + source/frameworks/flutter.txt | 14 + source/frameworks/maui.txt | 14 + source/frameworks/react-native.txt | 16 + source/frameworks/swiftui.txt | 15 + source/index.txt | 26 +- source/platforms.txt | 29 ++ source/platforms/android.txt | 16 + source/platforms/apple.txt | 19 + source/platforms/linux.txt | 16 + source/platforms/web.txt | 18 + source/platforms/windows.txt | 16 + source/sdk/api-reference.txt | 30 ++ source/sdk/atlas.txt | 17 + source/sdk/atlas/access-mongodb.txt | 14 + source/sdk/atlas/call-function.txt | 13 + source/sdk/atlas/connect.txt | 21 + source/sdk/crud.txt | 23 ++ source/sdk/crud/create.txt | 11 + source/sdk/crud/delete.txt | 11 + source/sdk/crud/query-engines.txt | 21 + .../query-engines/filter-data-java-sdk.txt | 13 + .../crud/query-engines/filter-data-linq.txt | 17 + .../query-engines/filter-data-swift-sdk.txt | 23 ++ .../query-engines}/realm-query-language.txt | 0 source/sdk/crud/read.txt | 19 + source/sdk/crud/threading.txt | 18 + source/sdk/crud/update.txt | 11 + source/sdk/files.txt | 21 + source/sdk/files/bundle-file.txt | 13 + source/sdk/files/configure-and-open.txt | 21 + source/sdk/files/delete-file.txt | 13 + source/sdk/files/encrypt-file.txt | 13 + source/sdk/files/reduce-file-size.txt | 13 + source/sdk/logging.txt | 13 + source/sdk/model-data.txt | 21 + source/sdk/model-data/change-object-model.txt | 13 + .../sdk/model-data/model-data-device-sync.txt | 13 + source/sdk/model-data/object-models.txt | 13 + source/sdk/model-data/relationships.txt | 13 + source/sdk/model-data/supported-types.txt | 21 + source/sdk/react-to-changes.txt | 13 + source/sdk/sync.txt | 37 ++ source/sdk/sync/add-sync-to-app.txt | 13 + .../configure-and-open-synced-database.txt | 21 + source/sdk/sync/event-library.txt | 388 ++++++++++++++++++ source/sdk/sync/handle-sync-errors.txt | 13 + source/sdk/sync/manage-sync-sessions.txt | 21 + source/sdk/sync/manage-sync-subscriptions.txt | 13 + source/sdk/sync/partition-based-sync.txt | 13 + source/sdk/sync/stream-data-to-atlas.txt | 13 + source/sdk/sync/write-to-synced-database.txt | 13 + source/sdk/telemetry.txt | 14 + source/sdk/{ => temp}/cpp.txt | 0 .../cpp/app-services/call-a-function.txt | 0 .../cpp/app-services/connect-to-app.txt | 0 .../{ => temp}/cpp/application-services.txt | 0 source/sdk/{ => temp}/cpp/crud.txt | 0 source/sdk/{ => temp}/cpp/crud/create.txt | 0 source/sdk/{ => temp}/cpp/crud/delete.txt | 0 .../sdk/{ => temp}/cpp/crud/filter-data.txt | 0 source/sdk/{ => temp}/cpp/crud/read.txt | 0 source/sdk/{ => temp}/cpp/crud/threading.txt | 0 source/sdk/{ => temp}/cpp/crud/update.txt | 0 source/sdk/{ => temp}/cpp/facets.toml | 0 source/sdk/{ => temp}/cpp/install.txt | 0 source/sdk/{ => temp}/cpp/logging.txt | 0 source/sdk/{ => temp}/cpp/manage-users.txt | 0 source/sdk/{ => temp}/cpp/model-data.txt | 0 .../cpp/model-data/object-models.txt | 0 .../cpp/model-data/relationships.txt | 0 .../cpp/model-data/supported-types.txt | 0 source/sdk/{ => temp}/cpp/quick-start.txt | 0 .../sdk/{ => temp}/cpp/react-to-changes.txt | 0 source/sdk/{ => temp}/cpp/realm-files.txt | 0 .../cpp/realm-files/compact-realm.txt | 0 .../configure-and-open-a-realm.txt | 0 .../cpp/realm-files/encrypt-a-realm.txt | 0 source/sdk/{ => temp}/cpp/sync.txt | 0 .../cpp/sync/handle-sync-errors.txt | 0 source/sdk/{ => temp}/cpp/sync/log-level.txt | 0 .../cpp/sync/manage-sync-session.txt | 0 .../cpp/sync/stream-data-to-atlas.txt | 0 .../cpp/sync/sync-subscriptions.txt | 0 .../cpp/sync/write-to-synced-realm.txt | 0 source/sdk/{ => temp}/cpp/telemetry.txt | 0 .../cpp/users/authenticate-users.txt | 0 .../{ => temp}/cpp/users/custom-user-data.txt | 0 .../cpp/users/manage-email-password-users.txt | 0 source/sdk/{ => temp}/dotnet.txt | 0 .../dotnet/app-services/call-a-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../app-services/manage-user-api-keys.txt | 0 .../app-services/mongodb-remote-access.txt | 0 .../dotnet/application-services.txt | 0 .../sdk/{ => temp}/dotnet/async-console.txt | 0 .../sdk/{ => temp}/dotnet/compatibility.txt | 0 source/sdk/{ => temp}/dotnet/crud.txt | 0 source/sdk/{ => temp}/dotnet/crud/create.txt | 0 source/sdk/{ => temp}/dotnet/crud/delete.txt | 0 source/sdk/{ => temp}/dotnet/crud/filter.txt | 0 source/sdk/{ => temp}/dotnet/crud/read.txt | 0 .../sdk/{ => temp}/dotnet/crud/threading.txt | 0 source/sdk/{ => temp}/dotnet/crud/update.txt | 0 .../dotnet/crud/write-transactions.txt | 0 source/sdk/{ => temp}/dotnet/facets.toml | 0 source/sdk/{ => temp}/dotnet/install.txt | 0 source/sdk/{ => temp}/dotnet/logging.txt | 0 .../dotnet/manage-users/authenticate.txt | 0 .../manage-users/create-and-delete-users.txt | 0 .../dotnet/manage-users/custom-user-data.txt | 0 .../manage-users/link-user-identities.txt | 0 .../manage-email-password-users.txt | 0 .../manage-users/multi-user-applications.txt | 0 .../dotnet/manage-users/user-metadata.txt | 0 source/sdk/{ => temp}/dotnet/model-data.txt | 0 .../model-data/change-an-object-model.txt | 0 .../dotnet/model-data/data-binding.txt | 0 .../dotnet/model-data/data-types.txt | 0 .../model-data/data-types/collections.txt | 0 .../model-data/data-types/dictionaries.txt | 0 .../data-types/embedded-objects.txt | 0 .../model-data/data-types/field-types.txt | 0 .../model-data/data-types/geospatials.txt | 0 .../dotnet/model-data/data-types/lists.txt | 0 .../model-data/data-types/realm-integer.txt | 0 .../model-data/data-types/realm-value.txt | 0 .../dotnet/model-data/data-types/sets.txt | 0 .../dotnet/model-data/define-object-model.txt | 0 .../dotnet/model-data/manual-schema.txt | 0 .../model-data/object-models-and-schemas.txt | 0 .../dotnet/model-data/relationships.txt | 0 source/sdk/{ => temp}/dotnet/quick-start.txt | 0 .../{ => temp}/dotnet/react-to-changes.txt | 0 source/sdk/{ => temp}/dotnet/realm-files.txt | 0 .../dotnet/realm-files/bundle-a-realm.txt | 0 .../dotnet/realm-files/compact-realm.txt | 0 .../dotnet/realm-files/delete-a-realm.txt | 0 .../dotnet/realm-files/encrypt-a-realm.txt | 0 .../{ => temp}/dotnet/realm-files/realms.txt | 0 source/sdk/{ => temp}/dotnet/sync.txt | 0 .../dotnet/sync/add-sync-to-app.txt | 0 .../dotnet/sync/asymmetric-sync.txt | 0 .../{ => temp}/dotnet/sync/client-reset.txt | 0 .../configure-and-open-a-synced-realm.txt | 0 .../{ => temp}/dotnet/sync/convert-realm.txt | 0 .../{ => temp}/dotnet/sync/flexible-sync.txt | 0 .../dotnet/sync/handle-sync-errors.txt | 0 .../dotnet/sync/partition-based-sync.txt | 0 .../{ => temp}/dotnet/sync/sync-progress.txt | 0 .../{ => temp}/dotnet/sync/sync-session.txt | 0 .../dotnet/sync/write-to-synced-realm.txt | 0 source/sdk/{ => temp}/dotnet/telemetry.txt | 0 .../sdk/{ => temp}/dotnet/troubleshooting.txt | 0 source/sdk/{ => temp}/dotnet/unity.txt | 0 .../sdk/{ => temp}/dotnet/work-with-users.txt | 0 source/sdk/{ => temp}/flutter.txt | 0 .../sdk/{ => temp}/flutter/app-services.txt | 0 .../flutter/app-services/call-function.txt | 0 .../flutter/app-services/connect-to-app.txt | 0 .../flutter/app-services/graphql-api.txt | 0 source/sdk/{ => temp}/flutter/crud.txt | 0 source/sdk/{ => temp}/flutter/crud/create.txt | 0 source/sdk/{ => temp}/flutter/crud/delete.txt | 0 source/sdk/{ => temp}/flutter/crud/read.txt | 0 source/sdk/{ => temp}/flutter/crud/update.txt | 0 source/sdk/{ => temp}/flutter/facets.toml | 0 source/sdk/{ => temp}/flutter/install.txt | 0 source/sdk/{ => temp}/flutter/logging.txt | 0 source/sdk/{ => temp}/flutter/quick-start.txt | 0 .../sdk/{ => temp}/flutter/realm-database.txt | 0 .../realm-database/configure-and-open.txt | 0 .../flutter/realm-database/freeze.txt | 0 .../flutter/realm-database/model-data.txt | 0 .../realm-database/model-data/data-types.txt | 0 .../model-data/define-realm-object-schema.txt | 0 .../realm-database/model-data/geospatial.txt | 0 .../model-data/property-annotations.txt | 0 .../model-data/relationships.txt | 0 .../model-data/update-realm-object-schema.txt | 0 .../realm-database/react-to-changes.txt | 0 .../flutter/realm-database/realm-files.txt | 0 .../realm-database/realm-files/bundle.txt | 0 .../realm-database/realm-files/compact.txt | 0 .../realm-database/realm-files/delete.txt | 0 .../realm-database/realm-files/encrypt.txt | 0 source/sdk/{ => temp}/flutter/sync.txt | 0 .../flutter/sync/add-sync-to-app.txt | 0 .../flutter/sync/handle-sync-errors.txt | 0 .../sdk/{ => temp}/flutter/sync/log-level.txt | 0 .../flutter/sync/manage-sync-session.txt | 0 .../sync/manage-sync-subscriptions.txt | 0 .../flutter/sync/open-synced-realm.txt | 0 .../flutter/sync/stream-data-to-atlas.txt | 0 .../flutter/sync/sync-multiple-processes.txt | 0 .../flutter/sync/write-to-synced-realm.txt | 0 source/sdk/{ => temp}/flutter/telemetry.txt | 0 .../sdk/{ => temp}/flutter/test-and-debug.txt | 0 .../{ => temp}/flutter/troubleshooting.txt | 0 .../sdk/{ => temp}/flutter/upgrade-to-v2.txt | 0 source/sdk/{ => temp}/flutter/users.txt | 0 .../{ => temp}/flutter/users/access-token.txt | 0 .../{ => temp}/flutter/users/authenticate.txt | 0 .../flutter/users/custom-user-data.txt | 0 .../{ => temp}/flutter/users/delete-user.txt | 0 .../flutter/users/email-password-users.txt | 0 .../flutter/users/link-user-identities.txt | 0 .../flutter/users/multiple-users.txt | 0 .../flutter/users/user-metadata.txt | 0 source/sdk/{ => temp}/java.txt | 0 source/sdk/{ => temp}/java/adapters.txt | 0 source/sdk/{ => temp}/java/api.txt | 0 source/sdk/{ => temp}/java/api/index.txt | 0 source/sdk/{ => temp}/java/api/io.txt | 0 source/sdk/{ => temp}/java/api/io/realm.txt | 0 .../sdk/{ => temp}/java/api/io/realm/Case.txt | 0 .../java/api/io/realm/CollectionUtils.txt | 0 .../api/io/realm/CompactOnLaunchCallback.txt | 0 .../realm/DefaultCompactOnLaunchCallback.txt | 0 .../java/api/io/realm/DynamicRealm.txt | 0 .../api/io/realm/DynamicRealm/Callback.txt | 0 .../api/io/realm/DynamicRealm/Transaction.txt | 0 .../DynamicRealm/Transaction/Callback.txt | 0 .../DynamicRealm/Transaction/OnError.txt | 0 .../DynamicRealm/Transaction/OnSuccess.txt | 0 .../java/api/io/realm/DynamicRealmObject.txt | 0 .../java/api/io/realm/FieldAttribute.txt | 0 .../java/api/io/realm/FrozenPendingRow.txt | 0 .../java/api/io/realm/ImportFlag.txt | 0 .../java/api/io/realm/MapChangeListener.txt | 0 .../java/api/io/realm/MapChangeSet.txt | 0 .../java/api/io/realm/MutableRealmInteger.txt | 0 .../java/api/io/realm/ObjectChangeSet.txt | 0 .../io/realm/OrderedCollectionChangeSet.txt | 0 .../OrderedCollectionChangeSet/Range.txt | 0 .../OrderedCollectionChangeSet/State.txt | 0 .../api/io/realm/OrderedRealmCollection.txt | 0 .../OrderedRealmCollectionChangeListener.txt | 0 .../realm/OrderedRealmCollectionSnapshot.txt | 0 .../java/api/io/realm/ProxyState.txt | 0 .../{ => temp}/java/api/io/realm/Realm.txt | 0 .../java/api/io/realm/Realm/Callback.txt | 0 .../java/api/io/realm/Realm/Transaction.txt | 0 .../io/realm/Realm/Transaction/Callback.txt | 0 .../io/realm/Realm/Transaction/OnError.txt | 0 .../io/realm/Realm/Transaction/OnSuccess.txt | 0 .../{ => temp}/java/api/io/realm/RealmAny.txt | 0 .../java/api/io/realm/RealmAny/Type.txt | 0 .../io/realm/RealmAnyNativeFunctionsImpl.txt | 0 .../java/api/io/realm/RealmAnyOperator.txt | 0 .../java/api/io/realm/RealmAsyncTask.txt | 0 .../java/api/io/realm/RealmChangeListener.txt | 0 .../java/api/io/realm/RealmCollection.txt | 0 .../java/api/io/realm/RealmConfiguration.txt | 0 .../io/realm/RealmConfiguration/Builder.txt | 0 .../java/api/io/realm/RealmDictionary.txt | 0 .../java/api/io/realm/RealmFieldType.txt | 0 .../java/api/io/realm/RealmList.txt | 0 .../{ => temp}/java/api/io/realm/RealmMap.txt | 0 .../java/api/io/realm/RealmMigration.txt | 0 .../java/api/io/realm/RealmModel.txt | 0 .../java/api/io/realm/RealmObject.txt | 0 .../io/realm/RealmObjectChangeListener.txt | 0 .../java/api/io/realm/RealmObjectSchema.txt | 0 .../io/realm/RealmObjectSchema/Function.txt | 0 .../java/api/io/realm/RealmQuery.txt | 0 .../java/api/io/realm/RealmResults.txt | 0 .../java/api/io/realm/RealmSchema.txt | 0 .../{ => temp}/java/api/io/realm/RealmSet.txt | 0 .../java/api/io/realm/SetChangeListener.txt | 0 .../java/api/io/realm/SetChangeSet.txt | 0 .../sdk/{ => temp}/java/api/io/realm/Sort.txt | 0 .../java/api/io/realm/annotations.txt | 0 .../java/api/io/realm/annotations/Beta.txt | 0 .../java/api/io/realm/annotations/Ignore.txt | 0 .../java/api/io/realm/annotations/Index.txt | 0 .../io/realm/annotations/LinkingObjects.txt | 0 .../api/io/realm/annotations/PrimaryKey.txt | 0 .../api/io/realm/annotations/RealmClass.txt | 0 .../api/io/realm/annotations/RealmField.txt | 0 .../api/io/realm/annotations/RealmModule.txt | 0 .../realm/annotations/RealmNamingPolicy.txt | 0 .../api/io/realm/annotations/Required.txt | 0 .../java/api/io/realm/coroutines.txt | 0 .../api/io/realm/coroutines/FlowFactory.txt | 0 .../io/realm/coroutines/RealmFlowFactory.txt | 0 .../java/api/io/realm/exceptions.txt | 0 .../DownloadingRealmInterruptedException.txt | 0 .../api/io/realm/exceptions/RealmError.txt | 0 .../io/realm/exceptions/RealmException.txt | 0 .../realm/exceptions/RealmFileException.txt | 0 .../exceptions/RealmFileException/Kind.txt | 0 .../RealmMigrationNeededException.txt | 0 .../RealmPrimaryKeyConstraintException.txt | 0 .../{ => temp}/java/api/io/realm/gradle.txt | 0 .../io/realm/gradle/RealmPluginExtension.txt | 0 .../PropertyChangedListener.txt | 0 .../sdk/{ => temp}/java/api/io/realm/log.txt | 0 .../java/api/io/realm/log/LogLevel.txt | 0 .../java/api/io/realm/log/RealmLog.txt | 0 .../java/api/io/realm/log/RealmLogger.txt | 0 .../{ => temp}/java/api/io/realm/mongodb.txt | 0 .../java/api/io/realm/mongodb/App.txt | 0 .../api/io/realm/mongodb/App/Callback.txt | 0 .../java/api/io/realm/mongodb/App/Result.txt | 0 .../api/io/realm/mongodb/AppConfiguration.txt | 0 .../mongodb/AppConfiguration/Builder.txt | 0 .../api/io/realm/mongodb/AppException.txt | 0 .../realm/mongodb/AuthenticationListener.txt | 0 .../java/api/io/realm/mongodb/Credentials.txt | 0 .../io/realm/mongodb/Credentials/Provider.txt | 0 .../java/api/io/realm/mongodb/ErrorCode.txt | 0 .../io/realm/mongodb/ErrorCode/Category.txt | 0 .../api/io/realm/mongodb/ErrorCode/Type.txt | 0 .../mongodb/RealmEventStreamAsyncTask.txt | 0 .../io/realm/mongodb/RealmEventStreamTask.txt | 0 .../api/io/realm/mongodb/RealmResultTask.txt | 0 .../java/api/io/realm/mongodb/User.txt | 0 .../java/api/io/realm/mongodb/User/State.txt | 0 .../api/io/realm/mongodb/UserIdentity.txt | 0 .../java/api/io/realm/mongodb/UserProfile.txt | 0 .../java/api/io/realm/mongodb/auth.txt | 0 .../java/api/io/realm/mongodb/auth/ApiKey.txt | 0 .../api/io/realm/mongodb/auth/ApiKeyAuth.txt | 0 .../realm/mongodb/auth/EmailPasswordAuth.txt | 0 .../io/realm/mongodb/auth/GoogleAuthType.txt | 0 .../java/api/io/realm/mongodb/functions.txt | 0 .../io/realm/mongodb/functions/Functions.txt | 0 .../api/io/realm/mongodb/log/obfuscator.txt | 0 .../log/obfuscator/HttpLogObfuscator.txt | 0 .../java/api/io/realm/mongodb/mongo.txt | 0 .../io/realm/mongodb/mongo/MongoClient.txt | 0 .../realm/mongodb/mongo/MongoCollection.txt | 0 .../io/realm/mongodb/mongo/MongoDatabase.txt | 0 .../io/realm/mongodb/mongo/MongoNamespace.txt | 0 .../api/io/realm/mongodb/mongo/events.txt | 0 .../mongodb/mongo/events/BaseChangeEvent.txt | 0 .../events/BaseChangeEvent/OperationType.txt | 0 .../mongo/events/UpdateDescription.txt | 0 .../api/io/realm/mongodb/mongo/iterable.txt | 0 .../mongo/iterable/AggregateIterable.txt | 0 .../mongodb/mongo/iterable/FindIterable.txt | 0 .../mongodb/mongo/iterable/MongoCursor.txt | 0 .../mongodb/mongo/iterable/MongoIterable.txt | 0 .../api/io/realm/mongodb/mongo/options.txt | 0 .../mongodb/mongo/options/CountOptions.txt | 0 .../mongo/options/FindOneAndModifyOptions.txt | 0 .../mongodb/mongo/options/FindOptions.txt | 0 .../mongo/options/InsertManyResult.txt | 0 .../mongodb/mongo/options/UpdateOptions.txt | 0 .../api/io/realm/mongodb/mongo/result.txt | 0 .../mongodb/mongo/result/DeleteResult.txt | 0 .../mongodb/mongo/result/InsertOneResult.txt | 0 .../mongodb/mongo/result/UpdateResult.txt | 0 .../java/api/io/realm/mongodb/push.txt | 0 .../java/api/io/realm/mongodb/push/Push.txt | 0 .../java/api/io/realm/mongodb/sync.txt | 0 .../mongodb/sync/ClientResetRequiredError.txt | 0 .../realm/mongodb/sync/ConnectionListener.txt | 0 .../io/realm/mongodb/sync/ConnectionState.txt | 0 .../sync/DiscardUnsyncedChangesStrategy.txt | 0 ...ManuallyRecoverUnsyncedChangesStrategy.txt | 0 .../mongodb/sync/MutableSubscriptionSet.txt | 0 .../api/io/realm/mongodb/sync/Progress.txt | 0 .../realm/mongodb/sync/ProgressListener.txt | 0 .../io/realm/mongodb/sync/ProgressMode.txt | 0 .../io/realm/mongodb/sync/Subscription.txt | 0 .../io/realm/mongodb/sync/SubscriptionSet.txt | 0 .../mongodb/sync/SubscriptionSet/State.txt | 0 .../SubscriptionSet/StateChangeCallback.txt | 0 .../SubscriptionSet/UpdateAsyncCallback.txt | 0 .../sync/SubscriptionSet/UpdateCallback.txt | 0 .../java/api/io/realm/mongodb/sync/Sync.txt | 0 .../api/io/realm/mongodb/sync/Sync/Debug.txt | 0 .../mongodb/sync/SyncClientResetStrategy.txt | 0 .../realm/mongodb/sync/SyncConfiguration.txt | 0 .../sync/SyncConfiguration/Builder.txt | 0 .../InitialFlexibleSyncSubscriptions.txt | 0 .../api/io/realm/mongodb/sync/SyncSession.txt | 0 .../sync/SyncSession/ClientResetHandler.txt | 0 .../mongodb/sync/SyncSession/ErrorHandler.txt | 0 .../realm/mongodb/sync/SyncSession/State.txt | 0 .../sdk/{ => temp}/java/api/io/realm/rx.txt | 0 .../java/api/io/realm/rx/CollectionChange.txt | 0 .../java/api/io/realm/rx/ObjectChange.txt | 0 .../io/realm/rx/RealmObservableFactory.txt | 0 .../api/io/realm/rx/RxObservableFactory.txt | 0 source/sdk/{ => temp}/java/app-services.txt | 0 .../java/app-services/call-a-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../app-services/mongodb-remote-access.txt | 0 source/sdk/{ => temp}/java/async-api.txt | 0 source/sdk/{ => temp}/java/crud.txt | 0 source/sdk/{ => temp}/java/crud/create.txt | 0 source/sdk/{ => temp}/java/crud/delete.txt | 0 .../sdk/{ => temp}/java/crud/filter-data.txt | 0 source/sdk/{ => temp}/java/crud/read.txt | 0 source/sdk/{ => temp}/java/crud/threading.txt | 0 source/sdk/{ => temp}/java/crud/update.txt | 0 source/sdk/{ => temp}/java/facets.toml | 0 source/sdk/{ => temp}/java/install.txt | 0 source/sdk/{ => temp}/java/manage-users.txt | 0 source/sdk/{ => temp}/java/migrate/index.txt | 0 source/sdk/{ => temp}/java/model-data.txt | 0 .../{ => temp}/java/model-data/data-types.txt | 0 .../model-data/data-types/collections.txt | 0 .../java/model-data/data-types/counters.txt | 0 .../data-types/embedded-objects.txt | 0 .../java/model-data/data-types/enums.txt | 0 .../model-data/data-types/field-types.txt | 0 .../java/model-data/data-types/realmany.txt | 0 .../model-data/data-types/realmdictionary.txt | 0 .../java/model-data/data-types/realmset.txt | 0 .../define-a-realm-object-model.txt | 0 .../model-data/modify-an-object-schema.txt | 0 .../java/model-data/relationships.txt | 0 source/sdk/{ => temp}/java/quick-starts.txt | 0 .../{ => temp}/java/quick-starts/livedata.txt | 0 .../java/quick-starts/quick-start-local.txt | 0 .../java/quick-starts/quick-start-sync.txt | 0 .../sdk/{ => temp}/java/react-to-changes.txt | 0 source/sdk/{ => temp}/java/realm-files.txt | 0 .../java/realm-files/bundle-a-realm.txt | 0 .../java/realm-files/encryption.txt | 0 .../realm-files/open-and-close-a-realm.txt | 0 source/sdk/{ => temp}/java/sync.txt | 0 .../{ => temp}/java/sync/background-sync.txt | 0 .../configure-and-open-a-synced-realm.txt | 0 .../{ => temp}/java/sync/flexible-sync.txt | 0 .../java/sync/handle-sync-errors.txt | 0 .../manual-client-reset-data-recovery.txt | 0 .../java/sync/network-connection.txt | 0 .../java/sync/partition-based-sync.txt | 0 .../java/sync/pause-resume-sync.txt | 0 .../java/sync/reset-a-client-realm.txt | 0 .../{ => temp}/java/sync/sync-progress.txt | 0 source/sdk/{ => temp}/java/telemetry.txt | 0 source/sdk/{ => temp}/java/test-and-debug.txt | 0 .../java/test-and-debug/debugging.txt | 0 .../java/test-and-debug/log-realm-events.txt | 0 .../java/test-and-debug/testing.txt | 0 .../java/test-and-debug/troubleshooting.txt | 0 .../sdk/{ => temp}/java/troubleshooting.txt | 0 .../java/users/authenticate-users.txt | 0 .../java/users/create-delete-users.txt | 0 .../java/users/custom-user-data.txt | 0 .../java/users/email-password-users.txt | 0 .../java/users/link-user-identities.txt | 0 .../java/users/manage-user-api-keys.txt | 0 .../java/users/multi-user-applications.txt | 0 source/sdk/{ => temp}/kotlin.txt | 0 source/sdk/{ => temp}/kotlin/app-services.txt | 0 .../kotlin/app-services/call-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../kotlin/app-services/handle-app-errors.txt | 0 source/sdk/{ => temp}/kotlin/facets.toml | 0 source/sdk/{ => temp}/kotlin/install.txt | 0 source/sdk/{ => temp}/kotlin/logging.txt | 0 .../migrate-from-java-sdk-to-kotlin-sdk.txt | 0 source/sdk/{ => temp}/kotlin/quick-start.txt | 0 .../sdk/{ => temp}/kotlin/realm-database.txt | 0 .../{ => temp}/kotlin/realm-database/crud.txt | 0 .../kotlin/realm-database/crud/create.txt | 0 .../kotlin/realm-database/crud/delete.txt | 0 .../kotlin/realm-database/crud/read.txt | 0 .../kotlin/realm-database/crud/update.txt | 0 .../kotlin/realm-database/errors.txt | 0 .../kotlin/realm-database/frozen-arch.txt | 0 .../realm-database/open-and-close-a-realm.txt | 0 .../realm-database/react-to-changes.txt | 0 .../kotlin/realm-database/realm-files.txt | 0 .../realm-files/bundle-a-realm.txt | 0 .../realm-files/compact-realm.txt | 0 .../realm-files/delete-a-realm.txt | 0 .../realm-files/encrypt-a-realm.txt | 0 .../kotlin/realm-database/schemas.txt | 0 .../schemas/change-an-object-model.txt | 0 .../schemas/define-realm-object-model.txt | 0 .../realm-database/schemas/geospatials.txt | 0 .../schemas/model-data-device-sync.txt | 0 .../schemas/property-annotations.txt | 0 .../realm-database/schemas/relationships.txt | 0 .../schemas/supported-types.txt | 0 .../kotlin/realm-database/serialization.txt | 0 source/sdk/{ => temp}/kotlin/sync.txt | 0 .../kotlin/sync/add-sync-to-app.txt | 0 .../kotlin/sync/background-sync.txt | 0 .../kotlin/sync/handle-sync-errors.txt | 0 .../sdk/{ => temp}/kotlin/sync/log-level.txt | 0 .../kotlin/sync/manage-sync-session.txt | 0 .../kotlin/sync/open-a-synced-realm.txt | 0 .../kotlin/sync/partition-based-sync.txt | 0 .../kotlin/sync/stream-data-to-atlas.txt | 0 .../sdk/{ => temp}/kotlin/sync/subscribe.txt | 0 .../kotlin/sync/write-to-synced-realm.txt | 0 source/sdk/{ => temp}/kotlin/telemetry.txt | 0 .../sdk/{ => temp}/kotlin/troubleshooting.txt | 0 source/sdk/{ => temp}/kotlin/users.txt | 0 .../kotlin/users/authenticate-users.txt | 0 .../kotlin/users/custom-user-data.txt | 0 .../{ => temp}/kotlin/users/delete-users.txt | 0 .../kotlin/users/link-credentials.txt | 0 .../users/manage-email-password-users.txt | 0 .../kotlin/users/manage-user-api-keys.txt | 0 .../kotlin/users/multi-user-applications.txt | 0 .../{ => temp}/kotlin/users/user-metadata.txt | 0 source/sdk/{ => temp}/node.txt | 0 source/sdk/{ => temp}/node/app-services.txt | 0 .../node/app-services/call-a-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../node/app-services/query-mongodb.txt | 0 source/sdk/{ => temp}/node/crud.txt | 0 source/sdk/{ => temp}/node/crud/create.txt | 0 source/sdk/{ => temp}/node/crud/delete.txt | 0 .../sdk/{ => temp}/node/crud/query-data.txt | 0 source/sdk/{ => temp}/node/crud/read.txt | 0 source/sdk/{ => temp}/node/crud/update.txt | 0 source/sdk/{ => temp}/node/facets.toml | 0 source/sdk/{ => temp}/node/install.txt | 0 source/sdk/{ => temp}/node/integrations.txt | 0 .../node/integrations/electron-cra.txt | 0 .../{ => temp}/node/integrations/electron.txt | 0 source/sdk/{ => temp}/node/logging.txt | 0 source/sdk/{ => temp}/node/manage-users.txt | 0 source/sdk/{ => temp}/node/migrate/index.txt | 0 source/sdk/{ => temp}/node/model-data.txt | 0 .../{ => temp}/node/model-data/data-types.txt | 0 .../model-data/data-types/collections.txt | 0 .../model-data/data-types/dictionaries.txt | 0 .../data-types/embedded-objects.txt | 0 .../model-data/data-types/field-types.txt | 0 .../node/model-data/data-types/geospatial.txt | 0 .../node/model-data/data-types/mixed.txt | 0 .../node/model-data/data-types/sets.txt | 0 .../node/model-data/data-types/uuid.txt | 0 .../define-a-realm-object-model.txt | 0 .../model-data/modify-an-object-schema.txt | 0 .../relationships-and-embedded-objects.txt | 0 source/sdk/{ => temp}/node/quick-start.txt | 0 .../sdk/{ => temp}/node/react-to-changes.txt | 0 source/sdk/{ => temp}/node/realm-files.txt | 0 .../{ => temp}/node/realm-files/bundle.txt | 0 .../node/realm-files/compact-realm.txt | 0 .../{ => temp}/node/realm-files/encrypt.txt | 0 .../realm-files/open-and-close-a-realm.txt | 0 source/sdk/{ => temp}/node/sync.txt | 0 .../node/sync/client-reset-data-recovery.txt | 0 .../configure-and-open-a-synced-realm.txt | 0 .../{ => temp}/node/sync/flexible-sync.txt | 0 .../node/sync/handle-sync-errors.txt | 0 source/sdk/{ => temp}/node/sync/log-level.txt | 0 .../node/sync/manage-sync-session.txt | 0 .../node/sync/partition-based-sync.txt | 0 .../node/sync/stream-data-to-atlas.txt | 0 source/sdk/{ => temp}/node/telemetry.txt | 0 .../node/users/access-custom-user-data.txt | 0 .../node/users/authenticate-users.txt | 0 .../node/users/create-delete-users.txt | 0 .../{ => temp}/node/users/link-identities.txt | 0 .../users/manage-email-password-users.txt | 0 .../node/users/manage-user-api-keys.txt | 0 .../node/users/multi-user-applications.txt | 0 .../{ => temp}/node/users/user-metadata.txt | 0 source/sdk/{ => temp}/react-native.txt | 0 .../{ => temp}/react-native/api-reference.txt | 0 .../api-reference/app-provider.txt | 0 .../api-reference/realm-provider.txt | 0 .../api-reference/user-provider.txt | 0 .../{ => temp}/react-native/app-services.txt | 0 .../app-services/call-a-function.txt | 0 .../connect-to-app-services-app.txt | 0 .../app-services/query-mongodb.txt | 0 .../react-native/bootstrap-with-expo.txt | 0 source/sdk/{ => temp}/react-native/crud.txt | 0 .../{ => temp}/react-native/crud/create.txt | 0 .../{ => temp}/react-native/crud/delete.txt | 0 .../react-native/crud/query-data.txt | 0 .../sdk/{ => temp}/react-native/crud/read.txt | 0 .../{ => temp}/react-native/crud/update.txt | 0 .../sdk/{ => temp}/react-native/facets.toml | 0 .../sdk/{ => temp}/react-native/install.txt | 0 .../{ => temp}/react-native/integrations.txt | 0 .../integrations/mac-catalyst.txt | 0 .../sdk/{ => temp}/react-native/logging.txt | 0 .../{ => temp}/react-native/manage-users.txt | 0 .../manage-users/authenticate-users.txt | 0 .../manage-users/create-and-delete-users.txt | 0 .../manage-users/custom-user-data.txt | 0 .../manage-users/link-user-identities.txt | 0 .../manage-email-password-users.txt | 0 .../manage-users/manage-user-api-keys.txt | 0 .../manage-users/multi-user-applications.txt | 0 .../{ => temp}/react-native/migrate/index.txt | 0 .../{ => temp}/react-native/model-data.txt | 0 .../model-data/change-an-object-model.txt | 0 .../react-native/model-data/data-types.txt | 0 .../model-data/data-types/collections.txt | 0 .../model-data/data-types/dictionaries.txt | 0 .../data-types/embedded-objects.txt | 0 .../model-data/data-types/geospatial.txt | 0 .../model-data/data-types/mixed.txt | 0 .../model-data/data-types/property-types.txt | 0 .../model-data/data-types/sets.txt | 0 .../model-data/data-types/uuid.txt | 0 .../define-a-realm-object-model.txt | 0 .../relationships-and-embedded-objects.txt | 0 .../{ => temp}/react-native/quick-start.txt | 0 .../react-native/react-to-changes.txt | 0 .../{ => temp}/react-native/realm-files.txt | 0 .../react-native/realm-files/bundle.txt | 0 .../realm-files/compact-realm.txt | 0 .../realm-files/configure-a-realm.txt | 0 .../react-native/realm-files/encrypt.txt | 0 .../sdk/{ => temp}/react-native/sync-data.txt | 0 .../sync-data/client-reset-data-recovery.txt | 0 .../sync-data/configure-a-synced-realm.txt | 0 .../react-native/sync-data/flexible-sync.txt | 0 .../sync-data/handle-sync-errors.txt | 0 .../react-native/sync-data/log-level.txt | 0 .../sync-data/manage-sync-session.txt | 0 .../sync-data/partition-based-sync.txt | 0 .../sync-data/stream-data-to-atlas.txt | 0 .../sdk/{ => temp}/react-native/telemetry.txt | 0 .../react-native/test-and-debug.txt | 0 .../react-native/test-and-debug/testing.txt | 0 .../test-and-debug/troubleshooting.txt | 0 source/sdk/{ => temp}/swift.txt | 0 source/sdk/{ => temp}/swift/api-reference.txt | 0 .../swift/app-services/call-a-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../app-services/mongodb-remote-access.txt | 0 .../{ => temp}/swift/application-services.txt | 0 source/sdk/{ => temp}/swift/crud.txt | 0 source/sdk/{ => temp}/swift/crud/create.txt | 0 source/sdk/{ => temp}/swift/crud/delete.txt | 0 .../sdk/{ => temp}/swift/crud/filter-data.txt | 0 source/sdk/{ => temp}/swift/crud/read.txt | 0 .../sdk/{ => temp}/swift/crud/threading.txt | 0 source/sdk/{ => temp}/swift/crud/update.txt | 0 source/sdk/{ => temp}/swift/facets.toml | 0 source/sdk/{ => temp}/swift/install.txt | 0 source/sdk/{ => temp}/swift/logging.txt | 0 source/sdk/{ => temp}/swift/model-data.txt | 0 .../model-data/change-an-object-model.txt | 0 .../model-data/model-data-device-sync.txt | 0 .../swift/model-data/object-models.txt | 0 .../swift/model-data/relationships.txt | 0 .../swift/model-data/supported-types.txt | 0 source/sdk/{ => temp}/swift/quick-start.txt | 0 .../sdk/{ => temp}/swift/react-to-changes.txt | 0 source/sdk/{ => temp}/swift/realm-files.txt | 0 .../swift/realm-files/bundle-a-realm.txt | 0 .../swift/realm-files/compacting.txt | 0 .../configure-and-open-a-realm.txt | 0 .../swift/realm-files/delete-a-realm.txt | 0 .../swift/realm-files/encrypt-a-realm.txt | 0 .../sdk/{ => temp}/swift/realm-files/tvos.txt | 0 .../{ => temp}/swift/swift-concurrency.txt | 0 .../sdk/{ => temp}/swift/swiftui-tutorial.txt | 0 source/sdk/{ => temp}/swift/swiftui.txt | 0 .../swift/swiftui/background-sync.txt | 0 .../swiftui/configure-and-open-realm.txt | 0 .../{ => temp}/swift/swiftui/filter-data.txt | 0 .../{ => temp}/swift/swiftui/model-data.txt | 0 .../model-data/change-an-object-model.txt | 0 .../define-a-realm-object-model.txt | 0 .../swiftui/pass-realm-data-between-views.txt | 0 .../swift/swiftui/react-to-changes.txt | 0 .../swift/swiftui/swiftui-previews.txt | 0 source/sdk/{ => temp}/swift/swiftui/write.txt | 0 source/sdk/{ => temp}/swift/sync.txt | 0 .../{ => temp}/swift/sync/add-sync-to-app.txt | 0 .../{ => temp}/swift/sync/background-sync.txt | 0 .../configure-and-open-a-synced-realm.txt | 0 .../{ => temp}/swift/sync/event-library.txt | 0 .../{ => temp}/swift/sync/flexible-sync.txt | 0 .../swift/sync/handle-sync-errors.txt | 0 .../sdk/{ => temp}/swift/sync/log-level.txt | 0 .../swift/sync/partition-based-sync.txt | 0 .../swift/sync/stream-data-to-atlas.txt | 0 .../{ => temp}/swift/sync/sync-session.txt | 0 .../swift/sync/write-to-synced-realm.txt | 0 source/sdk/{ => temp}/swift/telemetry.txt | 0 .../sdk/{ => temp}/swift/test-and-debug.txt | 0 .../swift/use-realm-with-actors.txt | 0 .../swift/users/authenticate-users.txt | 0 .../swift/users/create-and-delete-users.txt | 0 .../swift/users/custom-user-data.txt | 0 .../swift/users/link-user-identities.txt | 0 .../users/manage-email-password-users.txt | 0 .../swift/users/manage-user-api-keys.txt | 0 .../swift/users/multi-user-applications.txt | 0 .../{ => temp}/swift/users/user-metadata.txt | 0 .../sdk/{ => temp}/swift/work-with-users.txt | 0 .../{ => temp}/swift/xcode-playgrounds.txt | 0 source/sdk/users.txt | 35 ++ source/sdk/users/authenticate-users.txt | 13 + source/sdk/users/create-and-delete-users.txt | 11 + source/sdk/users/custom-user-data.txt | 13 + source/sdk/users/link-user-identities.txt | 13 + .../sdk/users/manage-email-password-users.txt | 13 + source/sdk/users/manage-user-api-keys.txt | 13 + source/sdk/users/multi-user-applications.txt | 13 + source/sdk/users/user-metadata.txt | 13 + 706 files changed, 1419 insertions(+), 11 deletions(-) create mode 100644 source/frameworks.txt create mode 100644 source/frameworks/dotnet.txt create mode 100644 source/frameworks/electron.txt create mode 100644 source/frameworks/flutter.txt create mode 100644 source/frameworks/maui.txt create mode 100644 source/frameworks/react-native.txt create mode 100644 source/frameworks/swiftui.txt create mode 100644 source/platforms.txt create mode 100644 source/platforms/android.txt create mode 100644 source/platforms/apple.txt create mode 100644 source/platforms/linux.txt create mode 100644 source/platforms/web.txt create mode 100644 source/platforms/windows.txt create mode 100644 source/sdk/api-reference.txt create mode 100644 source/sdk/atlas.txt create mode 100644 source/sdk/atlas/access-mongodb.txt create mode 100644 source/sdk/atlas/call-function.txt create mode 100644 source/sdk/atlas/connect.txt create mode 100644 source/sdk/crud.txt create mode 100644 source/sdk/crud/create.txt create mode 100644 source/sdk/crud/delete.txt create mode 100644 source/sdk/crud/query-engines.txt create mode 100644 source/sdk/crud/query-engines/filter-data-java-sdk.txt create mode 100644 source/sdk/crud/query-engines/filter-data-linq.txt create mode 100644 source/sdk/crud/query-engines/filter-data-swift-sdk.txt rename source/{ => sdk/crud/query-engines}/realm-query-language.txt (100%) create mode 100644 source/sdk/crud/read.txt create mode 100644 source/sdk/crud/threading.txt create mode 100644 source/sdk/crud/update.txt create mode 100644 source/sdk/files.txt create mode 100644 source/sdk/files/bundle-file.txt create mode 100644 source/sdk/files/configure-and-open.txt create mode 100644 source/sdk/files/delete-file.txt create mode 100644 source/sdk/files/encrypt-file.txt create mode 100644 source/sdk/files/reduce-file-size.txt create mode 100644 source/sdk/logging.txt create mode 100644 source/sdk/model-data.txt create mode 100644 source/sdk/model-data/change-object-model.txt create mode 100644 source/sdk/model-data/model-data-device-sync.txt create mode 100644 source/sdk/model-data/object-models.txt create mode 100644 source/sdk/model-data/relationships.txt create mode 100644 source/sdk/model-data/supported-types.txt create mode 100644 source/sdk/react-to-changes.txt create mode 100644 source/sdk/sync.txt create mode 100644 source/sdk/sync/add-sync-to-app.txt create mode 100644 source/sdk/sync/configure-and-open-synced-database.txt create mode 100644 source/sdk/sync/event-library.txt create mode 100644 source/sdk/sync/handle-sync-errors.txt create mode 100644 source/sdk/sync/manage-sync-sessions.txt create mode 100644 source/sdk/sync/manage-sync-subscriptions.txt create mode 100644 source/sdk/sync/partition-based-sync.txt create mode 100644 source/sdk/sync/stream-data-to-atlas.txt create mode 100644 source/sdk/sync/write-to-synced-database.txt create mode 100644 source/sdk/telemetry.txt rename source/sdk/{ => temp}/cpp.txt (100%) rename source/sdk/{ => temp}/cpp/app-services/call-a-function.txt (100%) rename source/sdk/{ => temp}/cpp/app-services/connect-to-app.txt (100%) rename source/sdk/{ => temp}/cpp/application-services.txt (100%) rename source/sdk/{ => temp}/cpp/crud.txt (100%) rename source/sdk/{ => temp}/cpp/crud/create.txt (100%) rename source/sdk/{ => temp}/cpp/crud/delete.txt (100%) rename source/sdk/{ => temp}/cpp/crud/filter-data.txt (100%) rename source/sdk/{ => temp}/cpp/crud/read.txt (100%) rename source/sdk/{ => temp}/cpp/crud/threading.txt (100%) rename source/sdk/{ => temp}/cpp/crud/update.txt (100%) rename source/sdk/{ => temp}/cpp/facets.toml (100%) rename source/sdk/{ => temp}/cpp/install.txt (100%) rename source/sdk/{ => temp}/cpp/logging.txt (100%) rename source/sdk/{ => temp}/cpp/manage-users.txt (100%) rename source/sdk/{ => temp}/cpp/model-data.txt (100%) rename source/sdk/{ => temp}/cpp/model-data/object-models.txt (100%) rename source/sdk/{ => temp}/cpp/model-data/relationships.txt (100%) rename source/sdk/{ => temp}/cpp/model-data/supported-types.txt (100%) rename source/sdk/{ => temp}/cpp/quick-start.txt (100%) rename source/sdk/{ => temp}/cpp/react-to-changes.txt (100%) rename source/sdk/{ => temp}/cpp/realm-files.txt (100%) rename source/sdk/{ => temp}/cpp/realm-files/compact-realm.txt (100%) rename source/sdk/{ => temp}/cpp/realm-files/configure-and-open-a-realm.txt (100%) rename source/sdk/{ => temp}/cpp/realm-files/encrypt-a-realm.txt (100%) rename source/sdk/{ => temp}/cpp/sync.txt (100%) rename source/sdk/{ => temp}/cpp/sync/handle-sync-errors.txt (100%) rename source/sdk/{ => temp}/cpp/sync/log-level.txt (100%) rename source/sdk/{ => temp}/cpp/sync/manage-sync-session.txt (100%) rename source/sdk/{ => temp}/cpp/sync/stream-data-to-atlas.txt (100%) rename source/sdk/{ => temp}/cpp/sync/sync-subscriptions.txt (100%) rename source/sdk/{ => temp}/cpp/sync/write-to-synced-realm.txt (100%) rename source/sdk/{ => temp}/cpp/telemetry.txt (100%) rename source/sdk/{ => temp}/cpp/users/authenticate-users.txt (100%) rename source/sdk/{ => temp}/cpp/users/custom-user-data.txt (100%) rename source/sdk/{ => temp}/cpp/users/manage-email-password-users.txt (100%) rename source/sdk/{ => temp}/dotnet.txt (100%) rename source/sdk/{ => temp}/dotnet/app-services/call-a-function.txt (100%) rename source/sdk/{ => temp}/dotnet/app-services/connect-to-app-services-backend.txt (100%) rename source/sdk/{ => temp}/dotnet/app-services/manage-user-api-keys.txt (100%) rename source/sdk/{ => temp}/dotnet/app-services/mongodb-remote-access.txt (100%) rename source/sdk/{ => temp}/dotnet/application-services.txt (100%) rename source/sdk/{ => temp}/dotnet/async-console.txt (100%) rename source/sdk/{ => temp}/dotnet/compatibility.txt (100%) rename source/sdk/{ => temp}/dotnet/crud.txt (100%) rename source/sdk/{ => temp}/dotnet/crud/create.txt (100%) rename source/sdk/{ => temp}/dotnet/crud/delete.txt (100%) rename source/sdk/{ => temp}/dotnet/crud/filter.txt (100%) rename source/sdk/{ => temp}/dotnet/crud/read.txt (100%) rename source/sdk/{ => temp}/dotnet/crud/threading.txt (100%) rename source/sdk/{ => temp}/dotnet/crud/update.txt (100%) rename source/sdk/{ => temp}/dotnet/crud/write-transactions.txt (100%) rename source/sdk/{ => temp}/dotnet/facets.toml (100%) rename source/sdk/{ => temp}/dotnet/install.txt (100%) rename source/sdk/{ => temp}/dotnet/logging.txt (100%) rename source/sdk/{ => temp}/dotnet/manage-users/authenticate.txt (100%) rename source/sdk/{ => temp}/dotnet/manage-users/create-and-delete-users.txt (100%) rename source/sdk/{ => temp}/dotnet/manage-users/custom-user-data.txt (100%) rename source/sdk/{ => temp}/dotnet/manage-users/link-user-identities.txt (100%) rename source/sdk/{ => temp}/dotnet/manage-users/manage-email-password-users.txt (100%) rename source/sdk/{ => temp}/dotnet/manage-users/multi-user-applications.txt (100%) rename source/sdk/{ => temp}/dotnet/manage-users/user-metadata.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/change-an-object-model.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-binding.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/collections.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/dictionaries.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/embedded-objects.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/field-types.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/geospatials.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/lists.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/realm-integer.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/realm-value.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/data-types/sets.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/define-object-model.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/manual-schema.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/object-models-and-schemas.txt (100%) rename source/sdk/{ => temp}/dotnet/model-data/relationships.txt (100%) rename source/sdk/{ => temp}/dotnet/quick-start.txt (100%) rename source/sdk/{ => temp}/dotnet/react-to-changes.txt (100%) rename source/sdk/{ => temp}/dotnet/realm-files.txt (100%) rename source/sdk/{ => temp}/dotnet/realm-files/bundle-a-realm.txt (100%) rename source/sdk/{ => temp}/dotnet/realm-files/compact-realm.txt (100%) rename source/sdk/{ => temp}/dotnet/realm-files/delete-a-realm.txt (100%) rename source/sdk/{ => temp}/dotnet/realm-files/encrypt-a-realm.txt (100%) rename source/sdk/{ => temp}/dotnet/realm-files/realms.txt (100%) rename source/sdk/{ => temp}/dotnet/sync.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/add-sync-to-app.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/asymmetric-sync.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/client-reset.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/configure-and-open-a-synced-realm.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/convert-realm.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/flexible-sync.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/handle-sync-errors.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/partition-based-sync.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/sync-progress.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/sync-session.txt (100%) rename source/sdk/{ => temp}/dotnet/sync/write-to-synced-realm.txt (100%) rename source/sdk/{ => temp}/dotnet/telemetry.txt (100%) rename source/sdk/{ => temp}/dotnet/troubleshooting.txt (100%) rename source/sdk/{ => temp}/dotnet/unity.txt (100%) rename source/sdk/{ => temp}/dotnet/work-with-users.txt (100%) rename source/sdk/{ => temp}/flutter.txt (100%) rename source/sdk/{ => temp}/flutter/app-services.txt (100%) rename source/sdk/{ => temp}/flutter/app-services/call-function.txt (100%) rename source/sdk/{ => temp}/flutter/app-services/connect-to-app.txt (100%) rename source/sdk/{ => temp}/flutter/app-services/graphql-api.txt (100%) rename source/sdk/{ => temp}/flutter/crud.txt (100%) rename source/sdk/{ => temp}/flutter/crud/create.txt (100%) rename source/sdk/{ => temp}/flutter/crud/delete.txt (100%) rename source/sdk/{ => temp}/flutter/crud/read.txt (100%) rename source/sdk/{ => temp}/flutter/crud/update.txt (100%) rename source/sdk/{ => temp}/flutter/facets.toml (100%) rename source/sdk/{ => temp}/flutter/install.txt (100%) rename source/sdk/{ => temp}/flutter/logging.txt (100%) rename source/sdk/{ => temp}/flutter/quick-start.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/configure-and-open.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/freeze.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/model-data.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/model-data/data-types.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/model-data/define-realm-object-schema.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/model-data/geospatial.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/model-data/property-annotations.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/model-data/relationships.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/model-data/update-realm-object-schema.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/react-to-changes.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/realm-files.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/realm-files/bundle.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/realm-files/compact.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/realm-files/delete.txt (100%) rename source/sdk/{ => temp}/flutter/realm-database/realm-files/encrypt.txt (100%) rename source/sdk/{ => temp}/flutter/sync.txt (100%) rename source/sdk/{ => temp}/flutter/sync/add-sync-to-app.txt (100%) rename source/sdk/{ => temp}/flutter/sync/handle-sync-errors.txt (100%) rename source/sdk/{ => temp}/flutter/sync/log-level.txt (100%) rename source/sdk/{ => temp}/flutter/sync/manage-sync-session.txt (100%) rename source/sdk/{ => temp}/flutter/sync/manage-sync-subscriptions.txt (100%) rename source/sdk/{ => temp}/flutter/sync/open-synced-realm.txt (100%) rename source/sdk/{ => temp}/flutter/sync/stream-data-to-atlas.txt (100%) rename source/sdk/{ => temp}/flutter/sync/sync-multiple-processes.txt (100%) rename source/sdk/{ => temp}/flutter/sync/write-to-synced-realm.txt (100%) rename source/sdk/{ => temp}/flutter/telemetry.txt (100%) rename source/sdk/{ => temp}/flutter/test-and-debug.txt (100%) rename source/sdk/{ => temp}/flutter/troubleshooting.txt (100%) rename source/sdk/{ => temp}/flutter/upgrade-to-v2.txt (100%) rename source/sdk/{ => temp}/flutter/users.txt (100%) rename source/sdk/{ => temp}/flutter/users/access-token.txt (100%) rename source/sdk/{ => temp}/flutter/users/authenticate.txt (100%) rename source/sdk/{ => temp}/flutter/users/custom-user-data.txt (100%) rename source/sdk/{ => temp}/flutter/users/delete-user.txt (100%) rename source/sdk/{ => temp}/flutter/users/email-password-users.txt (100%) rename source/sdk/{ => temp}/flutter/users/link-user-identities.txt (100%) rename source/sdk/{ => temp}/flutter/users/multiple-users.txt (100%) rename source/sdk/{ => temp}/flutter/users/user-metadata.txt (100%) rename source/sdk/{ => temp}/java.txt (100%) rename source/sdk/{ => temp}/java/adapters.txt (100%) rename source/sdk/{ => temp}/java/api.txt (100%) rename source/sdk/{ => temp}/java/api/index.txt (100%) rename source/sdk/{ => temp}/java/api/io.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/Case.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/CollectionUtils.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/CompactOnLaunchCallback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/DefaultCompactOnLaunchCallback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/DynamicRealm.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/DynamicRealm/Callback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/DynamicRealm/Transaction.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/DynamicRealm/Transaction/Callback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/DynamicRealm/Transaction/OnError.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/DynamicRealmObject.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/FieldAttribute.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/FrozenPendingRow.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/ImportFlag.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/MapChangeListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/MapChangeSet.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/MutableRealmInteger.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/ObjectChangeSet.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/OrderedCollectionChangeSet.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/OrderedCollectionChangeSet/Range.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/OrderedCollectionChangeSet/State.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/OrderedRealmCollection.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/OrderedRealmCollectionChangeListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/OrderedRealmCollectionSnapshot.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/ProxyState.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/Realm.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/Realm/Callback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/Realm/Transaction.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/Realm/Transaction/Callback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/Realm/Transaction/OnError.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/Realm/Transaction/OnSuccess.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmAny.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmAny/Type.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmAnyOperator.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmAsyncTask.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmChangeListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmCollection.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmConfiguration.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmConfiguration/Builder.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmDictionary.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmFieldType.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmList.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmMap.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmMigration.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmModel.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmObject.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmObjectChangeListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmObjectSchema.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmObjectSchema/Function.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmQuery.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmResults.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmSchema.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/RealmSet.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/SetChangeListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/SetChangeSet.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/Sort.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/Beta.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/Ignore.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/Index.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/LinkingObjects.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/PrimaryKey.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/RealmClass.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/RealmField.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/RealmModule.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/RealmNamingPolicy.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/annotations/Required.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/coroutines.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/coroutines/FlowFactory.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/coroutines/RealmFlowFactory.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/exceptions.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/exceptions/RealmError.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/exceptions/RealmException.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/exceptions/RealmFileException.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/exceptions/RealmFileException/Kind.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/exceptions/RealmMigrationNeededException.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/gradle.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/gradle/RealmPluginExtension.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/log.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/log/LogLevel.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/log/RealmLog.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/log/RealmLogger.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/App.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/App/Callback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/App/Result.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/AppConfiguration.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/AppConfiguration/Builder.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/AppException.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/AuthenticationListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/Credentials.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/Credentials/Provider.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/ErrorCode.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/ErrorCode/Category.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/ErrorCode/Type.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/RealmEventStreamTask.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/RealmResultTask.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/User.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/User/State.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/UserIdentity.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/UserProfile.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/auth.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/auth/ApiKey.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/auth/GoogleAuthType.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/functions.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/functions/Functions.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/log/obfuscator.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/MongoClient.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/MongoCollection.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/MongoDatabase.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/MongoNamespace.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/events.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/iterable.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/options.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/options/CountOptions.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/options/FindOptions.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/result.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/push.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/push/Push.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/ConnectionListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/ConnectionState.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/Progress.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/ProgressListener.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/ProgressMode.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/Subscription.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SubscriptionSet.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/Sync.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/Sync/Debug.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SyncConfiguration.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SyncSession.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/mongodb/sync/SyncSession/State.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/rx.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/rx/CollectionChange.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/rx/ObjectChange.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/rx/RealmObservableFactory.txt (100%) rename source/sdk/{ => temp}/java/api/io/realm/rx/RxObservableFactory.txt (100%) rename source/sdk/{ => temp}/java/app-services.txt (100%) rename source/sdk/{ => temp}/java/app-services/call-a-function.txt (100%) rename source/sdk/{ => temp}/java/app-services/connect-to-app-services-backend.txt (100%) rename source/sdk/{ => temp}/java/app-services/mongodb-remote-access.txt (100%) rename source/sdk/{ => temp}/java/async-api.txt (100%) rename source/sdk/{ => temp}/java/crud.txt (100%) rename source/sdk/{ => temp}/java/crud/create.txt (100%) rename source/sdk/{ => temp}/java/crud/delete.txt (100%) rename source/sdk/{ => temp}/java/crud/filter-data.txt (100%) rename source/sdk/{ => temp}/java/crud/read.txt (100%) rename source/sdk/{ => temp}/java/crud/threading.txt (100%) rename source/sdk/{ => temp}/java/crud/update.txt (100%) rename source/sdk/{ => temp}/java/facets.toml (100%) rename source/sdk/{ => temp}/java/install.txt (100%) rename source/sdk/{ => temp}/java/manage-users.txt (100%) rename source/sdk/{ => temp}/java/migrate/index.txt (100%) rename source/sdk/{ => temp}/java/model-data.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types/collections.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types/counters.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types/embedded-objects.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types/enums.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types/field-types.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types/realmany.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types/realmdictionary.txt (100%) rename source/sdk/{ => temp}/java/model-data/data-types/realmset.txt (100%) rename source/sdk/{ => temp}/java/model-data/define-a-realm-object-model.txt (100%) rename source/sdk/{ => temp}/java/model-data/modify-an-object-schema.txt (100%) rename source/sdk/{ => temp}/java/model-data/relationships.txt (100%) rename source/sdk/{ => temp}/java/quick-starts.txt (100%) rename source/sdk/{ => temp}/java/quick-starts/livedata.txt (100%) rename source/sdk/{ => temp}/java/quick-starts/quick-start-local.txt (100%) rename source/sdk/{ => temp}/java/quick-starts/quick-start-sync.txt (100%) rename source/sdk/{ => temp}/java/react-to-changes.txt (100%) rename source/sdk/{ => temp}/java/realm-files.txt (100%) rename source/sdk/{ => temp}/java/realm-files/bundle-a-realm.txt (100%) rename source/sdk/{ => temp}/java/realm-files/encryption.txt (100%) rename source/sdk/{ => temp}/java/realm-files/open-and-close-a-realm.txt (100%) rename source/sdk/{ => temp}/java/sync.txt (100%) rename source/sdk/{ => temp}/java/sync/background-sync.txt (100%) rename source/sdk/{ => temp}/java/sync/configure-and-open-a-synced-realm.txt (100%) rename source/sdk/{ => temp}/java/sync/flexible-sync.txt (100%) rename source/sdk/{ => temp}/java/sync/handle-sync-errors.txt (100%) rename source/sdk/{ => temp}/java/sync/manual-client-reset-data-recovery.txt (100%) rename source/sdk/{ => temp}/java/sync/network-connection.txt (100%) rename source/sdk/{ => temp}/java/sync/partition-based-sync.txt (100%) rename source/sdk/{ => temp}/java/sync/pause-resume-sync.txt (100%) rename source/sdk/{ => temp}/java/sync/reset-a-client-realm.txt (100%) rename source/sdk/{ => temp}/java/sync/sync-progress.txt (100%) rename source/sdk/{ => temp}/java/telemetry.txt (100%) rename source/sdk/{ => temp}/java/test-and-debug.txt (100%) rename source/sdk/{ => temp}/java/test-and-debug/debugging.txt (100%) rename source/sdk/{ => temp}/java/test-and-debug/log-realm-events.txt (100%) rename source/sdk/{ => temp}/java/test-and-debug/testing.txt (100%) rename source/sdk/{ => temp}/java/test-and-debug/troubleshooting.txt (100%) rename source/sdk/{ => temp}/java/troubleshooting.txt (100%) rename source/sdk/{ => temp}/java/users/authenticate-users.txt (100%) rename source/sdk/{ => temp}/java/users/create-delete-users.txt (100%) rename source/sdk/{ => temp}/java/users/custom-user-data.txt (100%) rename source/sdk/{ => temp}/java/users/email-password-users.txt (100%) rename source/sdk/{ => temp}/java/users/link-user-identities.txt (100%) rename source/sdk/{ => temp}/java/users/manage-user-api-keys.txt (100%) rename source/sdk/{ => temp}/java/users/multi-user-applications.txt (100%) rename source/sdk/{ => temp}/kotlin.txt (100%) rename source/sdk/{ => temp}/kotlin/app-services.txt (100%) rename source/sdk/{ => temp}/kotlin/app-services/call-function.txt (100%) rename source/sdk/{ => temp}/kotlin/app-services/connect-to-app-services-backend.txt (100%) rename source/sdk/{ => temp}/kotlin/app-services/handle-app-errors.txt (100%) rename source/sdk/{ => temp}/kotlin/facets.toml (100%) rename source/sdk/{ => temp}/kotlin/install.txt (100%) rename source/sdk/{ => temp}/kotlin/logging.txt (100%) rename source/sdk/{ => temp}/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt (100%) rename source/sdk/{ => temp}/kotlin/quick-start.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/crud.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/crud/create.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/crud/delete.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/crud/read.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/crud/update.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/errors.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/frozen-arch.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/open-and-close-a-realm.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/react-to-changes.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/realm-files.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/realm-files/bundle-a-realm.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/realm-files/compact-realm.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/realm-files/delete-a-realm.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/realm-files/encrypt-a-realm.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/schemas.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/schemas/change-an-object-model.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/schemas/define-realm-object-model.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/schemas/geospatials.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/schemas/model-data-device-sync.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/schemas/property-annotations.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/schemas/relationships.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/schemas/supported-types.txt (100%) rename source/sdk/{ => temp}/kotlin/realm-database/serialization.txt (100%) rename source/sdk/{ => temp}/kotlin/sync.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/add-sync-to-app.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/background-sync.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/handle-sync-errors.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/log-level.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/manage-sync-session.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/open-a-synced-realm.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/partition-based-sync.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/stream-data-to-atlas.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/subscribe.txt (100%) rename source/sdk/{ => temp}/kotlin/sync/write-to-synced-realm.txt (100%) rename source/sdk/{ => temp}/kotlin/telemetry.txt (100%) rename source/sdk/{ => temp}/kotlin/troubleshooting.txt (100%) rename source/sdk/{ => temp}/kotlin/users.txt (100%) rename source/sdk/{ => temp}/kotlin/users/authenticate-users.txt (100%) rename source/sdk/{ => temp}/kotlin/users/custom-user-data.txt (100%) rename source/sdk/{ => temp}/kotlin/users/delete-users.txt (100%) rename source/sdk/{ => temp}/kotlin/users/link-credentials.txt (100%) rename source/sdk/{ => temp}/kotlin/users/manage-email-password-users.txt (100%) rename source/sdk/{ => temp}/kotlin/users/manage-user-api-keys.txt (100%) rename source/sdk/{ => temp}/kotlin/users/multi-user-applications.txt (100%) rename source/sdk/{ => temp}/kotlin/users/user-metadata.txt (100%) rename source/sdk/{ => temp}/node.txt (100%) rename source/sdk/{ => temp}/node/app-services.txt (100%) rename source/sdk/{ => temp}/node/app-services/call-a-function.txt (100%) rename source/sdk/{ => temp}/node/app-services/connect-to-app-services-backend.txt (100%) rename source/sdk/{ => temp}/node/app-services/query-mongodb.txt (100%) rename source/sdk/{ => temp}/node/crud.txt (100%) rename source/sdk/{ => temp}/node/crud/create.txt (100%) rename source/sdk/{ => temp}/node/crud/delete.txt (100%) rename source/sdk/{ => temp}/node/crud/query-data.txt (100%) rename source/sdk/{ => temp}/node/crud/read.txt (100%) rename source/sdk/{ => temp}/node/crud/update.txt (100%) rename source/sdk/{ => temp}/node/facets.toml (100%) rename source/sdk/{ => temp}/node/install.txt (100%) rename source/sdk/{ => temp}/node/integrations.txt (100%) rename source/sdk/{ => temp}/node/integrations/electron-cra.txt (100%) rename source/sdk/{ => temp}/node/integrations/electron.txt (100%) rename source/sdk/{ => temp}/node/logging.txt (100%) rename source/sdk/{ => temp}/node/manage-users.txt (100%) rename source/sdk/{ => temp}/node/migrate/index.txt (100%) rename source/sdk/{ => temp}/node/model-data.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types/collections.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types/dictionaries.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types/embedded-objects.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types/field-types.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types/geospatial.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types/mixed.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types/sets.txt (100%) rename source/sdk/{ => temp}/node/model-data/data-types/uuid.txt (100%) rename source/sdk/{ => temp}/node/model-data/define-a-realm-object-model.txt (100%) rename source/sdk/{ => temp}/node/model-data/modify-an-object-schema.txt (100%) rename source/sdk/{ => temp}/node/model-data/relationships-and-embedded-objects.txt (100%) rename source/sdk/{ => temp}/node/quick-start.txt (100%) rename source/sdk/{ => temp}/node/react-to-changes.txt (100%) rename source/sdk/{ => temp}/node/realm-files.txt (100%) rename source/sdk/{ => temp}/node/realm-files/bundle.txt (100%) rename source/sdk/{ => temp}/node/realm-files/compact-realm.txt (100%) rename source/sdk/{ => temp}/node/realm-files/encrypt.txt (100%) rename source/sdk/{ => temp}/node/realm-files/open-and-close-a-realm.txt (100%) rename source/sdk/{ => temp}/node/sync.txt (100%) rename source/sdk/{ => temp}/node/sync/client-reset-data-recovery.txt (100%) rename source/sdk/{ => temp}/node/sync/configure-and-open-a-synced-realm.txt (100%) rename source/sdk/{ => temp}/node/sync/flexible-sync.txt (100%) rename source/sdk/{ => temp}/node/sync/handle-sync-errors.txt (100%) rename source/sdk/{ => temp}/node/sync/log-level.txt (100%) rename source/sdk/{ => temp}/node/sync/manage-sync-session.txt (100%) rename source/sdk/{ => temp}/node/sync/partition-based-sync.txt (100%) rename source/sdk/{ => temp}/node/sync/stream-data-to-atlas.txt (100%) rename source/sdk/{ => temp}/node/telemetry.txt (100%) rename source/sdk/{ => temp}/node/users/access-custom-user-data.txt (100%) rename source/sdk/{ => temp}/node/users/authenticate-users.txt (100%) rename source/sdk/{ => temp}/node/users/create-delete-users.txt (100%) rename source/sdk/{ => temp}/node/users/link-identities.txt (100%) rename source/sdk/{ => temp}/node/users/manage-email-password-users.txt (100%) rename source/sdk/{ => temp}/node/users/manage-user-api-keys.txt (100%) rename source/sdk/{ => temp}/node/users/multi-user-applications.txt (100%) rename source/sdk/{ => temp}/node/users/user-metadata.txt (100%) rename source/sdk/{ => temp}/react-native.txt (100%) rename source/sdk/{ => temp}/react-native/api-reference.txt (100%) rename source/sdk/{ => temp}/react-native/api-reference/app-provider.txt (100%) rename source/sdk/{ => temp}/react-native/api-reference/realm-provider.txt (100%) rename source/sdk/{ => temp}/react-native/api-reference/user-provider.txt (100%) rename source/sdk/{ => temp}/react-native/app-services.txt (100%) rename source/sdk/{ => temp}/react-native/app-services/call-a-function.txt (100%) rename source/sdk/{ => temp}/react-native/app-services/connect-to-app-services-app.txt (100%) rename source/sdk/{ => temp}/react-native/app-services/query-mongodb.txt (100%) rename source/sdk/{ => temp}/react-native/bootstrap-with-expo.txt (100%) rename source/sdk/{ => temp}/react-native/crud.txt (100%) rename source/sdk/{ => temp}/react-native/crud/create.txt (100%) rename source/sdk/{ => temp}/react-native/crud/delete.txt (100%) rename source/sdk/{ => temp}/react-native/crud/query-data.txt (100%) rename source/sdk/{ => temp}/react-native/crud/read.txt (100%) rename source/sdk/{ => temp}/react-native/crud/update.txt (100%) rename source/sdk/{ => temp}/react-native/facets.toml (100%) rename source/sdk/{ => temp}/react-native/install.txt (100%) rename source/sdk/{ => temp}/react-native/integrations.txt (100%) rename source/sdk/{ => temp}/react-native/integrations/mac-catalyst.txt (100%) rename source/sdk/{ => temp}/react-native/logging.txt (100%) rename source/sdk/{ => temp}/react-native/manage-users.txt (100%) rename source/sdk/{ => temp}/react-native/manage-users/authenticate-users.txt (100%) rename source/sdk/{ => temp}/react-native/manage-users/create-and-delete-users.txt (100%) rename source/sdk/{ => temp}/react-native/manage-users/custom-user-data.txt (100%) rename source/sdk/{ => temp}/react-native/manage-users/link-user-identities.txt (100%) rename source/sdk/{ => temp}/react-native/manage-users/manage-email-password-users.txt (100%) rename source/sdk/{ => temp}/react-native/manage-users/manage-user-api-keys.txt (100%) rename source/sdk/{ => temp}/react-native/manage-users/multi-user-applications.txt (100%) rename source/sdk/{ => temp}/react-native/migrate/index.txt (100%) rename source/sdk/{ => temp}/react-native/model-data.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/change-an-object-model.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types/collections.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types/dictionaries.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types/embedded-objects.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types/geospatial.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types/mixed.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types/property-types.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types/sets.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/data-types/uuid.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/define-a-realm-object-model.txt (100%) rename source/sdk/{ => temp}/react-native/model-data/relationships-and-embedded-objects.txt (100%) rename source/sdk/{ => temp}/react-native/quick-start.txt (100%) rename source/sdk/{ => temp}/react-native/react-to-changes.txt (100%) rename source/sdk/{ => temp}/react-native/realm-files.txt (100%) rename source/sdk/{ => temp}/react-native/realm-files/bundle.txt (100%) rename source/sdk/{ => temp}/react-native/realm-files/compact-realm.txt (100%) rename source/sdk/{ => temp}/react-native/realm-files/configure-a-realm.txt (100%) rename source/sdk/{ => temp}/react-native/realm-files/encrypt.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data/client-reset-data-recovery.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data/configure-a-synced-realm.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data/flexible-sync.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data/handle-sync-errors.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data/log-level.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data/manage-sync-session.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data/partition-based-sync.txt (100%) rename source/sdk/{ => temp}/react-native/sync-data/stream-data-to-atlas.txt (100%) rename source/sdk/{ => temp}/react-native/telemetry.txt (100%) rename source/sdk/{ => temp}/react-native/test-and-debug.txt (100%) rename source/sdk/{ => temp}/react-native/test-and-debug/testing.txt (100%) rename source/sdk/{ => temp}/react-native/test-and-debug/troubleshooting.txt (100%) rename source/sdk/{ => temp}/swift.txt (100%) rename source/sdk/{ => temp}/swift/api-reference.txt (100%) rename source/sdk/{ => temp}/swift/app-services/call-a-function.txt (100%) rename source/sdk/{ => temp}/swift/app-services/connect-to-app-services-backend.txt (100%) rename source/sdk/{ => temp}/swift/app-services/mongodb-remote-access.txt (100%) rename source/sdk/{ => temp}/swift/application-services.txt (100%) rename source/sdk/{ => temp}/swift/crud.txt (100%) rename source/sdk/{ => temp}/swift/crud/create.txt (100%) rename source/sdk/{ => temp}/swift/crud/delete.txt (100%) rename source/sdk/{ => temp}/swift/crud/filter-data.txt (100%) rename source/sdk/{ => temp}/swift/crud/read.txt (100%) rename source/sdk/{ => temp}/swift/crud/threading.txt (100%) rename source/sdk/{ => temp}/swift/crud/update.txt (100%) rename source/sdk/{ => temp}/swift/facets.toml (100%) rename source/sdk/{ => temp}/swift/install.txt (100%) rename source/sdk/{ => temp}/swift/logging.txt (100%) rename source/sdk/{ => temp}/swift/model-data.txt (100%) rename source/sdk/{ => temp}/swift/model-data/change-an-object-model.txt (100%) rename source/sdk/{ => temp}/swift/model-data/model-data-device-sync.txt (100%) rename source/sdk/{ => temp}/swift/model-data/object-models.txt (100%) rename source/sdk/{ => temp}/swift/model-data/relationships.txt (100%) rename source/sdk/{ => temp}/swift/model-data/supported-types.txt (100%) rename source/sdk/{ => temp}/swift/quick-start.txt (100%) rename source/sdk/{ => temp}/swift/react-to-changes.txt (100%) rename source/sdk/{ => temp}/swift/realm-files.txt (100%) rename source/sdk/{ => temp}/swift/realm-files/bundle-a-realm.txt (100%) rename source/sdk/{ => temp}/swift/realm-files/compacting.txt (100%) rename source/sdk/{ => temp}/swift/realm-files/configure-and-open-a-realm.txt (100%) rename source/sdk/{ => temp}/swift/realm-files/delete-a-realm.txt (100%) rename source/sdk/{ => temp}/swift/realm-files/encrypt-a-realm.txt (100%) rename source/sdk/{ => temp}/swift/realm-files/tvos.txt (100%) rename source/sdk/{ => temp}/swift/swift-concurrency.txt (100%) rename source/sdk/{ => temp}/swift/swiftui-tutorial.txt (100%) rename source/sdk/{ => temp}/swift/swiftui.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/background-sync.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/configure-and-open-realm.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/filter-data.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/model-data.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/model-data/change-an-object-model.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/model-data/define-a-realm-object-model.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/pass-realm-data-between-views.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/react-to-changes.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/swiftui-previews.txt (100%) rename source/sdk/{ => temp}/swift/swiftui/write.txt (100%) rename source/sdk/{ => temp}/swift/sync.txt (100%) rename source/sdk/{ => temp}/swift/sync/add-sync-to-app.txt (100%) rename source/sdk/{ => temp}/swift/sync/background-sync.txt (100%) rename source/sdk/{ => temp}/swift/sync/configure-and-open-a-synced-realm.txt (100%) rename source/sdk/{ => temp}/swift/sync/event-library.txt (100%) rename source/sdk/{ => temp}/swift/sync/flexible-sync.txt (100%) rename source/sdk/{ => temp}/swift/sync/handle-sync-errors.txt (100%) rename source/sdk/{ => temp}/swift/sync/log-level.txt (100%) rename source/sdk/{ => temp}/swift/sync/partition-based-sync.txt (100%) rename source/sdk/{ => temp}/swift/sync/stream-data-to-atlas.txt (100%) rename source/sdk/{ => temp}/swift/sync/sync-session.txt (100%) rename source/sdk/{ => temp}/swift/sync/write-to-synced-realm.txt (100%) rename source/sdk/{ => temp}/swift/telemetry.txt (100%) rename source/sdk/{ => temp}/swift/test-and-debug.txt (100%) rename source/sdk/{ => temp}/swift/use-realm-with-actors.txt (100%) rename source/sdk/{ => temp}/swift/users/authenticate-users.txt (100%) rename source/sdk/{ => temp}/swift/users/create-and-delete-users.txt (100%) rename source/sdk/{ => temp}/swift/users/custom-user-data.txt (100%) rename source/sdk/{ => temp}/swift/users/link-user-identities.txt (100%) rename source/sdk/{ => temp}/swift/users/manage-email-password-users.txt (100%) rename source/sdk/{ => temp}/swift/users/manage-user-api-keys.txt (100%) rename source/sdk/{ => temp}/swift/users/multi-user-applications.txt (100%) rename source/sdk/{ => temp}/swift/users/user-metadata.txt (100%) rename source/sdk/{ => temp}/swift/work-with-users.txt (100%) rename source/sdk/{ => temp}/swift/xcode-playgrounds.txt (100%) create mode 100644 source/sdk/users.txt create mode 100644 source/sdk/users/authenticate-users.txt create mode 100644 source/sdk/users/create-and-delete-users.txt create mode 100644 source/sdk/users/custom-user-data.txt create mode 100644 source/sdk/users/link-user-identities.txt create mode 100644 source/sdk/users/manage-email-password-users.txt create mode 100644 source/sdk/users/manage-user-api-keys.txt create mode 100644 source/sdk/users/multi-user-applications.txt create mode 100644 source/sdk/users/user-metadata.txt diff --git a/source/frameworks.txt b/source/frameworks.txt new file mode 100644 index 0000000000..eb5aeacefe --- /dev/null +++ b/source/frameworks.txt @@ -0,0 +1,31 @@ +.. _sdks-build-with-frameworks: + +===================== +Build with Frameworks +===================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. toctree:: + :titlesonly: + + Electron + Flutter + Maui + .NET + React Native + SwiftUI + +The following pages contain information about building with specific +frameworks using Atlas Device SDK: + +- :ref:`sdks-build-with-electron` +- :ref:`sdks-build-with-flutter` +- :ref:`sdks-build-with-maui` +- :ref:`sdks-build-with-dotnet` +- :ref:`sdks-build-with-react-native` +- :ref:`sdks-build-with-swiftui` diff --git a/source/frameworks/dotnet.txt b/source/frameworks/dotnet.txt new file mode 100644 index 0000000000..fb184051fc --- /dev/null +++ b/source/frameworks/dotnet.txt @@ -0,0 +1,14 @@ +.. _sdks-build-with-dotnet: + +=============== +Build with .NET +=============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with .NET. (This may +be a directory depending on how much content we have/need.) diff --git a/source/frameworks/electron.txt b/source/frameworks/electron.txt new file mode 100644 index 0000000000..f6f7c4f711 --- /dev/null +++ b/source/frameworks/electron.txt @@ -0,0 +1,14 @@ +.. _sdks-build-with-electron: + +=================== +Build with Electron +=================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with Electron. (This may +be a directory as we have two pages for this?) diff --git a/source/frameworks/flutter.txt b/source/frameworks/flutter.txt new file mode 100644 index 0000000000..e3937c6699 --- /dev/null +++ b/source/frameworks/flutter.txt @@ -0,0 +1,14 @@ +.. _sdks-build-with-flutter: + +================== +Build with Flutter +================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with Flutter. (This may +be a directory depending on how much content we have/need.) diff --git a/source/frameworks/maui.txt b/source/frameworks/maui.txt new file mode 100644 index 0000000000..468ebfb15d --- /dev/null +++ b/source/frameworks/maui.txt @@ -0,0 +1,14 @@ +.. _sdks-build-with-maui: + +=============== +Build with Maui +=============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with Maui. (This may +be a directory depending on how much content we have/need.) diff --git a/source/frameworks/react-native.txt b/source/frameworks/react-native.txt new file mode 100644 index 0000000000..446dbdd788 --- /dev/null +++ b/source/frameworks/react-native.txt @@ -0,0 +1,16 @@ +.. _sdks-build-with-react-native: + +======================= +Build with React Native +======================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with React Native +and ``@realm/react``. + +This will be a directory with content. diff --git a/source/frameworks/swiftui.txt b/source/frameworks/swiftui.txt new file mode 100644 index 0000000000..869adedb3f --- /dev/null +++ b/source/frameworks/swiftui.txt @@ -0,0 +1,15 @@ +.. _sdks-build-with-swiftui: + +================== +Build with SwiftUI +================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with SwiftUI. + +This will be a directory with SwiftUI content. diff --git a/source/index.txt b/source/index.txt index 7b36dab3ae..eb91c00710 100644 --- a/source/index.txt +++ b/source/index.txt @@ -14,20 +14,24 @@ Welcome to the Atlas Device SDK Docs :hidden: Introduction - C++ SDK - Flutter SDK - Java SDK - Kotlin SDK - .NET SDK - Node.js SDK - React Native SDK - Swift SDK - Web SDK - Atlas App Services + Install + Quick Start + Model Data + Open & Manage Database Files + Read & Write Data + React to Changes + Access Atlas + Manage Users + Sync Data + Logging + SDK Telemetry + API Reference + Build with Frameworks + Build for Platforms Realm Studio - Realm Query Language Example Projects Get Help + Atlas App Services .. introduction:: diff --git a/source/platforms.txt b/source/platforms.txt new file mode 100644 index 0000000000..d3cf0c3fc8 --- /dev/null +++ b/source/platforms.txt @@ -0,0 +1,29 @@ +.. _sdks-build-for-platforms: + +=================== +Build for Platforms +=================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. toctree:: + :titlesonly: + + Android + Apple + Linux + Web + Windows + +The following pages contain information about building for specific platforms +with Atlas Device SDK: + +- :ref:`sdks-build-for-android` +- :ref:`sdks-build-for-apple` +- :ref:`sdks-build-for-linux` +- :ref:`sdks-build-for-web` +- :ref:`sdks-build-for-windows` diff --git a/source/platforms/android.txt b/source/platforms/android.txt new file mode 100644 index 0000000000..07e511aebf --- /dev/null +++ b/source/platforms/android.txt @@ -0,0 +1,16 @@ +.. _sdks-build-for-android: + +================= +Build for Android +================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building for Android. + +Include info about which frameworks we support building for Android, plus +any specific version or compatibility info worth calling out? diff --git a/source/platforms/apple.txt b/source/platforms/apple.txt new file mode 100644 index 0000000000..67aae62a10 --- /dev/null +++ b/source/platforms/apple.txt @@ -0,0 +1,19 @@ +.. _sdks-build-for-apple: + +=============== +Build for Apple +=============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building for Apple. + +Include info about which frameworks we support building for Apple, plus +any specific version or compatibility info worth calling out? + +Maybe make this a directory with Apple-specific content (Apple Privacy +Manifest, build for tvOS, etc.?) diff --git a/source/platforms/linux.txt b/source/platforms/linux.txt new file mode 100644 index 0000000000..19aa25ae2d --- /dev/null +++ b/source/platforms/linux.txt @@ -0,0 +1,16 @@ +.. _sdks-build-for-linux: + +=============== +Build for Linux +=============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building for Linux. + +Include info about which frameworks we support building for Linux, plus +any specific version or compatibility info worth calling out? diff --git a/source/platforms/web.txt b/source/platforms/web.txt new file mode 100644 index 0000000000..fbf609ecf0 --- /dev/null +++ b/source/platforms/web.txt @@ -0,0 +1,18 @@ +.. _sdks-build-for-web: + +============= +Build for Web +============= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building for the Web. + +Include info about which frameworks we support building for Web, plus +any specific version or compatibility info worth calling out? + +(Maybe make this a directory and move Web SDK content wholesale to here?) diff --git a/source/platforms/windows.txt b/source/platforms/windows.txt new file mode 100644 index 0000000000..4c2271da3c --- /dev/null +++ b/source/platforms/windows.txt @@ -0,0 +1,16 @@ +.. _sdks-build-for-windows: + +================= +Build for Windows +================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building for Windows. + +Include info about which frameworks we support building for Windows, plus +any specific version or compatibility info worth calling out? diff --git a/source/sdk/api-reference.txt b/source/sdk/api-reference.txt new file mode 100644 index 0000000000..ee844669b5 --- /dev/null +++ b/source/sdk/api-reference.txt @@ -0,0 +1,30 @@ +============= +API Reference +============= + +.. toctree:: + :titlesonly: + + C# API Reference (.NET) + C++ API Reference (Doxygen) + Dart API Reference + Kotlin API Reference + Java API Reference + Java (Kotlin Extensions) API Reference + JavaScript SDK Reference + Kotlin API Reference + Swift API Reference + Objective-C API Reference + +The following pages contain API reference documentation for Atlas Device SDKs: + +- :ref:`C# API Reference (.NET) ` +- :ref:`C++ API Reference (Doxygen) ` +- :ref:`Dart API Reference ` +- :ref:`Kotlin API Reference ` +- :ref:`Java API Reference ` +- :ref:`Java (Kotlin Extensions) API Reference ` +- :ref:`JavaScript SDK Reference ` +- :ref:`Kotlin API Reference ` +- :ref:`Objective-C API Reference ` +- :ref:`Swift API Reference ` diff --git a/source/sdk/atlas.txt b/source/sdk/atlas.txt new file mode 100644 index 0000000000..94b073b383 --- /dev/null +++ b/source/sdk/atlas.txt @@ -0,0 +1,17 @@ +============ +Access Atlas +============ + +.. toctree:: + :titlesonly: + + Connect to Atlas + Call a Function + Access MongoDB + +The following pages contain information about how to connect to Atlas, +call Atlas Functions, and access MongoDB databases and collections directly: + +- :ref:`sdks-connect-to-atlas` +- :ref:`sdks-call-function` +- :ref:`sdks-access-mongodb` diff --git a/source/sdk/atlas/access-mongodb.txt b/source/sdk/atlas/access-mongodb.txt new file mode 100644 index 0000000000..b34eacef07 --- /dev/null +++ b/source/sdk/atlas/access-mongodb.txt @@ -0,0 +1,14 @@ +.. _sdks-access-mongodb: + +============== +Access MongoDB +============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for the query MongoDB content. + diff --git a/source/sdk/atlas/call-function.txt b/source/sdk/atlas/call-function.txt new file mode 100644 index 0000000000..c31a89ed61 --- /dev/null +++ b/source/sdk/atlas/call-function.txt @@ -0,0 +1,13 @@ +.. _sdks-call-function: + +=============== +Call a Function +=============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for the call a Function content. diff --git a/source/sdk/atlas/connect.txt b/source/sdk/atlas/connect.txt new file mode 100644 index 0000000000..48d846836d --- /dev/null +++ b/source/sdk/atlas/connect.txt @@ -0,0 +1,21 @@ +.. _sdks-connect-to-atlas: + +================ +Connect to Atlas +================ + +.. meta:: + :description: Connect to Atlas from the Atlas Device SDK. Specify configuration details to customize network access. + :keywords: code example + +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for the Connect to an App Services Backend content. diff --git a/source/sdk/crud.txt b/source/sdk/crud.txt new file mode 100644 index 0000000000..efafe96865 --- /dev/null +++ b/source/sdk/crud.txt @@ -0,0 +1,23 @@ +=================== +Read and Write Data +=================== + +.. toctree:: + :titlesonly: + + Create + Read + Update + Delete + Query Engines + Threading + +The following pages contain information about how to read and write data, +manage objects across threads, and use the Atlas Device SDK query engines: + +- :ref:`sdks-crud-create` +- :ref:`sdks-crud-read` +- :ref:`sdks-crud-update` +- :ref:`sdks-crud-delete` +- :ref:`sdks-query-engines` +- :ref:`sdks-threading` diff --git a/source/sdk/crud/create.txt b/source/sdk/crud/create.txt new file mode 100644 index 0000000000..d0f46a45ce --- /dev/null +++ b/source/sdk/crud/create.txt @@ -0,0 +1,11 @@ +.. _sdks-crud-create: + +============== +Create Objects +============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol diff --git a/source/sdk/crud/delete.txt b/source/sdk/crud/delete.txt new file mode 100644 index 0000000000..5da3c3aaca --- /dev/null +++ b/source/sdk/crud/delete.txt @@ -0,0 +1,11 @@ +.. _sdks-crud-delete: + +============== +Delete Objects +============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol diff --git a/source/sdk/crud/query-engines.txt b/source/sdk/crud/query-engines.txt new file mode 100644 index 0000000000..e03c337c8d --- /dev/null +++ b/source/sdk/crud/query-engines.txt @@ -0,0 +1,21 @@ +.. _sdks-query-engines: + +============= +Query Engines +============= + +.. toctree:: + :titlesonly: + + RQL + Fluent Interface (Java SDK) + LINQ (.NET SDK) + Type-Safe and NSPredicate Queries (Swift SDK) + +The following pages contain information about how to use the Atlas Device SDK +query engines: + +- :ref:`realm-query-language` +- :ref:`java-filter-data` +- :ref:`dotnet-linq` +- :ref:`sdks-filter-data-swift` diff --git a/source/sdk/crud/query-engines/filter-data-java-sdk.txt b/source/sdk/crud/query-engines/filter-data-java-sdk.txt new file mode 100644 index 0000000000..12a2f46f34 --- /dev/null +++ b/source/sdk/crud/query-engines/filter-data-java-sdk.txt @@ -0,0 +1,13 @@ +.. _java-filter-data: + +====================== +Filter Data - Java SDK +====================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder for filtering data in the Java SDK using the Fluent interface. \ No newline at end of file diff --git a/source/sdk/crud/query-engines/filter-data-linq.txt b/source/sdk/crud/query-engines/filter-data-linq.txt new file mode 100644 index 0000000000..508b0ed878 --- /dev/null +++ b/source/sdk/crud/query-engines/filter-data-linq.txt @@ -0,0 +1,17 @@ +.. _dotnet-filter-data: +.. _dotnet-filter-queries-based-on-object-properties: +.. _dotnet-filter-results: +.. _dotnet-client-query-engine: +.. _dotnet-linq: + +=========================== +Filter and Sort Data - LINQ +=========================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for querying data in .NET SDK using LINQ. diff --git a/source/sdk/crud/query-engines/filter-data-swift-sdk.txt b/source/sdk/crud/query-engines/filter-data-swift-sdk.txt new file mode 100644 index 0000000000..dd68cd6d02 --- /dev/null +++ b/source/sdk/crud/query-engines/filter-data-swift-sdk.txt @@ -0,0 +1,23 @@ +.. _ios-client-query-engine: +.. _ios-filter-data: +.. _sdks-filter-data-swift: + +======================= +Filter Data - Swift SDK +======================= + +.. meta:: + :description: Atlas Device SDK for Swift uses a range of operators to query different data types through type-safe or NSPredicate query engines. + :keywords: code example + +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 3 + :class: singlecol + +Placeholder page for Swift query engine details. diff --git a/source/realm-query-language.txt b/source/sdk/crud/query-engines/realm-query-language.txt similarity index 100% rename from source/realm-query-language.txt rename to source/sdk/crud/query-engines/realm-query-language.txt diff --git a/source/sdk/crud/read.txt b/source/sdk/crud/read.txt new file mode 100644 index 0000000000..f41f3e4623 --- /dev/null +++ b/source/sdk/crud/read.txt @@ -0,0 +1,19 @@ +.. _sdks-crud-read: + +============ +Read Objects +============ + +.. meta:: + :description: Read objects from the database by object type. Query by property to filter results. + :keywords: code example + +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol diff --git a/source/sdk/crud/threading.txt b/source/sdk/crud/threading.txt new file mode 100644 index 0000000000..e88063645a --- /dev/null +++ b/source/sdk/crud/threading.txt @@ -0,0 +1,18 @@ +.. _sdks-threading: + +========= +Threading +========= + +.. meta:: + :keywords: code example + +.. facet:: + :name: genre + :values: tutorial + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol diff --git a/source/sdk/crud/update.txt b/source/sdk/crud/update.txt new file mode 100644 index 0000000000..7c693c89b7 --- /dev/null +++ b/source/sdk/crud/update.txt @@ -0,0 +1,11 @@ +.. _sdks-crud-update: + +============== +Update Objects +============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol diff --git a/source/sdk/files.txt b/source/sdk/files.txt new file mode 100644 index 0000000000..1386dd6d6d --- /dev/null +++ b/source/sdk/files.txt @@ -0,0 +1,21 @@ +============== +Database Files +============== + +.. toctree:: + :titlesonly: + + Configure & Open a Database + Delete a Database + Reduce Database File Size + Encrypt a Database + Bundle a Database + +The following pages contain information about how to configure, open, and +manage database files in Atlas Device SDK code: + +- :ref:`sdks-configure-and-open-database` +- :ref:`sdks-delete-file` +- :ref:`sdks-compact-file` +- :ref:`sdks-encrypt-database` +- :ref:`sdks-bundle-file` diff --git a/source/sdk/files/bundle-file.txt b/source/sdk/files/bundle-file.txt new file mode 100644 index 0000000000..64efafbc04 --- /dev/null +++ b/source/sdk/files/bundle-file.txt @@ -0,0 +1,13 @@ +.. _sdks-bundle-file: + +====================== +Bundle a Database File +====================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for bundling a realm. \ No newline at end of file diff --git a/source/sdk/files/configure-and-open.txt b/source/sdk/files/configure-and-open.txt new file mode 100644 index 0000000000..d44b190609 --- /dev/null +++ b/source/sdk/files/configure-and-open.txt @@ -0,0 +1,21 @@ +.. _sdks-configure-and-open-database: + +================================ +Configure & Open a Database File +================================ + +.. meta:: + :description: Open a database for persistence on device. Use configuration options to encrypt the database, reduce its file size, use it in memory, and more. + :keywords: code example + +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for configuring and opening a realm. diff --git a/source/sdk/files/delete-file.txt b/source/sdk/files/delete-file.txt new file mode 100644 index 0000000000..6b8e2db07b --- /dev/null +++ b/source/sdk/files/delete-file.txt @@ -0,0 +1,13 @@ +.. _sdks-delete-file: + +====================== +Delete a Database File +====================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for deleting a realm. diff --git a/source/sdk/files/encrypt-file.txt b/source/sdk/files/encrypt-file.txt new file mode 100644 index 0000000000..1a13027f64 --- /dev/null +++ b/source/sdk/files/encrypt-file.txt @@ -0,0 +1,13 @@ +.. _sdks-encrypt-database: + +================== +Encrypt a Database +================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for encrypting a realm. diff --git a/source/sdk/files/reduce-file-size.txt b/source/sdk/files/reduce-file-size.txt new file mode 100644 index 0000000000..10708d3473 --- /dev/null +++ b/source/sdk/files/reduce-file-size.txt @@ -0,0 +1,13 @@ +.. _sdks-compact-file: + +========================= +Reduce Database File Size +========================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for compacting a realm. diff --git a/source/sdk/logging.txt b/source/sdk/logging.txt new file mode 100644 index 0000000000..334bbf58ed --- /dev/null +++ b/source/sdk/logging.txt @@ -0,0 +1,13 @@ +.. _sdks-logging: + +======= +Logging +======= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about logging. \ No newline at end of file diff --git a/source/sdk/model-data.txt b/source/sdk/model-data.txt new file mode 100644 index 0000000000..11296dd223 --- /dev/null +++ b/source/sdk/model-data.txt @@ -0,0 +1,21 @@ +========== +Model Data +========== + +.. toctree:: + :titlesonly: + + Define an Object Model + Relationships + Supported Types + Change an Object Model + Model Data with Device Sync + +The following pages contain information about how to model data in Atlas +Device SDK code: + +- :ref:`sdks-object-models` +- :ref:`sdks-relationships` +- :ref:`sdks-supported-data-types` +- :ref:`sdks-change-object-model` +- :ref:`sdks-model-data-device-sync` diff --git a/source/sdk/model-data/change-object-model.txt b/source/sdk/model-data/change-object-model.txt new file mode 100644 index 0000000000..5fd2bc4565 --- /dev/null +++ b/source/sdk/model-data/change-object-model.txt @@ -0,0 +1,13 @@ +.. _sdks-change-object-model: + +====================== +Change an Object Model +====================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for changing an object model. (Migrations) \ No newline at end of file diff --git a/source/sdk/model-data/model-data-device-sync.txt b/source/sdk/model-data/model-data-device-sync.txt new file mode 100644 index 0000000000..bf8f0c3904 --- /dev/null +++ b/source/sdk/model-data/model-data-device-sync.txt @@ -0,0 +1,13 @@ +.. _sdks-model-data-device-sync: + +=========================== +Model Data with Device Sync +=========================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for modeling data with Device Sync. diff --git a/source/sdk/model-data/object-models.txt b/source/sdk/model-data/object-models.txt new file mode 100644 index 0000000000..d3d0eef1a1 --- /dev/null +++ b/source/sdk/model-data/object-models.txt @@ -0,0 +1,13 @@ +.. _sdks-object-models: + +========================== +Define an SDK Object Model +========================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 3 + :class: singlecol + +Placeholder page for defining an object model. \ No newline at end of file diff --git a/source/sdk/model-data/relationships.txt b/source/sdk/model-data/relationships.txt new file mode 100644 index 0000000000..94ab2460f7 --- /dev/null +++ b/source/sdk/model-data/relationships.txt @@ -0,0 +1,13 @@ +.. _sdks-relationships: + +=================== +Model Relationships +=================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 3 + :class: singlecol + +Placeholder page for modeling relationships in the SDKs. \ No newline at end of file diff --git a/source/sdk/model-data/supported-types.txt b/source/sdk/model-data/supported-types.txt new file mode 100644 index 0000000000..6a13f4c7e2 --- /dev/null +++ b/source/sdk/model-data/supported-types.txt @@ -0,0 +1,21 @@ +.. _sdks-supported-data-types: + +=============== +Supported Types +=============== + +.. meta:: + :description: Atlas Device SDK supports a range of primitive data types, as well as collections and geospatial data. + :keywords: code example + +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 3 + :class: singlecol + +Placeholder page for supported data types. diff --git a/source/sdk/react-to-changes.txt b/source/sdk/react-to-changes.txt new file mode 100644 index 0000000000..e3a25cbb04 --- /dev/null +++ b/source/sdk/react-to-changes.txt @@ -0,0 +1,13 @@ +.. _sdks-react-to-changes: + +================ +React to Changes +================ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about realm notifications. diff --git a/source/sdk/sync.txt b/source/sdk/sync.txt new file mode 100644 index 0000000000..997bbf8942 --- /dev/null +++ b/source/sdk/sync.txt @@ -0,0 +1,37 @@ +.. _sdks-sync-data: + +========= +Sync Data +========= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. toctree:: + :titlesonly: + + Add Sync to an App + Configure & Open a Synced Database + Manage Sync Subscriptions + Write to a Synced Realm + Handle Sync Errors + Manage Sync Sessions + Stream Data to Atlas + Partition-Based Sync + Event Library (Swift SDK) + +The following pages contain information about how to sync data between devices, +and with MongoDB Atlas: + +- :ref:`sdks-add-sync-to-app` +- :ref:`sdks-configure-and-open-synced-database` +- :ref:`sdks-manage-sync-subscriptions` +- :ref:`sdks-write-synced-database` +- :ref:`sdks-handle-sync-errors` +- :ref:`sdks-manage-sync-sessions` +- :ref:`sdks-stream-data-to-atlas` +- :ref:`sdks-partition-based-sync` +- :ref:`swift-event-library` diff --git a/source/sdk/sync/add-sync-to-app.txt b/source/sdk/sync/add-sync-to-app.txt new file mode 100644 index 0000000000..6ec338b565 --- /dev/null +++ b/source/sdk/sync/add-sync-to-app.txt @@ -0,0 +1,13 @@ +.. _sdks-add-sync-to-app: + +========================= +Add Device Sync to an App +========================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for adding Device Sync to a local-only app. \ No newline at end of file diff --git a/source/sdk/sync/configure-and-open-synced-database.txt b/source/sdk/sync/configure-and-open-synced-database.txt new file mode 100644 index 0000000000..f2a178fbca --- /dev/null +++ b/source/sdk/sync/configure-and-open-synced-database.txt @@ -0,0 +1,21 @@ +.. _sdks-configure-and-open-synced-database: + +================================== +Configure & Open a Synced Database +================================== + +.. meta:: + :description: Open a synced database to share data across devices. Provide an app user, and specify whether to download changes before opening the database. + :keywords: code example + +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for configuring and opening a synced database. diff --git a/source/sdk/sync/event-library.txt b/source/sdk/sync/event-library.txt new file mode 100644 index 0000000000..ca05786165 --- /dev/null +++ b/source/sdk/sync/event-library.txt @@ -0,0 +1,388 @@ +.. _swift-event-library: + +============================== +Event Library - Swift SDK Only +============================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +The Event Library enables you to track a user's activity while using a +Sync-enabled mobile application. The Event Library can record read and +write transactions. Developers can also configure custom events to record +button presses, the data displayed in the UI, or other important details. + +When you use the Event Library, you can specify the events you want to +record. This means opening two realms: + +- The user realm, where the user does the reading and writing in the + client application +- The event realm, where the Event Library records scoped and custom events + +The data from both realms syncs to your App Services App. The client +user never interacts directly with the event realm or its data; and +the event realm Sync user can even be different from the user +realm. + +Because the Event Library generates a large amount of data: + +- The client device must have enough capacity to store the data +- Expect Device Sync usage for the event realm to be higher than the reading + and writing in the user realm +- The App's backing Atlas cluster must have enough storage + capacity to handle the data generated by the Event Library + +Before You Begin +---------------- + +The Event Library stores data in an ``AuditEvent`` collection in your +linked Atlas data source. Enable :ref:`Development Mode ` +in your App Services App to let Atlas create the collection and infer +the schema from the uploaded events + +.. important:: Partition-Based Sync Required + + The Event Library does not support recording ``AuditEvents`` using Flexible + Sync. This functionality requires a Partition-Based Sync App Services App + to record ``AuditEvent`` data. + +Enable Event Recording +---------------------- + +To enable event recording, set the :swift-sdk:`Event.Configuration +` +property on the :swift-sdk:`Realm.Configuration `. + +You can initialize the ``EventConfiguration`` in either of two ways: + +- Use the default-initialized configuration when you don't need to specify details +- Pass additional parameters to customize the event configuration + +Default Event Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you don't need to specify particular parameters, you can use the +default-initialized ``EventConfiguration``: + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.default-event-configuration.swift + :language: swift + +Pass Parameters to Event Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can pass optional parameters to customize the ``EventConfiguration``: + +- ``metadata``: String dictionary of metadata fields to append to each event +- ``syncUser``: The user to use for syncing event realm(s). If nil, defaults + to the user from the ``Realm.Configuration``. +- ``partitionPrefix``: String prefix to append to the event partition value +- ``logger``: Custom logger to use for events. If nil, defaults to the + logger from the user realm. +- ``errorHandler``: The custom error handler called if a Sync error occurs + when uploading event data. If ``nil``, the SDK logs the event and then calls + ``abort()``. Production apps should always define an event ``errorHandler`` + unless aborting on the error is the desired behavior. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.event-configuration-with-params.swift + :language: swift + +Update Event Metadata +~~~~~~~~~~~~~~~~~~~~~ + +You can update metadata even after you have started recording events. +Use the ``updateMetadata()`` function to replace the metadata supplied in +the event configuration with new values. + +If you update metadata while an event scope is active, the Event Library +does not use the new metadata until the next event scope begins. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.update-event-metadata.swift + :language: swift + +.. _swift-event-library-record-events: + +Record Events +------------- + +Interact with the Event Realm +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +After you define your event configuration, you can invoke the event recording +functionality with the new :swift-sdk:`events ` property +on a :swift-sdk:`realm `. This returns an ``Event`` +instance tied to that realm. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.invoke-event-realm.swift + :language: swift + +Record Read or Write Events +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. versionchanged:: 10.36.0 + + endScope() deprecated for commit() and cancel(), new Scope object + +The Event Library records read and write events within the context of +a scope. The scope is the period during which the Event Library watches +for and records realm activities. You can set different scopes to record +different types of events. For example, you might have scopes for specific +user flows such as "login", different scopes for different screens, or +different scopes for specific compliance-related activities. + +Use :swift-sdk:`beginScope(activity: "some activity") +` +to begin recording a new event with the given activity name. This returns +a :swift-sdk:`Scope ` object, which you can +use to later commit or cancel the scope. Beginning a scope records +activities that occur within that scope as read or write events. + +- Read events: run queries and instantiate objects. When the scope ends, + the event realm records these activities as read events. +- Write events: modify objects. When the scope ends, the event realm records + the initial state of the object, as well as the new values of any + properties that change durign the scope of the event. + +Using ``beginScope`` to record an event opens the event realm if it +is not already open. The SDK opens event realms on the background +thread and reports errors to the error callback. + +.. note:: Overlapping Event Scopes + + If more than one event scope is active simultaneously, generated events are + recorded by all active scopes. + +When you're done recording events for a scope, use ``commit()`` +to save events that occurred within the scope. When you end the +recording, the Event Library saves the event to disk locally. Then, if +the device has a network connection, the SDK asynchronously sends the data +to the server. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.record-read-and-write-events.swift + :language: swift + +Alternately, you can ``cancel()`` an event scope. This stops recording events, +and does not persist the events to disk or to the server. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.cancel-event-scope.swift + :language: swift + +You can check whether a given scope is currently in progress using the +``isActive`` bool. This returns ``true`` if you have begun a scope +that you have not yet committed or canceled. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.check-event-scope.swift + :language: swift + +You can pass an optional completion block to ``commit()`` +when you finish recording. The SDK calls this block when the event data +has been successfully persisted - not when the event realm upload has completed. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.scoped-event-with-completion.swift + :language: swift + +Record Custom Events +~~~~~~~~~~~~~~~~~~~~ + +The Event Library lets you record button clicks or other events that do not +involve database reads and writes. Use :swift-sdk:`recordEvent +` +to record a custom event. This function takes these parameters: + +- ``activity``: the activity name. This is an arbitrary string, such as + "user registration." +- ``eventType``: the type of event. This is an arbitrary string, such as + "pressed Submit button." +- ``data``: an optional data payload for the event. +- ``completion``: an optional completion handler. The Event Library calls + this completion block once the event has been saved to the event + realm, or if an error occurs. A nil error indicates success. + +A custom event doesn't have a scope like read and write events. Instead, +recording a custom event is more analogous to firing a trigger. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.record-custom-events.swift + :language: swift + +Event Object Serialization +-------------------------- + +JSON Object Serialization +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Event Library converts each event object to a JSON object. Most +:ref:`Realm types ` have an +analogous JSON representation. For example, a Realm +String property becomes a JSON String. + +This is how the Event Library represents the types that do not have a direct +JSON analog: + +.. list-table:: + :widths: 20 80 + + * - Date + - Encoded to a string in :wikipedia:`ISO 8601-1:2019 format `. + * - Data + - Excluded entirely from the event. + * - UUID + - Encoded to a :rfc:`4122`-compliant string. + * - ObjectID + - Encoded to our :manual:`ObjectID ` string representation. + * - Decimal128 + - Encoded to a string, not a number. JSON numbers are officially infinite- + precision, but are rarely actually implemented as such. + * - List + - Encoded as an array. + * - Set + - Encoded as an array. + * - Dictionary + - Encoded as an object. + * - Embedded objects + - Encoded as an object. + +Non-embedded object links are encoded as the primary key of the target. In +read events, if the link is followed, this expands to the full object. If +the link is not followed, this remains a primary key. + +Customize Event Serialization +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can customize JSON serialization for event objects. To customize +the event payload, use the :swift-sdk:`CustomEventRepresentable +` protocol. + +When an object conforms to ``CustomEventRepresentable``, the Event Library +serializes objects by: + +- Constructing an accessor object +- Calling ``customEventRepresentation`` on that accessor object +- Serializing the result instead of the original object + +To conform to ``CustomEventRepresentable``, your object must implement a +:swift-sdk:`customEventRepresentation +` +function that defines your customized serialization. + +.. literalinclude:: /examples/generated/code/start/EventLibrary.snippet.custom-event-representable.swift + :language: swift + +Event Realm File Size +--------------------- + +The event realm can grow quite large if the device is offline for an +extended time. + +To compensate for this, the Event Library automatically splits event data +into multiple partitions as needed. When a partition reaches its maximum +size, the Event Library closes the event realm and automatically begins +writing to a new partition. + +The Event Library checks whether the user has any unsynced partitions. If +they do, the Event Library opens one, uploads the data, and then closes +the file and deletes it. This repeats until the user has no unsynced +partitions. + +Event Library Reference +----------------------- + +Events +~~~~~~ + +The ``AuditEvent`` collection where events are stored must have a schema +defined on the server for the App receiving events. + +The schema must contain the following fields: + +.. list-table:: + :widths: 20 20 60 + + * - ID + - ``_id`` + - ObjectId. + + * - Type of Event + - ``event`` + - Optional string. ``read`` or ``write`` for scoped events, or + an arbitrary string for custom events. + + * - Event Scope + - ``activity`` + - Optional string. The scope name passed to ``beginScope()`` to begin + recording the event, or an arbitrary string for custom events. + + * - Timestamp + - ``timestamp`` + - Device local time when the event scope is ended and the + data is committed, *or* the time when the event hits the server. + + * - Data + - ``data`` + - The event payload. This is a JSON blob for scoped events, or an + arbitrary string for custom events. + + * - Metadata + - ``metadata key`` (string) + - An optional metadata dictionary. When this dictionary contains keys + and values, the key becomes a field name in the event object, and + the value is stored in that field for every event. + +Event Payload +~~~~~~~~~~~~~ + +Each event contains a payload in the ``data`` property that captures +the current state of the objects being read or written to. + +Payloads for custom events can be whatever the developer desires, including nil. + +.. important:: + + Because the payload captures the current state of the objects being read or + written to, this produces a very large amount of data. However, this must + be done on the client rather than the server, as the exact data that the + user views may never exist server-side. In practice, this means that the + device must have the capacity to store a large amount of data if it goes + offline. Additionally, Device Sync usage for the event realm may be much + higher than for the reading and writing the user does in the user + realm. + +.. example:: + + In our :ref:`Record Events ` examples + above, these are the ``data`` payloads for the read and write events: + + .. code-block:: json + :caption: Read Event Payload + + { + "type":"Person", + "value": [{ + "_id":"62b38b3c10846041166f5deb", + "_partition":"", + "employeeId":2, + "name":"Anthony", + "userId":null + }] + } + + .. code-block:: json + :caption: Write Event Payload + + { + "Person": { + "modifications": [{ + "newValue": { + "name":"Tony" + }, + "oldValue":{ + "_id":"62b38b3c10846041166f5deb", + "_partition":"", + "employeeId":2, + "name":"Anthony", + "userId":null + } + }] + } + } diff --git a/source/sdk/sync/handle-sync-errors.txt b/source/sdk/sync/handle-sync-errors.txt new file mode 100644 index 0000000000..ac7190722d --- /dev/null +++ b/source/sdk/sync/handle-sync-errors.txt @@ -0,0 +1,13 @@ +.. _sdks-handle-sync-errors: + +================== +Handle Sync Errors +================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for handling Sync errors. diff --git a/source/sdk/sync/manage-sync-sessions.txt b/source/sdk/sync/manage-sync-sessions.txt new file mode 100644 index 0000000000..171c6c6366 --- /dev/null +++ b/source/sdk/sync/manage-sync-sessions.txt @@ -0,0 +1,21 @@ +.. _sdks-manage-sync-sessions: + +==================== +Manage Sync Sessions +==================== + +.. meta:: + :description: Access the Sync session to check network connection, wait for uploads and downloads, and check Sync progress. + :keywords: code example + +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about managing sync sessions. diff --git a/source/sdk/sync/manage-sync-subscriptions.txt b/source/sdk/sync/manage-sync-subscriptions.txt new file mode 100644 index 0000000000..d3a3d1a42a --- /dev/null +++ b/source/sdk/sync/manage-sync-subscriptions.txt @@ -0,0 +1,13 @@ +.. _sdks-manage-sync-subscriptions: + +========================= +Manage Sync Subscriptions +========================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about managing Flexible Sync subscriptions. diff --git a/source/sdk/sync/partition-based-sync.txt b/source/sdk/sync/partition-based-sync.txt new file mode 100644 index 0000000000..7c91c8a1bf --- /dev/null +++ b/source/sdk/sync/partition-based-sync.txt @@ -0,0 +1,13 @@ +.. _sdks-partition-based-sync: + +==================== +Partition-Based Sync +==================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for Partition-Based Sync content. diff --git a/source/sdk/sync/stream-data-to-atlas.txt b/source/sdk/sync/stream-data-to-atlas.txt new file mode 100644 index 0000000000..8b59c16729 --- /dev/null +++ b/source/sdk/sync/stream-data-to-atlas.txt @@ -0,0 +1,13 @@ +.. _sdks-stream-data-to-atlas: + +==================== +Stream Data to Atlas +==================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about asymmetric sync/data ingest. diff --git a/source/sdk/sync/write-to-synced-database.txt b/source/sdk/sync/write-to-synced-database.txt new file mode 100644 index 0000000000..e351da49c4 --- /dev/null +++ b/source/sdk/sync/write-to-synced-database.txt @@ -0,0 +1,13 @@ +.. _sdks-write-synced-database: + +=============================== +Write Data to a Synced Database +=============================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 3 + :class: singlecol + +Placeholder page for information about writing to a synced realm. diff --git a/source/sdk/telemetry.txt b/source/sdk/telemetry.txt new file mode 100644 index 0000000000..c269b6ade4 --- /dev/null +++ b/source/sdk/telemetry.txt @@ -0,0 +1,14 @@ +.. _sdks-telemetry: + +========= +Telemetry +========= + +.. meta:: + :description: Atlas Device SDK collects anonymized telemetry during app development, but not in production builds. + +.. facet:: + :name: genre + :values: reference + +.. include:: /includes/sdk-telemetry.rst diff --git a/source/sdk/cpp.txt b/source/sdk/temp/cpp.txt similarity index 100% rename from source/sdk/cpp.txt rename to source/sdk/temp/cpp.txt diff --git a/source/sdk/cpp/app-services/call-a-function.txt b/source/sdk/temp/cpp/app-services/call-a-function.txt similarity index 100% rename from source/sdk/cpp/app-services/call-a-function.txt rename to source/sdk/temp/cpp/app-services/call-a-function.txt diff --git a/source/sdk/cpp/app-services/connect-to-app.txt b/source/sdk/temp/cpp/app-services/connect-to-app.txt similarity index 100% rename from source/sdk/cpp/app-services/connect-to-app.txt rename to source/sdk/temp/cpp/app-services/connect-to-app.txt diff --git a/source/sdk/cpp/application-services.txt b/source/sdk/temp/cpp/application-services.txt similarity index 100% rename from source/sdk/cpp/application-services.txt rename to source/sdk/temp/cpp/application-services.txt diff --git a/source/sdk/cpp/crud.txt b/source/sdk/temp/cpp/crud.txt similarity index 100% rename from source/sdk/cpp/crud.txt rename to source/sdk/temp/cpp/crud.txt diff --git a/source/sdk/cpp/crud/create.txt b/source/sdk/temp/cpp/crud/create.txt similarity index 100% rename from source/sdk/cpp/crud/create.txt rename to source/sdk/temp/cpp/crud/create.txt diff --git a/source/sdk/cpp/crud/delete.txt b/source/sdk/temp/cpp/crud/delete.txt similarity index 100% rename from source/sdk/cpp/crud/delete.txt rename to source/sdk/temp/cpp/crud/delete.txt diff --git a/source/sdk/cpp/crud/filter-data.txt b/source/sdk/temp/cpp/crud/filter-data.txt similarity index 100% rename from source/sdk/cpp/crud/filter-data.txt rename to source/sdk/temp/cpp/crud/filter-data.txt diff --git a/source/sdk/cpp/crud/read.txt b/source/sdk/temp/cpp/crud/read.txt similarity index 100% rename from source/sdk/cpp/crud/read.txt rename to source/sdk/temp/cpp/crud/read.txt diff --git a/source/sdk/cpp/crud/threading.txt b/source/sdk/temp/cpp/crud/threading.txt similarity index 100% rename from source/sdk/cpp/crud/threading.txt rename to source/sdk/temp/cpp/crud/threading.txt diff --git a/source/sdk/cpp/crud/update.txt b/source/sdk/temp/cpp/crud/update.txt similarity index 100% rename from source/sdk/cpp/crud/update.txt rename to source/sdk/temp/cpp/crud/update.txt diff --git a/source/sdk/cpp/facets.toml b/source/sdk/temp/cpp/facets.toml similarity index 100% rename from source/sdk/cpp/facets.toml rename to source/sdk/temp/cpp/facets.toml diff --git a/source/sdk/cpp/install.txt b/source/sdk/temp/cpp/install.txt similarity index 100% rename from source/sdk/cpp/install.txt rename to source/sdk/temp/cpp/install.txt diff --git a/source/sdk/cpp/logging.txt b/source/sdk/temp/cpp/logging.txt similarity index 100% rename from source/sdk/cpp/logging.txt rename to source/sdk/temp/cpp/logging.txt diff --git a/source/sdk/cpp/manage-users.txt b/source/sdk/temp/cpp/manage-users.txt similarity index 100% rename from source/sdk/cpp/manage-users.txt rename to source/sdk/temp/cpp/manage-users.txt diff --git a/source/sdk/cpp/model-data.txt b/source/sdk/temp/cpp/model-data.txt similarity index 100% rename from source/sdk/cpp/model-data.txt rename to source/sdk/temp/cpp/model-data.txt diff --git a/source/sdk/cpp/model-data/object-models.txt b/source/sdk/temp/cpp/model-data/object-models.txt similarity index 100% rename from source/sdk/cpp/model-data/object-models.txt rename to source/sdk/temp/cpp/model-data/object-models.txt diff --git a/source/sdk/cpp/model-data/relationships.txt b/source/sdk/temp/cpp/model-data/relationships.txt similarity index 100% rename from source/sdk/cpp/model-data/relationships.txt rename to source/sdk/temp/cpp/model-data/relationships.txt diff --git a/source/sdk/cpp/model-data/supported-types.txt b/source/sdk/temp/cpp/model-data/supported-types.txt similarity index 100% rename from source/sdk/cpp/model-data/supported-types.txt rename to source/sdk/temp/cpp/model-data/supported-types.txt diff --git a/source/sdk/cpp/quick-start.txt b/source/sdk/temp/cpp/quick-start.txt similarity index 100% rename from source/sdk/cpp/quick-start.txt rename to source/sdk/temp/cpp/quick-start.txt diff --git a/source/sdk/cpp/react-to-changes.txt b/source/sdk/temp/cpp/react-to-changes.txt similarity index 100% rename from source/sdk/cpp/react-to-changes.txt rename to source/sdk/temp/cpp/react-to-changes.txt diff --git a/source/sdk/cpp/realm-files.txt b/source/sdk/temp/cpp/realm-files.txt similarity index 100% rename from source/sdk/cpp/realm-files.txt rename to source/sdk/temp/cpp/realm-files.txt diff --git a/source/sdk/cpp/realm-files/compact-realm.txt b/source/sdk/temp/cpp/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/cpp/realm-files/compact-realm.txt rename to source/sdk/temp/cpp/realm-files/compact-realm.txt diff --git a/source/sdk/cpp/realm-files/configure-and-open-a-realm.txt b/source/sdk/temp/cpp/realm-files/configure-and-open-a-realm.txt similarity index 100% rename from source/sdk/cpp/realm-files/configure-and-open-a-realm.txt rename to source/sdk/temp/cpp/realm-files/configure-and-open-a-realm.txt diff --git a/source/sdk/cpp/realm-files/encrypt-a-realm.txt b/source/sdk/temp/cpp/realm-files/encrypt-a-realm.txt similarity index 100% rename from source/sdk/cpp/realm-files/encrypt-a-realm.txt rename to source/sdk/temp/cpp/realm-files/encrypt-a-realm.txt diff --git a/source/sdk/cpp/sync.txt b/source/sdk/temp/cpp/sync.txt similarity index 100% rename from source/sdk/cpp/sync.txt rename to source/sdk/temp/cpp/sync.txt diff --git a/source/sdk/cpp/sync/handle-sync-errors.txt b/source/sdk/temp/cpp/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/cpp/sync/handle-sync-errors.txt rename to source/sdk/temp/cpp/sync/handle-sync-errors.txt diff --git a/source/sdk/cpp/sync/log-level.txt b/source/sdk/temp/cpp/sync/log-level.txt similarity index 100% rename from source/sdk/cpp/sync/log-level.txt rename to source/sdk/temp/cpp/sync/log-level.txt diff --git a/source/sdk/cpp/sync/manage-sync-session.txt b/source/sdk/temp/cpp/sync/manage-sync-session.txt similarity index 100% rename from source/sdk/cpp/sync/manage-sync-session.txt rename to source/sdk/temp/cpp/sync/manage-sync-session.txt diff --git a/source/sdk/cpp/sync/stream-data-to-atlas.txt b/source/sdk/temp/cpp/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/cpp/sync/stream-data-to-atlas.txt rename to source/sdk/temp/cpp/sync/stream-data-to-atlas.txt diff --git a/source/sdk/cpp/sync/sync-subscriptions.txt b/source/sdk/temp/cpp/sync/sync-subscriptions.txt similarity index 100% rename from source/sdk/cpp/sync/sync-subscriptions.txt rename to source/sdk/temp/cpp/sync/sync-subscriptions.txt diff --git a/source/sdk/cpp/sync/write-to-synced-realm.txt b/source/sdk/temp/cpp/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/cpp/sync/write-to-synced-realm.txt rename to source/sdk/temp/cpp/sync/write-to-synced-realm.txt diff --git a/source/sdk/cpp/telemetry.txt b/source/sdk/temp/cpp/telemetry.txt similarity index 100% rename from source/sdk/cpp/telemetry.txt rename to source/sdk/temp/cpp/telemetry.txt diff --git a/source/sdk/cpp/users/authenticate-users.txt b/source/sdk/temp/cpp/users/authenticate-users.txt similarity index 100% rename from source/sdk/cpp/users/authenticate-users.txt rename to source/sdk/temp/cpp/users/authenticate-users.txt diff --git a/source/sdk/cpp/users/custom-user-data.txt b/source/sdk/temp/cpp/users/custom-user-data.txt similarity index 100% rename from source/sdk/cpp/users/custom-user-data.txt rename to source/sdk/temp/cpp/users/custom-user-data.txt diff --git a/source/sdk/cpp/users/manage-email-password-users.txt b/source/sdk/temp/cpp/users/manage-email-password-users.txt similarity index 100% rename from source/sdk/cpp/users/manage-email-password-users.txt rename to source/sdk/temp/cpp/users/manage-email-password-users.txt diff --git a/source/sdk/dotnet.txt b/source/sdk/temp/dotnet.txt similarity index 100% rename from source/sdk/dotnet.txt rename to source/sdk/temp/dotnet.txt diff --git a/source/sdk/dotnet/app-services/call-a-function.txt b/source/sdk/temp/dotnet/app-services/call-a-function.txt similarity index 100% rename from source/sdk/dotnet/app-services/call-a-function.txt rename to source/sdk/temp/dotnet/app-services/call-a-function.txt diff --git a/source/sdk/dotnet/app-services/connect-to-app-services-backend.txt b/source/sdk/temp/dotnet/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/dotnet/app-services/connect-to-app-services-backend.txt rename to source/sdk/temp/dotnet/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/dotnet/app-services/manage-user-api-keys.txt b/source/sdk/temp/dotnet/app-services/manage-user-api-keys.txt similarity index 100% rename from source/sdk/dotnet/app-services/manage-user-api-keys.txt rename to source/sdk/temp/dotnet/app-services/manage-user-api-keys.txt diff --git a/source/sdk/dotnet/app-services/mongodb-remote-access.txt b/source/sdk/temp/dotnet/app-services/mongodb-remote-access.txt similarity index 100% rename from source/sdk/dotnet/app-services/mongodb-remote-access.txt rename to source/sdk/temp/dotnet/app-services/mongodb-remote-access.txt diff --git a/source/sdk/dotnet/application-services.txt b/source/sdk/temp/dotnet/application-services.txt similarity index 100% rename from source/sdk/dotnet/application-services.txt rename to source/sdk/temp/dotnet/application-services.txt diff --git a/source/sdk/dotnet/async-console.txt b/source/sdk/temp/dotnet/async-console.txt similarity index 100% rename from source/sdk/dotnet/async-console.txt rename to source/sdk/temp/dotnet/async-console.txt diff --git a/source/sdk/dotnet/compatibility.txt b/source/sdk/temp/dotnet/compatibility.txt similarity index 100% rename from source/sdk/dotnet/compatibility.txt rename to source/sdk/temp/dotnet/compatibility.txt diff --git a/source/sdk/dotnet/crud.txt b/source/sdk/temp/dotnet/crud.txt similarity index 100% rename from source/sdk/dotnet/crud.txt rename to source/sdk/temp/dotnet/crud.txt diff --git a/source/sdk/dotnet/crud/create.txt b/source/sdk/temp/dotnet/crud/create.txt similarity index 100% rename from source/sdk/dotnet/crud/create.txt rename to source/sdk/temp/dotnet/crud/create.txt diff --git a/source/sdk/dotnet/crud/delete.txt b/source/sdk/temp/dotnet/crud/delete.txt similarity index 100% rename from source/sdk/dotnet/crud/delete.txt rename to source/sdk/temp/dotnet/crud/delete.txt diff --git a/source/sdk/dotnet/crud/filter.txt b/source/sdk/temp/dotnet/crud/filter.txt similarity index 100% rename from source/sdk/dotnet/crud/filter.txt rename to source/sdk/temp/dotnet/crud/filter.txt diff --git a/source/sdk/dotnet/crud/read.txt b/source/sdk/temp/dotnet/crud/read.txt similarity index 100% rename from source/sdk/dotnet/crud/read.txt rename to source/sdk/temp/dotnet/crud/read.txt diff --git a/source/sdk/dotnet/crud/threading.txt b/source/sdk/temp/dotnet/crud/threading.txt similarity index 100% rename from source/sdk/dotnet/crud/threading.txt rename to source/sdk/temp/dotnet/crud/threading.txt diff --git a/source/sdk/dotnet/crud/update.txt b/source/sdk/temp/dotnet/crud/update.txt similarity index 100% rename from source/sdk/dotnet/crud/update.txt rename to source/sdk/temp/dotnet/crud/update.txt diff --git a/source/sdk/dotnet/crud/write-transactions.txt b/source/sdk/temp/dotnet/crud/write-transactions.txt similarity index 100% rename from source/sdk/dotnet/crud/write-transactions.txt rename to source/sdk/temp/dotnet/crud/write-transactions.txt diff --git a/source/sdk/dotnet/facets.toml b/source/sdk/temp/dotnet/facets.toml similarity index 100% rename from source/sdk/dotnet/facets.toml rename to source/sdk/temp/dotnet/facets.toml diff --git a/source/sdk/dotnet/install.txt b/source/sdk/temp/dotnet/install.txt similarity index 100% rename from source/sdk/dotnet/install.txt rename to source/sdk/temp/dotnet/install.txt diff --git a/source/sdk/dotnet/logging.txt b/source/sdk/temp/dotnet/logging.txt similarity index 100% rename from source/sdk/dotnet/logging.txt rename to source/sdk/temp/dotnet/logging.txt diff --git a/source/sdk/dotnet/manage-users/authenticate.txt b/source/sdk/temp/dotnet/manage-users/authenticate.txt similarity index 100% rename from source/sdk/dotnet/manage-users/authenticate.txt rename to source/sdk/temp/dotnet/manage-users/authenticate.txt diff --git a/source/sdk/dotnet/manage-users/create-and-delete-users.txt b/source/sdk/temp/dotnet/manage-users/create-and-delete-users.txt similarity index 100% rename from source/sdk/dotnet/manage-users/create-and-delete-users.txt rename to source/sdk/temp/dotnet/manage-users/create-and-delete-users.txt diff --git a/source/sdk/dotnet/manage-users/custom-user-data.txt b/source/sdk/temp/dotnet/manage-users/custom-user-data.txt similarity index 100% rename from source/sdk/dotnet/manage-users/custom-user-data.txt rename to source/sdk/temp/dotnet/manage-users/custom-user-data.txt diff --git a/source/sdk/dotnet/manage-users/link-user-identities.txt b/source/sdk/temp/dotnet/manage-users/link-user-identities.txt similarity index 100% rename from source/sdk/dotnet/manage-users/link-user-identities.txt rename to source/sdk/temp/dotnet/manage-users/link-user-identities.txt diff --git a/source/sdk/dotnet/manage-users/manage-email-password-users.txt b/source/sdk/temp/dotnet/manage-users/manage-email-password-users.txt similarity index 100% rename from source/sdk/dotnet/manage-users/manage-email-password-users.txt rename to source/sdk/temp/dotnet/manage-users/manage-email-password-users.txt diff --git a/source/sdk/dotnet/manage-users/multi-user-applications.txt b/source/sdk/temp/dotnet/manage-users/multi-user-applications.txt similarity index 100% rename from source/sdk/dotnet/manage-users/multi-user-applications.txt rename to source/sdk/temp/dotnet/manage-users/multi-user-applications.txt diff --git a/source/sdk/dotnet/manage-users/user-metadata.txt b/source/sdk/temp/dotnet/manage-users/user-metadata.txt similarity index 100% rename from source/sdk/dotnet/manage-users/user-metadata.txt rename to source/sdk/temp/dotnet/manage-users/user-metadata.txt diff --git a/source/sdk/dotnet/model-data.txt b/source/sdk/temp/dotnet/model-data.txt similarity index 100% rename from source/sdk/dotnet/model-data.txt rename to source/sdk/temp/dotnet/model-data.txt diff --git a/source/sdk/dotnet/model-data/change-an-object-model.txt b/source/sdk/temp/dotnet/model-data/change-an-object-model.txt similarity index 100% rename from source/sdk/dotnet/model-data/change-an-object-model.txt rename to source/sdk/temp/dotnet/model-data/change-an-object-model.txt diff --git a/source/sdk/dotnet/model-data/data-binding.txt b/source/sdk/temp/dotnet/model-data/data-binding.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-binding.txt rename to source/sdk/temp/dotnet/model-data/data-binding.txt diff --git a/source/sdk/dotnet/model-data/data-types.txt b/source/sdk/temp/dotnet/model-data/data-types.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types.txt rename to source/sdk/temp/dotnet/model-data/data-types.txt diff --git a/source/sdk/dotnet/model-data/data-types/collections.txt b/source/sdk/temp/dotnet/model-data/data-types/collections.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/collections.txt rename to source/sdk/temp/dotnet/model-data/data-types/collections.txt diff --git a/source/sdk/dotnet/model-data/data-types/dictionaries.txt b/source/sdk/temp/dotnet/model-data/data-types/dictionaries.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/dictionaries.txt rename to source/sdk/temp/dotnet/model-data/data-types/dictionaries.txt diff --git a/source/sdk/dotnet/model-data/data-types/embedded-objects.txt b/source/sdk/temp/dotnet/model-data/data-types/embedded-objects.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/embedded-objects.txt rename to source/sdk/temp/dotnet/model-data/data-types/embedded-objects.txt diff --git a/source/sdk/dotnet/model-data/data-types/field-types.txt b/source/sdk/temp/dotnet/model-data/data-types/field-types.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/field-types.txt rename to source/sdk/temp/dotnet/model-data/data-types/field-types.txt diff --git a/source/sdk/dotnet/model-data/data-types/geospatials.txt b/source/sdk/temp/dotnet/model-data/data-types/geospatials.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/geospatials.txt rename to source/sdk/temp/dotnet/model-data/data-types/geospatials.txt diff --git a/source/sdk/dotnet/model-data/data-types/lists.txt b/source/sdk/temp/dotnet/model-data/data-types/lists.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/lists.txt rename to source/sdk/temp/dotnet/model-data/data-types/lists.txt diff --git a/source/sdk/dotnet/model-data/data-types/realm-integer.txt b/source/sdk/temp/dotnet/model-data/data-types/realm-integer.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/realm-integer.txt rename to source/sdk/temp/dotnet/model-data/data-types/realm-integer.txt diff --git a/source/sdk/dotnet/model-data/data-types/realm-value.txt b/source/sdk/temp/dotnet/model-data/data-types/realm-value.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/realm-value.txt rename to source/sdk/temp/dotnet/model-data/data-types/realm-value.txt diff --git a/source/sdk/dotnet/model-data/data-types/sets.txt b/source/sdk/temp/dotnet/model-data/data-types/sets.txt similarity index 100% rename from source/sdk/dotnet/model-data/data-types/sets.txt rename to source/sdk/temp/dotnet/model-data/data-types/sets.txt diff --git a/source/sdk/dotnet/model-data/define-object-model.txt b/source/sdk/temp/dotnet/model-data/define-object-model.txt similarity index 100% rename from source/sdk/dotnet/model-data/define-object-model.txt rename to source/sdk/temp/dotnet/model-data/define-object-model.txt diff --git a/source/sdk/dotnet/model-data/manual-schema.txt b/source/sdk/temp/dotnet/model-data/manual-schema.txt similarity index 100% rename from source/sdk/dotnet/model-data/manual-schema.txt rename to source/sdk/temp/dotnet/model-data/manual-schema.txt diff --git a/source/sdk/dotnet/model-data/object-models-and-schemas.txt b/source/sdk/temp/dotnet/model-data/object-models-and-schemas.txt similarity index 100% rename from source/sdk/dotnet/model-data/object-models-and-schemas.txt rename to source/sdk/temp/dotnet/model-data/object-models-and-schemas.txt diff --git a/source/sdk/dotnet/model-data/relationships.txt b/source/sdk/temp/dotnet/model-data/relationships.txt similarity index 100% rename from source/sdk/dotnet/model-data/relationships.txt rename to source/sdk/temp/dotnet/model-data/relationships.txt diff --git a/source/sdk/dotnet/quick-start.txt b/source/sdk/temp/dotnet/quick-start.txt similarity index 100% rename from source/sdk/dotnet/quick-start.txt rename to source/sdk/temp/dotnet/quick-start.txt diff --git a/source/sdk/dotnet/react-to-changes.txt b/source/sdk/temp/dotnet/react-to-changes.txt similarity index 100% rename from source/sdk/dotnet/react-to-changes.txt rename to source/sdk/temp/dotnet/react-to-changes.txt diff --git a/source/sdk/dotnet/realm-files.txt b/source/sdk/temp/dotnet/realm-files.txt similarity index 100% rename from source/sdk/dotnet/realm-files.txt rename to source/sdk/temp/dotnet/realm-files.txt diff --git a/source/sdk/dotnet/realm-files/bundle-a-realm.txt b/source/sdk/temp/dotnet/realm-files/bundle-a-realm.txt similarity index 100% rename from source/sdk/dotnet/realm-files/bundle-a-realm.txt rename to source/sdk/temp/dotnet/realm-files/bundle-a-realm.txt diff --git a/source/sdk/dotnet/realm-files/compact-realm.txt b/source/sdk/temp/dotnet/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/dotnet/realm-files/compact-realm.txt rename to source/sdk/temp/dotnet/realm-files/compact-realm.txt diff --git a/source/sdk/dotnet/realm-files/delete-a-realm.txt b/source/sdk/temp/dotnet/realm-files/delete-a-realm.txt similarity index 100% rename from source/sdk/dotnet/realm-files/delete-a-realm.txt rename to source/sdk/temp/dotnet/realm-files/delete-a-realm.txt diff --git a/source/sdk/dotnet/realm-files/encrypt-a-realm.txt b/source/sdk/temp/dotnet/realm-files/encrypt-a-realm.txt similarity index 100% rename from source/sdk/dotnet/realm-files/encrypt-a-realm.txt rename to source/sdk/temp/dotnet/realm-files/encrypt-a-realm.txt diff --git a/source/sdk/dotnet/realm-files/realms.txt b/source/sdk/temp/dotnet/realm-files/realms.txt similarity index 100% rename from source/sdk/dotnet/realm-files/realms.txt rename to source/sdk/temp/dotnet/realm-files/realms.txt diff --git a/source/sdk/dotnet/sync.txt b/source/sdk/temp/dotnet/sync.txt similarity index 100% rename from source/sdk/dotnet/sync.txt rename to source/sdk/temp/dotnet/sync.txt diff --git a/source/sdk/dotnet/sync/add-sync-to-app.txt b/source/sdk/temp/dotnet/sync/add-sync-to-app.txt similarity index 100% rename from source/sdk/dotnet/sync/add-sync-to-app.txt rename to source/sdk/temp/dotnet/sync/add-sync-to-app.txt diff --git a/source/sdk/dotnet/sync/asymmetric-sync.txt b/source/sdk/temp/dotnet/sync/asymmetric-sync.txt similarity index 100% rename from source/sdk/dotnet/sync/asymmetric-sync.txt rename to source/sdk/temp/dotnet/sync/asymmetric-sync.txt diff --git a/source/sdk/dotnet/sync/client-reset.txt b/source/sdk/temp/dotnet/sync/client-reset.txt similarity index 100% rename from source/sdk/dotnet/sync/client-reset.txt rename to source/sdk/temp/dotnet/sync/client-reset.txt diff --git a/source/sdk/dotnet/sync/configure-and-open-a-synced-realm.txt b/source/sdk/temp/dotnet/sync/configure-and-open-a-synced-realm.txt similarity index 100% rename from source/sdk/dotnet/sync/configure-and-open-a-synced-realm.txt rename to source/sdk/temp/dotnet/sync/configure-and-open-a-synced-realm.txt diff --git a/source/sdk/dotnet/sync/convert-realm.txt b/source/sdk/temp/dotnet/sync/convert-realm.txt similarity index 100% rename from source/sdk/dotnet/sync/convert-realm.txt rename to source/sdk/temp/dotnet/sync/convert-realm.txt diff --git a/source/sdk/dotnet/sync/flexible-sync.txt b/source/sdk/temp/dotnet/sync/flexible-sync.txt similarity index 100% rename from source/sdk/dotnet/sync/flexible-sync.txt rename to source/sdk/temp/dotnet/sync/flexible-sync.txt diff --git a/source/sdk/dotnet/sync/handle-sync-errors.txt b/source/sdk/temp/dotnet/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/dotnet/sync/handle-sync-errors.txt rename to source/sdk/temp/dotnet/sync/handle-sync-errors.txt diff --git a/source/sdk/dotnet/sync/partition-based-sync.txt b/source/sdk/temp/dotnet/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/dotnet/sync/partition-based-sync.txt rename to source/sdk/temp/dotnet/sync/partition-based-sync.txt diff --git a/source/sdk/dotnet/sync/sync-progress.txt b/source/sdk/temp/dotnet/sync/sync-progress.txt similarity index 100% rename from source/sdk/dotnet/sync/sync-progress.txt rename to source/sdk/temp/dotnet/sync/sync-progress.txt diff --git a/source/sdk/dotnet/sync/sync-session.txt b/source/sdk/temp/dotnet/sync/sync-session.txt similarity index 100% rename from source/sdk/dotnet/sync/sync-session.txt rename to source/sdk/temp/dotnet/sync/sync-session.txt diff --git a/source/sdk/dotnet/sync/write-to-synced-realm.txt b/source/sdk/temp/dotnet/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/dotnet/sync/write-to-synced-realm.txt rename to source/sdk/temp/dotnet/sync/write-to-synced-realm.txt diff --git a/source/sdk/dotnet/telemetry.txt b/source/sdk/temp/dotnet/telemetry.txt similarity index 100% rename from source/sdk/dotnet/telemetry.txt rename to source/sdk/temp/dotnet/telemetry.txt diff --git a/source/sdk/dotnet/troubleshooting.txt b/source/sdk/temp/dotnet/troubleshooting.txt similarity index 100% rename from source/sdk/dotnet/troubleshooting.txt rename to source/sdk/temp/dotnet/troubleshooting.txt diff --git a/source/sdk/dotnet/unity.txt b/source/sdk/temp/dotnet/unity.txt similarity index 100% rename from source/sdk/dotnet/unity.txt rename to source/sdk/temp/dotnet/unity.txt diff --git a/source/sdk/dotnet/work-with-users.txt b/source/sdk/temp/dotnet/work-with-users.txt similarity index 100% rename from source/sdk/dotnet/work-with-users.txt rename to source/sdk/temp/dotnet/work-with-users.txt diff --git a/source/sdk/flutter.txt b/source/sdk/temp/flutter.txt similarity index 100% rename from source/sdk/flutter.txt rename to source/sdk/temp/flutter.txt diff --git a/source/sdk/flutter/app-services.txt b/source/sdk/temp/flutter/app-services.txt similarity index 100% rename from source/sdk/flutter/app-services.txt rename to source/sdk/temp/flutter/app-services.txt diff --git a/source/sdk/flutter/app-services/call-function.txt b/source/sdk/temp/flutter/app-services/call-function.txt similarity index 100% rename from source/sdk/flutter/app-services/call-function.txt rename to source/sdk/temp/flutter/app-services/call-function.txt diff --git a/source/sdk/flutter/app-services/connect-to-app.txt b/source/sdk/temp/flutter/app-services/connect-to-app.txt similarity index 100% rename from source/sdk/flutter/app-services/connect-to-app.txt rename to source/sdk/temp/flutter/app-services/connect-to-app.txt diff --git a/source/sdk/flutter/app-services/graphql-api.txt b/source/sdk/temp/flutter/app-services/graphql-api.txt similarity index 100% rename from source/sdk/flutter/app-services/graphql-api.txt rename to source/sdk/temp/flutter/app-services/graphql-api.txt diff --git a/source/sdk/flutter/crud.txt b/source/sdk/temp/flutter/crud.txt similarity index 100% rename from source/sdk/flutter/crud.txt rename to source/sdk/temp/flutter/crud.txt diff --git a/source/sdk/flutter/crud/create.txt b/source/sdk/temp/flutter/crud/create.txt similarity index 100% rename from source/sdk/flutter/crud/create.txt rename to source/sdk/temp/flutter/crud/create.txt diff --git a/source/sdk/flutter/crud/delete.txt b/source/sdk/temp/flutter/crud/delete.txt similarity index 100% rename from source/sdk/flutter/crud/delete.txt rename to source/sdk/temp/flutter/crud/delete.txt diff --git a/source/sdk/flutter/crud/read.txt b/source/sdk/temp/flutter/crud/read.txt similarity index 100% rename from source/sdk/flutter/crud/read.txt rename to source/sdk/temp/flutter/crud/read.txt diff --git a/source/sdk/flutter/crud/update.txt b/source/sdk/temp/flutter/crud/update.txt similarity index 100% rename from source/sdk/flutter/crud/update.txt rename to source/sdk/temp/flutter/crud/update.txt diff --git a/source/sdk/flutter/facets.toml b/source/sdk/temp/flutter/facets.toml similarity index 100% rename from source/sdk/flutter/facets.toml rename to source/sdk/temp/flutter/facets.toml diff --git a/source/sdk/flutter/install.txt b/source/sdk/temp/flutter/install.txt similarity index 100% rename from source/sdk/flutter/install.txt rename to source/sdk/temp/flutter/install.txt diff --git a/source/sdk/flutter/logging.txt b/source/sdk/temp/flutter/logging.txt similarity index 100% rename from source/sdk/flutter/logging.txt rename to source/sdk/temp/flutter/logging.txt diff --git a/source/sdk/flutter/quick-start.txt b/source/sdk/temp/flutter/quick-start.txt similarity index 100% rename from source/sdk/flutter/quick-start.txt rename to source/sdk/temp/flutter/quick-start.txt diff --git a/source/sdk/flutter/realm-database.txt b/source/sdk/temp/flutter/realm-database.txt similarity index 100% rename from source/sdk/flutter/realm-database.txt rename to source/sdk/temp/flutter/realm-database.txt diff --git a/source/sdk/flutter/realm-database/configure-and-open.txt b/source/sdk/temp/flutter/realm-database/configure-and-open.txt similarity index 100% rename from source/sdk/flutter/realm-database/configure-and-open.txt rename to source/sdk/temp/flutter/realm-database/configure-and-open.txt diff --git a/source/sdk/flutter/realm-database/freeze.txt b/source/sdk/temp/flutter/realm-database/freeze.txt similarity index 100% rename from source/sdk/flutter/realm-database/freeze.txt rename to source/sdk/temp/flutter/realm-database/freeze.txt diff --git a/source/sdk/flutter/realm-database/model-data.txt b/source/sdk/temp/flutter/realm-database/model-data.txt similarity index 100% rename from source/sdk/flutter/realm-database/model-data.txt rename to source/sdk/temp/flutter/realm-database/model-data.txt diff --git a/source/sdk/flutter/realm-database/model-data/data-types.txt b/source/sdk/temp/flutter/realm-database/model-data/data-types.txt similarity index 100% rename from source/sdk/flutter/realm-database/model-data/data-types.txt rename to source/sdk/temp/flutter/realm-database/model-data/data-types.txt diff --git a/source/sdk/flutter/realm-database/model-data/define-realm-object-schema.txt b/source/sdk/temp/flutter/realm-database/model-data/define-realm-object-schema.txt similarity index 100% rename from source/sdk/flutter/realm-database/model-data/define-realm-object-schema.txt rename to source/sdk/temp/flutter/realm-database/model-data/define-realm-object-schema.txt diff --git a/source/sdk/flutter/realm-database/model-data/geospatial.txt b/source/sdk/temp/flutter/realm-database/model-data/geospatial.txt similarity index 100% rename from source/sdk/flutter/realm-database/model-data/geospatial.txt rename to source/sdk/temp/flutter/realm-database/model-data/geospatial.txt diff --git a/source/sdk/flutter/realm-database/model-data/property-annotations.txt b/source/sdk/temp/flutter/realm-database/model-data/property-annotations.txt similarity index 100% rename from source/sdk/flutter/realm-database/model-data/property-annotations.txt rename to source/sdk/temp/flutter/realm-database/model-data/property-annotations.txt diff --git a/source/sdk/flutter/realm-database/model-data/relationships.txt b/source/sdk/temp/flutter/realm-database/model-data/relationships.txt similarity index 100% rename from source/sdk/flutter/realm-database/model-data/relationships.txt rename to source/sdk/temp/flutter/realm-database/model-data/relationships.txt diff --git a/source/sdk/flutter/realm-database/model-data/update-realm-object-schema.txt b/source/sdk/temp/flutter/realm-database/model-data/update-realm-object-schema.txt similarity index 100% rename from source/sdk/flutter/realm-database/model-data/update-realm-object-schema.txt rename to source/sdk/temp/flutter/realm-database/model-data/update-realm-object-schema.txt diff --git a/source/sdk/flutter/realm-database/react-to-changes.txt b/source/sdk/temp/flutter/realm-database/react-to-changes.txt similarity index 100% rename from source/sdk/flutter/realm-database/react-to-changes.txt rename to source/sdk/temp/flutter/realm-database/react-to-changes.txt diff --git a/source/sdk/flutter/realm-database/realm-files.txt b/source/sdk/temp/flutter/realm-database/realm-files.txt similarity index 100% rename from source/sdk/flutter/realm-database/realm-files.txt rename to source/sdk/temp/flutter/realm-database/realm-files.txt diff --git a/source/sdk/flutter/realm-database/realm-files/bundle.txt b/source/sdk/temp/flutter/realm-database/realm-files/bundle.txt similarity index 100% rename from source/sdk/flutter/realm-database/realm-files/bundle.txt rename to source/sdk/temp/flutter/realm-database/realm-files/bundle.txt diff --git a/source/sdk/flutter/realm-database/realm-files/compact.txt b/source/sdk/temp/flutter/realm-database/realm-files/compact.txt similarity index 100% rename from source/sdk/flutter/realm-database/realm-files/compact.txt rename to source/sdk/temp/flutter/realm-database/realm-files/compact.txt diff --git a/source/sdk/flutter/realm-database/realm-files/delete.txt b/source/sdk/temp/flutter/realm-database/realm-files/delete.txt similarity index 100% rename from source/sdk/flutter/realm-database/realm-files/delete.txt rename to source/sdk/temp/flutter/realm-database/realm-files/delete.txt diff --git a/source/sdk/flutter/realm-database/realm-files/encrypt.txt b/source/sdk/temp/flutter/realm-database/realm-files/encrypt.txt similarity index 100% rename from source/sdk/flutter/realm-database/realm-files/encrypt.txt rename to source/sdk/temp/flutter/realm-database/realm-files/encrypt.txt diff --git a/source/sdk/flutter/sync.txt b/source/sdk/temp/flutter/sync.txt similarity index 100% rename from source/sdk/flutter/sync.txt rename to source/sdk/temp/flutter/sync.txt diff --git a/source/sdk/flutter/sync/add-sync-to-app.txt b/source/sdk/temp/flutter/sync/add-sync-to-app.txt similarity index 100% rename from source/sdk/flutter/sync/add-sync-to-app.txt rename to source/sdk/temp/flutter/sync/add-sync-to-app.txt diff --git a/source/sdk/flutter/sync/handle-sync-errors.txt b/source/sdk/temp/flutter/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/flutter/sync/handle-sync-errors.txt rename to source/sdk/temp/flutter/sync/handle-sync-errors.txt diff --git a/source/sdk/flutter/sync/log-level.txt b/source/sdk/temp/flutter/sync/log-level.txt similarity index 100% rename from source/sdk/flutter/sync/log-level.txt rename to source/sdk/temp/flutter/sync/log-level.txt diff --git a/source/sdk/flutter/sync/manage-sync-session.txt b/source/sdk/temp/flutter/sync/manage-sync-session.txt similarity index 100% rename from source/sdk/flutter/sync/manage-sync-session.txt rename to source/sdk/temp/flutter/sync/manage-sync-session.txt diff --git a/source/sdk/flutter/sync/manage-sync-subscriptions.txt b/source/sdk/temp/flutter/sync/manage-sync-subscriptions.txt similarity index 100% rename from source/sdk/flutter/sync/manage-sync-subscriptions.txt rename to source/sdk/temp/flutter/sync/manage-sync-subscriptions.txt diff --git a/source/sdk/flutter/sync/open-synced-realm.txt b/source/sdk/temp/flutter/sync/open-synced-realm.txt similarity index 100% rename from source/sdk/flutter/sync/open-synced-realm.txt rename to source/sdk/temp/flutter/sync/open-synced-realm.txt diff --git a/source/sdk/flutter/sync/stream-data-to-atlas.txt b/source/sdk/temp/flutter/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/flutter/sync/stream-data-to-atlas.txt rename to source/sdk/temp/flutter/sync/stream-data-to-atlas.txt diff --git a/source/sdk/flutter/sync/sync-multiple-processes.txt b/source/sdk/temp/flutter/sync/sync-multiple-processes.txt similarity index 100% rename from source/sdk/flutter/sync/sync-multiple-processes.txt rename to source/sdk/temp/flutter/sync/sync-multiple-processes.txt diff --git a/source/sdk/flutter/sync/write-to-synced-realm.txt b/source/sdk/temp/flutter/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/flutter/sync/write-to-synced-realm.txt rename to source/sdk/temp/flutter/sync/write-to-synced-realm.txt diff --git a/source/sdk/flutter/telemetry.txt b/source/sdk/temp/flutter/telemetry.txt similarity index 100% rename from source/sdk/flutter/telemetry.txt rename to source/sdk/temp/flutter/telemetry.txt diff --git a/source/sdk/flutter/test-and-debug.txt b/source/sdk/temp/flutter/test-and-debug.txt similarity index 100% rename from source/sdk/flutter/test-and-debug.txt rename to source/sdk/temp/flutter/test-and-debug.txt diff --git a/source/sdk/flutter/troubleshooting.txt b/source/sdk/temp/flutter/troubleshooting.txt similarity index 100% rename from source/sdk/flutter/troubleshooting.txt rename to source/sdk/temp/flutter/troubleshooting.txt diff --git a/source/sdk/flutter/upgrade-to-v2.txt b/source/sdk/temp/flutter/upgrade-to-v2.txt similarity index 100% rename from source/sdk/flutter/upgrade-to-v2.txt rename to source/sdk/temp/flutter/upgrade-to-v2.txt diff --git a/source/sdk/flutter/users.txt b/source/sdk/temp/flutter/users.txt similarity index 100% rename from source/sdk/flutter/users.txt rename to source/sdk/temp/flutter/users.txt diff --git a/source/sdk/flutter/users/access-token.txt b/source/sdk/temp/flutter/users/access-token.txt similarity index 100% rename from source/sdk/flutter/users/access-token.txt rename to source/sdk/temp/flutter/users/access-token.txt diff --git a/source/sdk/flutter/users/authenticate.txt b/source/sdk/temp/flutter/users/authenticate.txt similarity index 100% rename from source/sdk/flutter/users/authenticate.txt rename to source/sdk/temp/flutter/users/authenticate.txt diff --git a/source/sdk/flutter/users/custom-user-data.txt b/source/sdk/temp/flutter/users/custom-user-data.txt similarity index 100% rename from source/sdk/flutter/users/custom-user-data.txt rename to source/sdk/temp/flutter/users/custom-user-data.txt diff --git a/source/sdk/flutter/users/delete-user.txt b/source/sdk/temp/flutter/users/delete-user.txt similarity index 100% rename from source/sdk/flutter/users/delete-user.txt rename to source/sdk/temp/flutter/users/delete-user.txt diff --git a/source/sdk/flutter/users/email-password-users.txt b/source/sdk/temp/flutter/users/email-password-users.txt similarity index 100% rename from source/sdk/flutter/users/email-password-users.txt rename to source/sdk/temp/flutter/users/email-password-users.txt diff --git a/source/sdk/flutter/users/link-user-identities.txt b/source/sdk/temp/flutter/users/link-user-identities.txt similarity index 100% rename from source/sdk/flutter/users/link-user-identities.txt rename to source/sdk/temp/flutter/users/link-user-identities.txt diff --git a/source/sdk/flutter/users/multiple-users.txt b/source/sdk/temp/flutter/users/multiple-users.txt similarity index 100% rename from source/sdk/flutter/users/multiple-users.txt rename to source/sdk/temp/flutter/users/multiple-users.txt diff --git a/source/sdk/flutter/users/user-metadata.txt b/source/sdk/temp/flutter/users/user-metadata.txt similarity index 100% rename from source/sdk/flutter/users/user-metadata.txt rename to source/sdk/temp/flutter/users/user-metadata.txt diff --git a/source/sdk/java.txt b/source/sdk/temp/java.txt similarity index 100% rename from source/sdk/java.txt rename to source/sdk/temp/java.txt diff --git a/source/sdk/java/adapters.txt b/source/sdk/temp/java/adapters.txt similarity index 100% rename from source/sdk/java/adapters.txt rename to source/sdk/temp/java/adapters.txt diff --git a/source/sdk/java/api.txt b/source/sdk/temp/java/api.txt similarity index 100% rename from source/sdk/java/api.txt rename to source/sdk/temp/java/api.txt diff --git a/source/sdk/java/api/index.txt b/source/sdk/temp/java/api/index.txt similarity index 100% rename from source/sdk/java/api/index.txt rename to source/sdk/temp/java/api/index.txt diff --git a/source/sdk/java/api/io.txt b/source/sdk/temp/java/api/io.txt similarity index 100% rename from source/sdk/java/api/io.txt rename to source/sdk/temp/java/api/io.txt diff --git a/source/sdk/java/api/io/realm.txt b/source/sdk/temp/java/api/io/realm.txt similarity index 100% rename from source/sdk/java/api/io/realm.txt rename to source/sdk/temp/java/api/io/realm.txt diff --git a/source/sdk/java/api/io/realm/Case.txt b/source/sdk/temp/java/api/io/realm/Case.txt similarity index 100% rename from source/sdk/java/api/io/realm/Case.txt rename to source/sdk/temp/java/api/io/realm/Case.txt diff --git a/source/sdk/java/api/io/realm/CollectionUtils.txt b/source/sdk/temp/java/api/io/realm/CollectionUtils.txt similarity index 100% rename from source/sdk/java/api/io/realm/CollectionUtils.txt rename to source/sdk/temp/java/api/io/realm/CollectionUtils.txt diff --git a/source/sdk/java/api/io/realm/CompactOnLaunchCallback.txt b/source/sdk/temp/java/api/io/realm/CompactOnLaunchCallback.txt similarity index 100% rename from source/sdk/java/api/io/realm/CompactOnLaunchCallback.txt rename to source/sdk/temp/java/api/io/realm/CompactOnLaunchCallback.txt diff --git a/source/sdk/java/api/io/realm/DefaultCompactOnLaunchCallback.txt b/source/sdk/temp/java/api/io/realm/DefaultCompactOnLaunchCallback.txt similarity index 100% rename from source/sdk/java/api/io/realm/DefaultCompactOnLaunchCallback.txt rename to source/sdk/temp/java/api/io/realm/DefaultCompactOnLaunchCallback.txt diff --git a/source/sdk/java/api/io/realm/DynamicRealm.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm.txt similarity index 100% rename from source/sdk/java/api/io/realm/DynamicRealm.txt rename to source/sdk/temp/java/api/io/realm/DynamicRealm.txt diff --git a/source/sdk/java/api/io/realm/DynamicRealm/Callback.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Callback.txt similarity index 100% rename from source/sdk/java/api/io/realm/DynamicRealm/Callback.txt rename to source/sdk/temp/java/api/io/realm/DynamicRealm/Callback.txt diff --git a/source/sdk/java/api/io/realm/DynamicRealm/Transaction.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction.txt similarity index 100% rename from source/sdk/java/api/io/realm/DynamicRealm/Transaction.txt rename to source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction.txt diff --git a/source/sdk/java/api/io/realm/DynamicRealm/Transaction/Callback.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/Callback.txt similarity index 100% rename from source/sdk/java/api/io/realm/DynamicRealm/Transaction/Callback.txt rename to source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/Callback.txt diff --git a/source/sdk/java/api/io/realm/DynamicRealm/Transaction/OnError.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnError.txt similarity index 100% rename from source/sdk/java/api/io/realm/DynamicRealm/Transaction/OnError.txt rename to source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnError.txt diff --git a/source/sdk/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt similarity index 100% rename from source/sdk/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt rename to source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt diff --git a/source/sdk/java/api/io/realm/DynamicRealmObject.txt b/source/sdk/temp/java/api/io/realm/DynamicRealmObject.txt similarity index 100% rename from source/sdk/java/api/io/realm/DynamicRealmObject.txt rename to source/sdk/temp/java/api/io/realm/DynamicRealmObject.txt diff --git a/source/sdk/java/api/io/realm/FieldAttribute.txt b/source/sdk/temp/java/api/io/realm/FieldAttribute.txt similarity index 100% rename from source/sdk/java/api/io/realm/FieldAttribute.txt rename to source/sdk/temp/java/api/io/realm/FieldAttribute.txt diff --git a/source/sdk/java/api/io/realm/FrozenPendingRow.txt b/source/sdk/temp/java/api/io/realm/FrozenPendingRow.txt similarity index 100% rename from source/sdk/java/api/io/realm/FrozenPendingRow.txt rename to source/sdk/temp/java/api/io/realm/FrozenPendingRow.txt diff --git a/source/sdk/java/api/io/realm/ImportFlag.txt b/source/sdk/temp/java/api/io/realm/ImportFlag.txt similarity index 100% rename from source/sdk/java/api/io/realm/ImportFlag.txt rename to source/sdk/temp/java/api/io/realm/ImportFlag.txt diff --git a/source/sdk/java/api/io/realm/MapChangeListener.txt b/source/sdk/temp/java/api/io/realm/MapChangeListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/MapChangeListener.txt rename to source/sdk/temp/java/api/io/realm/MapChangeListener.txt diff --git a/source/sdk/java/api/io/realm/MapChangeSet.txt b/source/sdk/temp/java/api/io/realm/MapChangeSet.txt similarity index 100% rename from source/sdk/java/api/io/realm/MapChangeSet.txt rename to source/sdk/temp/java/api/io/realm/MapChangeSet.txt diff --git a/source/sdk/java/api/io/realm/MutableRealmInteger.txt b/source/sdk/temp/java/api/io/realm/MutableRealmInteger.txt similarity index 100% rename from source/sdk/java/api/io/realm/MutableRealmInteger.txt rename to source/sdk/temp/java/api/io/realm/MutableRealmInteger.txt diff --git a/source/sdk/java/api/io/realm/ObjectChangeSet.txt b/source/sdk/temp/java/api/io/realm/ObjectChangeSet.txt similarity index 100% rename from source/sdk/java/api/io/realm/ObjectChangeSet.txt rename to source/sdk/temp/java/api/io/realm/ObjectChangeSet.txt diff --git a/source/sdk/java/api/io/realm/OrderedCollectionChangeSet.txt b/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet.txt similarity index 100% rename from source/sdk/java/api/io/realm/OrderedCollectionChangeSet.txt rename to source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet.txt diff --git a/source/sdk/java/api/io/realm/OrderedCollectionChangeSet/Range.txt b/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/Range.txt similarity index 100% rename from source/sdk/java/api/io/realm/OrderedCollectionChangeSet/Range.txt rename to source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/Range.txt diff --git a/source/sdk/java/api/io/realm/OrderedCollectionChangeSet/State.txt b/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/State.txt similarity index 100% rename from source/sdk/java/api/io/realm/OrderedCollectionChangeSet/State.txt rename to source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/State.txt diff --git a/source/sdk/java/api/io/realm/OrderedRealmCollection.txt b/source/sdk/temp/java/api/io/realm/OrderedRealmCollection.txt similarity index 100% rename from source/sdk/java/api/io/realm/OrderedRealmCollection.txt rename to source/sdk/temp/java/api/io/realm/OrderedRealmCollection.txt diff --git a/source/sdk/java/api/io/realm/OrderedRealmCollectionChangeListener.txt b/source/sdk/temp/java/api/io/realm/OrderedRealmCollectionChangeListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/OrderedRealmCollectionChangeListener.txt rename to source/sdk/temp/java/api/io/realm/OrderedRealmCollectionChangeListener.txt diff --git a/source/sdk/java/api/io/realm/OrderedRealmCollectionSnapshot.txt b/source/sdk/temp/java/api/io/realm/OrderedRealmCollectionSnapshot.txt similarity index 100% rename from source/sdk/java/api/io/realm/OrderedRealmCollectionSnapshot.txt rename to source/sdk/temp/java/api/io/realm/OrderedRealmCollectionSnapshot.txt diff --git a/source/sdk/java/api/io/realm/ProxyState.txt b/source/sdk/temp/java/api/io/realm/ProxyState.txt similarity index 100% rename from source/sdk/java/api/io/realm/ProxyState.txt rename to source/sdk/temp/java/api/io/realm/ProxyState.txt diff --git a/source/sdk/java/api/io/realm/Realm.txt b/source/sdk/temp/java/api/io/realm/Realm.txt similarity index 100% rename from source/sdk/java/api/io/realm/Realm.txt rename to source/sdk/temp/java/api/io/realm/Realm.txt diff --git a/source/sdk/java/api/io/realm/Realm/Callback.txt b/source/sdk/temp/java/api/io/realm/Realm/Callback.txt similarity index 100% rename from source/sdk/java/api/io/realm/Realm/Callback.txt rename to source/sdk/temp/java/api/io/realm/Realm/Callback.txt diff --git a/source/sdk/java/api/io/realm/Realm/Transaction.txt b/source/sdk/temp/java/api/io/realm/Realm/Transaction.txt similarity index 100% rename from source/sdk/java/api/io/realm/Realm/Transaction.txt rename to source/sdk/temp/java/api/io/realm/Realm/Transaction.txt diff --git a/source/sdk/java/api/io/realm/Realm/Transaction/Callback.txt b/source/sdk/temp/java/api/io/realm/Realm/Transaction/Callback.txt similarity index 100% rename from source/sdk/java/api/io/realm/Realm/Transaction/Callback.txt rename to source/sdk/temp/java/api/io/realm/Realm/Transaction/Callback.txt diff --git a/source/sdk/java/api/io/realm/Realm/Transaction/OnError.txt b/source/sdk/temp/java/api/io/realm/Realm/Transaction/OnError.txt similarity index 100% rename from source/sdk/java/api/io/realm/Realm/Transaction/OnError.txt rename to source/sdk/temp/java/api/io/realm/Realm/Transaction/OnError.txt diff --git a/source/sdk/java/api/io/realm/Realm/Transaction/OnSuccess.txt b/source/sdk/temp/java/api/io/realm/Realm/Transaction/OnSuccess.txt similarity index 100% rename from source/sdk/java/api/io/realm/Realm/Transaction/OnSuccess.txt rename to source/sdk/temp/java/api/io/realm/Realm/Transaction/OnSuccess.txt diff --git a/source/sdk/java/api/io/realm/RealmAny.txt b/source/sdk/temp/java/api/io/realm/RealmAny.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmAny.txt rename to source/sdk/temp/java/api/io/realm/RealmAny.txt diff --git a/source/sdk/java/api/io/realm/RealmAny/Type.txt b/source/sdk/temp/java/api/io/realm/RealmAny/Type.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmAny/Type.txt rename to source/sdk/temp/java/api/io/realm/RealmAny/Type.txt diff --git a/source/sdk/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt b/source/sdk/temp/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt rename to source/sdk/temp/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt diff --git a/source/sdk/java/api/io/realm/RealmAnyOperator.txt b/source/sdk/temp/java/api/io/realm/RealmAnyOperator.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmAnyOperator.txt rename to source/sdk/temp/java/api/io/realm/RealmAnyOperator.txt diff --git a/source/sdk/java/api/io/realm/RealmAsyncTask.txt b/source/sdk/temp/java/api/io/realm/RealmAsyncTask.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmAsyncTask.txt rename to source/sdk/temp/java/api/io/realm/RealmAsyncTask.txt diff --git a/source/sdk/java/api/io/realm/RealmChangeListener.txt b/source/sdk/temp/java/api/io/realm/RealmChangeListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmChangeListener.txt rename to source/sdk/temp/java/api/io/realm/RealmChangeListener.txt diff --git a/source/sdk/java/api/io/realm/RealmCollection.txt b/source/sdk/temp/java/api/io/realm/RealmCollection.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmCollection.txt rename to source/sdk/temp/java/api/io/realm/RealmCollection.txt diff --git a/source/sdk/java/api/io/realm/RealmConfiguration.txt b/source/sdk/temp/java/api/io/realm/RealmConfiguration.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmConfiguration.txt rename to source/sdk/temp/java/api/io/realm/RealmConfiguration.txt diff --git a/source/sdk/java/api/io/realm/RealmConfiguration/Builder.txt b/source/sdk/temp/java/api/io/realm/RealmConfiguration/Builder.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmConfiguration/Builder.txt rename to source/sdk/temp/java/api/io/realm/RealmConfiguration/Builder.txt diff --git a/source/sdk/java/api/io/realm/RealmDictionary.txt b/source/sdk/temp/java/api/io/realm/RealmDictionary.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmDictionary.txt rename to source/sdk/temp/java/api/io/realm/RealmDictionary.txt diff --git a/source/sdk/java/api/io/realm/RealmFieldType.txt b/source/sdk/temp/java/api/io/realm/RealmFieldType.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmFieldType.txt rename to source/sdk/temp/java/api/io/realm/RealmFieldType.txt diff --git a/source/sdk/java/api/io/realm/RealmList.txt b/source/sdk/temp/java/api/io/realm/RealmList.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmList.txt rename to source/sdk/temp/java/api/io/realm/RealmList.txt diff --git a/source/sdk/java/api/io/realm/RealmMap.txt b/source/sdk/temp/java/api/io/realm/RealmMap.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmMap.txt rename to source/sdk/temp/java/api/io/realm/RealmMap.txt diff --git a/source/sdk/java/api/io/realm/RealmMigration.txt b/source/sdk/temp/java/api/io/realm/RealmMigration.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmMigration.txt rename to source/sdk/temp/java/api/io/realm/RealmMigration.txt diff --git a/source/sdk/java/api/io/realm/RealmModel.txt b/source/sdk/temp/java/api/io/realm/RealmModel.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmModel.txt rename to source/sdk/temp/java/api/io/realm/RealmModel.txt diff --git a/source/sdk/java/api/io/realm/RealmObject.txt b/source/sdk/temp/java/api/io/realm/RealmObject.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmObject.txt rename to source/sdk/temp/java/api/io/realm/RealmObject.txt diff --git a/source/sdk/java/api/io/realm/RealmObjectChangeListener.txt b/source/sdk/temp/java/api/io/realm/RealmObjectChangeListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmObjectChangeListener.txt rename to source/sdk/temp/java/api/io/realm/RealmObjectChangeListener.txt diff --git a/source/sdk/java/api/io/realm/RealmObjectSchema.txt b/source/sdk/temp/java/api/io/realm/RealmObjectSchema.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmObjectSchema.txt rename to source/sdk/temp/java/api/io/realm/RealmObjectSchema.txt diff --git a/source/sdk/java/api/io/realm/RealmObjectSchema/Function.txt b/source/sdk/temp/java/api/io/realm/RealmObjectSchema/Function.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmObjectSchema/Function.txt rename to source/sdk/temp/java/api/io/realm/RealmObjectSchema/Function.txt diff --git a/source/sdk/java/api/io/realm/RealmQuery.txt b/source/sdk/temp/java/api/io/realm/RealmQuery.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmQuery.txt rename to source/sdk/temp/java/api/io/realm/RealmQuery.txt diff --git a/source/sdk/java/api/io/realm/RealmResults.txt b/source/sdk/temp/java/api/io/realm/RealmResults.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmResults.txt rename to source/sdk/temp/java/api/io/realm/RealmResults.txt diff --git a/source/sdk/java/api/io/realm/RealmSchema.txt b/source/sdk/temp/java/api/io/realm/RealmSchema.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmSchema.txt rename to source/sdk/temp/java/api/io/realm/RealmSchema.txt diff --git a/source/sdk/java/api/io/realm/RealmSet.txt b/source/sdk/temp/java/api/io/realm/RealmSet.txt similarity index 100% rename from source/sdk/java/api/io/realm/RealmSet.txt rename to source/sdk/temp/java/api/io/realm/RealmSet.txt diff --git a/source/sdk/java/api/io/realm/SetChangeListener.txt b/source/sdk/temp/java/api/io/realm/SetChangeListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/SetChangeListener.txt rename to source/sdk/temp/java/api/io/realm/SetChangeListener.txt diff --git a/source/sdk/java/api/io/realm/SetChangeSet.txt b/source/sdk/temp/java/api/io/realm/SetChangeSet.txt similarity index 100% rename from source/sdk/java/api/io/realm/SetChangeSet.txt rename to source/sdk/temp/java/api/io/realm/SetChangeSet.txt diff --git a/source/sdk/java/api/io/realm/Sort.txt b/source/sdk/temp/java/api/io/realm/Sort.txt similarity index 100% rename from source/sdk/java/api/io/realm/Sort.txt rename to source/sdk/temp/java/api/io/realm/Sort.txt diff --git a/source/sdk/java/api/io/realm/annotations.txt b/source/sdk/temp/java/api/io/realm/annotations.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations.txt rename to source/sdk/temp/java/api/io/realm/annotations.txt diff --git a/source/sdk/java/api/io/realm/annotations/Beta.txt b/source/sdk/temp/java/api/io/realm/annotations/Beta.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/Beta.txt rename to source/sdk/temp/java/api/io/realm/annotations/Beta.txt diff --git a/source/sdk/java/api/io/realm/annotations/Ignore.txt b/source/sdk/temp/java/api/io/realm/annotations/Ignore.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/Ignore.txt rename to source/sdk/temp/java/api/io/realm/annotations/Ignore.txt diff --git a/source/sdk/java/api/io/realm/annotations/Index.txt b/source/sdk/temp/java/api/io/realm/annotations/Index.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/Index.txt rename to source/sdk/temp/java/api/io/realm/annotations/Index.txt diff --git a/source/sdk/java/api/io/realm/annotations/LinkingObjects.txt b/source/sdk/temp/java/api/io/realm/annotations/LinkingObjects.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/LinkingObjects.txt rename to source/sdk/temp/java/api/io/realm/annotations/LinkingObjects.txt diff --git a/source/sdk/java/api/io/realm/annotations/PrimaryKey.txt b/source/sdk/temp/java/api/io/realm/annotations/PrimaryKey.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/PrimaryKey.txt rename to source/sdk/temp/java/api/io/realm/annotations/PrimaryKey.txt diff --git a/source/sdk/java/api/io/realm/annotations/RealmClass.txt b/source/sdk/temp/java/api/io/realm/annotations/RealmClass.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/RealmClass.txt rename to source/sdk/temp/java/api/io/realm/annotations/RealmClass.txt diff --git a/source/sdk/java/api/io/realm/annotations/RealmField.txt b/source/sdk/temp/java/api/io/realm/annotations/RealmField.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/RealmField.txt rename to source/sdk/temp/java/api/io/realm/annotations/RealmField.txt diff --git a/source/sdk/java/api/io/realm/annotations/RealmModule.txt b/source/sdk/temp/java/api/io/realm/annotations/RealmModule.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/RealmModule.txt rename to source/sdk/temp/java/api/io/realm/annotations/RealmModule.txt diff --git a/source/sdk/java/api/io/realm/annotations/RealmNamingPolicy.txt b/source/sdk/temp/java/api/io/realm/annotations/RealmNamingPolicy.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/RealmNamingPolicy.txt rename to source/sdk/temp/java/api/io/realm/annotations/RealmNamingPolicy.txt diff --git a/source/sdk/java/api/io/realm/annotations/Required.txt b/source/sdk/temp/java/api/io/realm/annotations/Required.txt similarity index 100% rename from source/sdk/java/api/io/realm/annotations/Required.txt rename to source/sdk/temp/java/api/io/realm/annotations/Required.txt diff --git a/source/sdk/java/api/io/realm/coroutines.txt b/source/sdk/temp/java/api/io/realm/coroutines.txt similarity index 100% rename from source/sdk/java/api/io/realm/coroutines.txt rename to source/sdk/temp/java/api/io/realm/coroutines.txt diff --git a/source/sdk/java/api/io/realm/coroutines/FlowFactory.txt b/source/sdk/temp/java/api/io/realm/coroutines/FlowFactory.txt similarity index 100% rename from source/sdk/java/api/io/realm/coroutines/FlowFactory.txt rename to source/sdk/temp/java/api/io/realm/coroutines/FlowFactory.txt diff --git a/source/sdk/java/api/io/realm/coroutines/RealmFlowFactory.txt b/source/sdk/temp/java/api/io/realm/coroutines/RealmFlowFactory.txt similarity index 100% rename from source/sdk/java/api/io/realm/coroutines/RealmFlowFactory.txt rename to source/sdk/temp/java/api/io/realm/coroutines/RealmFlowFactory.txt diff --git a/source/sdk/java/api/io/realm/exceptions.txt b/source/sdk/temp/java/api/io/realm/exceptions.txt similarity index 100% rename from source/sdk/java/api/io/realm/exceptions.txt rename to source/sdk/temp/java/api/io/realm/exceptions.txt diff --git a/source/sdk/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt b/source/sdk/temp/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt similarity index 100% rename from source/sdk/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt rename to source/sdk/temp/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt diff --git a/source/sdk/java/api/io/realm/exceptions/RealmError.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmError.txt similarity index 100% rename from source/sdk/java/api/io/realm/exceptions/RealmError.txt rename to source/sdk/temp/java/api/io/realm/exceptions/RealmError.txt diff --git a/source/sdk/java/api/io/realm/exceptions/RealmException.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmException.txt similarity index 100% rename from source/sdk/java/api/io/realm/exceptions/RealmException.txt rename to source/sdk/temp/java/api/io/realm/exceptions/RealmException.txt diff --git a/source/sdk/java/api/io/realm/exceptions/RealmFileException.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmFileException.txt similarity index 100% rename from source/sdk/java/api/io/realm/exceptions/RealmFileException.txt rename to source/sdk/temp/java/api/io/realm/exceptions/RealmFileException.txt diff --git a/source/sdk/java/api/io/realm/exceptions/RealmFileException/Kind.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmFileException/Kind.txt similarity index 100% rename from source/sdk/java/api/io/realm/exceptions/RealmFileException/Kind.txt rename to source/sdk/temp/java/api/io/realm/exceptions/RealmFileException/Kind.txt diff --git a/source/sdk/java/api/io/realm/exceptions/RealmMigrationNeededException.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmMigrationNeededException.txt similarity index 100% rename from source/sdk/java/api/io/realm/exceptions/RealmMigrationNeededException.txt rename to source/sdk/temp/java/api/io/realm/exceptions/RealmMigrationNeededException.txt diff --git a/source/sdk/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt similarity index 100% rename from source/sdk/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt rename to source/sdk/temp/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt diff --git a/source/sdk/java/api/io/realm/gradle.txt b/source/sdk/temp/java/api/io/realm/gradle.txt similarity index 100% rename from source/sdk/java/api/io/realm/gradle.txt rename to source/sdk/temp/java/api/io/realm/gradle.txt diff --git a/source/sdk/java/api/io/realm/gradle/RealmPluginExtension.txt b/source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension.txt similarity index 100% rename from source/sdk/java/api/io/realm/gradle/RealmPluginExtension.txt rename to source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension.txt diff --git a/source/sdk/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt b/source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt rename to source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt diff --git a/source/sdk/java/api/io/realm/log.txt b/source/sdk/temp/java/api/io/realm/log.txt similarity index 100% rename from source/sdk/java/api/io/realm/log.txt rename to source/sdk/temp/java/api/io/realm/log.txt diff --git a/source/sdk/java/api/io/realm/log/LogLevel.txt b/source/sdk/temp/java/api/io/realm/log/LogLevel.txt similarity index 100% rename from source/sdk/java/api/io/realm/log/LogLevel.txt rename to source/sdk/temp/java/api/io/realm/log/LogLevel.txt diff --git a/source/sdk/java/api/io/realm/log/RealmLog.txt b/source/sdk/temp/java/api/io/realm/log/RealmLog.txt similarity index 100% rename from source/sdk/java/api/io/realm/log/RealmLog.txt rename to source/sdk/temp/java/api/io/realm/log/RealmLog.txt diff --git a/source/sdk/java/api/io/realm/log/RealmLogger.txt b/source/sdk/temp/java/api/io/realm/log/RealmLogger.txt similarity index 100% rename from source/sdk/java/api/io/realm/log/RealmLogger.txt rename to source/sdk/temp/java/api/io/realm/log/RealmLogger.txt diff --git a/source/sdk/java/api/io/realm/mongodb.txt b/source/sdk/temp/java/api/io/realm/mongodb.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb.txt rename to source/sdk/temp/java/api/io/realm/mongodb.txt diff --git a/source/sdk/java/api/io/realm/mongodb/App.txt b/source/sdk/temp/java/api/io/realm/mongodb/App.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/App.txt rename to source/sdk/temp/java/api/io/realm/mongodb/App.txt diff --git a/source/sdk/java/api/io/realm/mongodb/App/Callback.txt b/source/sdk/temp/java/api/io/realm/mongodb/App/Callback.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/App/Callback.txt rename to source/sdk/temp/java/api/io/realm/mongodb/App/Callback.txt diff --git a/source/sdk/java/api/io/realm/mongodb/App/Result.txt b/source/sdk/temp/java/api/io/realm/mongodb/App/Result.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/App/Result.txt rename to source/sdk/temp/java/api/io/realm/mongodb/App/Result.txt diff --git a/source/sdk/java/api/io/realm/mongodb/AppConfiguration.txt b/source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/AppConfiguration.txt rename to source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration.txt diff --git a/source/sdk/java/api/io/realm/mongodb/AppConfiguration/Builder.txt b/source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration/Builder.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/AppConfiguration/Builder.txt rename to source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration/Builder.txt diff --git a/source/sdk/java/api/io/realm/mongodb/AppException.txt b/source/sdk/temp/java/api/io/realm/mongodb/AppException.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/AppException.txt rename to source/sdk/temp/java/api/io/realm/mongodb/AppException.txt diff --git a/source/sdk/java/api/io/realm/mongodb/AuthenticationListener.txt b/source/sdk/temp/java/api/io/realm/mongodb/AuthenticationListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/AuthenticationListener.txt rename to source/sdk/temp/java/api/io/realm/mongodb/AuthenticationListener.txt diff --git a/source/sdk/java/api/io/realm/mongodb/Credentials.txt b/source/sdk/temp/java/api/io/realm/mongodb/Credentials.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/Credentials.txt rename to source/sdk/temp/java/api/io/realm/mongodb/Credentials.txt diff --git a/source/sdk/java/api/io/realm/mongodb/Credentials/Provider.txt b/source/sdk/temp/java/api/io/realm/mongodb/Credentials/Provider.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/Credentials/Provider.txt rename to source/sdk/temp/java/api/io/realm/mongodb/Credentials/Provider.txt diff --git a/source/sdk/java/api/io/realm/mongodb/ErrorCode.txt b/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/ErrorCode.txt rename to source/sdk/temp/java/api/io/realm/mongodb/ErrorCode.txt diff --git a/source/sdk/java/api/io/realm/mongodb/ErrorCode/Category.txt b/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Category.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/ErrorCode/Category.txt rename to source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Category.txt diff --git a/source/sdk/java/api/io/realm/mongodb/ErrorCode/Type.txt b/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Type.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/ErrorCode/Type.txt rename to source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Type.txt diff --git a/source/sdk/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt b/source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt rename to source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt diff --git a/source/sdk/java/api/io/realm/mongodb/RealmEventStreamTask.txt b/source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamTask.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/RealmEventStreamTask.txt rename to source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamTask.txt diff --git a/source/sdk/java/api/io/realm/mongodb/RealmResultTask.txt b/source/sdk/temp/java/api/io/realm/mongodb/RealmResultTask.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/RealmResultTask.txt rename to source/sdk/temp/java/api/io/realm/mongodb/RealmResultTask.txt diff --git a/source/sdk/java/api/io/realm/mongodb/User.txt b/source/sdk/temp/java/api/io/realm/mongodb/User.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/User.txt rename to source/sdk/temp/java/api/io/realm/mongodb/User.txt diff --git a/source/sdk/java/api/io/realm/mongodb/User/State.txt b/source/sdk/temp/java/api/io/realm/mongodb/User/State.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/User/State.txt rename to source/sdk/temp/java/api/io/realm/mongodb/User/State.txt diff --git a/source/sdk/java/api/io/realm/mongodb/UserIdentity.txt b/source/sdk/temp/java/api/io/realm/mongodb/UserIdentity.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/UserIdentity.txt rename to source/sdk/temp/java/api/io/realm/mongodb/UserIdentity.txt diff --git a/source/sdk/java/api/io/realm/mongodb/UserProfile.txt b/source/sdk/temp/java/api/io/realm/mongodb/UserProfile.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/UserProfile.txt rename to source/sdk/temp/java/api/io/realm/mongodb/UserProfile.txt diff --git a/source/sdk/java/api/io/realm/mongodb/auth.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/auth.txt rename to source/sdk/temp/java/api/io/realm/mongodb/auth.txt diff --git a/source/sdk/java/api/io/realm/mongodb/auth/ApiKey.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKey.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/auth/ApiKey.txt rename to source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKey.txt diff --git a/source/sdk/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt rename to source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt diff --git a/source/sdk/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt rename to source/sdk/temp/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt diff --git a/source/sdk/java/api/io/realm/mongodb/auth/GoogleAuthType.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth/GoogleAuthType.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/auth/GoogleAuthType.txt rename to source/sdk/temp/java/api/io/realm/mongodb/auth/GoogleAuthType.txt diff --git a/source/sdk/java/api/io/realm/mongodb/functions.txt b/source/sdk/temp/java/api/io/realm/mongodb/functions.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/functions.txt rename to source/sdk/temp/java/api/io/realm/mongodb/functions.txt diff --git a/source/sdk/java/api/io/realm/mongodb/functions/Functions.txt b/source/sdk/temp/java/api/io/realm/mongodb/functions/Functions.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/functions/Functions.txt rename to source/sdk/temp/java/api/io/realm/mongodb/functions/Functions.txt diff --git a/source/sdk/java/api/io/realm/mongodb/log/obfuscator.txt b/source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/log/obfuscator.txt rename to source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator.txt diff --git a/source/sdk/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt b/source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt rename to source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/MongoClient.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoClient.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/MongoClient.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoClient.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/MongoCollection.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoCollection.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/MongoCollection.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoCollection.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/MongoDatabase.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoDatabase.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/MongoDatabase.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoDatabase.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/MongoNamespace.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoNamespace.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/MongoNamespace.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoNamespace.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/events.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/events.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/events.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/events.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/iterable.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/iterable.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/options.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/options.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/options.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/options/CountOptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/CountOptions.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/options/CountOptions.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/options/CountOptions.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/options/FindOptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOptions.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/options/FindOptions.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOptions.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/result.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/result.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/result.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/result.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt diff --git a/source/sdk/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt rename to source/sdk/temp/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt diff --git a/source/sdk/java/api/io/realm/mongodb/push.txt b/source/sdk/temp/java/api/io/realm/mongodb/push.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/push.txt rename to source/sdk/temp/java/api/io/realm/mongodb/push.txt diff --git a/source/sdk/java/api/io/realm/mongodb/push/Push.txt b/source/sdk/temp/java/api/io/realm/mongodb/push/Push.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/push/Push.txt rename to source/sdk/temp/java/api/io/realm/mongodb/push/Push.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/ConnectionListener.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/ConnectionListener.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionListener.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/ConnectionState.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionState.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/ConnectionState.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionState.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/Progress.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/Progress.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/Progress.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/Progress.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/ProgressListener.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressListener.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/ProgressListener.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressListener.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/ProgressMode.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressMode.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/ProgressMode.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressMode.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/Subscription.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/Subscription.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/Subscription.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/Subscription.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/Sync.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/Sync.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/Sync.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/Sync.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/Sync/Debug.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/Sync/Debug.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/Sync/Debug.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/Sync/Debug.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SyncConfiguration.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SyncConfiguration.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SyncSession.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SyncSession.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt diff --git a/source/sdk/java/api/io/realm/mongodb/sync/SyncSession/State.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/State.txt similarity index 100% rename from source/sdk/java/api/io/realm/mongodb/sync/SyncSession/State.txt rename to source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/State.txt diff --git a/source/sdk/java/api/io/realm/rx.txt b/source/sdk/temp/java/api/io/realm/rx.txt similarity index 100% rename from source/sdk/java/api/io/realm/rx.txt rename to source/sdk/temp/java/api/io/realm/rx.txt diff --git a/source/sdk/java/api/io/realm/rx/CollectionChange.txt b/source/sdk/temp/java/api/io/realm/rx/CollectionChange.txt similarity index 100% rename from source/sdk/java/api/io/realm/rx/CollectionChange.txt rename to source/sdk/temp/java/api/io/realm/rx/CollectionChange.txt diff --git a/source/sdk/java/api/io/realm/rx/ObjectChange.txt b/source/sdk/temp/java/api/io/realm/rx/ObjectChange.txt similarity index 100% rename from source/sdk/java/api/io/realm/rx/ObjectChange.txt rename to source/sdk/temp/java/api/io/realm/rx/ObjectChange.txt diff --git a/source/sdk/java/api/io/realm/rx/RealmObservableFactory.txt b/source/sdk/temp/java/api/io/realm/rx/RealmObservableFactory.txt similarity index 100% rename from source/sdk/java/api/io/realm/rx/RealmObservableFactory.txt rename to source/sdk/temp/java/api/io/realm/rx/RealmObservableFactory.txt diff --git a/source/sdk/java/api/io/realm/rx/RxObservableFactory.txt b/source/sdk/temp/java/api/io/realm/rx/RxObservableFactory.txt similarity index 100% rename from source/sdk/java/api/io/realm/rx/RxObservableFactory.txt rename to source/sdk/temp/java/api/io/realm/rx/RxObservableFactory.txt diff --git a/source/sdk/java/app-services.txt b/source/sdk/temp/java/app-services.txt similarity index 100% rename from source/sdk/java/app-services.txt rename to source/sdk/temp/java/app-services.txt diff --git a/source/sdk/java/app-services/call-a-function.txt b/source/sdk/temp/java/app-services/call-a-function.txt similarity index 100% rename from source/sdk/java/app-services/call-a-function.txt rename to source/sdk/temp/java/app-services/call-a-function.txt diff --git a/source/sdk/java/app-services/connect-to-app-services-backend.txt b/source/sdk/temp/java/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/java/app-services/connect-to-app-services-backend.txt rename to source/sdk/temp/java/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/java/app-services/mongodb-remote-access.txt b/source/sdk/temp/java/app-services/mongodb-remote-access.txt similarity index 100% rename from source/sdk/java/app-services/mongodb-remote-access.txt rename to source/sdk/temp/java/app-services/mongodb-remote-access.txt diff --git a/source/sdk/java/async-api.txt b/source/sdk/temp/java/async-api.txt similarity index 100% rename from source/sdk/java/async-api.txt rename to source/sdk/temp/java/async-api.txt diff --git a/source/sdk/java/crud.txt b/source/sdk/temp/java/crud.txt similarity index 100% rename from source/sdk/java/crud.txt rename to source/sdk/temp/java/crud.txt diff --git a/source/sdk/java/crud/create.txt b/source/sdk/temp/java/crud/create.txt similarity index 100% rename from source/sdk/java/crud/create.txt rename to source/sdk/temp/java/crud/create.txt diff --git a/source/sdk/java/crud/delete.txt b/source/sdk/temp/java/crud/delete.txt similarity index 100% rename from source/sdk/java/crud/delete.txt rename to source/sdk/temp/java/crud/delete.txt diff --git a/source/sdk/java/crud/filter-data.txt b/source/sdk/temp/java/crud/filter-data.txt similarity index 100% rename from source/sdk/java/crud/filter-data.txt rename to source/sdk/temp/java/crud/filter-data.txt diff --git a/source/sdk/java/crud/read.txt b/source/sdk/temp/java/crud/read.txt similarity index 100% rename from source/sdk/java/crud/read.txt rename to source/sdk/temp/java/crud/read.txt diff --git a/source/sdk/java/crud/threading.txt b/source/sdk/temp/java/crud/threading.txt similarity index 100% rename from source/sdk/java/crud/threading.txt rename to source/sdk/temp/java/crud/threading.txt diff --git a/source/sdk/java/crud/update.txt b/source/sdk/temp/java/crud/update.txt similarity index 100% rename from source/sdk/java/crud/update.txt rename to source/sdk/temp/java/crud/update.txt diff --git a/source/sdk/java/facets.toml b/source/sdk/temp/java/facets.toml similarity index 100% rename from source/sdk/java/facets.toml rename to source/sdk/temp/java/facets.toml diff --git a/source/sdk/java/install.txt b/source/sdk/temp/java/install.txt similarity index 100% rename from source/sdk/java/install.txt rename to source/sdk/temp/java/install.txt diff --git a/source/sdk/java/manage-users.txt b/source/sdk/temp/java/manage-users.txt similarity index 100% rename from source/sdk/java/manage-users.txt rename to source/sdk/temp/java/manage-users.txt diff --git a/source/sdk/java/migrate/index.txt b/source/sdk/temp/java/migrate/index.txt similarity index 100% rename from source/sdk/java/migrate/index.txt rename to source/sdk/temp/java/migrate/index.txt diff --git a/source/sdk/java/model-data.txt b/source/sdk/temp/java/model-data.txt similarity index 100% rename from source/sdk/java/model-data.txt rename to source/sdk/temp/java/model-data.txt diff --git a/source/sdk/java/model-data/data-types.txt b/source/sdk/temp/java/model-data/data-types.txt similarity index 100% rename from source/sdk/java/model-data/data-types.txt rename to source/sdk/temp/java/model-data/data-types.txt diff --git a/source/sdk/java/model-data/data-types/collections.txt b/source/sdk/temp/java/model-data/data-types/collections.txt similarity index 100% rename from source/sdk/java/model-data/data-types/collections.txt rename to source/sdk/temp/java/model-data/data-types/collections.txt diff --git a/source/sdk/java/model-data/data-types/counters.txt b/source/sdk/temp/java/model-data/data-types/counters.txt similarity index 100% rename from source/sdk/java/model-data/data-types/counters.txt rename to source/sdk/temp/java/model-data/data-types/counters.txt diff --git a/source/sdk/java/model-data/data-types/embedded-objects.txt b/source/sdk/temp/java/model-data/data-types/embedded-objects.txt similarity index 100% rename from source/sdk/java/model-data/data-types/embedded-objects.txt rename to source/sdk/temp/java/model-data/data-types/embedded-objects.txt diff --git a/source/sdk/java/model-data/data-types/enums.txt b/source/sdk/temp/java/model-data/data-types/enums.txt similarity index 100% rename from source/sdk/java/model-data/data-types/enums.txt rename to source/sdk/temp/java/model-data/data-types/enums.txt diff --git a/source/sdk/java/model-data/data-types/field-types.txt b/source/sdk/temp/java/model-data/data-types/field-types.txt similarity index 100% rename from source/sdk/java/model-data/data-types/field-types.txt rename to source/sdk/temp/java/model-data/data-types/field-types.txt diff --git a/source/sdk/java/model-data/data-types/realmany.txt b/source/sdk/temp/java/model-data/data-types/realmany.txt similarity index 100% rename from source/sdk/java/model-data/data-types/realmany.txt rename to source/sdk/temp/java/model-data/data-types/realmany.txt diff --git a/source/sdk/java/model-data/data-types/realmdictionary.txt b/source/sdk/temp/java/model-data/data-types/realmdictionary.txt similarity index 100% rename from source/sdk/java/model-data/data-types/realmdictionary.txt rename to source/sdk/temp/java/model-data/data-types/realmdictionary.txt diff --git a/source/sdk/java/model-data/data-types/realmset.txt b/source/sdk/temp/java/model-data/data-types/realmset.txt similarity index 100% rename from source/sdk/java/model-data/data-types/realmset.txt rename to source/sdk/temp/java/model-data/data-types/realmset.txt diff --git a/source/sdk/java/model-data/define-a-realm-object-model.txt b/source/sdk/temp/java/model-data/define-a-realm-object-model.txt similarity index 100% rename from source/sdk/java/model-data/define-a-realm-object-model.txt rename to source/sdk/temp/java/model-data/define-a-realm-object-model.txt diff --git a/source/sdk/java/model-data/modify-an-object-schema.txt b/source/sdk/temp/java/model-data/modify-an-object-schema.txt similarity index 100% rename from source/sdk/java/model-data/modify-an-object-schema.txt rename to source/sdk/temp/java/model-data/modify-an-object-schema.txt diff --git a/source/sdk/java/model-data/relationships.txt b/source/sdk/temp/java/model-data/relationships.txt similarity index 100% rename from source/sdk/java/model-data/relationships.txt rename to source/sdk/temp/java/model-data/relationships.txt diff --git a/source/sdk/java/quick-starts.txt b/source/sdk/temp/java/quick-starts.txt similarity index 100% rename from source/sdk/java/quick-starts.txt rename to source/sdk/temp/java/quick-starts.txt diff --git a/source/sdk/java/quick-starts/livedata.txt b/source/sdk/temp/java/quick-starts/livedata.txt similarity index 100% rename from source/sdk/java/quick-starts/livedata.txt rename to source/sdk/temp/java/quick-starts/livedata.txt diff --git a/source/sdk/java/quick-starts/quick-start-local.txt b/source/sdk/temp/java/quick-starts/quick-start-local.txt similarity index 100% rename from source/sdk/java/quick-starts/quick-start-local.txt rename to source/sdk/temp/java/quick-starts/quick-start-local.txt diff --git a/source/sdk/java/quick-starts/quick-start-sync.txt b/source/sdk/temp/java/quick-starts/quick-start-sync.txt similarity index 100% rename from source/sdk/java/quick-starts/quick-start-sync.txt rename to source/sdk/temp/java/quick-starts/quick-start-sync.txt diff --git a/source/sdk/java/react-to-changes.txt b/source/sdk/temp/java/react-to-changes.txt similarity index 100% rename from source/sdk/java/react-to-changes.txt rename to source/sdk/temp/java/react-to-changes.txt diff --git a/source/sdk/java/realm-files.txt b/source/sdk/temp/java/realm-files.txt similarity index 100% rename from source/sdk/java/realm-files.txt rename to source/sdk/temp/java/realm-files.txt diff --git a/source/sdk/java/realm-files/bundle-a-realm.txt b/source/sdk/temp/java/realm-files/bundle-a-realm.txt similarity index 100% rename from source/sdk/java/realm-files/bundle-a-realm.txt rename to source/sdk/temp/java/realm-files/bundle-a-realm.txt diff --git a/source/sdk/java/realm-files/encryption.txt b/source/sdk/temp/java/realm-files/encryption.txt similarity index 100% rename from source/sdk/java/realm-files/encryption.txt rename to source/sdk/temp/java/realm-files/encryption.txt diff --git a/source/sdk/java/realm-files/open-and-close-a-realm.txt b/source/sdk/temp/java/realm-files/open-and-close-a-realm.txt similarity index 100% rename from source/sdk/java/realm-files/open-and-close-a-realm.txt rename to source/sdk/temp/java/realm-files/open-and-close-a-realm.txt diff --git a/source/sdk/java/sync.txt b/source/sdk/temp/java/sync.txt similarity index 100% rename from source/sdk/java/sync.txt rename to source/sdk/temp/java/sync.txt diff --git a/source/sdk/java/sync/background-sync.txt b/source/sdk/temp/java/sync/background-sync.txt similarity index 100% rename from source/sdk/java/sync/background-sync.txt rename to source/sdk/temp/java/sync/background-sync.txt diff --git a/source/sdk/java/sync/configure-and-open-a-synced-realm.txt b/source/sdk/temp/java/sync/configure-and-open-a-synced-realm.txt similarity index 100% rename from source/sdk/java/sync/configure-and-open-a-synced-realm.txt rename to source/sdk/temp/java/sync/configure-and-open-a-synced-realm.txt diff --git a/source/sdk/java/sync/flexible-sync.txt b/source/sdk/temp/java/sync/flexible-sync.txt similarity index 100% rename from source/sdk/java/sync/flexible-sync.txt rename to source/sdk/temp/java/sync/flexible-sync.txt diff --git a/source/sdk/java/sync/handle-sync-errors.txt b/source/sdk/temp/java/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/java/sync/handle-sync-errors.txt rename to source/sdk/temp/java/sync/handle-sync-errors.txt diff --git a/source/sdk/java/sync/manual-client-reset-data-recovery.txt b/source/sdk/temp/java/sync/manual-client-reset-data-recovery.txt similarity index 100% rename from source/sdk/java/sync/manual-client-reset-data-recovery.txt rename to source/sdk/temp/java/sync/manual-client-reset-data-recovery.txt diff --git a/source/sdk/java/sync/network-connection.txt b/source/sdk/temp/java/sync/network-connection.txt similarity index 100% rename from source/sdk/java/sync/network-connection.txt rename to source/sdk/temp/java/sync/network-connection.txt diff --git a/source/sdk/java/sync/partition-based-sync.txt b/source/sdk/temp/java/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/java/sync/partition-based-sync.txt rename to source/sdk/temp/java/sync/partition-based-sync.txt diff --git a/source/sdk/java/sync/pause-resume-sync.txt b/source/sdk/temp/java/sync/pause-resume-sync.txt similarity index 100% rename from source/sdk/java/sync/pause-resume-sync.txt rename to source/sdk/temp/java/sync/pause-resume-sync.txt diff --git a/source/sdk/java/sync/reset-a-client-realm.txt b/source/sdk/temp/java/sync/reset-a-client-realm.txt similarity index 100% rename from source/sdk/java/sync/reset-a-client-realm.txt rename to source/sdk/temp/java/sync/reset-a-client-realm.txt diff --git a/source/sdk/java/sync/sync-progress.txt b/source/sdk/temp/java/sync/sync-progress.txt similarity index 100% rename from source/sdk/java/sync/sync-progress.txt rename to source/sdk/temp/java/sync/sync-progress.txt diff --git a/source/sdk/java/telemetry.txt b/source/sdk/temp/java/telemetry.txt similarity index 100% rename from source/sdk/java/telemetry.txt rename to source/sdk/temp/java/telemetry.txt diff --git a/source/sdk/java/test-and-debug.txt b/source/sdk/temp/java/test-and-debug.txt similarity index 100% rename from source/sdk/java/test-and-debug.txt rename to source/sdk/temp/java/test-and-debug.txt diff --git a/source/sdk/java/test-and-debug/debugging.txt b/source/sdk/temp/java/test-and-debug/debugging.txt similarity index 100% rename from source/sdk/java/test-and-debug/debugging.txt rename to source/sdk/temp/java/test-and-debug/debugging.txt diff --git a/source/sdk/java/test-and-debug/log-realm-events.txt b/source/sdk/temp/java/test-and-debug/log-realm-events.txt similarity index 100% rename from source/sdk/java/test-and-debug/log-realm-events.txt rename to source/sdk/temp/java/test-and-debug/log-realm-events.txt diff --git a/source/sdk/java/test-and-debug/testing.txt b/source/sdk/temp/java/test-and-debug/testing.txt similarity index 100% rename from source/sdk/java/test-and-debug/testing.txt rename to source/sdk/temp/java/test-and-debug/testing.txt diff --git a/source/sdk/java/test-and-debug/troubleshooting.txt b/source/sdk/temp/java/test-and-debug/troubleshooting.txt similarity index 100% rename from source/sdk/java/test-and-debug/troubleshooting.txt rename to source/sdk/temp/java/test-and-debug/troubleshooting.txt diff --git a/source/sdk/java/troubleshooting.txt b/source/sdk/temp/java/troubleshooting.txt similarity index 100% rename from source/sdk/java/troubleshooting.txt rename to source/sdk/temp/java/troubleshooting.txt diff --git a/source/sdk/java/users/authenticate-users.txt b/source/sdk/temp/java/users/authenticate-users.txt similarity index 100% rename from source/sdk/java/users/authenticate-users.txt rename to source/sdk/temp/java/users/authenticate-users.txt diff --git a/source/sdk/java/users/create-delete-users.txt b/source/sdk/temp/java/users/create-delete-users.txt similarity index 100% rename from source/sdk/java/users/create-delete-users.txt rename to source/sdk/temp/java/users/create-delete-users.txt diff --git a/source/sdk/java/users/custom-user-data.txt b/source/sdk/temp/java/users/custom-user-data.txt similarity index 100% rename from source/sdk/java/users/custom-user-data.txt rename to source/sdk/temp/java/users/custom-user-data.txt diff --git a/source/sdk/java/users/email-password-users.txt b/source/sdk/temp/java/users/email-password-users.txt similarity index 100% rename from source/sdk/java/users/email-password-users.txt rename to source/sdk/temp/java/users/email-password-users.txt diff --git a/source/sdk/java/users/link-user-identities.txt b/source/sdk/temp/java/users/link-user-identities.txt similarity index 100% rename from source/sdk/java/users/link-user-identities.txt rename to source/sdk/temp/java/users/link-user-identities.txt diff --git a/source/sdk/java/users/manage-user-api-keys.txt b/source/sdk/temp/java/users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/java/users/manage-user-api-keys.txt rename to source/sdk/temp/java/users/manage-user-api-keys.txt diff --git a/source/sdk/java/users/multi-user-applications.txt b/source/sdk/temp/java/users/multi-user-applications.txt similarity index 100% rename from source/sdk/java/users/multi-user-applications.txt rename to source/sdk/temp/java/users/multi-user-applications.txt diff --git a/source/sdk/kotlin.txt b/source/sdk/temp/kotlin.txt similarity index 100% rename from source/sdk/kotlin.txt rename to source/sdk/temp/kotlin.txt diff --git a/source/sdk/kotlin/app-services.txt b/source/sdk/temp/kotlin/app-services.txt similarity index 100% rename from source/sdk/kotlin/app-services.txt rename to source/sdk/temp/kotlin/app-services.txt diff --git a/source/sdk/kotlin/app-services/call-function.txt b/source/sdk/temp/kotlin/app-services/call-function.txt similarity index 100% rename from source/sdk/kotlin/app-services/call-function.txt rename to source/sdk/temp/kotlin/app-services/call-function.txt diff --git a/source/sdk/kotlin/app-services/connect-to-app-services-backend.txt b/source/sdk/temp/kotlin/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/kotlin/app-services/connect-to-app-services-backend.txt rename to source/sdk/temp/kotlin/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/kotlin/app-services/handle-app-errors.txt b/source/sdk/temp/kotlin/app-services/handle-app-errors.txt similarity index 100% rename from source/sdk/kotlin/app-services/handle-app-errors.txt rename to source/sdk/temp/kotlin/app-services/handle-app-errors.txt diff --git a/source/sdk/kotlin/facets.toml b/source/sdk/temp/kotlin/facets.toml similarity index 100% rename from source/sdk/kotlin/facets.toml rename to source/sdk/temp/kotlin/facets.toml diff --git a/source/sdk/kotlin/install.txt b/source/sdk/temp/kotlin/install.txt similarity index 100% rename from source/sdk/kotlin/install.txt rename to source/sdk/temp/kotlin/install.txt diff --git a/source/sdk/kotlin/logging.txt b/source/sdk/temp/kotlin/logging.txt similarity index 100% rename from source/sdk/kotlin/logging.txt rename to source/sdk/temp/kotlin/logging.txt diff --git a/source/sdk/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt b/source/sdk/temp/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt similarity index 100% rename from source/sdk/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt rename to source/sdk/temp/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt diff --git a/source/sdk/kotlin/quick-start.txt b/source/sdk/temp/kotlin/quick-start.txt similarity index 100% rename from source/sdk/kotlin/quick-start.txt rename to source/sdk/temp/kotlin/quick-start.txt diff --git a/source/sdk/kotlin/realm-database.txt b/source/sdk/temp/kotlin/realm-database.txt similarity index 100% rename from source/sdk/kotlin/realm-database.txt rename to source/sdk/temp/kotlin/realm-database.txt diff --git a/source/sdk/kotlin/realm-database/crud.txt b/source/sdk/temp/kotlin/realm-database/crud.txt similarity index 100% rename from source/sdk/kotlin/realm-database/crud.txt rename to source/sdk/temp/kotlin/realm-database/crud.txt diff --git a/source/sdk/kotlin/realm-database/crud/create.txt b/source/sdk/temp/kotlin/realm-database/crud/create.txt similarity index 100% rename from source/sdk/kotlin/realm-database/crud/create.txt rename to source/sdk/temp/kotlin/realm-database/crud/create.txt diff --git a/source/sdk/kotlin/realm-database/crud/delete.txt b/source/sdk/temp/kotlin/realm-database/crud/delete.txt similarity index 100% rename from source/sdk/kotlin/realm-database/crud/delete.txt rename to source/sdk/temp/kotlin/realm-database/crud/delete.txt diff --git a/source/sdk/kotlin/realm-database/crud/read.txt b/source/sdk/temp/kotlin/realm-database/crud/read.txt similarity index 100% rename from source/sdk/kotlin/realm-database/crud/read.txt rename to source/sdk/temp/kotlin/realm-database/crud/read.txt diff --git a/source/sdk/kotlin/realm-database/crud/update.txt b/source/sdk/temp/kotlin/realm-database/crud/update.txt similarity index 100% rename from source/sdk/kotlin/realm-database/crud/update.txt rename to source/sdk/temp/kotlin/realm-database/crud/update.txt diff --git a/source/sdk/kotlin/realm-database/errors.txt b/source/sdk/temp/kotlin/realm-database/errors.txt similarity index 100% rename from source/sdk/kotlin/realm-database/errors.txt rename to source/sdk/temp/kotlin/realm-database/errors.txt diff --git a/source/sdk/kotlin/realm-database/frozen-arch.txt b/source/sdk/temp/kotlin/realm-database/frozen-arch.txt similarity index 100% rename from source/sdk/kotlin/realm-database/frozen-arch.txt rename to source/sdk/temp/kotlin/realm-database/frozen-arch.txt diff --git a/source/sdk/kotlin/realm-database/open-and-close-a-realm.txt b/source/sdk/temp/kotlin/realm-database/open-and-close-a-realm.txt similarity index 100% rename from source/sdk/kotlin/realm-database/open-and-close-a-realm.txt rename to source/sdk/temp/kotlin/realm-database/open-and-close-a-realm.txt diff --git a/source/sdk/kotlin/realm-database/react-to-changes.txt b/source/sdk/temp/kotlin/realm-database/react-to-changes.txt similarity index 100% rename from source/sdk/kotlin/realm-database/react-to-changes.txt rename to source/sdk/temp/kotlin/realm-database/react-to-changes.txt diff --git a/source/sdk/kotlin/realm-database/realm-files.txt b/source/sdk/temp/kotlin/realm-database/realm-files.txt similarity index 100% rename from source/sdk/kotlin/realm-database/realm-files.txt rename to source/sdk/temp/kotlin/realm-database/realm-files.txt diff --git a/source/sdk/kotlin/realm-database/realm-files/bundle-a-realm.txt b/source/sdk/temp/kotlin/realm-database/realm-files/bundle-a-realm.txt similarity index 100% rename from source/sdk/kotlin/realm-database/realm-files/bundle-a-realm.txt rename to source/sdk/temp/kotlin/realm-database/realm-files/bundle-a-realm.txt diff --git a/source/sdk/kotlin/realm-database/realm-files/compact-realm.txt b/source/sdk/temp/kotlin/realm-database/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/kotlin/realm-database/realm-files/compact-realm.txt rename to source/sdk/temp/kotlin/realm-database/realm-files/compact-realm.txt diff --git a/source/sdk/kotlin/realm-database/realm-files/delete-a-realm.txt b/source/sdk/temp/kotlin/realm-database/realm-files/delete-a-realm.txt similarity index 100% rename from source/sdk/kotlin/realm-database/realm-files/delete-a-realm.txt rename to source/sdk/temp/kotlin/realm-database/realm-files/delete-a-realm.txt diff --git a/source/sdk/kotlin/realm-database/realm-files/encrypt-a-realm.txt b/source/sdk/temp/kotlin/realm-database/realm-files/encrypt-a-realm.txt similarity index 100% rename from source/sdk/kotlin/realm-database/realm-files/encrypt-a-realm.txt rename to source/sdk/temp/kotlin/realm-database/realm-files/encrypt-a-realm.txt diff --git a/source/sdk/kotlin/realm-database/schemas.txt b/source/sdk/temp/kotlin/realm-database/schemas.txt similarity index 100% rename from source/sdk/kotlin/realm-database/schemas.txt rename to source/sdk/temp/kotlin/realm-database/schemas.txt diff --git a/source/sdk/kotlin/realm-database/schemas/change-an-object-model.txt b/source/sdk/temp/kotlin/realm-database/schemas/change-an-object-model.txt similarity index 100% rename from source/sdk/kotlin/realm-database/schemas/change-an-object-model.txt rename to source/sdk/temp/kotlin/realm-database/schemas/change-an-object-model.txt diff --git a/source/sdk/kotlin/realm-database/schemas/define-realm-object-model.txt b/source/sdk/temp/kotlin/realm-database/schemas/define-realm-object-model.txt similarity index 100% rename from source/sdk/kotlin/realm-database/schemas/define-realm-object-model.txt rename to source/sdk/temp/kotlin/realm-database/schemas/define-realm-object-model.txt diff --git a/source/sdk/kotlin/realm-database/schemas/geospatials.txt b/source/sdk/temp/kotlin/realm-database/schemas/geospatials.txt similarity index 100% rename from source/sdk/kotlin/realm-database/schemas/geospatials.txt rename to source/sdk/temp/kotlin/realm-database/schemas/geospatials.txt diff --git a/source/sdk/kotlin/realm-database/schemas/model-data-device-sync.txt b/source/sdk/temp/kotlin/realm-database/schemas/model-data-device-sync.txt similarity index 100% rename from source/sdk/kotlin/realm-database/schemas/model-data-device-sync.txt rename to source/sdk/temp/kotlin/realm-database/schemas/model-data-device-sync.txt diff --git a/source/sdk/kotlin/realm-database/schemas/property-annotations.txt b/source/sdk/temp/kotlin/realm-database/schemas/property-annotations.txt similarity index 100% rename from source/sdk/kotlin/realm-database/schemas/property-annotations.txt rename to source/sdk/temp/kotlin/realm-database/schemas/property-annotations.txt diff --git a/source/sdk/kotlin/realm-database/schemas/relationships.txt b/source/sdk/temp/kotlin/realm-database/schemas/relationships.txt similarity index 100% rename from source/sdk/kotlin/realm-database/schemas/relationships.txt rename to source/sdk/temp/kotlin/realm-database/schemas/relationships.txt diff --git a/source/sdk/kotlin/realm-database/schemas/supported-types.txt b/source/sdk/temp/kotlin/realm-database/schemas/supported-types.txt similarity index 100% rename from source/sdk/kotlin/realm-database/schemas/supported-types.txt rename to source/sdk/temp/kotlin/realm-database/schemas/supported-types.txt diff --git a/source/sdk/kotlin/realm-database/serialization.txt b/source/sdk/temp/kotlin/realm-database/serialization.txt similarity index 100% rename from source/sdk/kotlin/realm-database/serialization.txt rename to source/sdk/temp/kotlin/realm-database/serialization.txt diff --git a/source/sdk/kotlin/sync.txt b/source/sdk/temp/kotlin/sync.txt similarity index 100% rename from source/sdk/kotlin/sync.txt rename to source/sdk/temp/kotlin/sync.txt diff --git a/source/sdk/kotlin/sync/add-sync-to-app.txt b/source/sdk/temp/kotlin/sync/add-sync-to-app.txt similarity index 100% rename from source/sdk/kotlin/sync/add-sync-to-app.txt rename to source/sdk/temp/kotlin/sync/add-sync-to-app.txt diff --git a/source/sdk/kotlin/sync/background-sync.txt b/source/sdk/temp/kotlin/sync/background-sync.txt similarity index 100% rename from source/sdk/kotlin/sync/background-sync.txt rename to source/sdk/temp/kotlin/sync/background-sync.txt diff --git a/source/sdk/kotlin/sync/handle-sync-errors.txt b/source/sdk/temp/kotlin/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/kotlin/sync/handle-sync-errors.txt rename to source/sdk/temp/kotlin/sync/handle-sync-errors.txt diff --git a/source/sdk/kotlin/sync/log-level.txt b/source/sdk/temp/kotlin/sync/log-level.txt similarity index 100% rename from source/sdk/kotlin/sync/log-level.txt rename to source/sdk/temp/kotlin/sync/log-level.txt diff --git a/source/sdk/kotlin/sync/manage-sync-session.txt b/source/sdk/temp/kotlin/sync/manage-sync-session.txt similarity index 100% rename from source/sdk/kotlin/sync/manage-sync-session.txt rename to source/sdk/temp/kotlin/sync/manage-sync-session.txt diff --git a/source/sdk/kotlin/sync/open-a-synced-realm.txt b/source/sdk/temp/kotlin/sync/open-a-synced-realm.txt similarity index 100% rename from source/sdk/kotlin/sync/open-a-synced-realm.txt rename to source/sdk/temp/kotlin/sync/open-a-synced-realm.txt diff --git a/source/sdk/kotlin/sync/partition-based-sync.txt b/source/sdk/temp/kotlin/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/kotlin/sync/partition-based-sync.txt rename to source/sdk/temp/kotlin/sync/partition-based-sync.txt diff --git a/source/sdk/kotlin/sync/stream-data-to-atlas.txt b/source/sdk/temp/kotlin/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/kotlin/sync/stream-data-to-atlas.txt rename to source/sdk/temp/kotlin/sync/stream-data-to-atlas.txt diff --git a/source/sdk/kotlin/sync/subscribe.txt b/source/sdk/temp/kotlin/sync/subscribe.txt similarity index 100% rename from source/sdk/kotlin/sync/subscribe.txt rename to source/sdk/temp/kotlin/sync/subscribe.txt diff --git a/source/sdk/kotlin/sync/write-to-synced-realm.txt b/source/sdk/temp/kotlin/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/kotlin/sync/write-to-synced-realm.txt rename to source/sdk/temp/kotlin/sync/write-to-synced-realm.txt diff --git a/source/sdk/kotlin/telemetry.txt b/source/sdk/temp/kotlin/telemetry.txt similarity index 100% rename from source/sdk/kotlin/telemetry.txt rename to source/sdk/temp/kotlin/telemetry.txt diff --git a/source/sdk/kotlin/troubleshooting.txt b/source/sdk/temp/kotlin/troubleshooting.txt similarity index 100% rename from source/sdk/kotlin/troubleshooting.txt rename to source/sdk/temp/kotlin/troubleshooting.txt diff --git a/source/sdk/kotlin/users.txt b/source/sdk/temp/kotlin/users.txt similarity index 100% rename from source/sdk/kotlin/users.txt rename to source/sdk/temp/kotlin/users.txt diff --git a/source/sdk/kotlin/users/authenticate-users.txt b/source/sdk/temp/kotlin/users/authenticate-users.txt similarity index 100% rename from source/sdk/kotlin/users/authenticate-users.txt rename to source/sdk/temp/kotlin/users/authenticate-users.txt diff --git a/source/sdk/kotlin/users/custom-user-data.txt b/source/sdk/temp/kotlin/users/custom-user-data.txt similarity index 100% rename from source/sdk/kotlin/users/custom-user-data.txt rename to source/sdk/temp/kotlin/users/custom-user-data.txt diff --git a/source/sdk/kotlin/users/delete-users.txt b/source/sdk/temp/kotlin/users/delete-users.txt similarity index 100% rename from source/sdk/kotlin/users/delete-users.txt rename to source/sdk/temp/kotlin/users/delete-users.txt diff --git a/source/sdk/kotlin/users/link-credentials.txt b/source/sdk/temp/kotlin/users/link-credentials.txt similarity index 100% rename from source/sdk/kotlin/users/link-credentials.txt rename to source/sdk/temp/kotlin/users/link-credentials.txt diff --git a/source/sdk/kotlin/users/manage-email-password-users.txt b/source/sdk/temp/kotlin/users/manage-email-password-users.txt similarity index 100% rename from source/sdk/kotlin/users/manage-email-password-users.txt rename to source/sdk/temp/kotlin/users/manage-email-password-users.txt diff --git a/source/sdk/kotlin/users/manage-user-api-keys.txt b/source/sdk/temp/kotlin/users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/kotlin/users/manage-user-api-keys.txt rename to source/sdk/temp/kotlin/users/manage-user-api-keys.txt diff --git a/source/sdk/kotlin/users/multi-user-applications.txt b/source/sdk/temp/kotlin/users/multi-user-applications.txt similarity index 100% rename from source/sdk/kotlin/users/multi-user-applications.txt rename to source/sdk/temp/kotlin/users/multi-user-applications.txt diff --git a/source/sdk/kotlin/users/user-metadata.txt b/source/sdk/temp/kotlin/users/user-metadata.txt similarity index 100% rename from source/sdk/kotlin/users/user-metadata.txt rename to source/sdk/temp/kotlin/users/user-metadata.txt diff --git a/source/sdk/node.txt b/source/sdk/temp/node.txt similarity index 100% rename from source/sdk/node.txt rename to source/sdk/temp/node.txt diff --git a/source/sdk/node/app-services.txt b/source/sdk/temp/node/app-services.txt similarity index 100% rename from source/sdk/node/app-services.txt rename to source/sdk/temp/node/app-services.txt diff --git a/source/sdk/node/app-services/call-a-function.txt b/source/sdk/temp/node/app-services/call-a-function.txt similarity index 100% rename from source/sdk/node/app-services/call-a-function.txt rename to source/sdk/temp/node/app-services/call-a-function.txt diff --git a/source/sdk/node/app-services/connect-to-app-services-backend.txt b/source/sdk/temp/node/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/node/app-services/connect-to-app-services-backend.txt rename to source/sdk/temp/node/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/node/app-services/query-mongodb.txt b/source/sdk/temp/node/app-services/query-mongodb.txt similarity index 100% rename from source/sdk/node/app-services/query-mongodb.txt rename to source/sdk/temp/node/app-services/query-mongodb.txt diff --git a/source/sdk/node/crud.txt b/source/sdk/temp/node/crud.txt similarity index 100% rename from source/sdk/node/crud.txt rename to source/sdk/temp/node/crud.txt diff --git a/source/sdk/node/crud/create.txt b/source/sdk/temp/node/crud/create.txt similarity index 100% rename from source/sdk/node/crud/create.txt rename to source/sdk/temp/node/crud/create.txt diff --git a/source/sdk/node/crud/delete.txt b/source/sdk/temp/node/crud/delete.txt similarity index 100% rename from source/sdk/node/crud/delete.txt rename to source/sdk/temp/node/crud/delete.txt diff --git a/source/sdk/node/crud/query-data.txt b/source/sdk/temp/node/crud/query-data.txt similarity index 100% rename from source/sdk/node/crud/query-data.txt rename to source/sdk/temp/node/crud/query-data.txt diff --git a/source/sdk/node/crud/read.txt b/source/sdk/temp/node/crud/read.txt similarity index 100% rename from source/sdk/node/crud/read.txt rename to source/sdk/temp/node/crud/read.txt diff --git a/source/sdk/node/crud/update.txt b/source/sdk/temp/node/crud/update.txt similarity index 100% rename from source/sdk/node/crud/update.txt rename to source/sdk/temp/node/crud/update.txt diff --git a/source/sdk/node/facets.toml b/source/sdk/temp/node/facets.toml similarity index 100% rename from source/sdk/node/facets.toml rename to source/sdk/temp/node/facets.toml diff --git a/source/sdk/node/install.txt b/source/sdk/temp/node/install.txt similarity index 100% rename from source/sdk/node/install.txt rename to source/sdk/temp/node/install.txt diff --git a/source/sdk/node/integrations.txt b/source/sdk/temp/node/integrations.txt similarity index 100% rename from source/sdk/node/integrations.txt rename to source/sdk/temp/node/integrations.txt diff --git a/source/sdk/node/integrations/electron-cra.txt b/source/sdk/temp/node/integrations/electron-cra.txt similarity index 100% rename from source/sdk/node/integrations/electron-cra.txt rename to source/sdk/temp/node/integrations/electron-cra.txt diff --git a/source/sdk/node/integrations/electron.txt b/source/sdk/temp/node/integrations/electron.txt similarity index 100% rename from source/sdk/node/integrations/electron.txt rename to source/sdk/temp/node/integrations/electron.txt diff --git a/source/sdk/node/logging.txt b/source/sdk/temp/node/logging.txt similarity index 100% rename from source/sdk/node/logging.txt rename to source/sdk/temp/node/logging.txt diff --git a/source/sdk/node/manage-users.txt b/source/sdk/temp/node/manage-users.txt similarity index 100% rename from source/sdk/node/manage-users.txt rename to source/sdk/temp/node/manage-users.txt diff --git a/source/sdk/node/migrate/index.txt b/source/sdk/temp/node/migrate/index.txt similarity index 100% rename from source/sdk/node/migrate/index.txt rename to source/sdk/temp/node/migrate/index.txt diff --git a/source/sdk/node/model-data.txt b/source/sdk/temp/node/model-data.txt similarity index 100% rename from source/sdk/node/model-data.txt rename to source/sdk/temp/node/model-data.txt diff --git a/source/sdk/node/model-data/data-types.txt b/source/sdk/temp/node/model-data/data-types.txt similarity index 100% rename from source/sdk/node/model-data/data-types.txt rename to source/sdk/temp/node/model-data/data-types.txt diff --git a/source/sdk/node/model-data/data-types/collections.txt b/source/sdk/temp/node/model-data/data-types/collections.txt similarity index 100% rename from source/sdk/node/model-data/data-types/collections.txt rename to source/sdk/temp/node/model-data/data-types/collections.txt diff --git a/source/sdk/node/model-data/data-types/dictionaries.txt b/source/sdk/temp/node/model-data/data-types/dictionaries.txt similarity index 100% rename from source/sdk/node/model-data/data-types/dictionaries.txt rename to source/sdk/temp/node/model-data/data-types/dictionaries.txt diff --git a/source/sdk/node/model-data/data-types/embedded-objects.txt b/source/sdk/temp/node/model-data/data-types/embedded-objects.txt similarity index 100% rename from source/sdk/node/model-data/data-types/embedded-objects.txt rename to source/sdk/temp/node/model-data/data-types/embedded-objects.txt diff --git a/source/sdk/node/model-data/data-types/field-types.txt b/source/sdk/temp/node/model-data/data-types/field-types.txt similarity index 100% rename from source/sdk/node/model-data/data-types/field-types.txt rename to source/sdk/temp/node/model-data/data-types/field-types.txt diff --git a/source/sdk/node/model-data/data-types/geospatial.txt b/source/sdk/temp/node/model-data/data-types/geospatial.txt similarity index 100% rename from source/sdk/node/model-data/data-types/geospatial.txt rename to source/sdk/temp/node/model-data/data-types/geospatial.txt diff --git a/source/sdk/node/model-data/data-types/mixed.txt b/source/sdk/temp/node/model-data/data-types/mixed.txt similarity index 100% rename from source/sdk/node/model-data/data-types/mixed.txt rename to source/sdk/temp/node/model-data/data-types/mixed.txt diff --git a/source/sdk/node/model-data/data-types/sets.txt b/source/sdk/temp/node/model-data/data-types/sets.txt similarity index 100% rename from source/sdk/node/model-data/data-types/sets.txt rename to source/sdk/temp/node/model-data/data-types/sets.txt diff --git a/source/sdk/node/model-data/data-types/uuid.txt b/source/sdk/temp/node/model-data/data-types/uuid.txt similarity index 100% rename from source/sdk/node/model-data/data-types/uuid.txt rename to source/sdk/temp/node/model-data/data-types/uuid.txt diff --git a/source/sdk/node/model-data/define-a-realm-object-model.txt b/source/sdk/temp/node/model-data/define-a-realm-object-model.txt similarity index 100% rename from source/sdk/node/model-data/define-a-realm-object-model.txt rename to source/sdk/temp/node/model-data/define-a-realm-object-model.txt diff --git a/source/sdk/node/model-data/modify-an-object-schema.txt b/source/sdk/temp/node/model-data/modify-an-object-schema.txt similarity index 100% rename from source/sdk/node/model-data/modify-an-object-schema.txt rename to source/sdk/temp/node/model-data/modify-an-object-schema.txt diff --git a/source/sdk/node/model-data/relationships-and-embedded-objects.txt b/source/sdk/temp/node/model-data/relationships-and-embedded-objects.txt similarity index 100% rename from source/sdk/node/model-data/relationships-and-embedded-objects.txt rename to source/sdk/temp/node/model-data/relationships-and-embedded-objects.txt diff --git a/source/sdk/node/quick-start.txt b/source/sdk/temp/node/quick-start.txt similarity index 100% rename from source/sdk/node/quick-start.txt rename to source/sdk/temp/node/quick-start.txt diff --git a/source/sdk/node/react-to-changes.txt b/source/sdk/temp/node/react-to-changes.txt similarity index 100% rename from source/sdk/node/react-to-changes.txt rename to source/sdk/temp/node/react-to-changes.txt diff --git a/source/sdk/node/realm-files.txt b/source/sdk/temp/node/realm-files.txt similarity index 100% rename from source/sdk/node/realm-files.txt rename to source/sdk/temp/node/realm-files.txt diff --git a/source/sdk/node/realm-files/bundle.txt b/source/sdk/temp/node/realm-files/bundle.txt similarity index 100% rename from source/sdk/node/realm-files/bundle.txt rename to source/sdk/temp/node/realm-files/bundle.txt diff --git a/source/sdk/node/realm-files/compact-realm.txt b/source/sdk/temp/node/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/node/realm-files/compact-realm.txt rename to source/sdk/temp/node/realm-files/compact-realm.txt diff --git a/source/sdk/node/realm-files/encrypt.txt b/source/sdk/temp/node/realm-files/encrypt.txt similarity index 100% rename from source/sdk/node/realm-files/encrypt.txt rename to source/sdk/temp/node/realm-files/encrypt.txt diff --git a/source/sdk/node/realm-files/open-and-close-a-realm.txt b/source/sdk/temp/node/realm-files/open-and-close-a-realm.txt similarity index 100% rename from source/sdk/node/realm-files/open-and-close-a-realm.txt rename to source/sdk/temp/node/realm-files/open-and-close-a-realm.txt diff --git a/source/sdk/node/sync.txt b/source/sdk/temp/node/sync.txt similarity index 100% rename from source/sdk/node/sync.txt rename to source/sdk/temp/node/sync.txt diff --git a/source/sdk/node/sync/client-reset-data-recovery.txt b/source/sdk/temp/node/sync/client-reset-data-recovery.txt similarity index 100% rename from source/sdk/node/sync/client-reset-data-recovery.txt rename to source/sdk/temp/node/sync/client-reset-data-recovery.txt diff --git a/source/sdk/node/sync/configure-and-open-a-synced-realm.txt b/source/sdk/temp/node/sync/configure-and-open-a-synced-realm.txt similarity index 100% rename from source/sdk/node/sync/configure-and-open-a-synced-realm.txt rename to source/sdk/temp/node/sync/configure-and-open-a-synced-realm.txt diff --git a/source/sdk/node/sync/flexible-sync.txt b/source/sdk/temp/node/sync/flexible-sync.txt similarity index 100% rename from source/sdk/node/sync/flexible-sync.txt rename to source/sdk/temp/node/sync/flexible-sync.txt diff --git a/source/sdk/node/sync/handle-sync-errors.txt b/source/sdk/temp/node/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/node/sync/handle-sync-errors.txt rename to source/sdk/temp/node/sync/handle-sync-errors.txt diff --git a/source/sdk/node/sync/log-level.txt b/source/sdk/temp/node/sync/log-level.txt similarity index 100% rename from source/sdk/node/sync/log-level.txt rename to source/sdk/temp/node/sync/log-level.txt diff --git a/source/sdk/node/sync/manage-sync-session.txt b/source/sdk/temp/node/sync/manage-sync-session.txt similarity index 100% rename from source/sdk/node/sync/manage-sync-session.txt rename to source/sdk/temp/node/sync/manage-sync-session.txt diff --git a/source/sdk/node/sync/partition-based-sync.txt b/source/sdk/temp/node/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/node/sync/partition-based-sync.txt rename to source/sdk/temp/node/sync/partition-based-sync.txt diff --git a/source/sdk/node/sync/stream-data-to-atlas.txt b/source/sdk/temp/node/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/node/sync/stream-data-to-atlas.txt rename to source/sdk/temp/node/sync/stream-data-to-atlas.txt diff --git a/source/sdk/node/telemetry.txt b/source/sdk/temp/node/telemetry.txt similarity index 100% rename from source/sdk/node/telemetry.txt rename to source/sdk/temp/node/telemetry.txt diff --git a/source/sdk/node/users/access-custom-user-data.txt b/source/sdk/temp/node/users/access-custom-user-data.txt similarity index 100% rename from source/sdk/node/users/access-custom-user-data.txt rename to source/sdk/temp/node/users/access-custom-user-data.txt diff --git a/source/sdk/node/users/authenticate-users.txt b/source/sdk/temp/node/users/authenticate-users.txt similarity index 100% rename from source/sdk/node/users/authenticate-users.txt rename to source/sdk/temp/node/users/authenticate-users.txt diff --git a/source/sdk/node/users/create-delete-users.txt b/source/sdk/temp/node/users/create-delete-users.txt similarity index 100% rename from source/sdk/node/users/create-delete-users.txt rename to source/sdk/temp/node/users/create-delete-users.txt diff --git a/source/sdk/node/users/link-identities.txt b/source/sdk/temp/node/users/link-identities.txt similarity index 100% rename from source/sdk/node/users/link-identities.txt rename to source/sdk/temp/node/users/link-identities.txt diff --git a/source/sdk/node/users/manage-email-password-users.txt b/source/sdk/temp/node/users/manage-email-password-users.txt similarity index 100% rename from source/sdk/node/users/manage-email-password-users.txt rename to source/sdk/temp/node/users/manage-email-password-users.txt diff --git a/source/sdk/node/users/manage-user-api-keys.txt b/source/sdk/temp/node/users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/node/users/manage-user-api-keys.txt rename to source/sdk/temp/node/users/manage-user-api-keys.txt diff --git a/source/sdk/node/users/multi-user-applications.txt b/source/sdk/temp/node/users/multi-user-applications.txt similarity index 100% rename from source/sdk/node/users/multi-user-applications.txt rename to source/sdk/temp/node/users/multi-user-applications.txt diff --git a/source/sdk/node/users/user-metadata.txt b/source/sdk/temp/node/users/user-metadata.txt similarity index 100% rename from source/sdk/node/users/user-metadata.txt rename to source/sdk/temp/node/users/user-metadata.txt diff --git a/source/sdk/react-native.txt b/source/sdk/temp/react-native.txt similarity index 100% rename from source/sdk/react-native.txt rename to source/sdk/temp/react-native.txt diff --git a/source/sdk/react-native/api-reference.txt b/source/sdk/temp/react-native/api-reference.txt similarity index 100% rename from source/sdk/react-native/api-reference.txt rename to source/sdk/temp/react-native/api-reference.txt diff --git a/source/sdk/react-native/api-reference/app-provider.txt b/source/sdk/temp/react-native/api-reference/app-provider.txt similarity index 100% rename from source/sdk/react-native/api-reference/app-provider.txt rename to source/sdk/temp/react-native/api-reference/app-provider.txt diff --git a/source/sdk/react-native/api-reference/realm-provider.txt b/source/sdk/temp/react-native/api-reference/realm-provider.txt similarity index 100% rename from source/sdk/react-native/api-reference/realm-provider.txt rename to source/sdk/temp/react-native/api-reference/realm-provider.txt diff --git a/source/sdk/react-native/api-reference/user-provider.txt b/source/sdk/temp/react-native/api-reference/user-provider.txt similarity index 100% rename from source/sdk/react-native/api-reference/user-provider.txt rename to source/sdk/temp/react-native/api-reference/user-provider.txt diff --git a/source/sdk/react-native/app-services.txt b/source/sdk/temp/react-native/app-services.txt similarity index 100% rename from source/sdk/react-native/app-services.txt rename to source/sdk/temp/react-native/app-services.txt diff --git a/source/sdk/react-native/app-services/call-a-function.txt b/source/sdk/temp/react-native/app-services/call-a-function.txt similarity index 100% rename from source/sdk/react-native/app-services/call-a-function.txt rename to source/sdk/temp/react-native/app-services/call-a-function.txt diff --git a/source/sdk/react-native/app-services/connect-to-app-services-app.txt b/source/sdk/temp/react-native/app-services/connect-to-app-services-app.txt similarity index 100% rename from source/sdk/react-native/app-services/connect-to-app-services-app.txt rename to source/sdk/temp/react-native/app-services/connect-to-app-services-app.txt diff --git a/source/sdk/react-native/app-services/query-mongodb.txt b/source/sdk/temp/react-native/app-services/query-mongodb.txt similarity index 100% rename from source/sdk/react-native/app-services/query-mongodb.txt rename to source/sdk/temp/react-native/app-services/query-mongodb.txt diff --git a/source/sdk/react-native/bootstrap-with-expo.txt b/source/sdk/temp/react-native/bootstrap-with-expo.txt similarity index 100% rename from source/sdk/react-native/bootstrap-with-expo.txt rename to source/sdk/temp/react-native/bootstrap-with-expo.txt diff --git a/source/sdk/react-native/crud.txt b/source/sdk/temp/react-native/crud.txt similarity index 100% rename from source/sdk/react-native/crud.txt rename to source/sdk/temp/react-native/crud.txt diff --git a/source/sdk/react-native/crud/create.txt b/source/sdk/temp/react-native/crud/create.txt similarity index 100% rename from source/sdk/react-native/crud/create.txt rename to source/sdk/temp/react-native/crud/create.txt diff --git a/source/sdk/react-native/crud/delete.txt b/source/sdk/temp/react-native/crud/delete.txt similarity index 100% rename from source/sdk/react-native/crud/delete.txt rename to source/sdk/temp/react-native/crud/delete.txt diff --git a/source/sdk/react-native/crud/query-data.txt b/source/sdk/temp/react-native/crud/query-data.txt similarity index 100% rename from source/sdk/react-native/crud/query-data.txt rename to source/sdk/temp/react-native/crud/query-data.txt diff --git a/source/sdk/react-native/crud/read.txt b/source/sdk/temp/react-native/crud/read.txt similarity index 100% rename from source/sdk/react-native/crud/read.txt rename to source/sdk/temp/react-native/crud/read.txt diff --git a/source/sdk/react-native/crud/update.txt b/source/sdk/temp/react-native/crud/update.txt similarity index 100% rename from source/sdk/react-native/crud/update.txt rename to source/sdk/temp/react-native/crud/update.txt diff --git a/source/sdk/react-native/facets.toml b/source/sdk/temp/react-native/facets.toml similarity index 100% rename from source/sdk/react-native/facets.toml rename to source/sdk/temp/react-native/facets.toml diff --git a/source/sdk/react-native/install.txt b/source/sdk/temp/react-native/install.txt similarity index 100% rename from source/sdk/react-native/install.txt rename to source/sdk/temp/react-native/install.txt diff --git a/source/sdk/react-native/integrations.txt b/source/sdk/temp/react-native/integrations.txt similarity index 100% rename from source/sdk/react-native/integrations.txt rename to source/sdk/temp/react-native/integrations.txt diff --git a/source/sdk/react-native/integrations/mac-catalyst.txt b/source/sdk/temp/react-native/integrations/mac-catalyst.txt similarity index 100% rename from source/sdk/react-native/integrations/mac-catalyst.txt rename to source/sdk/temp/react-native/integrations/mac-catalyst.txt diff --git a/source/sdk/react-native/logging.txt b/source/sdk/temp/react-native/logging.txt similarity index 100% rename from source/sdk/react-native/logging.txt rename to source/sdk/temp/react-native/logging.txt diff --git a/source/sdk/react-native/manage-users.txt b/source/sdk/temp/react-native/manage-users.txt similarity index 100% rename from source/sdk/react-native/manage-users.txt rename to source/sdk/temp/react-native/manage-users.txt diff --git a/source/sdk/react-native/manage-users/authenticate-users.txt b/source/sdk/temp/react-native/manage-users/authenticate-users.txt similarity index 100% rename from source/sdk/react-native/manage-users/authenticate-users.txt rename to source/sdk/temp/react-native/manage-users/authenticate-users.txt diff --git a/source/sdk/react-native/manage-users/create-and-delete-users.txt b/source/sdk/temp/react-native/manage-users/create-and-delete-users.txt similarity index 100% rename from source/sdk/react-native/manage-users/create-and-delete-users.txt rename to source/sdk/temp/react-native/manage-users/create-and-delete-users.txt diff --git a/source/sdk/react-native/manage-users/custom-user-data.txt b/source/sdk/temp/react-native/manage-users/custom-user-data.txt similarity index 100% rename from source/sdk/react-native/manage-users/custom-user-data.txt rename to source/sdk/temp/react-native/manage-users/custom-user-data.txt diff --git a/source/sdk/react-native/manage-users/link-user-identities.txt b/source/sdk/temp/react-native/manage-users/link-user-identities.txt similarity index 100% rename from source/sdk/react-native/manage-users/link-user-identities.txt rename to source/sdk/temp/react-native/manage-users/link-user-identities.txt diff --git a/source/sdk/react-native/manage-users/manage-email-password-users.txt b/source/sdk/temp/react-native/manage-users/manage-email-password-users.txt similarity index 100% rename from source/sdk/react-native/manage-users/manage-email-password-users.txt rename to source/sdk/temp/react-native/manage-users/manage-email-password-users.txt diff --git a/source/sdk/react-native/manage-users/manage-user-api-keys.txt b/source/sdk/temp/react-native/manage-users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/react-native/manage-users/manage-user-api-keys.txt rename to source/sdk/temp/react-native/manage-users/manage-user-api-keys.txt diff --git a/source/sdk/react-native/manage-users/multi-user-applications.txt b/source/sdk/temp/react-native/manage-users/multi-user-applications.txt similarity index 100% rename from source/sdk/react-native/manage-users/multi-user-applications.txt rename to source/sdk/temp/react-native/manage-users/multi-user-applications.txt diff --git a/source/sdk/react-native/migrate/index.txt b/source/sdk/temp/react-native/migrate/index.txt similarity index 100% rename from source/sdk/react-native/migrate/index.txt rename to source/sdk/temp/react-native/migrate/index.txt diff --git a/source/sdk/react-native/model-data.txt b/source/sdk/temp/react-native/model-data.txt similarity index 100% rename from source/sdk/react-native/model-data.txt rename to source/sdk/temp/react-native/model-data.txt diff --git a/source/sdk/react-native/model-data/change-an-object-model.txt b/source/sdk/temp/react-native/model-data/change-an-object-model.txt similarity index 100% rename from source/sdk/react-native/model-data/change-an-object-model.txt rename to source/sdk/temp/react-native/model-data/change-an-object-model.txt diff --git a/source/sdk/react-native/model-data/data-types.txt b/source/sdk/temp/react-native/model-data/data-types.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types.txt rename to source/sdk/temp/react-native/model-data/data-types.txt diff --git a/source/sdk/react-native/model-data/data-types/collections.txt b/source/sdk/temp/react-native/model-data/data-types/collections.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types/collections.txt rename to source/sdk/temp/react-native/model-data/data-types/collections.txt diff --git a/source/sdk/react-native/model-data/data-types/dictionaries.txt b/source/sdk/temp/react-native/model-data/data-types/dictionaries.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types/dictionaries.txt rename to source/sdk/temp/react-native/model-data/data-types/dictionaries.txt diff --git a/source/sdk/react-native/model-data/data-types/embedded-objects.txt b/source/sdk/temp/react-native/model-data/data-types/embedded-objects.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types/embedded-objects.txt rename to source/sdk/temp/react-native/model-data/data-types/embedded-objects.txt diff --git a/source/sdk/react-native/model-data/data-types/geospatial.txt b/source/sdk/temp/react-native/model-data/data-types/geospatial.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types/geospatial.txt rename to source/sdk/temp/react-native/model-data/data-types/geospatial.txt diff --git a/source/sdk/react-native/model-data/data-types/mixed.txt b/source/sdk/temp/react-native/model-data/data-types/mixed.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types/mixed.txt rename to source/sdk/temp/react-native/model-data/data-types/mixed.txt diff --git a/source/sdk/react-native/model-data/data-types/property-types.txt b/source/sdk/temp/react-native/model-data/data-types/property-types.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types/property-types.txt rename to source/sdk/temp/react-native/model-data/data-types/property-types.txt diff --git a/source/sdk/react-native/model-data/data-types/sets.txt b/source/sdk/temp/react-native/model-data/data-types/sets.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types/sets.txt rename to source/sdk/temp/react-native/model-data/data-types/sets.txt diff --git a/source/sdk/react-native/model-data/data-types/uuid.txt b/source/sdk/temp/react-native/model-data/data-types/uuid.txt similarity index 100% rename from source/sdk/react-native/model-data/data-types/uuid.txt rename to source/sdk/temp/react-native/model-data/data-types/uuid.txt diff --git a/source/sdk/react-native/model-data/define-a-realm-object-model.txt b/source/sdk/temp/react-native/model-data/define-a-realm-object-model.txt similarity index 100% rename from source/sdk/react-native/model-data/define-a-realm-object-model.txt rename to source/sdk/temp/react-native/model-data/define-a-realm-object-model.txt diff --git a/source/sdk/react-native/model-data/relationships-and-embedded-objects.txt b/source/sdk/temp/react-native/model-data/relationships-and-embedded-objects.txt similarity index 100% rename from source/sdk/react-native/model-data/relationships-and-embedded-objects.txt rename to source/sdk/temp/react-native/model-data/relationships-and-embedded-objects.txt diff --git a/source/sdk/react-native/quick-start.txt b/source/sdk/temp/react-native/quick-start.txt similarity index 100% rename from source/sdk/react-native/quick-start.txt rename to source/sdk/temp/react-native/quick-start.txt diff --git a/source/sdk/react-native/react-to-changes.txt b/source/sdk/temp/react-native/react-to-changes.txt similarity index 100% rename from source/sdk/react-native/react-to-changes.txt rename to source/sdk/temp/react-native/react-to-changes.txt diff --git a/source/sdk/react-native/realm-files.txt b/source/sdk/temp/react-native/realm-files.txt similarity index 100% rename from source/sdk/react-native/realm-files.txt rename to source/sdk/temp/react-native/realm-files.txt diff --git a/source/sdk/react-native/realm-files/bundle.txt b/source/sdk/temp/react-native/realm-files/bundle.txt similarity index 100% rename from source/sdk/react-native/realm-files/bundle.txt rename to source/sdk/temp/react-native/realm-files/bundle.txt diff --git a/source/sdk/react-native/realm-files/compact-realm.txt b/source/sdk/temp/react-native/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/react-native/realm-files/compact-realm.txt rename to source/sdk/temp/react-native/realm-files/compact-realm.txt diff --git a/source/sdk/react-native/realm-files/configure-a-realm.txt b/source/sdk/temp/react-native/realm-files/configure-a-realm.txt similarity index 100% rename from source/sdk/react-native/realm-files/configure-a-realm.txt rename to source/sdk/temp/react-native/realm-files/configure-a-realm.txt diff --git a/source/sdk/react-native/realm-files/encrypt.txt b/source/sdk/temp/react-native/realm-files/encrypt.txt similarity index 100% rename from source/sdk/react-native/realm-files/encrypt.txt rename to source/sdk/temp/react-native/realm-files/encrypt.txt diff --git a/source/sdk/react-native/sync-data.txt b/source/sdk/temp/react-native/sync-data.txt similarity index 100% rename from source/sdk/react-native/sync-data.txt rename to source/sdk/temp/react-native/sync-data.txt diff --git a/source/sdk/react-native/sync-data/client-reset-data-recovery.txt b/source/sdk/temp/react-native/sync-data/client-reset-data-recovery.txt similarity index 100% rename from source/sdk/react-native/sync-data/client-reset-data-recovery.txt rename to source/sdk/temp/react-native/sync-data/client-reset-data-recovery.txt diff --git a/source/sdk/react-native/sync-data/configure-a-synced-realm.txt b/source/sdk/temp/react-native/sync-data/configure-a-synced-realm.txt similarity index 100% rename from source/sdk/react-native/sync-data/configure-a-synced-realm.txt rename to source/sdk/temp/react-native/sync-data/configure-a-synced-realm.txt diff --git a/source/sdk/react-native/sync-data/flexible-sync.txt b/source/sdk/temp/react-native/sync-data/flexible-sync.txt similarity index 100% rename from source/sdk/react-native/sync-data/flexible-sync.txt rename to source/sdk/temp/react-native/sync-data/flexible-sync.txt diff --git a/source/sdk/react-native/sync-data/handle-sync-errors.txt b/source/sdk/temp/react-native/sync-data/handle-sync-errors.txt similarity index 100% rename from source/sdk/react-native/sync-data/handle-sync-errors.txt rename to source/sdk/temp/react-native/sync-data/handle-sync-errors.txt diff --git a/source/sdk/react-native/sync-data/log-level.txt b/source/sdk/temp/react-native/sync-data/log-level.txt similarity index 100% rename from source/sdk/react-native/sync-data/log-level.txt rename to source/sdk/temp/react-native/sync-data/log-level.txt diff --git a/source/sdk/react-native/sync-data/manage-sync-session.txt b/source/sdk/temp/react-native/sync-data/manage-sync-session.txt similarity index 100% rename from source/sdk/react-native/sync-data/manage-sync-session.txt rename to source/sdk/temp/react-native/sync-data/manage-sync-session.txt diff --git a/source/sdk/react-native/sync-data/partition-based-sync.txt b/source/sdk/temp/react-native/sync-data/partition-based-sync.txt similarity index 100% rename from source/sdk/react-native/sync-data/partition-based-sync.txt rename to source/sdk/temp/react-native/sync-data/partition-based-sync.txt diff --git a/source/sdk/react-native/sync-data/stream-data-to-atlas.txt b/source/sdk/temp/react-native/sync-data/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/react-native/sync-data/stream-data-to-atlas.txt rename to source/sdk/temp/react-native/sync-data/stream-data-to-atlas.txt diff --git a/source/sdk/react-native/telemetry.txt b/source/sdk/temp/react-native/telemetry.txt similarity index 100% rename from source/sdk/react-native/telemetry.txt rename to source/sdk/temp/react-native/telemetry.txt diff --git a/source/sdk/react-native/test-and-debug.txt b/source/sdk/temp/react-native/test-and-debug.txt similarity index 100% rename from source/sdk/react-native/test-and-debug.txt rename to source/sdk/temp/react-native/test-and-debug.txt diff --git a/source/sdk/react-native/test-and-debug/testing.txt b/source/sdk/temp/react-native/test-and-debug/testing.txt similarity index 100% rename from source/sdk/react-native/test-and-debug/testing.txt rename to source/sdk/temp/react-native/test-and-debug/testing.txt diff --git a/source/sdk/react-native/test-and-debug/troubleshooting.txt b/source/sdk/temp/react-native/test-and-debug/troubleshooting.txt similarity index 100% rename from source/sdk/react-native/test-and-debug/troubleshooting.txt rename to source/sdk/temp/react-native/test-and-debug/troubleshooting.txt diff --git a/source/sdk/swift.txt b/source/sdk/temp/swift.txt similarity index 100% rename from source/sdk/swift.txt rename to source/sdk/temp/swift.txt diff --git a/source/sdk/swift/api-reference.txt b/source/sdk/temp/swift/api-reference.txt similarity index 100% rename from source/sdk/swift/api-reference.txt rename to source/sdk/temp/swift/api-reference.txt diff --git a/source/sdk/swift/app-services/call-a-function.txt b/source/sdk/temp/swift/app-services/call-a-function.txt similarity index 100% rename from source/sdk/swift/app-services/call-a-function.txt rename to source/sdk/temp/swift/app-services/call-a-function.txt diff --git a/source/sdk/swift/app-services/connect-to-app-services-backend.txt b/source/sdk/temp/swift/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/swift/app-services/connect-to-app-services-backend.txt rename to source/sdk/temp/swift/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/swift/app-services/mongodb-remote-access.txt b/source/sdk/temp/swift/app-services/mongodb-remote-access.txt similarity index 100% rename from source/sdk/swift/app-services/mongodb-remote-access.txt rename to source/sdk/temp/swift/app-services/mongodb-remote-access.txt diff --git a/source/sdk/swift/application-services.txt b/source/sdk/temp/swift/application-services.txt similarity index 100% rename from source/sdk/swift/application-services.txt rename to source/sdk/temp/swift/application-services.txt diff --git a/source/sdk/swift/crud.txt b/source/sdk/temp/swift/crud.txt similarity index 100% rename from source/sdk/swift/crud.txt rename to source/sdk/temp/swift/crud.txt diff --git a/source/sdk/swift/crud/create.txt b/source/sdk/temp/swift/crud/create.txt similarity index 100% rename from source/sdk/swift/crud/create.txt rename to source/sdk/temp/swift/crud/create.txt diff --git a/source/sdk/swift/crud/delete.txt b/source/sdk/temp/swift/crud/delete.txt similarity index 100% rename from source/sdk/swift/crud/delete.txt rename to source/sdk/temp/swift/crud/delete.txt diff --git a/source/sdk/swift/crud/filter-data.txt b/source/sdk/temp/swift/crud/filter-data.txt similarity index 100% rename from source/sdk/swift/crud/filter-data.txt rename to source/sdk/temp/swift/crud/filter-data.txt diff --git a/source/sdk/swift/crud/read.txt b/source/sdk/temp/swift/crud/read.txt similarity index 100% rename from source/sdk/swift/crud/read.txt rename to source/sdk/temp/swift/crud/read.txt diff --git a/source/sdk/swift/crud/threading.txt b/source/sdk/temp/swift/crud/threading.txt similarity index 100% rename from source/sdk/swift/crud/threading.txt rename to source/sdk/temp/swift/crud/threading.txt diff --git a/source/sdk/swift/crud/update.txt b/source/sdk/temp/swift/crud/update.txt similarity index 100% rename from source/sdk/swift/crud/update.txt rename to source/sdk/temp/swift/crud/update.txt diff --git a/source/sdk/swift/facets.toml b/source/sdk/temp/swift/facets.toml similarity index 100% rename from source/sdk/swift/facets.toml rename to source/sdk/temp/swift/facets.toml diff --git a/source/sdk/swift/install.txt b/source/sdk/temp/swift/install.txt similarity index 100% rename from source/sdk/swift/install.txt rename to source/sdk/temp/swift/install.txt diff --git a/source/sdk/swift/logging.txt b/source/sdk/temp/swift/logging.txt similarity index 100% rename from source/sdk/swift/logging.txt rename to source/sdk/temp/swift/logging.txt diff --git a/source/sdk/swift/model-data.txt b/source/sdk/temp/swift/model-data.txt similarity index 100% rename from source/sdk/swift/model-data.txt rename to source/sdk/temp/swift/model-data.txt diff --git a/source/sdk/swift/model-data/change-an-object-model.txt b/source/sdk/temp/swift/model-data/change-an-object-model.txt similarity index 100% rename from source/sdk/swift/model-data/change-an-object-model.txt rename to source/sdk/temp/swift/model-data/change-an-object-model.txt diff --git a/source/sdk/swift/model-data/model-data-device-sync.txt b/source/sdk/temp/swift/model-data/model-data-device-sync.txt similarity index 100% rename from source/sdk/swift/model-data/model-data-device-sync.txt rename to source/sdk/temp/swift/model-data/model-data-device-sync.txt diff --git a/source/sdk/swift/model-data/object-models.txt b/source/sdk/temp/swift/model-data/object-models.txt similarity index 100% rename from source/sdk/swift/model-data/object-models.txt rename to source/sdk/temp/swift/model-data/object-models.txt diff --git a/source/sdk/swift/model-data/relationships.txt b/source/sdk/temp/swift/model-data/relationships.txt similarity index 100% rename from source/sdk/swift/model-data/relationships.txt rename to source/sdk/temp/swift/model-data/relationships.txt diff --git a/source/sdk/swift/model-data/supported-types.txt b/source/sdk/temp/swift/model-data/supported-types.txt similarity index 100% rename from source/sdk/swift/model-data/supported-types.txt rename to source/sdk/temp/swift/model-data/supported-types.txt diff --git a/source/sdk/swift/quick-start.txt b/source/sdk/temp/swift/quick-start.txt similarity index 100% rename from source/sdk/swift/quick-start.txt rename to source/sdk/temp/swift/quick-start.txt diff --git a/source/sdk/swift/react-to-changes.txt b/source/sdk/temp/swift/react-to-changes.txt similarity index 100% rename from source/sdk/swift/react-to-changes.txt rename to source/sdk/temp/swift/react-to-changes.txt diff --git a/source/sdk/swift/realm-files.txt b/source/sdk/temp/swift/realm-files.txt similarity index 100% rename from source/sdk/swift/realm-files.txt rename to source/sdk/temp/swift/realm-files.txt diff --git a/source/sdk/swift/realm-files/bundle-a-realm.txt b/source/sdk/temp/swift/realm-files/bundle-a-realm.txt similarity index 100% rename from source/sdk/swift/realm-files/bundle-a-realm.txt rename to source/sdk/temp/swift/realm-files/bundle-a-realm.txt diff --git a/source/sdk/swift/realm-files/compacting.txt b/source/sdk/temp/swift/realm-files/compacting.txt similarity index 100% rename from source/sdk/swift/realm-files/compacting.txt rename to source/sdk/temp/swift/realm-files/compacting.txt diff --git a/source/sdk/swift/realm-files/configure-and-open-a-realm.txt b/source/sdk/temp/swift/realm-files/configure-and-open-a-realm.txt similarity index 100% rename from source/sdk/swift/realm-files/configure-and-open-a-realm.txt rename to source/sdk/temp/swift/realm-files/configure-and-open-a-realm.txt diff --git a/source/sdk/swift/realm-files/delete-a-realm.txt b/source/sdk/temp/swift/realm-files/delete-a-realm.txt similarity index 100% rename from source/sdk/swift/realm-files/delete-a-realm.txt rename to source/sdk/temp/swift/realm-files/delete-a-realm.txt diff --git a/source/sdk/swift/realm-files/encrypt-a-realm.txt b/source/sdk/temp/swift/realm-files/encrypt-a-realm.txt similarity index 100% rename from source/sdk/swift/realm-files/encrypt-a-realm.txt rename to source/sdk/temp/swift/realm-files/encrypt-a-realm.txt diff --git a/source/sdk/swift/realm-files/tvos.txt b/source/sdk/temp/swift/realm-files/tvos.txt similarity index 100% rename from source/sdk/swift/realm-files/tvos.txt rename to source/sdk/temp/swift/realm-files/tvos.txt diff --git a/source/sdk/swift/swift-concurrency.txt b/source/sdk/temp/swift/swift-concurrency.txt similarity index 100% rename from source/sdk/swift/swift-concurrency.txt rename to source/sdk/temp/swift/swift-concurrency.txt diff --git a/source/sdk/swift/swiftui-tutorial.txt b/source/sdk/temp/swift/swiftui-tutorial.txt similarity index 100% rename from source/sdk/swift/swiftui-tutorial.txt rename to source/sdk/temp/swift/swiftui-tutorial.txt diff --git a/source/sdk/swift/swiftui.txt b/source/sdk/temp/swift/swiftui.txt similarity index 100% rename from source/sdk/swift/swiftui.txt rename to source/sdk/temp/swift/swiftui.txt diff --git a/source/sdk/swift/swiftui/background-sync.txt b/source/sdk/temp/swift/swiftui/background-sync.txt similarity index 100% rename from source/sdk/swift/swiftui/background-sync.txt rename to source/sdk/temp/swift/swiftui/background-sync.txt diff --git a/source/sdk/swift/swiftui/configure-and-open-realm.txt b/source/sdk/temp/swift/swiftui/configure-and-open-realm.txt similarity index 100% rename from source/sdk/swift/swiftui/configure-and-open-realm.txt rename to source/sdk/temp/swift/swiftui/configure-and-open-realm.txt diff --git a/source/sdk/swift/swiftui/filter-data.txt b/source/sdk/temp/swift/swiftui/filter-data.txt similarity index 100% rename from source/sdk/swift/swiftui/filter-data.txt rename to source/sdk/temp/swift/swiftui/filter-data.txt diff --git a/source/sdk/swift/swiftui/model-data.txt b/source/sdk/temp/swift/swiftui/model-data.txt similarity index 100% rename from source/sdk/swift/swiftui/model-data.txt rename to source/sdk/temp/swift/swiftui/model-data.txt diff --git a/source/sdk/swift/swiftui/model-data/change-an-object-model.txt b/source/sdk/temp/swift/swiftui/model-data/change-an-object-model.txt similarity index 100% rename from source/sdk/swift/swiftui/model-data/change-an-object-model.txt rename to source/sdk/temp/swift/swiftui/model-data/change-an-object-model.txt diff --git a/source/sdk/swift/swiftui/model-data/define-a-realm-object-model.txt b/source/sdk/temp/swift/swiftui/model-data/define-a-realm-object-model.txt similarity index 100% rename from source/sdk/swift/swiftui/model-data/define-a-realm-object-model.txt rename to source/sdk/temp/swift/swiftui/model-data/define-a-realm-object-model.txt diff --git a/source/sdk/swift/swiftui/pass-realm-data-between-views.txt b/source/sdk/temp/swift/swiftui/pass-realm-data-between-views.txt similarity index 100% rename from source/sdk/swift/swiftui/pass-realm-data-between-views.txt rename to source/sdk/temp/swift/swiftui/pass-realm-data-between-views.txt diff --git a/source/sdk/swift/swiftui/react-to-changes.txt b/source/sdk/temp/swift/swiftui/react-to-changes.txt similarity index 100% rename from source/sdk/swift/swiftui/react-to-changes.txt rename to source/sdk/temp/swift/swiftui/react-to-changes.txt diff --git a/source/sdk/swift/swiftui/swiftui-previews.txt b/source/sdk/temp/swift/swiftui/swiftui-previews.txt similarity index 100% rename from source/sdk/swift/swiftui/swiftui-previews.txt rename to source/sdk/temp/swift/swiftui/swiftui-previews.txt diff --git a/source/sdk/swift/swiftui/write.txt b/source/sdk/temp/swift/swiftui/write.txt similarity index 100% rename from source/sdk/swift/swiftui/write.txt rename to source/sdk/temp/swift/swiftui/write.txt diff --git a/source/sdk/swift/sync.txt b/source/sdk/temp/swift/sync.txt similarity index 100% rename from source/sdk/swift/sync.txt rename to source/sdk/temp/swift/sync.txt diff --git a/source/sdk/swift/sync/add-sync-to-app.txt b/source/sdk/temp/swift/sync/add-sync-to-app.txt similarity index 100% rename from source/sdk/swift/sync/add-sync-to-app.txt rename to source/sdk/temp/swift/sync/add-sync-to-app.txt diff --git a/source/sdk/swift/sync/background-sync.txt b/source/sdk/temp/swift/sync/background-sync.txt similarity index 100% rename from source/sdk/swift/sync/background-sync.txt rename to source/sdk/temp/swift/sync/background-sync.txt diff --git a/source/sdk/swift/sync/configure-and-open-a-synced-realm.txt b/source/sdk/temp/swift/sync/configure-and-open-a-synced-realm.txt similarity index 100% rename from source/sdk/swift/sync/configure-and-open-a-synced-realm.txt rename to source/sdk/temp/swift/sync/configure-and-open-a-synced-realm.txt diff --git a/source/sdk/swift/sync/event-library.txt b/source/sdk/temp/swift/sync/event-library.txt similarity index 100% rename from source/sdk/swift/sync/event-library.txt rename to source/sdk/temp/swift/sync/event-library.txt diff --git a/source/sdk/swift/sync/flexible-sync.txt b/source/sdk/temp/swift/sync/flexible-sync.txt similarity index 100% rename from source/sdk/swift/sync/flexible-sync.txt rename to source/sdk/temp/swift/sync/flexible-sync.txt diff --git a/source/sdk/swift/sync/handle-sync-errors.txt b/source/sdk/temp/swift/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/swift/sync/handle-sync-errors.txt rename to source/sdk/temp/swift/sync/handle-sync-errors.txt diff --git a/source/sdk/swift/sync/log-level.txt b/source/sdk/temp/swift/sync/log-level.txt similarity index 100% rename from source/sdk/swift/sync/log-level.txt rename to source/sdk/temp/swift/sync/log-level.txt diff --git a/source/sdk/swift/sync/partition-based-sync.txt b/source/sdk/temp/swift/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/swift/sync/partition-based-sync.txt rename to source/sdk/temp/swift/sync/partition-based-sync.txt diff --git a/source/sdk/swift/sync/stream-data-to-atlas.txt b/source/sdk/temp/swift/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/swift/sync/stream-data-to-atlas.txt rename to source/sdk/temp/swift/sync/stream-data-to-atlas.txt diff --git a/source/sdk/swift/sync/sync-session.txt b/source/sdk/temp/swift/sync/sync-session.txt similarity index 100% rename from source/sdk/swift/sync/sync-session.txt rename to source/sdk/temp/swift/sync/sync-session.txt diff --git a/source/sdk/swift/sync/write-to-synced-realm.txt b/source/sdk/temp/swift/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/swift/sync/write-to-synced-realm.txt rename to source/sdk/temp/swift/sync/write-to-synced-realm.txt diff --git a/source/sdk/swift/telemetry.txt b/source/sdk/temp/swift/telemetry.txt similarity index 100% rename from source/sdk/swift/telemetry.txt rename to source/sdk/temp/swift/telemetry.txt diff --git a/source/sdk/swift/test-and-debug.txt b/source/sdk/temp/swift/test-and-debug.txt similarity index 100% rename from source/sdk/swift/test-and-debug.txt rename to source/sdk/temp/swift/test-and-debug.txt diff --git a/source/sdk/swift/use-realm-with-actors.txt b/source/sdk/temp/swift/use-realm-with-actors.txt similarity index 100% rename from source/sdk/swift/use-realm-with-actors.txt rename to source/sdk/temp/swift/use-realm-with-actors.txt diff --git a/source/sdk/swift/users/authenticate-users.txt b/source/sdk/temp/swift/users/authenticate-users.txt similarity index 100% rename from source/sdk/swift/users/authenticate-users.txt rename to source/sdk/temp/swift/users/authenticate-users.txt diff --git a/source/sdk/swift/users/create-and-delete-users.txt b/source/sdk/temp/swift/users/create-and-delete-users.txt similarity index 100% rename from source/sdk/swift/users/create-and-delete-users.txt rename to source/sdk/temp/swift/users/create-and-delete-users.txt diff --git a/source/sdk/swift/users/custom-user-data.txt b/source/sdk/temp/swift/users/custom-user-data.txt similarity index 100% rename from source/sdk/swift/users/custom-user-data.txt rename to source/sdk/temp/swift/users/custom-user-data.txt diff --git a/source/sdk/swift/users/link-user-identities.txt b/source/sdk/temp/swift/users/link-user-identities.txt similarity index 100% rename from source/sdk/swift/users/link-user-identities.txt rename to source/sdk/temp/swift/users/link-user-identities.txt diff --git a/source/sdk/swift/users/manage-email-password-users.txt b/source/sdk/temp/swift/users/manage-email-password-users.txt similarity index 100% rename from source/sdk/swift/users/manage-email-password-users.txt rename to source/sdk/temp/swift/users/manage-email-password-users.txt diff --git a/source/sdk/swift/users/manage-user-api-keys.txt b/source/sdk/temp/swift/users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/swift/users/manage-user-api-keys.txt rename to source/sdk/temp/swift/users/manage-user-api-keys.txt diff --git a/source/sdk/swift/users/multi-user-applications.txt b/source/sdk/temp/swift/users/multi-user-applications.txt similarity index 100% rename from source/sdk/swift/users/multi-user-applications.txt rename to source/sdk/temp/swift/users/multi-user-applications.txt diff --git a/source/sdk/swift/users/user-metadata.txt b/source/sdk/temp/swift/users/user-metadata.txt similarity index 100% rename from source/sdk/swift/users/user-metadata.txt rename to source/sdk/temp/swift/users/user-metadata.txt diff --git a/source/sdk/swift/work-with-users.txt b/source/sdk/temp/swift/work-with-users.txt similarity index 100% rename from source/sdk/swift/work-with-users.txt rename to source/sdk/temp/swift/work-with-users.txt diff --git a/source/sdk/swift/xcode-playgrounds.txt b/source/sdk/temp/swift/xcode-playgrounds.txt similarity index 100% rename from source/sdk/swift/xcode-playgrounds.txt rename to source/sdk/temp/swift/xcode-playgrounds.txt diff --git a/source/sdk/users.txt b/source/sdk/users.txt new file mode 100644 index 0000000000..b3e4a12a79 --- /dev/null +++ b/source/sdk/users.txt @@ -0,0 +1,35 @@ +.. _sdks-manage-users: + +============ +Manage Users +============ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. toctree:: + :titlesonly: + + Create and Delete Users + Authenticate Users + Custom User Data + User Metadata + Manage Email/Password Users + Multi-User Applications + Link User Identities + Create & Manage User API Keys + +The following pages contain information about how to create, delete, and +manage users in Atlas Device SDK: + +- :ref:`sdks-create-and-delete-users` +- :ref:`sdks-authenticate-users` +- :ref:`sdks-custom-user-data` +- :ref:`sdks-user-metadata` +- :ref:`sdks-manage-email-password-users` +- :ref:`sdks-multi-user-applications` +- :ref:`sdks-link-user-identities` +- :ref:`sdks-manage-user-api-keys` diff --git a/source/sdk/users/authenticate-users.txt b/source/sdk/users/authenticate-users.txt new file mode 100644 index 0000000000..4b334a24b2 --- /dev/null +++ b/source/sdk/users/authenticate-users.txt @@ -0,0 +1,13 @@ +.. _sdks-authenticate-users: + +================== +Authenticate Users +================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for authenticate users content. diff --git a/source/sdk/users/create-and-delete-users.txt b/source/sdk/users/create-and-delete-users.txt new file mode 100644 index 0000000000..dc4a3c90b6 --- /dev/null +++ b/source/sdk/users/create-and-delete-users.txt @@ -0,0 +1,11 @@ +.. _sdks-create-and-delete-users: + +======================= +Create and Delete Users +======================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol diff --git a/source/sdk/users/custom-user-data.txt b/source/sdk/users/custom-user-data.txt new file mode 100644 index 0000000000..f2bf49e077 --- /dev/null +++ b/source/sdk/users/custom-user-data.txt @@ -0,0 +1,13 @@ +.. _sdks-custom-user-data: + +================ +Custom User Data +================ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about custom user data. diff --git a/source/sdk/users/link-user-identities.txt b/source/sdk/users/link-user-identities.txt new file mode 100644 index 0000000000..fcc8a8d129 --- /dev/null +++ b/source/sdk/users/link-user-identities.txt @@ -0,0 +1,13 @@ +.. _sdks-link-user-identities: + +==================== +Link User Identities +==================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about linking user identities. diff --git a/source/sdk/users/manage-email-password-users.txt b/source/sdk/users/manage-email-password-users.txt new file mode 100644 index 0000000000..bcc39ed5fa --- /dev/null +++ b/source/sdk/users/manage-email-password-users.txt @@ -0,0 +1,13 @@ +.. _sdks-manage-email-password-users: + +=========================== +Manage Email/Password Users +=========================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about managing email/password users. diff --git a/source/sdk/users/manage-user-api-keys.txt b/source/sdk/users/manage-user-api-keys.txt new file mode 100644 index 0000000000..d2a2a779ba --- /dev/null +++ b/source/sdk/users/manage-user-api-keys.txt @@ -0,0 +1,13 @@ +.. _sdks-manage-user-api-keys: + +==================== +Manage User API Keys +==================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about managing user API keys. diff --git a/source/sdk/users/multi-user-applications.txt b/source/sdk/users/multi-user-applications.txt new file mode 100644 index 0000000000..f31968abbe --- /dev/null +++ b/source/sdk/users/multi-user-applications.txt @@ -0,0 +1,13 @@ +.. _sdks-multi-user-applications: + +======================= +Multi-User Applications +======================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for multi-user application content. diff --git a/source/sdk/users/user-metadata.txt b/source/sdk/users/user-metadata.txt new file mode 100644 index 0000000000..0d36c57fce --- /dev/null +++ b/source/sdk/users/user-metadata.txt @@ -0,0 +1,13 @@ +.. _sdks-user-metadata: + +============= +User Metadata +============= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for user metadata content. From d308023723b4b44d2b674919269b88fc09d4885e Mon Sep 17 00:00:00 2001 From: dacharyc Date: Tue, 7 May 2024 16:29:31 -0400 Subject: [PATCH 02/63] Update landing page and add missing placeholder pages --- source/index.txt | 215 ++++++++++++++++++++++++++----------- source/sdk/crud/create.txt | 2 + source/sdk/crud/delete.txt | 2 + source/sdk/crud/read.txt | 2 + source/sdk/crud/update.txt | 2 + source/sdk/install.txt | 20 ++++ source/sdk/quick-start.txt | 13 +++ 7 files changed, 196 insertions(+), 60 deletions(-) create mode 100644 source/sdk/install.txt create mode 100644 source/sdk/quick-start.txt diff --git a/source/index.txt b/source/index.txt index eb91c00710..638efc4f74 100644 --- a/source/index.txt +++ b/source/index.txt @@ -64,89 +64,184 @@ SDK is language-idiomatic and includes: :ref:`Authentication `, :ref:`Functions `, :ref:`Triggers `, and more. +.. kicker:: Learning Paths + +Get Started with the Swift SDK +------------------------------ + .. card-group:: + :columns: 3 :style: extra-compact - :columns: 2 .. card:: - :cta: Learn more about Atlas App Services - :headline: Atlas App Services - :icon: /images/icons/realm.svg - :url: https://www.mongodb.com/docs/atlas/app-services/ + :headline: Quick Start + :cta: See Code Examples + :url: https://https://preview-mongodbdacharyc.gatsbyjs.io/realm/scaffold-consolidated-sdk-toc/sdk/quick-start + :icon: /images/icons/branding_2022/Technical_ATLAS_Functions3x.png + :icon-alt: Functions Icon - Discover how to sync data, define permissions, and connect to other services, including MongoDB Atlas. + Minimal-explanation code examples of how to work with the Swift SDK. + Write to the device database, and sync with other devices. .. card:: - :headline: Swift SDK - :url: https://www.mongodb.com/docs/realm/sdk/swift/ - :icon: /images/icons/swift_sdk.svg - :icon-alt: Swift SDK icon + :headline: Working Example App + :cta: Explore an Example App + :url: https://www.mongodb.com/docs/atlas/app-services/template-apps/ + :icon: /images/icons/branding_2022/Technical_REALM_Mobile3x.png + :icon-alt: Realm Mobile Icon - Build applications in Swift or Objective-C for Apple platforms, including iOS, macOS, watchOS, and tvOS. + Learn from example by dissecting a working mobile client app that + uses Atlas Device SDK. .. card:: - :headline: Kotlin SDK - :url: https://www.mongodb.com/docs/realm/sdk/kotlin/ - :icon: /images/icons/kotlin_sdk.svg - :icon-alt: Kotlin SDK icon + :headline: Guided Tutorial + :cta: Follow the Tutorial + :url: https://www.mongodb.com/docs/atlas/app-services/tutorials/ + :icon: /images/icons/branding_2022/General_CONTENT_Tutorial3x.png + :icon-alt: Tutorial Icon - Build cross-platform applications for Android, iOS, and macOS with Kotlin Multiplatform (KMP). + Follow a guided tutorial to learn how to adapt the example app to + create your own working app. - .. card:: - :headline: .NET SDK - :url: https://www.mongodb.com/docs/realm/sdk/dotnet/ - :icon: /images/icons/dot_net_sdk.svg - :icon-alt: .NET SDK icon +.. kicker:: What You Can Do - Build applications that use C# and the .NET platform, including MAUI, - Xamarin, native Windows applications, and Unity projects. +Develop Apps with the SDK +-------------------------- - .. card:: - :headline: Node.js SDK - :url: https://www.mongodb.com/docs/realm/sdk/node/ - :icon: /images/icons/node_js_sdk.svg - :icon-alt: Node.JS SDK icon +Use the SDK's open-source database - Realm - as an object store on the device. +Use Device Sync to keep data in sync with your MongoDB Atlas cluster and +other clients. - Use the Node.js SDK to build server and IoT applications in JavaScript or TypeScript. +.. tabs:: - .. card:: - :headline: React Native SDK - :url: https://www.mongodb.com/docs/realm/sdk/react-native/ - :icon: /images/icons/react_native_sdk.svg - :icon-alt: React SDK icon + .. tab:: Store Data with the SDK + :tabid: device-persistence - Use the React Native SDK to build cross-platform applications in JavaScript or TypeScript. + .. procedure:: - .. card:: - :headline: Java SDK - :url: https://www.mongodb.com/docs/realm/sdk/java/ - :icon: /images/icons/android_sdk.svg - :icon-alt: Java SDK icon + .. step:: Install the SDK - Build Android applications in Java or Kotlin. + Use popular package managers and build tools to + :ref:`sdks-install` in your project. - .. card:: - :headline: Web SDK - :url: https://www.mongodb.com/docs/realm/web/ - :icon: /images/icons/web_sdk.svg - :icon-alt: Web SDK icon + Import the relevant dependency in your project files to get started. - Build web applications in JavaScript or TypeScript. Access data with MongoDB queries. + .. step:: Define an Object Schema - .. card:: - :headline: Flutter SDK - :url: https://www.mongodb.com/docs/realm/sdk/flutter - :icon: /images/icons/flutter.svg - :icon-alt: Flutter SDK icon + Use your preferred programming language to idiomatically + :ref:`define an object model `. - Build Flutter applications with Dart. + .. step:: Open a Database - .. card:: - :headline: C++ SDK - :url: https://www.mongodb.com/docs/realm/sdk/cpp - :icon: /images/icons/cpp_sdk.svg - :icon-alt: C++ SDK icon + The SDK's database - Realm - stores objects in files on your + device. Or you can open an in-memory database which does not + create a file. + :ref:`Configure and open a database ` + to specify the options for your database file. + + .. step:: Read and Write Data + + :ref:`Create `, :ref:`read `, + :ref:`update `, and :ref:`delete ` + objects from the device database. Filter data using the + :ref:`query engines ` provided by the SDK. + + .. step:: React to Changes + + Live objects mean that your data is always up-to-date. + You can :ref:`register a notification handler ` + to watch for changes and perform some logic, such as updating + your UI. Or use our React Native or SwiftUI support to + idiomatically to update Views when data changes. + + .. image:: /images/illustrations/Spot_MauvePurple_Infrastructure_Tech_RealmApp2x.png + :alt: Atlas Device SDK Mobile Illustration + + .. tab:: Sync Data Across Devices + :tabid: device-sync + + .. procedure:: + + .. step:: Connect to an Atlas App Services App + + Configure :ref:`Device Sync in an App Services App + `. Define data access rules. Use + Development Mode to infer your schema from your client data model. + + Then, :ref:`connect to Atlas ` from + your client. + + .. step:: Authenticate a User + + Use one of our authentication providers to :ref:`authenticate a + user `. App Services provides access + to popular authentication providers, such as Apple, Google, or + Facebook. Use our built-in email/password provider to manage + users without a third-party, or use custom JWT authentication to + integrate with other authentication providers. Anonymous authentication + provides access without requiring a login or persisting user data. + + .. step:: Open a Synced Database + + :ref:`Configure and open a synced database `. + :ref:`Subscribe to a query ` + to determine what data the synced database can read and write. + + .. step:: Read and Write Synced Data + + The APIs to read and write data are the same whether you're + using a synced or non-synced database. Data that you read and write + to the device is automatically kept in sync with your Atlas + cluster and other clients. Apps keep working offline and + deterministically sync changes whenever a network connection + is available. + + .. image:: /images/illustrations/Spot_AzureBlue_Mobile_Tech_RealmSync.png + :alt: Device Sync Illustration + + .. tab:: Build with Atlas App Services + :tabid: app-services + + .. container:: + + Call Serverless Functions + ~~~~~~~~~~~~~~~~~~~~~~~~~ + + You can :ref:`call serverless Functions ` + from your client application that run in an App Services backend. + + Query MongoDB Atlas + ~~~~~~~~~~~~~~~~~~~ + + You can :ref:`query data stored in MongoDB ` + directly from your client application code. + + Authenticate Users + ~~~~~~~~~~~~~~~~~~ + + Authenticate users with built-in and third-party :ref:`authentication + providers `. Use the authenticated user to + access App Services. + + .. image:: /images/illustrations/Spot_MauvePurple_APIs_Tech_RealmApp.png + :alt: App Services Illustration + + + .. tab:: Develop with Popular Frameworks + :tabid: realm-frameworks + + .. container:: + + Our SDKs offer framework-idiomatic tools to streamline your + Atlas Device SDK development. In React Native, use our ``@realm/react`` + hooks to manage the Atlas connection, authenticate users, and write to + the database. In Swift, use property wrappers and convenience + features designed to make it easier to work with SwiftUI. - Build applications in C++. Access data stored in realms and sync data with Atlas. + .. literalinclude:: /examples/generated/swiftui/FilterData.snippet.searchable.swift + :language: swift + :caption: SwiftUI Property Wrappers Offer Realm/SwiftUI Integration + :copyable: false -For legacy (pre-v10) Realm Documentation, see https://www.mongodb.com/docs/realm-legacy/docs/. + .. image:: /images/illustrations/Spot_MauvePurple_Logic_Tech_RealmApp2x.png + :alt: Atlas Device SDK Mobile Illustration diff --git a/source/sdk/crud/create.txt b/source/sdk/crud/create.txt index d0f46a45ce..8b44493d9a 100644 --- a/source/sdk/crud/create.txt +++ b/source/sdk/crud/create.txt @@ -9,3 +9,5 @@ Create Objects :backlinks: none :depth: 2 :class: singlecol + +Placeholder page for Create an object content. diff --git a/source/sdk/crud/delete.txt b/source/sdk/crud/delete.txt index 5da3c3aaca..e873cb14c6 100644 --- a/source/sdk/crud/delete.txt +++ b/source/sdk/crud/delete.txt @@ -9,3 +9,5 @@ Delete Objects :backlinks: none :depth: 2 :class: singlecol + +Placeholder page for content related to deleting objects. diff --git a/source/sdk/crud/read.txt b/source/sdk/crud/read.txt index f41f3e4623..c8686404fc 100644 --- a/source/sdk/crud/read.txt +++ b/source/sdk/crud/read.txt @@ -17,3 +17,5 @@ Read Objects :backlinks: none :depth: 2 :class: singlecol + +Placeholder page for content related to reading realm objects. diff --git a/source/sdk/crud/update.txt b/source/sdk/crud/update.txt index 7c693c89b7..992cc009e0 100644 --- a/source/sdk/crud/update.txt +++ b/source/sdk/crud/update.txt @@ -9,3 +9,5 @@ Update Objects :backlinks: none :depth: 2 :class: singlecol + +Placeholder page for content related to updating realm objects. diff --git a/source/sdk/install.txt b/source/sdk/install.txt new file mode 100644 index 0000000000..b575168178 --- /dev/null +++ b/source/sdk/install.txt @@ -0,0 +1,20 @@ +.. _sdks-install: + +======================== +Install Atlas Device SDK +======================== + +.. meta:: + :description: Install Atlas Device SDK for your preferred language or framework using popular package managers and build tools. + +.. facet:: + :name: genre + :values: tutorial + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +Placeholder page for Install content. diff --git a/source/sdk/quick-start.txt b/source/sdk/quick-start.txt new file mode 100644 index 0000000000..9cc61012de --- /dev/null +++ b/source/sdk/quick-start.txt @@ -0,0 +1,13 @@ +.. _sdks-quick-start: + +=========== +Quick Start +=========== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for quick start content. From 95361c059c4d3d1a0ea5fc4d94914af8505f9932 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Tue, 7 May 2024 16:32:17 -0400 Subject: [PATCH 03/63] Remove 'Swift' reference from landing page --- source/index.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/index.txt b/source/index.txt index 638efc4f74..f4a58e5181 100644 --- a/source/index.txt +++ b/source/index.txt @@ -66,8 +66,8 @@ SDK is language-idiomatic and includes: .. kicker:: Learning Paths -Get Started with the Swift SDK ------------------------------- +Get Started with Atlas Device SDK +--------------------------------- .. card-group:: :columns: 3 From 760a9ed9b27f37ccb76d77e534413a8087cae645 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Tue, 7 May 2024 16:52:05 -0400 Subject: [PATCH 04/63] Add IoT --- source/platforms.txt | 2 ++ source/platforms/iot.txt | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 source/platforms/iot.txt diff --git a/source/platforms.txt b/source/platforms.txt index d3cf0c3fc8..e7e415ab08 100644 --- a/source/platforms.txt +++ b/source/platforms.txt @@ -15,6 +15,7 @@ Build for Platforms Android Apple + IoT Linux Web Windows @@ -24,6 +25,7 @@ with Atlas Device SDK: - :ref:`sdks-build-for-android` - :ref:`sdks-build-for-apple` +- :ref:`sdks-build-for-iot` - :ref:`sdks-build-for-linux` - :ref:`sdks-build-for-web` - :ref:`sdks-build-for-windows` diff --git a/source/platforms/iot.txt b/source/platforms/iot.txt new file mode 100644 index 0000000000..58cc1384fa --- /dev/null +++ b/source/platforms/iot.txt @@ -0,0 +1,16 @@ +.. _sdks-build-for-iot: + +============= +Build for IoT +============= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building for IoT. + +Include info about which frameworks we support building for IoT, plus +any specific version or compatibility info worth calling out? From 9c249f6899c8adfad4355f535d099053e1bfc394 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Tue, 7 May 2024 17:30:47 -0400 Subject: [PATCH 05/63] Add test and debug section, move logging into new section --- source/index.txt | 2 +- source/sdk/test-and-debug.txt | 17 +++++++++++++++++ .../sdk/{logging.txt => test-and-debug/log.txt} | 2 +- source/sdk/test-and-debug/test.txt | 13 +++++++++++++ source/sdk/test-and-debug/troubleshooting.txt | 13 +++++++++++++ 5 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 source/sdk/test-and-debug.txt rename source/sdk/{logging.txt => test-and-debug/log.txt} (74%) create mode 100644 source/sdk/test-and-debug/test.txt create mode 100644 source/sdk/test-and-debug/troubleshooting.txt diff --git a/source/index.txt b/source/index.txt index f4a58e5181..764ab2fae3 100644 --- a/source/index.txt +++ b/source/index.txt @@ -23,7 +23,7 @@ Welcome to the Atlas Device SDK Docs Access Atlas Manage Users Sync Data - Logging + Test and Debug SDK Telemetry API Reference Build with Frameworks diff --git a/source/sdk/test-and-debug.txt b/source/sdk/test-and-debug.txt new file mode 100644 index 0000000000..01c653ac3d --- /dev/null +++ b/source/sdk/test-and-debug.txt @@ -0,0 +1,17 @@ +============== +Test and Debug +============== + +.. toctree:: + :titlesonly: + + Logging + Testing + Troubleshooting + +The following pages contain information about how to log information, run tests +using the database, and troubleshoot specific errors: + +- :ref:`sdks-logging` +- :ref:`sdks-testing` +- :ref:`sdks-troubleshooting` diff --git a/source/sdk/logging.txt b/source/sdk/test-and-debug/log.txt similarity index 74% rename from source/sdk/logging.txt rename to source/sdk/test-and-debug/log.txt index 334bbf58ed..5f9fc0d083 100644 --- a/source/sdk/logging.txt +++ b/source/sdk/test-and-debug/log.txt @@ -10,4 +10,4 @@ Logging :depth: 2 :class: singlecol -Placeholder page for information about logging. \ No newline at end of file +Placeholder page for information about logging. diff --git a/source/sdk/test-and-debug/test.txt b/source/sdk/test-and-debug/test.txt new file mode 100644 index 0000000000..93bc352db7 --- /dev/null +++ b/source/sdk/test-and-debug/test.txt @@ -0,0 +1,13 @@ +.. _sdks-testing: + +======= +Testing +======= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about testing. diff --git a/source/sdk/test-and-debug/troubleshooting.txt b/source/sdk/test-and-debug/troubleshooting.txt new file mode 100644 index 0000000000..2665ffb502 --- /dev/null +++ b/source/sdk/test-and-debug/troubleshooting.txt @@ -0,0 +1,13 @@ +.. _sdks-troubleshooting: + +=============== +Troubleshooting +=============== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about troubleshooting specific errors. From 3f5e7a0d92eef6f3b7337a736d2f0fe009f2b55e Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 8 May 2024 16:27:10 -0400 Subject: [PATCH 06/63] Partial Create page as PoC --- .../MissingAPIPlaceholders/missing.cpp | 1 + .../MissingAPIPlaceholders/missing.cs | 1 + .../MissingAPIPlaceholders/missing.dart | 1 + .../MissingAPIPlaceholders/missing.java | 1 + .../MissingAPIPlaceholders/missing.js | 1 + .../MissingAPIPlaceholders/missing.kt | 1 + .../examples/MissingAPIPlaceholders/missing.m | 1 + .../MissingAPIPlaceholders/missing.swift | 1 + .../MissingAPIPlaceholders/missing.ts | 1 + .../MissingExamplePlaceholders/missing.cpp | 2 + .../MissingExamplePlaceholders/missing.cs | 2 + .../MissingExamplePlaceholders/missing.dart | 2 + .../MissingExamplePlaceholders/missing.java | 2 + .../MissingExamplePlaceholders/missing.js | 2 + .../MissingExamplePlaceholders/missing.kt | 2 + .../MissingExamplePlaceholders/missing.m | 2 + .../MissingExamplePlaceholders/missing.swift | 2 + .../MissingExamplePlaceholders/missing.ts | 2 + .../create-embedded-object-description.rst | 16 + .../api-details/cpp/crud/create-procedure.rst | 17 + .../crud/create-realm-object-description.rst | 10 + .../csharp/crud/create-procedure.rst | 17 + .../crud/create-realm-object-description.rst | 5 + .../create-asymmetric-object-description.rst | 2 + .../dart/crud/create-procedure.rst | 16 + .../crud/create-realm-object-description.rst | 16 + .../create-asymmetric-object-description.rst | 2 + .../create-embedded-object-description.rst | 2 + ...create-asymmetric-object-not-supported.rst | 2 + .../java/crud/create-procedure.rst | 14 + .../crud/create-realm-object-description.rst | 7 + .../create-asymmetric-object-description.rst | 4 + .../javascript/crud/create-procedure.rst | 16 + .../crud/create-realm-object-description.rst | 5 + .../create-asymmetric-object-description.rst | 13 + .../create-embedded-object-description.rst | 10 + .../kotlin/crud/create-procedure.rst | 35 ++ .../crud/create-realm-object-description.rst | 6 + .../objectivec/crud/create-procedure.rst | 20 + .../crud/create-realm-object-description.rst | 4 + .../create-asymmetric-object-description.rst | 7 + .../swift/crud/create-procedure.rst | 20 + .../crud/create-realm-object-description.rst | 4 + .../create-asymmetric-object-description.rst | 4 + .../typescript/crud/create-procedure.rst | 16 + .../crud/create-realm-object-description.rst | 5 + .../crud-create-asymmetric-object-model.rst | 59 +++ .../crud/crud-create-asymmetric-object.rst | 57 +++ .../crud-create-embedded-object-model.rst | 58 +++ .../crud/crud-create-embedded-object.rst | 58 +++ .../crud/crud-create-realm-object-model.rst | 56 +++ .../crud/crud-create-realm-object.rst | 59 +++ source/sdk/crud/create.txt | 357 +++++++++++++++++- source/sdk/model-data/object-models.txt | 16 +- 54 files changed, 1040 insertions(+), 2 deletions(-) create mode 100644 source/examples/MissingAPIPlaceholders/missing.cpp create mode 100644 source/examples/MissingAPIPlaceholders/missing.cs create mode 100644 source/examples/MissingAPIPlaceholders/missing.dart create mode 100644 source/examples/MissingAPIPlaceholders/missing.java create mode 100644 source/examples/MissingAPIPlaceholders/missing.js create mode 100644 source/examples/MissingAPIPlaceholders/missing.kt create mode 100644 source/examples/MissingAPIPlaceholders/missing.m create mode 100644 source/examples/MissingAPIPlaceholders/missing.swift create mode 100644 source/examples/MissingAPIPlaceholders/missing.ts create mode 100644 source/examples/MissingExamplePlaceholders/missing.cpp create mode 100644 source/examples/MissingExamplePlaceholders/missing.cs create mode 100644 source/examples/MissingExamplePlaceholders/missing.dart create mode 100644 source/examples/MissingExamplePlaceholders/missing.java create mode 100644 source/examples/MissingExamplePlaceholders/missing.js create mode 100644 source/examples/MissingExamplePlaceholders/missing.kt create mode 100644 source/examples/MissingExamplePlaceholders/missing.m create mode 100644 source/examples/MissingExamplePlaceholders/missing.swift create mode 100644 source/examples/MissingExamplePlaceholders/missing.ts create mode 100644 source/includes/api-details/cpp/crud/create-embedded-object-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-procedure.rst create mode 100644 source/includes/api-details/cpp/crud/create-realm-object-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-procedure.rst create mode 100644 source/includes/api-details/csharp/crud/create-realm-object-description.rst create mode 100644 source/includes/api-details/dart/crud/create-asymmetric-object-description.rst create mode 100644 source/includes/api-details/dart/crud/create-procedure.rst create mode 100644 source/includes/api-details/dart/crud/create-realm-object-description.rst create mode 100644 source/includes/api-details/generic/crud/create-asymmetric-object-description.rst create mode 100644 source/includes/api-details/generic/crud/create-embedded-object-description.rst create mode 100644 source/includes/api-details/java/crud/create-asymmetric-object-not-supported.rst create mode 100644 source/includes/api-details/java/crud/create-procedure.rst create mode 100644 source/includes/api-details/java/crud/create-realm-object-description.rst create mode 100644 source/includes/api-details/javascript/crud/create-asymmetric-object-description.rst create mode 100644 source/includes/api-details/javascript/crud/create-procedure.rst create mode 100644 source/includes/api-details/javascript/crud/create-realm-object-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-embedded-object-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-procedure.rst create mode 100644 source/includes/api-details/kotlin/crud/create-realm-object-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-procedure.rst create mode 100644 source/includes/api-details/objectivec/crud/create-realm-object-description.rst create mode 100644 source/includes/api-details/swift/crud/create-asymmetric-object-description.rst create mode 100644 source/includes/api-details/swift/crud/create-procedure.rst create mode 100644 source/includes/api-details/swift/crud/create-realm-object-description.rst create mode 100644 source/includes/api-details/typescript/crud/create-asymmetric-object-description.rst create mode 100644 source/includes/api-details/typescript/crud/create-procedure.rst create mode 100644 source/includes/api-details/typescript/crud/create-realm-object-description.rst create mode 100644 source/includes/sdk-examples/crud/crud-create-asymmetric-object-model.rst create mode 100644 source/includes/sdk-examples/crud/crud-create-asymmetric-object.rst create mode 100644 source/includes/sdk-examples/crud/crud-create-embedded-object-model.rst create mode 100644 source/includes/sdk-examples/crud/crud-create-embedded-object.rst create mode 100644 source/includes/sdk-examples/crud/crud-create-realm-object-model.rst create mode 100644 source/includes/sdk-examples/crud/crud-create-realm-object.rst diff --git a/source/examples/MissingAPIPlaceholders/missing.cpp b/source/examples/MissingAPIPlaceholders/missing.cpp new file mode 100644 index 0000000000..b5ba4125c4 --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.cpp @@ -0,0 +1 @@ +// The C++ SDK does not currently support this API. diff --git a/source/examples/MissingAPIPlaceholders/missing.cs b/source/examples/MissingAPIPlaceholders/missing.cs new file mode 100644 index 0000000000..63560b2a02 --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.cs @@ -0,0 +1 @@ +// The .NET SDK does not currently support this API. diff --git a/source/examples/MissingAPIPlaceholders/missing.dart b/source/examples/MissingAPIPlaceholders/missing.dart new file mode 100644 index 0000000000..5cc60fdb10 --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.dart @@ -0,0 +1 @@ +// The Flutter SDK does not currently support this API. diff --git a/source/examples/MissingAPIPlaceholders/missing.java b/source/examples/MissingAPIPlaceholders/missing.java new file mode 100644 index 0000000000..5b7abc0b78 --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.java @@ -0,0 +1 @@ +// The Java SDK does not support this API. diff --git a/source/examples/MissingAPIPlaceholders/missing.js b/source/examples/MissingAPIPlaceholders/missing.js new file mode 100644 index 0000000000..2cbf46abe5 --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.js @@ -0,0 +1 @@ +// The Node.js SDK does not currently support this API. diff --git a/source/examples/MissingAPIPlaceholders/missing.kt b/source/examples/MissingAPIPlaceholders/missing.kt new file mode 100644 index 0000000000..5804ce35f6 --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.kt @@ -0,0 +1 @@ +// The Kotlin SDK does not currently support this API. diff --git a/source/examples/MissingAPIPlaceholders/missing.m b/source/examples/MissingAPIPlaceholders/missing.m new file mode 100644 index 0000000000..c8a3abd96b --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.m @@ -0,0 +1 @@ +// The Swift SDK does not currently support this API. diff --git a/source/examples/MissingAPIPlaceholders/missing.swift b/source/examples/MissingAPIPlaceholders/missing.swift new file mode 100644 index 0000000000..c8a3abd96b --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.swift @@ -0,0 +1 @@ +// The Swift SDK does not currently support this API. diff --git a/source/examples/MissingAPIPlaceholders/missing.ts b/source/examples/MissingAPIPlaceholders/missing.ts new file mode 100644 index 0000000000..c788c96509 --- /dev/null +++ b/source/examples/MissingAPIPlaceholders/missing.ts @@ -0,0 +1 @@ +// This API is not currently available in TypeScript. diff --git a/source/examples/MissingExamplePlaceholders/missing.cpp b/source/examples/MissingExamplePlaceholders/missing.cpp new file mode 100644 index 0000000000..906d6e0f8c --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.cpp @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in C++. +// Please refer to the other languages or related pages for example code. diff --git a/source/examples/MissingExamplePlaceholders/missing.cs b/source/examples/MissingExamplePlaceholders/missing.cs new file mode 100644 index 0000000000..2130048ee9 --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.cs @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in C#. +// Please refer to the other languages or related pages for example code. diff --git a/source/examples/MissingExamplePlaceholders/missing.dart b/source/examples/MissingExamplePlaceholders/missing.dart new file mode 100644 index 0000000000..291e4eb0ce --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.dart @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in Dart. +// Please refer to the other languages or related pages for example code. diff --git a/source/examples/MissingExamplePlaceholders/missing.java b/source/examples/MissingExamplePlaceholders/missing.java new file mode 100644 index 0000000000..d9d8b07eaf --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.java @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in Java. +// Please refer to the other languages or related pages for example code. diff --git a/source/examples/MissingExamplePlaceholders/missing.js b/source/examples/MissingExamplePlaceholders/missing.js new file mode 100644 index 0000000000..9affb156c9 --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.js @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in JavaScript. +// Please refer to the other languages or related pages for example code. diff --git a/source/examples/MissingExamplePlaceholders/missing.kt b/source/examples/MissingExamplePlaceholders/missing.kt new file mode 100644 index 0000000000..e0f82450ea --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.kt @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in Kotlin. +// Please refer to the other languages or related pages for example code. diff --git a/source/examples/MissingExamplePlaceholders/missing.m b/source/examples/MissingExamplePlaceholders/missing.m new file mode 100644 index 0000000000..21da71fc02 --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.m @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in Objective-C. +// Please refer to the other languages or related pages for example code. diff --git a/source/examples/MissingExamplePlaceholders/missing.swift b/source/examples/MissingExamplePlaceholders/missing.swift new file mode 100644 index 0000000000..a2510417b9 --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.swift @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in Swift. +// Please refer to the other languages or related pages for example code. diff --git a/source/examples/MissingExamplePlaceholders/missing.ts b/source/examples/MissingExamplePlaceholders/missing.ts new file mode 100644 index 0000000000..855d7406ef --- /dev/null +++ b/source/examples/MissingExamplePlaceholders/missing.ts @@ -0,0 +1,2 @@ +// The documentation does not currently have this code example in TypeScript. +// Please refer to the other languages or related pages for example code. diff --git a/source/includes/api-details/cpp/crud/create-embedded-object-description.rst b/source/includes/api-details/cpp/crud/create-embedded-object-description.rst new file mode 100644 index 0000000000..c2deb59ae6 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-embedded-object-description.rst @@ -0,0 +1,16 @@ +To create an embedded object, assign the raw pointer of the embedded +object to a parent object's property. Move the parent object into +the realm using the :cpp-sdk:`Realm.add() function ` +inside of a write transaction. + +In this example, we assign the raw pointer of the embedded object - +``ContactDetails *`` - to the embedded object property of the parent +object - ``Business.contactDetails``. + +Then, we add the ``business`` object to the realm. This copies the +``business`` and ``contactDetails`` objects to the realm. + +Because ``ContactDetails`` is an embedded object, it does not have +its own lifecycle independent of the main ``Business`` object. +If you delete the ``Business`` object, this also deletes the +``ContactDetails`` object. diff --git a/source/includes/api-details/cpp/crud/create-procedure.rst b/source/includes/api-details/cpp/crud/create-procedure.rst new file mode 100644 index 0000000000..98e85ab096 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-procedure.rst @@ -0,0 +1,17 @@ +#. Open a write transaction with + :cpp-sdk:`Realm.write() function `. + +#. Instantiate an unmanaged object instance within the ``realm`` namespace. + +#. Move the unmanaged object instance into the database using the + :cpp-sdk:`Realm.add() function `. + + When you move an object into a realm, this consumes the object as an rvalue. + You must use the managed object for any data access or observation. If + you would like to immediately work with the object, return a managed + version of the object. + +#. Work with the persisted SDK object through the returned instance. Note that + this *does not* apply to asymmetric objects, which are write-only. Once an + asymmetric object is synced, it is deleted from the database. You cannot + read, update, or delete an asymmetric object from the device. diff --git a/source/includes/api-details/cpp/crud/create-realm-object-description.rst b/source/includes/api-details/cpp/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..e9d7eff12a --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-realm-object-description.rst @@ -0,0 +1,10 @@ +To create an object, you must instantiate it using the ``realm`` namespace. +Move the object into the realm using the +:cpp-sdk:`Realm.add() function ` +inside of a write transaction. + +When you move an object into a realm, this consumes the object as an +rvalue. You must use the managed object for any data access or observation. +In this example, copying the ``dog`` object into the realm consumes +it as an rvalue. You can return the managed object to continue to work +with it. diff --git a/source/includes/api-details/csharp/crud/create-procedure.rst b/source/includes/api-details/csharp/crud/create-procedure.rst new file mode 100644 index 0000000000..778a1c3261 --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-procedure.rst @@ -0,0 +1,17 @@ +#. Open a write transaction with the + :dotnet-sdk:`Realm.Write() ` + or :dotnet-sdk:`Realm.WriteAsync() ` + methods. Prefer ``WriteAsync()`` to avoid blocking the UI, unless blocking + the UI is desired. + +#. Instantiate an unmanaged object instance whose object model implements one + of the SDK's object interfaces. For more information, refer to + :ref:`sdks-object-models`. + +#. Pass the unmanaged object instance to the + :dotnet-sdk:`Realm.Add() method ` + to persist the object data to the database. + + Note that asymmetric objects are write-only. Once an asymmetric object is + synced, it is deleted from the device database. You cannot read, update, or + delete an asymmetric object from the device. diff --git a/source/includes/api-details/csharp/crud/create-realm-object-description.rst b/source/includes/api-details/csharp/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..8bfd3abf3a --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-realm-object-description.rst @@ -0,0 +1,5 @@ +The following code shows two methods for creating a new Realm object. In the +first example, we create the object first, and then add it to the realm within +a :dotnet-sdk:`WriteAsync() ` +method. In the second example, we create the document within the ``WriteAsync`` +block, which returns a realm object we can further work with. diff --git a/source/includes/api-details/dart/crud/create-asymmetric-object-description.rst b/source/includes/api-details/dart/crud/create-asymmetric-object-description.rst new file mode 100644 index 0000000000..1dbaf49905 --- /dev/null +++ b/source/includes/api-details/dart/crud/create-asymmetric-object-description.rst @@ -0,0 +1,2 @@ +Once you have an open Realm, you can create an asymmetric object inside +a write transaction. Pass your object data to ``realm.ingest``. diff --git a/source/includes/api-details/dart/crud/create-procedure.rst b/source/includes/api-details/dart/crud/create-procedure.rst new file mode 100644 index 0000000000..10f6a02a7d --- /dev/null +++ b/source/includes/api-details/dart/crud/create-procedure.rst @@ -0,0 +1,16 @@ +#. Open a write transaction with a + :flutter-sdk:`Realm.write() ` or + :flutter-sdk:`Realm.writeAsync() ` methods. + +#. Instantiate an unmanaged object instance whose ``RealmObject`` model + has been successfully created, generated, and imported into the file. + For more information, refer to :ref:`sdks-object-models`. + +#. Pass the unmanaged object instance to the + :flutter-sdk:`Realm.add() method ` + to persist the object data to the database. You can return managed objects + from the write transaction block to observe or work with them immediately. + + Note that asymmetric objects are write-only. Once an asymmetric object is + synced, it is deleted from the device database. You cannot read, update, or + delete an asymmetric object from the device. diff --git a/source/includes/api-details/dart/crud/create-realm-object-description.rst b/source/includes/api-details/dart/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..37958863aa --- /dev/null +++ b/source/includes/api-details/dart/crud/create-realm-object-description.rst @@ -0,0 +1,16 @@ +Once you've opened a database, you can create objects within it using a +:flutter-sdk:`Realm.write() ` transaction block. + +.. code-block:: dart + + realm.write((){ + // ...write data to realm + }); + +You can also return values from the write transaction callback function. + +.. warning:: Write RealmObjects to One Realm File + + You can only write ``RealmObjects`` to a single realm file. + If you already wrote a ``RealmObject`` to one realm file, + the SDK throws a ``RealmException`` if you try to write it to another database. diff --git a/source/includes/api-details/generic/crud/create-asymmetric-object-description.rst b/source/includes/api-details/generic/crud/create-asymmetric-object-description.rst new file mode 100644 index 0000000000..228f2411af --- /dev/null +++ b/source/includes/api-details/generic/crud/create-asymmetric-object-description.rst @@ -0,0 +1,2 @@ +To create an asymmetric object, initialize an asymmetric object type and add +it to the database in a write transaction: diff --git a/source/includes/api-details/generic/crud/create-embedded-object-description.rst b/source/includes/api-details/generic/crud/create-embedded-object-description.rst new file mode 100644 index 0000000000..d7a77e0f10 --- /dev/null +++ b/source/includes/api-details/generic/crud/create-embedded-object-description.rst @@ -0,0 +1,2 @@ +To create an embedded object, assign an instance of the embedded object +to a parent object's property: diff --git a/source/includes/api-details/java/crud/create-asymmetric-object-not-supported.rst b/source/includes/api-details/java/crud/create-asymmetric-object-not-supported.rst new file mode 100644 index 0000000000..ca1a3ca71e --- /dev/null +++ b/source/includes/api-details/java/crud/create-asymmetric-object-not-supported.rst @@ -0,0 +1,2 @@ +:ref:`Data Ingest ` is not supported in the Java SDK. +To stream data from the client application to Atlas, use the Kotlin SDK. diff --git a/source/includes/api-details/java/crud/create-procedure.rst b/source/includes/api-details/java/crud/create-procedure.rst new file mode 100644 index 0000000000..cb6a8f23e4 --- /dev/null +++ b/source/includes/api-details/java/crud/create-procedure.rst @@ -0,0 +1,14 @@ +#. Open a write transaction with the + :java-sdk:`realm.executeTransaction() ` or + :java-sdk:`realm.executeTransactionAsync() ` methods. + +#. Instantiate an unmanaged object instance whose model subclasses + :java-sdk:`RealmObject ` or implements the + :java-sdk:`RealmModel ` interface. For more + information, refer to :ref:`sdks-object-models`. + +#. Pass the unmanaged object instance to the + :java-sdk:`realm.createObject() method ` + or the + :java-sdk:`createObjectFromJson() method ` + to create an SDK object instance. diff --git a/source/includes/api-details/java/crud/create-realm-object-description.rst b/source/includes/api-details/java/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..cb6fba2130 --- /dev/null +++ b/source/includes/api-details/java/crud/create-realm-object-description.rst @@ -0,0 +1,7 @@ +Use :java-sdk:`realm.createObject() ` +in a transaction to create a persistent instance of a Realm object in a +realm. You can then modify the returned object with other field values +using accessors and mutators. + +The following example demonstrates how to create an object with +:java-sdk:`createObject() `: diff --git a/source/includes/api-details/javascript/crud/create-asymmetric-object-description.rst b/source/includes/api-details/javascript/crud/create-asymmetric-object-description.rst new file mode 100644 index 0000000000..ad0daf2a47 --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-asymmetric-object-description.rst @@ -0,0 +1,4 @@ +You can create an asymmetric object inside a write transaction using +:js-sdk:`Realm.create() `. When creating an +asymmetric object, ``Realm.create()`` returns ``undefined`` rather than the +object itself. diff --git a/source/includes/api-details/javascript/crud/create-procedure.rst b/source/includes/api-details/javascript/crud/create-procedure.rst new file mode 100644 index 0000000000..b8da41b3be --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-procedure.rst @@ -0,0 +1,16 @@ +#. Open a write transaction with the + :js-sdk:`Realm.write() ` method. + +#. Instantiate an unmanaged object instance of your JavaScript class or a + class that extends :js-sdk:`Realm.object `. + For more information, refer to :ref:`sdks-object-models`. + +#. Pass the unmanaged object instance to the + :js-sdk:`Realm.create() ` method + to persist the object data to the database. You can assign the new managed + object to a variable or return it from the write transaction block to + observe or work with it immediately. + + Note that asymmetric objects are write-only. Once an asymmetric object is + synced, it is deleted from the device database. You cannot read, update, or + delete an asymmetric object from the device. diff --git a/source/includes/api-details/javascript/crud/create-realm-object-description.rst b/source/includes/api-details/javascript/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..2250961812 --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-realm-object-description.rst @@ -0,0 +1,5 @@ +To add an object to a realm, instantiate it as you would any other object +and then pass it to :js-sdk:`Realm.create() ` inside of a +write transaction. If the realm's :ref:`schema ` includes +the object type and the object conforms to the schema, then Realm +stores the object, which is now *managed* by the realm. diff --git a/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst b/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst new file mode 100644 index 0000000000..1607cc5dd6 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst @@ -0,0 +1,13 @@ +Unlike other SDK objects, you *do not* use the ``copyToRealm()`` method to +create it. Instead, you use a special ``insert()`` extension method to insert +it into the database. + +To create a new ``AsymmetricRealmObject`` instance, instantiate a +new object of an +:ref:`asymmetric object type ` using +`insert() <{+kotlin-sync-prefix+}io.realm.kotlin.mongodb.ext/insert.html>`__. + +In the following example, we instantiate a new ``WeatherSensor`` +object and pass it to ``insert()`` within a write transaction: + +.. versionadded:: 1.10.0 diff --git a/source/includes/api-details/kotlin/crud/create-embedded-object-description.rst b/source/includes/api-details/kotlin/crud/create-embedded-object-description.rst new file mode 100644 index 0000000000..3a3b592f55 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-embedded-object-description.rst @@ -0,0 +1,10 @@ +In the following example, we instantiate a new ``Contact`` object with +an embedded ``Address``, which contains a ``Contact`` object and an embedded +``Country`` object: + +.. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-one-embedded-object.kt + :language: kotlin + +We also instantiate a new ``Business`` object with a +list of embedded ``Address`` objects, which also contain ``Contact`` +objects and embedded ``Country`` objects: diff --git a/source/includes/api-details/kotlin/crud/create-procedure.rst b/source/includes/api-details/kotlin/crud/create-procedure.rst new file mode 100644 index 0000000000..0398727886 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-procedure.rst @@ -0,0 +1,35 @@ +#. Open a write transaction with `realm.write() + <{+kotlin-local-prefix+}io.realm.kotlin/-realm/write.html>`__ or + `realm.writeBlocking() + <{+kotlin-local-prefix+}io.realm.kotlin/-realm/write-blocking.html>`__. + +#. Instantiate an unmanaged object instance with the class + constructor. You can use an `apply block + `__ + to configure multiple properties at once. + +#. Pass the unmanaged object instance to `copyToRealm() + <{+kotlin-local-prefix+}io.realm.kotlin/-mutable-realm/copy-to-realm.html>`__ + to persist the object data to the database. This method returns a + live managed instance of the object. + + .. important:: Asymmetric Objects Use Insert() + + Asymmetric objects are special write-only objects that do not + persist to the database. They *do not* use ``copyToRealm()``. + Instead, you pass the asymmetric object instance to the + ``insert()`` extension method within a write transaction. + Refer to the :ref:`sdks-create-asymmetric-object` section + on this page for more information. + +#. Work with the persisted SDK object through the returned instance. The live + object is accessible until the write transaction completes. Note that this + *does not* apply to asymmetric objects, which are write-only. Once an + asymmetric object is synced, it is deleted from the device database. You + cannot read, update, or delete an asymmetric object from the device. + +.. note:: Frozen Objects + + In Kotlin, objects returned from a write closure become frozen objects when + the write transaction completes. For more information, refer to + :ref:`kotlin-frozen-architecture`. diff --git a/source/includes/api-details/kotlin/crud/create-realm-object-description.rst b/source/includes/api-details/kotlin/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..c6b59e347d --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-realm-object-description.rst @@ -0,0 +1,6 @@ +To create a new ``RealmObject`` instance, instantiate a new object of a +:ref:`realm object type `. + +In the following example, we instantiate a ``Frog`` object in a +``realm.write()`` block, then pass the instantiated object to +``copyToRealm()`` to return a managed instance: diff --git a/source/includes/api-details/objectivec/crud/create-procedure.rst b/source/includes/api-details/objectivec/crud/create-procedure.rst new file mode 100644 index 0000000000..568aa78d4a --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-procedure.rst @@ -0,0 +1,20 @@ +#. Open a write transaction with the + :objc-sdk:`-[RLMRealm transactionWith:block] + ` + or the :objc-sdk:`-[RLMRealm transactionWithoutNotifying:block:] + ` + methods. + +#. Instantiate an unmanaged object instance of a class that subclasses one + of: + + - :objc-sdk:`RLMObject ` + - :objc-sdk:`RLMEmbeddedObject ` + - :objc-sdk:`RLMAsymmetricObject ` + + For more information, refer to :ref:`sdks-object-models`. + +#. Pass the unmanaged object instance to the + :objc-sdk:`-[RLMRealm addObject:] + ` method + to persist the object data to the database. diff --git a/source/includes/api-details/objectivec/crud/create-realm-object-description.rst b/source/includes/api-details/objectivec/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..be7d8b3c32 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-realm-object-description.rst @@ -0,0 +1,4 @@ +To add an object to a realm, instantiate it as you would any other +object and then pass it to :objc-sdk:`-[RLMRealm addObject:] +` inside +of a write transaction. diff --git a/source/includes/api-details/swift/crud/create-asymmetric-object-description.rst b/source/includes/api-details/swift/crud/create-asymmetric-object-description.rst new file mode 100644 index 0000000000..cd9dc7b89a --- /dev/null +++ b/source/includes/api-details/swift/crud/create-asymmetric-object-description.rst @@ -0,0 +1,7 @@ +You can only create an ``AsymmetricObject`` using +:swift-sdk:`create(_ type:, value:) +`. +You cannot use the ``.add()`` API to create asymmetric object types. +You can create AsymmetricObjects for a realm initialized with a +:swift-sdk:`Flexible Sync configuration +`. diff --git a/source/includes/api-details/swift/crud/create-procedure.rst b/source/includes/api-details/swift/crud/create-procedure.rst new file mode 100644 index 0000000000..146d8fe2f5 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-procedure.rst @@ -0,0 +1,20 @@ +#. Open a write transaction with the + ``Realm.write()``,``Realm.writeAsync()``, or ``Realm.asyncWrite()`` methods. + +#. Instantiate an unmanaged object instance of a class that subclasses one + of: + + - :swift-sdk:`Object ` + - :swift-sdk:`EmbeddedObject ` + - :swift-sdk:`AsymmetricObject ` + + For more information, refer to :ref:`sdks-object-models`. + +#. Pass the unmanaged object instance to the + :swift-sdk:`Realm.create() ` + or :swift-sdk:`Realm.add() ` + methods to persist the object data to the database. + + Note that asymmetric objects are write-only. Once an asymmetric object is + synced, it is deleted from the device database. You cannot read, update, or + delete an asymmetric object from the device. diff --git a/source/includes/api-details/swift/crud/create-realm-object-description.rst b/source/includes/api-details/swift/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..25fe15a5ea --- /dev/null +++ b/source/includes/api-details/swift/crud/create-realm-object-description.rst @@ -0,0 +1,4 @@ +To add an object to a realm, instantiate it as you would any other +object and then pass it to :swift-sdk:`Realm.add(_:update:) +` +inside of a write transaction. diff --git a/source/includes/api-details/typescript/crud/create-asymmetric-object-description.rst b/source/includes/api-details/typescript/crud/create-asymmetric-object-description.rst new file mode 100644 index 0000000000..ad0daf2a47 --- /dev/null +++ b/source/includes/api-details/typescript/crud/create-asymmetric-object-description.rst @@ -0,0 +1,4 @@ +You can create an asymmetric object inside a write transaction using +:js-sdk:`Realm.create() `. When creating an +asymmetric object, ``Realm.create()`` returns ``undefined`` rather than the +object itself. diff --git a/source/includes/api-details/typescript/crud/create-procedure.rst b/source/includes/api-details/typescript/crud/create-procedure.rst new file mode 100644 index 0000000000..c22e9f5319 --- /dev/null +++ b/source/includes/api-details/typescript/crud/create-procedure.rst @@ -0,0 +1,16 @@ +#. Open a write transaction with the + :js-sdk:`Realm.write() ` method. + +#. Instantiate an unmanaged object instance of a class that extends + :js-sdk:`Realm.object `. + For more information, refer to :ref:`sdks-object-models`. + +#. Pass the unmanaged object instance to the + :js-sdk:`Realm.create() ` method + to persist the object data to the database. You can assign the new managed + object to a variable or return it from the write transaction block to + observe or work with it immediately. + + Note that asymmetric objects are write-only. Once an asymmetric object is + synced, it is deleted from the device database. You cannot read, update, or + delete an asymmetric object from the device. diff --git a/source/includes/api-details/typescript/crud/create-realm-object-description.rst b/source/includes/api-details/typescript/crud/create-realm-object-description.rst new file mode 100644 index 0000000000..2250961812 --- /dev/null +++ b/source/includes/api-details/typescript/crud/create-realm-object-description.rst @@ -0,0 +1,5 @@ +To add an object to a realm, instantiate it as you would any other object +and then pass it to :js-sdk:`Realm.create() ` inside of a +write transaction. If the realm's :ref:`schema ` includes +the object type and the object conforms to the schema, then Realm +stores the object, which is now *managed* by the realm. diff --git a/source/includes/sdk-examples/crud/crud-create-asymmetric-object-model.rst b/source/includes/sdk-examples/crud/crud-create-asymmetric-object-model.rst new file mode 100644 index 0000000000..586a50ca45 --- /dev/null +++ b/source/includes/sdk-examples/crud/crud-create-asymmetric-object-model.rst @@ -0,0 +1,59 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.asymmetric-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_ingest.test.snippet.asymmetric-sync-object.dart + :language: dart + :emphasize-lines: 1 + + - id: java + content: | + + .. literalinclude:: /examples/MissingAPIPlaceholders/missing.java + :language: java + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.asymmetric-sync-object.js + :language: javascript + :emphasize-lines: 6 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-asymmetric-model.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.asymmetric-model.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.asymmetric-sync-object.ts + :language: typescript + :emphasize-lines: 12 diff --git a/source/includes/sdk-examples/crud/crud-create-asymmetric-object.rst b/source/includes/sdk-examples/crud/crud-create-asymmetric-object.rst new file mode 100644 index 0000000000..5fbdd73384 --- /dev/null +++ b/source/includes/sdk-examples/crud/crud-create-asymmetric-object.rst @@ -0,0 +1,57 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.create-asymmetric-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_ingest.test.snippet.write-asymmetric-object.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingAPIPlaceholders/missing.java + :language: java + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AsymmetricSyncTest.snippet.create-asymmetric-object.kt + :language: kotlin + :emphasize-lines: 10, 11 + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.create-asymmetric-object.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.write-asymmetric-object.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/crud-create-embedded-object-model.rst b/source/includes/sdk-examples/crud/crud-create-embedded-object-model.rst new file mode 100644 index 0000000000..d6b56296cf --- /dev/null +++ b/source/includes/sdk-examples/crud/crud-create-embedded-object-model.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.model-with-embedded-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/EmbeddedExamples.snippet.embedded-classes.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/EmbeddedObjects/DefineEmbeddedObjects.java + :language: java + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.define-embedded-objects.js + :language: javascript + :emphasize-lines: 3, 18, 28 + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/crud-create-embedded-object.rst b/source/includes/sdk-examples/crud/crud-create-embedded-object.rst new file mode 100644 index 0000000000..018ada3e1e --- /dev/null +++ b/source/includes/sdk-examples/crud/crud-create-embedded-object.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.create-embedded-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/EmbeddedExamples.snippet.create.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/EmbeddedObjects/CreateEmbeddedObject.java + :language: java + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.create-an-embedded-object.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-many-embedded-objects.kt + :language: kotlin + :emphasize-lines: 15 + + - id: objectivec + content: | + + .. literalinclude:: /examples/EmbeddedObjects/CreateEmbeddedObject.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.create-an-embedded-object.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/crud-create-realm-object-model.rst b/source/includes/sdk-examples/crud/crud-create-realm-object-model.rst new file mode 100644 index 0000000000..15429210f6 --- /dev/null +++ b/source/includes/sdk-examples/crud/crud-create-realm-object-model.rst @@ -0,0 +1,56 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.dog-model-shows-namespace.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Task.snippet.item-model.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.models.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.java + :language: java + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/crud-create-realm-object.rst b/source/includes/sdk-examples/crud/crud-create-realm-object.rst new file mode 100644 index 0000000000..502ab3e55f --- /dev/null +++ b/source/includes/sdk-examples/crud/crud-create-realm-object.rst @@ -0,0 +1,59 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.create-an-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.create.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.return-from-write.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.create-an-object.java + :language: java + :emphasize-lines: 3 + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-create-a-new-object.js + :language: javascript + :emphasize-lines: 6 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-new-realm-object.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.create.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.create.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.ts + :language: typescript diff --git a/source/sdk/crud/create.txt b/source/sdk/crud/create.txt index 8b44493d9a..4a40f8814a 100644 --- a/source/sdk/crud/create.txt +++ b/source/sdk/crud/create.txt @@ -10,4 +10,359 @@ Create Objects :depth: 2 :class: singlecol -Placeholder page for Create an object content. +.. tabs-selector:: drivers + +This page describes the concepts of write transactions and managed objects in +a database, then explains how to create and persist a new object to a local or +synced database using Atlas Device SDK. To learn more about object models and +how to define them, refer to :ref:`sdks-object-models`. + +You can create objects whose object type is managed by the database instance. +For more information, refer to +:ref:`sdks-configure-and-open-database` or +:ref:`sdks-configure-and-open-synced-database`. + +.. note:: Write to a Synced Database + + The syntax to write a new object to the database is the same for a local or + a synced database. However, there are additional considerations that determine + whether the write operation in a synced database is successful. For more + information, refer to :ref:`sdks-write-synced-database`. + +.. _sdks-write-transactions: + +Write Transactions +------------------ + +The Atlas Device SDK persistence layer handles writes in terms of transactions. +All writes must happen within a transaction. A **transaction** is a list of +read and write operations that the database treats as a single indivisible +operation: either *all* of the operations succeed or *none* of the operations +in the transaction take effect. + +The SDK represents each transaction as a callback function +that contains zero or more read and write operations. To run +a transaction, you define a transaction callback and pass it to +one of the database's write methods. Within this callback, you can access a +database instance and then create, read, update, and delete objects within the +database. + +A database file allows only one open write transaction at a time. The SDK +blocks other writes on other threads until the open transaction on the database +file is complete. This means there is never a race condition when reading +values from the database within a transaction. + +When you are done with your transaction, the SDK either commits it or cancels +it: + +- When the SDK commits a transaction, it writes all changes to disk. For + synced databases, the SDK then queues the change for synchronization with the + backend. +- When the SDK cancels a write transaction or an operation in + the transaction causes an error, all changes are discarded. + +.. _sdks-managed-vs-unmanaged-objects: + +Managed and Unmanaged Objects +----------------------------- + +The SDK's APIs may refer to objects as managed or unmanaged. When you create +an object with the SDK, it is unmanaged until it is added to the database, +which creates a managed instance. + +- **Managed objects** are SDK objects that persist in a database instance. + Managed objects can only be accessed from an open database file. They can be + updated with changes within write transactions as long as that database + remains open. Managed objects are tied to the database instance from which + they originated and cannot be directly written to another database. However, + the SDK supplies a method to copy managed objects from one database file to + another. + + You can use the SDK's APIs with managed objects. For example, managed + objects can have relationships with other objects and you can observe them + for changes. You can also create an unmanaged copy of a managed object. + Refer to the :ref:`Create an Unmanaged Copy of an Object or Collection + ` section on this page. + +- **Unmanaged objects** are SDK objects that behave like normal Kotlin objects, + but they are not persisted in the database. All SDK objects are unmanaged + until you add them to a database within a write transaction. + You cannot use the SDK's APIs with unmanaged objects or observe them for + changes. + +.. tip:: + + You can check if an object is managed with the + ``isManaged`` API. + +Create a Realm Object +--------------------- + +Before you can create a new object and persist it to the realm, you must +:ref:`sdks-object-models`. Then, you include that object type in your database +schema when you open the database. + +.. important:: Object Types Must Be in Your Schema + + You can only write objects whose object type is included in the database + schema. If you try to reference or write an object of an object type + that isn't in your schema, the SDK returns a schema validation error. + +To create a new object and persist it to the database: + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp + + .. include:: /includes/api-details/cpp/crud/create-procedure.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-procedure.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-procedure.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-procedure.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-procedure.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-procedure.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/create-procedure.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-procedure.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/create-procedure.rst + +You can also upsert into a database using specific criteria. For more +information, refer to :ref:`sdks-upsert-an-object`. + +Create a Realm Object +~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp + + .. include:: /includes/api-details/cpp/crud/create-realm-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-realm-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-realm-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-realm-object-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-realm-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-realm-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/create-realm-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-realm-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/create-realm-object-description.rst + +.. include:: /includes/sdk-examples/crud-create-realm-object.rst + +Model +````` + +For more information about modeling an object, refer to: +:ref:`sdk-define-a-new-object-type`. + +.. include:: /includes/sdk-examples/crud-create-realm-object-model.rst + +.. _sdks-create-an-embedded-object: + +Create an Embedded Object +~~~~~~~~~~~~~~~~~~~~~~~~~ + +To create a new embedded object instance, assign an instance of an +:ref:`embedded object type ` to a +parent object's property. This can be in a one-to-one, one-to-many, or +inverse :ref:`relationship ` +depending on how you defined the embedded object within the parent +object type. + +.. note:: Embedded Objects Must Be Created Within a Parent Object + + An embedded object requires a parent object and *cannot* exist as an + independent SDK object. + +Embedded objects have strict ownership with their parent object. +After you create the embedded object, you *cannot* reassign it to a +different parent object or share it between multiple parent objects. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp + + .. include:: /includes/api-details/cpp/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + +.. include:: /includes/sdk-examples/crud-create-embedded-object.rst + +Model +````` + +For more information about modeling an embedded object, refer to: +:ref:`sdks-embedded-objects`. + +.. include:: /includes/sdk-examples/crud-create-embedded-object-model.rst + +.. _sdks-create-asymmetric-object: + +Create an Asymmetric Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Asymmetric objects are write-only. Once inserted, the asymmetric object syncs +to Atlas. You *cannot* access the managed data locally, remove it from the +database, or query for it. + +For information on how to use asymmetric objects in your application, +refer to :ref:`sdks-stream-data-to-atlas`. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + +.. include:: /includes/sdk-examples/crud-create-asymmetric-object.rst + +Model +````` + +For more information about modeling an asymmetric object, refer to: +:ref:`sdks-asymmetric-objects`. + +.. include:: /includes/sdk-examples/crud-create-asymmetric-object-model.rst diff --git a/source/sdk/model-data/object-models.txt b/source/sdk/model-data/object-models.txt index d3d0eef1a1..7439782093 100644 --- a/source/sdk/model-data/object-models.txt +++ b/source/sdk/model-data/object-models.txt @@ -10,4 +10,18 @@ Define an SDK Object Model :depth: 3 :class: singlecol -Placeholder page for defining an object model. \ No newline at end of file +Placeholder page for defining an object model. + +.. _sdks-embedded-objects: + +Define an Embedded Object +------------------------- + +Placeholder for defining an embedded object, so we have a ref target to link to. + +.. _sdks-asymmetric-objects: + +Define an Asymmetric Object +--------------------------- + +Placeholder for defining an asymmetric object, so we have a ref target to link to. From 6c255ff1052bad961e980b0c76ff5ef7984e3cba Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 8 May 2024 16:33:44 -0400 Subject: [PATCH 07/63] Delete Java API reference to make build errors easier to parse --- source/sdk/temp/java/api/index.txt | 37 - source/sdk/temp/java/api/io.txt | 34 - source/sdk/temp/java/api/io/realm.txt | 74 - source/sdk/temp/java/api/io/realm/Case.txt | 316 - .../java/api/io/realm/CollectionUtils.txt | 425 - .../api/io/realm/CompactOnLaunchCallback.txt | 127 - .../realm/DefaultCompactOnLaunchCallback.txt | 187 - .../temp/java/api/io/realm/DynamicRealm.txt | 2541 --- .../api/io/realm/DynamicRealm/Callback.txt | 271 - .../api/io/realm/DynamicRealm/Transaction.txt | 144 - .../DynamicRealm/Transaction/Callback.txt | 241 - .../DynamicRealm/Transaction/OnError.txt | 118 - .../DynamicRealm/Transaction/OnSuccess.txt | 102 - .../java/api/io/realm/DynamicRealmObject.txt | 5552 ------- .../temp/java/api/io/realm/FieldAttribute.txt | 261 - .../java/api/io/realm/FrozenPendingRow.txt | 3275 ---- .../sdk/temp/java/api/io/realm/ImportFlag.txt | 249 - .../java/api/io/realm/MapChangeListener.txt | 176 - .../temp/java/api/io/realm/MapChangeSet.txt | 270 - .../java/api/io/realm/MutableRealmInteger.txt | 1027 -- .../java/api/io/realm/ObjectChangeSet.txt | 249 - .../io/realm/OrderedCollectionChangeSet.txt | 548 - .../OrderedCollectionChangeSet/Range.txt | 248 - .../OrderedCollectionChangeSet/State.txt | 273 - .../api/io/realm/OrderedRealmCollection.txt | 1327 -- .../OrderedRealmCollectionChangeListener.txt | 150 - .../realm/OrderedRealmCollectionSnapshot.txt | 1432 -- .../sdk/temp/java/api/io/realm/ProxyState.txt | 1141 -- source/sdk/temp/java/api/io/realm/Realm.txt | 6101 ------- .../temp/java/api/io/realm/Realm/Callback.txt | 271 - .../java/api/io/realm/Realm/Transaction.txt | 144 - .../io/realm/Realm/Transaction/Callback.txt | 241 - .../io/realm/Realm/Transaction/OnError.txt | 118 - .../io/realm/Realm/Transaction/OnSuccess.txt | 102 - .../sdk/temp/java/api/io/realm/RealmAny.txt | 2368 --- .../temp/java/api/io/realm/RealmAny/Type.txt | 589 - .../io/realm/RealmAnyNativeFunctionsImpl.txt | 394 - .../java/api/io/realm/RealmAnyOperator.txt | 171 - .../temp/java/api/io/realm/RealmAsyncTask.txt | 153 - .../java/api/io/realm/RealmChangeListener.txt | 134 - .../java/api/io/realm/RealmCollection.txt | 1108 -- .../java/api/io/realm/RealmConfiguration.txt | 1960 --- .../io/realm/RealmConfiguration/Builder.txt | 1718 -- .../java/api/io/realm/RealmDictionary.txt | 154 - .../temp/java/api/io/realm/RealmFieldType.txt | 1512 -- .../sdk/temp/java/api/io/realm/RealmList.txt | 4242 ----- .../sdk/temp/java/api/io/realm/RealmMap.txt | 1502 -- .../temp/java/api/io/realm/RealmMigration.txt | 196 - .../sdk/temp/java/api/io/realm/RealmModel.txt | 60 - .../temp/java/api/io/realm/RealmObject.txt | 2978 ---- .../io/realm/RealmObjectChangeListener.txt | 206 - .../java/api/io/realm/RealmObjectSchema.txt | 3394 ---- .../io/realm/RealmObjectSchema/Function.txt | 130 - .../sdk/temp/java/api/io/realm/RealmQuery.txt | 13375 ---------------- .../temp/java/api/io/realm/RealmResults.txt | 3386 ---- .../temp/java/api/io/realm/RealmSchema.txt | 1113 -- .../sdk/temp/java/api/io/realm/RealmSet.txt | 2721 ---- .../java/api/io/realm/SetChangeListener.txt | 164 - .../temp/java/api/io/realm/SetChangeSet.txt | 284 - source/sdk/temp/java/api/io/realm/Sort.txt | 304 - .../temp/java/api/io/realm/annotations.txt | 45 - .../java/api/io/realm/annotations/Beta.txt | 28 - .../java/api/io/realm/annotations/Ignore.txt | 28 - .../java/api/io/realm/annotations/Index.txt | 30 - .../io/realm/annotations/LinkingObjects.txt | 193 - .../api/io/realm/annotations/PrimaryKey.txt | 42 - .../api/io/realm/annotations/RealmClass.txt | 277 - .../api/io/realm/annotations/RealmField.txt | 153 - .../api/io/realm/annotations/RealmModule.txt | 315 - .../realm/annotations/RealmNamingPolicy.txt | 459 - .../api/io/realm/annotations/Required.txt | 50 - .../sdk/temp/java/api/io/realm/coroutines.txt | 29 - .../api/io/realm/coroutines/FlowFactory.txt | 1630 -- .../io/realm/coroutines/RealmFlowFactory.txt | 1468 -- .../sdk/temp/java/api/io/realm/exceptions.txt | 39 - .../DownloadingRealmInterruptedException.txt | 142 - .../api/io/realm/exceptions/RealmError.txt | 95 - .../io/realm/exceptions/RealmException.txt | 138 - .../realm/exceptions/RealmFileException.txt | 378 - .../exceptions/RealmFileException/Kind.txt | 383 - .../RealmMigrationNeededException.txt | 188 - .../RealmPrimaryKeyConstraintException.txt | 110 - source/sdk/temp/java/api/io/realm/gradle.txt | 30 - .../io/realm/gradle/RealmPluginExtension.txt | 529 - .../PropertyChangedListener.txt | 111 - source/sdk/temp/java/api/io/realm/log.txt | 31 - .../temp/java/api/io/realm/log/LogLevel.txt | 267 - .../temp/java/api/io/realm/log/RealmLog.txt | 2961 ---- .../java/api/io/realm/log/RealmLogger.txt | 218 - source/sdk/temp/java/api/io/realm/mongodb.txt | 36 - .../temp/java/api/io/realm/mongodb/App.txt | 1623 -- .../api/io/realm/mongodb/App/Callback.txt | 134 - .../java/api/io/realm/mongodb/App/Result.txt | 606 - .../api/io/realm/mongodb/AppConfiguration.txt | 1270 -- .../mongodb/AppConfiguration/Builder.txt | 1503 -- .../api/io/realm/mongodb/AppException.txt | 855 - .../realm/mongodb/AuthenticationListener.txt | 190 - .../java/api/io/realm/mongodb/Credentials.txt | 1024 -- .../io/realm/mongodb/Credentials/Provider.txt | 561 - .../java/api/io/realm/mongodb/ErrorCode.txt | 4751 ------ .../io/realm/mongodb/ErrorCode/Category.txt | 249 - .../api/io/realm/mongodb/ErrorCode/Type.txt | 313 - .../mongodb/RealmEventStreamAsyncTask.txt | 201 - .../io/realm/mongodb/RealmEventStreamTask.txt | 178 - .../api/io/realm/mongodb/RealmResultTask.txt | 207 - .../temp/java/api/io/realm/mongodb/User.txt | 1983 --- .../java/api/io/realm/mongodb/User/State.txt | 271 - .../api/io/realm/mongodb/UserIdentity.txt | 351 - .../java/api/io/realm/mongodb/UserProfile.txt | 811 - .../temp/java/api/io/realm/mongodb/auth.txt | 33 - .../java/api/io/realm/mongodb/auth/ApiKey.txt | 473 - .../api/io/realm/mongodb/auth/ApiKeyAuth.txt | 1583 -- .../realm/mongodb/auth/EmailPasswordAuth.txt | 2873 ---- .../io/realm/mongodb/auth/GoogleAuthType.txt | 248 - .../java/api/io/realm/mongodb/functions.txt | 27 - .../io/realm/mongodb/functions/Functions.txt | 2022 --- .../api/io/realm/mongodb/log/obfuscator.txt | 27 - .../log/obfuscator/HttpLogObfuscator.txt | 376 - .../temp/java/api/io/realm/mongodb/mongo.txt | 33 - .../io/realm/mongodb/mongo/MongoClient.txt | 195 - .../realm/mongodb/mongo/MongoCollection.txt | 4472 ------ .../io/realm/mongodb/mongo/MongoDatabase.txt | 305 - .../io/realm/mongodb/mongo/MongoNamespace.txt | 772 - .../api/io/realm/mongodb/mongo/events.txt | 31 - .../mongodb/mongo/events/BaseChangeEvent.txt | 411 - .../events/BaseChangeEvent/OperationType.txt | 315 - .../mongo/events/UpdateDescription.txt | 711 - .../api/io/realm/mongodb/mongo/iterable.txt | 33 - .../mongo/iterable/AggregateIterable.txt | 104 - .../mongodb/mongo/iterable/FindIterable.txt | 411 - .../mongodb/mongo/iterable/MongoCursor.txt | 285 - .../mongodb/mongo/iterable/MongoIterable.txt | 181 - .../api/io/realm/mongodb/mongo/options.txt | 35 - .../mongodb/mongo/options/CountOptions.txt | 293 - .../mongo/options/FindOneAndModifyOptions.txt | 683 - .../mongodb/mongo/options/FindOptions.txt | 553 - .../mongo/options/InsertManyResult.txt | 174 - .../mongodb/mongo/options/UpdateOptions.txt | 293 - .../api/io/realm/mongodb/mongo/result.txt | 31 - .../mongodb/mongo/result/DeleteResult.txt | 174 - .../mongodb/mongo/result/InsertOneResult.txt | 174 - .../mongodb/mongo/result/UpdateResult.txt | 300 - .../temp/java/api/io/realm/mongodb/push.txt | 27 - .../java/api/io/realm/mongodb/push/Push.txt | 459 - .../temp/java/api/io/realm/mongodb/sync.txt | 75 - .../mongodb/sync/ClientResetRequiredError.txt | 316 - .../realm/mongodb/sync/ConnectionListener.txt | 178 - .../io/realm/mongodb/sync/ConnectionState.txt | 263 - .../sync/DiscardUnsyncedChangesStrategy.txt | 380 - ...ManuallyRecoverUnsyncedChangesStrategy.txt | 194 - .../mongodb/sync/MutableSubscriptionSet.txt | 577 - .../api/io/realm/mongodb/sync/Progress.txt | 521 - .../realm/mongodb/sync/ProgressListener.txt | 142 - .../io/realm/mongodb/sync/ProgressMode.txt | 251 - .../io/realm/mongodb/sync/Subscription.txt | 526 - .../io/realm/mongodb/sync/SubscriptionSet.txt | 1070 -- .../mongodb/sync/SubscriptionSet/State.txt | 409 - .../SubscriptionSet/StateChangeCallback.txt | 188 - .../SubscriptionSet/UpdateAsyncCallback.txt | 200 - .../sync/SubscriptionSet/UpdateCallback.txt | 126 - .../java/api/io/realm/mongodb/sync/Sync.txt | 424 - .../api/io/realm/mongodb/sync/Sync/Debug.txt | 151 - .../mongodb/sync/SyncClientResetStrategy.txt | 23 - .../realm/mongodb/sync/SyncConfiguration.txt | 2119 --- .../sync/SyncConfiguration/Builder.txt | 2385 --- .../InitialFlexibleSyncSubscriptions.txt | 168 - .../api/io/realm/mongodb/sync/SyncSession.txt | 1453 -- .../sync/SyncSession/ClientResetHandler.txt | 66 - .../mongodb/sync/SyncSession/ErrorHandler.txt | 182 - .../realm/mongodb/sync/SyncSession/State.txt | 317 - source/sdk/temp/java/api/io/realm/rx.txt | 33 - .../java/api/io/realm/rx/CollectionChange.txt | 391 - .../java/api/io/realm/rx/ObjectChange.txt | 442 - .../io/realm/rx/RealmObservableFactory.txt | 1768 -- .../api/io/realm/rx/RxObservableFactory.txt | 1808 --- 175 files changed, 135835 deletions(-) delete mode 100644 source/sdk/temp/java/api/index.txt delete mode 100644 source/sdk/temp/java/api/io.txt delete mode 100644 source/sdk/temp/java/api/io/realm.txt delete mode 100644 source/sdk/temp/java/api/io/realm/Case.txt delete mode 100644 source/sdk/temp/java/api/io/realm/CollectionUtils.txt delete mode 100644 source/sdk/temp/java/api/io/realm/CompactOnLaunchCallback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/DefaultCompactOnLaunchCallback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/DynamicRealm.txt delete mode 100644 source/sdk/temp/java/api/io/realm/DynamicRealm/Callback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction.txt delete mode 100644 source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/Callback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnError.txt delete mode 100644 source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt delete mode 100644 source/sdk/temp/java/api/io/realm/DynamicRealmObject.txt delete mode 100644 source/sdk/temp/java/api/io/realm/FieldAttribute.txt delete mode 100644 source/sdk/temp/java/api/io/realm/FrozenPendingRow.txt delete mode 100644 source/sdk/temp/java/api/io/realm/ImportFlag.txt delete mode 100644 source/sdk/temp/java/api/io/realm/MapChangeListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/MapChangeSet.txt delete mode 100644 source/sdk/temp/java/api/io/realm/MutableRealmInteger.txt delete mode 100644 source/sdk/temp/java/api/io/realm/ObjectChangeSet.txt delete mode 100644 source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet.txt delete mode 100644 source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/Range.txt delete mode 100644 source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/State.txt delete mode 100644 source/sdk/temp/java/api/io/realm/OrderedRealmCollection.txt delete mode 100644 source/sdk/temp/java/api/io/realm/OrderedRealmCollectionChangeListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/OrderedRealmCollectionSnapshot.txt delete mode 100644 source/sdk/temp/java/api/io/realm/ProxyState.txt delete mode 100644 source/sdk/temp/java/api/io/realm/Realm.txt delete mode 100644 source/sdk/temp/java/api/io/realm/Realm/Callback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/Realm/Transaction.txt delete mode 100644 source/sdk/temp/java/api/io/realm/Realm/Transaction/Callback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/Realm/Transaction/OnError.txt delete mode 100644 source/sdk/temp/java/api/io/realm/Realm/Transaction/OnSuccess.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmAny.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmAny/Type.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmAnyOperator.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmAsyncTask.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmChangeListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmCollection.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmConfiguration.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmConfiguration/Builder.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmDictionary.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmFieldType.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmList.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmMap.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmMigration.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmModel.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmObject.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmObjectChangeListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmObjectSchema.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmObjectSchema/Function.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmQuery.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmResults.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmSchema.txt delete mode 100644 source/sdk/temp/java/api/io/realm/RealmSet.txt delete mode 100644 source/sdk/temp/java/api/io/realm/SetChangeListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/SetChangeSet.txt delete mode 100644 source/sdk/temp/java/api/io/realm/Sort.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/Beta.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/Ignore.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/Index.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/LinkingObjects.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/PrimaryKey.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/RealmClass.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/RealmField.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/RealmModule.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/RealmNamingPolicy.txt delete mode 100644 source/sdk/temp/java/api/io/realm/annotations/Required.txt delete mode 100644 source/sdk/temp/java/api/io/realm/coroutines.txt delete mode 100644 source/sdk/temp/java/api/io/realm/coroutines/FlowFactory.txt delete mode 100644 source/sdk/temp/java/api/io/realm/coroutines/RealmFlowFactory.txt delete mode 100644 source/sdk/temp/java/api/io/realm/exceptions.txt delete mode 100644 source/sdk/temp/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt delete mode 100644 source/sdk/temp/java/api/io/realm/exceptions/RealmError.txt delete mode 100644 source/sdk/temp/java/api/io/realm/exceptions/RealmException.txt delete mode 100644 source/sdk/temp/java/api/io/realm/exceptions/RealmFileException.txt delete mode 100644 source/sdk/temp/java/api/io/realm/exceptions/RealmFileException/Kind.txt delete mode 100644 source/sdk/temp/java/api/io/realm/exceptions/RealmMigrationNeededException.txt delete mode 100644 source/sdk/temp/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt delete mode 100644 source/sdk/temp/java/api/io/realm/gradle.txt delete mode 100644 source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension.txt delete mode 100644 source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/log.txt delete mode 100644 source/sdk/temp/java/api/io/realm/log/LogLevel.txt delete mode 100644 source/sdk/temp/java/api/io/realm/log/RealmLog.txt delete mode 100644 source/sdk/temp/java/api/io/realm/log/RealmLogger.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/App.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/App/Callback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/App/Result.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration/Builder.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/AppException.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/AuthenticationListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/Credentials.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/Credentials/Provider.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/ErrorCode.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Category.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Type.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamTask.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/RealmResultTask.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/User.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/User/State.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/UserIdentity.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/UserProfile.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/auth.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKey.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/auth/GoogleAuthType.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/functions.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/functions/Functions.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoClient.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoCollection.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoDatabase.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoNamespace.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/events.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/options.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/options/CountOptions.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOptions.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/result.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/push.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/push/Push.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionState.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/Progress.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressListener.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressMode.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/Subscription.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/Sync.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/Sync/Debug.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt delete mode 100644 source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/State.txt delete mode 100644 source/sdk/temp/java/api/io/realm/rx.txt delete mode 100644 source/sdk/temp/java/api/io/realm/rx/CollectionChange.txt delete mode 100644 source/sdk/temp/java/api/io/realm/rx/ObjectChange.txt delete mode 100644 source/sdk/temp/java/api/io/realm/rx/RealmObservableFactory.txt delete mode 100644 source/sdk/temp/java/api/io/realm/rx/RxObservableFactory.txt diff --git a/source/sdk/temp/java/api/index.txt b/source/sdk/temp/java/api/index.txt deleted file mode 100644 index f1b4db5f0d..0000000000 --- a/source/sdk/temp/java/api/index.txt +++ /dev/null @@ -1,37 +0,0 @@ -:orphan: - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -API Reference -^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - io.realm - io.realm.annotations - io.realm.coroutines - io.realm.exceptions - io.realm.gradle - io.realm.log - io.realm.mongodb - io.realm.mongodb.auth - io.realm.mongodb.functions - io.realm.mongodb.log.obfuscator - io.realm.mongodb.mongo - io.realm.mongodb.mongo.events - io.realm.mongodb.mongo.iterable - io.realm.mongodb.mongo.options - io.realm.mongodb.mongo.result - io.realm.mongodb.push - io.realm.mongodb.sync - io.realm.rx - - diff --git a/source/sdk/temp/java/api/io.txt b/source/sdk/temp/java/api/io.txt deleted file mode 100644 index 2747454236..0000000000 --- a/source/sdk/temp/java/api/io.txt +++ /dev/null @@ -1,34 +0,0 @@ -:orphan: - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Realm Java API -^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - io.realm - io.realm.annotations - io.realm.coroutines - io.realm.exceptions - io.realm.log - io.realm.mongodb - io.realm.mongodb.functions - io.realm.mongodb.log.obfuscator - io.realm.mongodb.mongo - io.realm.mongodb.mongo.events - io.realm.mongodb.mongo.iterable - io.realm.mongodb.mongo.options - io.realm.mongodb.mongo.result - io.realm.mongodb.push - io.realm.mongodb.sync - io.realm.rx diff --git a/source/sdk/temp/java/api/io/realm.txt b/source/sdk/temp/java/api/io/realm.txt deleted file mode 100644 index 8bccff0842..0000000000 --- a/source/sdk/temp/java/api/io/realm.txt +++ /dev/null @@ -1,74 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm -^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - Case - CollectionUtils - CompactOnLaunchCallback - DefaultCompactOnLaunchCallback - DynamicRealm - DynamicRealm.Callback - DynamicRealm.Transaction - DynamicRealm.Transaction.Callback - DynamicRealm.Transaction.OnError - DynamicRealm.Transaction.OnSuccess - DynamicRealmObject - FieldAttribute - FrozenPendingRow - ImportFlag - MapChangeListener - MapChangeSet - MutableRealmInteger - ObjectChangeSet - OrderedCollectionChangeSet - OrderedCollectionChangeSet.Range - OrderedCollectionChangeSet.State - OrderedRealmCollection - OrderedRealmCollectionChangeListener - OrderedRealmCollectionSnapshot - ProxyState - Realm - Realm.Callback - Realm.Transaction - Realm.Transaction.Callback - Realm.Transaction.OnError - Realm.Transaction.OnSuccess - RealmAny - RealmAny.Type - RealmAnyNativeFunctionsImpl - RealmAnyOperator - RealmAsyncTask - RealmChangeListener - RealmCollection - RealmConfiguration - RealmConfiguration.Builder - RealmDictionary - RealmFieldType - RealmList - RealmMap - RealmMigration - RealmModel - RealmObject - RealmObjectChangeListener - RealmObjectSchema - RealmObjectSchema.Function - RealmQuery - RealmResults - RealmSchema - RealmSet - SetChangeListener - SetChangeSet - Sort diff --git a/source/sdk/temp/java/api/io/realm/Case.txt b/source/sdk/temp/java/api/io/realm/Case.txt deleted file mode 100644 index ef7ddc6182..0000000000 --- a/source/sdk/temp/java/api/io/realm/Case.txt +++ /dev/null @@ -1,316 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum Case -^^^^^^^^^ - -.. _io_realm_Case: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.Case - - -This class describes the Case settings used in Realm queries. - - -.. seealso:: - - - - - :ref:`io.realm.RealmQuery.equalTo(String, String, Case) ` - - - - - :ref:`io.realm.RealmQuery.contains(String, String, Case) ` - - - - - :ref:`io.realm.RealmQuery.beginsWith(String, String, Case) ` - - - - - :ref:`io.realm.RealmQuery.endsWith(String, String, Case) ` - - - - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`INSENSITIVE ` - - - - - - - * - :ref:`SENSITIVE ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`getValue ` () - | - - - Returns the value for this setting that is used by the underlying query engine. - - - - - * - public static :ref:`Case ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`Case ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_Case_INSENSITIVE: - -.. _Case_INSENSITIVE: - - - -``INSENSITIVE`` ----------------- - -public static final :ref:`Case ` - - - - - -.. _io_realm_Case_SENSITIVE: - -.. _Case_SENSITIVE: - - - -``SENSITIVE`` --------------- - -public static final :ref:`Case ` - - - - - - -Method Detail -============= - -.. _getValue: - -.. _getValue__: - -.. _Case_getValue: - -.. _Case_getValue__: - -.. _io_realm_Case_getValue: - -.. _io_realm_Case_getValue__: - - - -getValue --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`getValue ` () - | - - - - - * - Returns the value for this setting that is used by the underlying query engine. - - - - - - - **Returns** - - The value used by the underlying query engine to indicate this value. - - - - - - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _Case_valueOf: - -.. _Case_valueOf__: - -.. _io_realm_Case_valueOf: - -.. _io_realm_Case_valueOf__: - - - -valueOf -------- - -.. _io_realm_Case_valueOf_java_lang_String_: - -.. _io_realm_Case_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _Case_valueOf_java_lang_String_: - -.. _Case_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Case ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _Case_values: - -.. _Case_values__: - -.. _io_realm_Case_values: - -.. _io_realm_Case_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Case ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/CollectionUtils.txt b/source/sdk/temp/java/api/io/realm/CollectionUtils.txt deleted file mode 100644 index 55de7d30eb..0000000000 --- a/source/sdk/temp/java/api/io/realm/CollectionUtils.txt +++ /dev/null @@ -1,425 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class CollectionUtils -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_CollectionUtils: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.CollectionUtils - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`CollectionUtils ` () - | - - - - - - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static final `String `__ - - - - :ref:`DICTIONARY_TYPE ` - - - - - * - public static final `String `__ - - - - :ref:`LIST_TYPE ` - - - - - * - public static final `String `__ - - - - :ref:`SET_TYPE ` - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static **void** - - | :ref:`checkForAddRemoveListener ` ( - | **BaseRealm** baseRealm, - | `Object `__ listener, - | **boolean** checkListener - | ) - - - Checks whether it is possible to add or remove a provided listener. - - - - - * - public static **E** - - | :ref:`copyToRealm ` <**E** >( - | **BaseRealm** baseRealm, - | **E** object - | ) - - - Called by both list and dictionary operators to copy a RealmModel to Realm in case it has been deemed necessary. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_CollectionUtils_DICTIONARY_TYPE: - - - -``DICTIONARY_TYPE`` --------------------- - - - - -.. _io_realm_CollectionUtils_LIST_TYPE: - - - -``LIST_TYPE`` --------------- - - - - -.. _io_realm_CollectionUtils_SET_TYPE: - - - -``SET_TYPE`` -------------- - - - - - - -Constructor Detail -================== - -.. _CollectionUtils: - -.. _CollectionUtils__: - -.. _io_realm_CollectionUtils: - -.. _io_realm_CollectionUtils__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`CollectionUtils ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _checkForAddRemoveListener: - -.. _checkForAddRemoveListener__: - -.. _CollectionUtils_checkForAddRemoveListener: - -.. _CollectionUtils_checkForAddRemoveListener__: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener__: - - - -checkForAddRemoveListener -------------------------- - -.. _io_realm_CollectionUtils_checkForAddRemoveListener_io_realm_BaseRealm_java_lang_Object_boolean_: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener_io_realm_BaseRealm__java_lang_Object__boolean_: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener_io_realm_BaseRealm_Object_boolean_: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener_io_realm_BaseRealm__Object__boolean_: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener_BaseRealm_java_lang_Object_boolean_: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener_BaseRealm__java_lang_Object__boolean_: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener_BaseRealm_Object_boolean_: - -.. _io_realm_CollectionUtils_checkForAddRemoveListener_BaseRealm__Object__boolean_: - -.. _checkForAddRemoveListener_io_realm_BaseRealm_java_lang_Object_boolean_: - -.. _checkForAddRemoveListener_io_realm_BaseRealm__java_lang_Object__boolean_: - -.. _checkForAddRemoveListener_io_realm_BaseRealm_Object_boolean_: - -.. _checkForAddRemoveListener_io_realm_BaseRealm__Object__boolean_: - -.. _checkForAddRemoveListener_BaseRealm_java_lang_Object_boolean_: - -.. _checkForAddRemoveListener_BaseRealm__java_lang_Object__boolean_: - -.. _checkForAddRemoveListener_BaseRealm_Object_boolean_: - -.. _checkForAddRemoveListener_BaseRealm__Object__boolean_: - -.. _CollectionUtils_checkForAddRemoveListener_io_realm_BaseRealm_java_lang_Object_boolean_: - -.. _CollectionUtils_checkForAddRemoveListener_io_realm_BaseRealm__java_lang_Object__boolean_: - -.. _CollectionUtils_checkForAddRemoveListener_io_realm_BaseRealm_Object_boolean_: - -.. _CollectionUtils_checkForAddRemoveListener_io_realm_BaseRealm__Object__boolean_: - -.. _CollectionUtils_checkForAddRemoveListener_BaseRealm_java_lang_Object_boolean_: - -.. _CollectionUtils_checkForAddRemoveListener_BaseRealm__java_lang_Object__boolean_: - -.. _CollectionUtils_checkForAddRemoveListener_BaseRealm_Object_boolean_: - -.. _CollectionUtils_checkForAddRemoveListener_BaseRealm__Object__boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`checkForAddRemoveListener ` ( - | **BaseRealm** baseRealm, - | `Object `__ listener, - | **boolean** checkListener - | ) - - - - - * - Checks whether it is possible to add or remove a provided listener. - - - - - **Parameters** - - - ``listener`` - The listener to be checked. - - - - - ``checkListener`` - whether the check should be performed. - - - - - - - - - - - - - - - - -.. _copyToRealm: - -.. _copyToRealm__: - -.. _CollectionUtils_copyToRealm: - -.. _CollectionUtils_copyToRealm__: - -.. _io_realm_CollectionUtils_copyToRealm: - -.. _io_realm_CollectionUtils_copyToRealm__: - - - -copyToRealm ------------ - -.. _io_realm_CollectionUtils_copyToRealm_io_realm_BaseRealm_E_: - -.. _io_realm_CollectionUtils_copyToRealm_io_realm_BaseRealm__E_: - -.. _io_realm_CollectionUtils_copyToRealm_io_realm_BaseRealm_RealmModel_: - -.. _io_realm_CollectionUtils_copyToRealm_io_realm_BaseRealm__RealmModel_: - -.. _io_realm_CollectionUtils_copyToRealm_BaseRealm_E_: - -.. _io_realm_CollectionUtils_copyToRealm_BaseRealm__E_: - -.. _io_realm_CollectionUtils_copyToRealm_BaseRealm_RealmModel_: - -.. _io_realm_CollectionUtils_copyToRealm_BaseRealm__RealmModel_: - -.. _copyToRealm_io_realm_BaseRealm_E_: - -.. _copyToRealm_io_realm_BaseRealm__E_: - -.. _copyToRealm_io_realm_BaseRealm_RealmModel_: - -.. _copyToRealm_io_realm_BaseRealm__RealmModel_: - -.. _copyToRealm_BaseRealm_E_: - -.. _copyToRealm_BaseRealm__E_: - -.. _copyToRealm_BaseRealm_RealmModel_: - -.. _copyToRealm_BaseRealm__RealmModel_: - -.. _CollectionUtils_copyToRealm_io_realm_BaseRealm_E_: - -.. _CollectionUtils_copyToRealm_io_realm_BaseRealm__E_: - -.. _CollectionUtils_copyToRealm_io_realm_BaseRealm_RealmModel_: - -.. _CollectionUtils_copyToRealm_io_realm_BaseRealm__RealmModel_: - -.. _CollectionUtils_copyToRealm_BaseRealm_E_: - -.. _CollectionUtils_copyToRealm_BaseRealm__E_: - -.. _CollectionUtils_copyToRealm_BaseRealm_RealmModel_: - -.. _CollectionUtils_copyToRealm_BaseRealm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **E** :ref:`copyToRealm ` <**E** >( - | **BaseRealm** baseRealm, - | **E** object - | ) - - - - - * - Called by both list and dictionary operators to copy a RealmModel to Realm in case it has been deemed necessary. - - - **Type Parameters** - - - ``E`` - The RealmModel type. - - - - - - - - **Parameters** - - - ``baseRealm`` - The Realm instance to copy the object to. - - - - - ``object`` - The object to copy. - - - - - - - - **Returns** - - the copied object - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/CompactOnLaunchCallback.txt b/source/sdk/temp/java/api/io/realm/CompactOnLaunchCallback.txt deleted file mode 100644 index db70789f26..0000000000 --- a/source/sdk/temp/java/api/io/realm/CompactOnLaunchCallback.txt +++ /dev/null @@ -1,127 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface CompactOnLaunchCallback -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_CompactOnLaunchCallback: - - - -io.realm -======== - -This interface is used to determine if a Realm file should be compacted the first time the file is opened and before the instance is returned.Note that compacting a file can take a while, so compacting should generally only be done on a background thread or when used in combination with :ref:`Realm.getInstanceAsync(RealmConfiguration, io.realm.Realm.Callback) ` . - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`shouldCompact ` ( - | **long** totalBytes, - | **long** usedBytes - | ) - - - This method determines if the Realm file should be compacted before opened and returned to the user. - - - - - - - -Method Detail -============= - -.. _shouldCompact: - -.. _shouldCompact__: - -.. _CompactOnLaunchCallback_shouldCompact: - -.. _CompactOnLaunchCallback_shouldCompact__: - -.. _io_realm_CompactOnLaunchCallback_shouldCompact: - -.. _io_realm_CompactOnLaunchCallback_shouldCompact__: - - - -shouldCompact -------------- - -.. _io_realm_CompactOnLaunchCallback_shouldCompact_long_long_: - -.. _io_realm_CompactOnLaunchCallback_shouldCompact_long__long_: - -.. _shouldCompact_long_long_: - -.. _shouldCompact_long__long_: - -.. _CompactOnLaunchCallback_shouldCompact_long_long_: - -.. _CompactOnLaunchCallback_shouldCompact_long__long_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`shouldCompact ` ( - | **long** totalBytes, - | **long** usedBytes - | ) - - - - - * - This method determines if the Realm file should be compacted before opened and returned to the user. It is passed the total file size (data + free space) and the bytes used by data in the file. - - - - - **Parameters** - - - ``totalBytes`` - the total file size (data + free space). - - - - - ``usedBytes`` - the total bytes used by data in the file. - - - - - - - - **Returns** - - {code true} to indicate an attempt to compact the file should be made. Otherwise, the compaction will be skipped. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/DefaultCompactOnLaunchCallback.txt b/source/sdk/temp/java/api/io/realm/DefaultCompactOnLaunchCallback.txt deleted file mode 100644 index 41db45f038..0000000000 --- a/source/sdk/temp/java/api/io/realm/DefaultCompactOnLaunchCallback.txt +++ /dev/null @@ -1,187 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class DefaultCompactOnLaunchCallback -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_DefaultCompactOnLaunchCallback: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.DefaultCompactOnLaunchCallback - - -**Implemented interfaces:** - - - -- :ref:`io.realm.CompactOnLaunchCallback ` - - -The default implementation for determining if a file should be compacted or not. This implementation will only trigger if the file is above 50 MB and more than 50% can be reclaimed. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`DefaultCompactOnLaunchCallback ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`shouldCompact ` ( - | **long** totalBytes, - | **long** usedBytes - | ) - - - This method determines if the Realm file should be compacted before opened and returned to the user. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _DefaultCompactOnLaunchCallback: - -.. _DefaultCompactOnLaunchCallback__: - -.. _io_realm_DefaultCompactOnLaunchCallback: - -.. _io_realm_DefaultCompactOnLaunchCallback__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DefaultCompactOnLaunchCallback ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _shouldCompact: - -.. _shouldCompact__: - -.. _DefaultCompactOnLaunchCallback_shouldCompact: - -.. _DefaultCompactOnLaunchCallback_shouldCompact__: - -.. _io_realm_DefaultCompactOnLaunchCallback_shouldCompact: - -.. _io_realm_DefaultCompactOnLaunchCallback_shouldCompact__: - - - -shouldCompact -------------- - -.. _io_realm_DefaultCompactOnLaunchCallback_shouldCompact_long_long_: - -.. _io_realm_DefaultCompactOnLaunchCallback_shouldCompact_long__long_: - -.. _shouldCompact_long_long_: - -.. _shouldCompact_long__long_: - -.. _DefaultCompactOnLaunchCallback_shouldCompact_long_long_: - -.. _DefaultCompactOnLaunchCallback_shouldCompact_long__long_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`shouldCompact ` ( - | **long** totalBytes, - | **long** usedBytes - | ) - - - - - * - This method determines if the Realm file should be compacted before opened and returned to the user. It is passed the total file size (data + free space) and the bytes used by data in the file. - - - - - - - **Returns** - - {code true} to indicate an attempt to compact the file should be made. Otherwise, the compaction will be skipped. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/DynamicRealm.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm.txt deleted file mode 100644 index d4230ae872..0000000000 --- a/source/sdk/temp/java/api/io/realm/DynamicRealm.txt +++ /dev/null @@ -1,2541 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class DynamicRealm -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_DynamicRealm: - - - -io.realm -======== - - - | `java.lang.Object `__ - | **io.realm.BaseRealm** - | io.realm.DynamicRealm - - -DynamicRealm is a dynamic variant of :ref:`io.realm.Realm ` . This means that all access to data and/or queries are done using string based class names instead of class type references. - -This is useful during migrations or when working with string-based data like CSV or XML files. - -The same :ref:`io.realm.RealmConfiguration ` can be used to open a Realm file in both dynamic and typed mode, but modifying the schema while having both a typed and dynamic version open is highly discouraged and will most likely crash the typed Realm. During migrations only a DynamicRealm will be open. - - - -Dynamic Realms do not enforce schemas or schema versions and :ref:`RealmMigration ` code is not used even if it has been defined in the :ref:`RealmConfiguration ` . - - - -This means that the schema is not created or validated until a Realm has been opened in typed mode. If a Realm file is opened in dynamic mode first it will not contain any information about classes and fields, and any queries for classes defined by the schema will fail. - - - - -.. seealso:: - - - - - :ref:`Realm ` - - - - - :ref:`RealmSchema ` - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static interface`` - - :ref:`DynamicRealm.Transaction ` - - - * - ``public abstract static`` - - :ref:`DynamicRealm.Callback ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - Adds a change listener to the Realm. - - - - - * - public **** - - | :ref:`asFlowable ` () - | - - - Returns an RxJava Flowable that monitors changes to this Realm. - - - - - * - public :ref:`DynamicRealmObject ` - - | :ref:`createEmbeddedObject ` ( - | `String `__ className, - | :ref:`DynamicRealmObject ` parentObject, - | `String `__ parentProperty - | ) - - - Instantiates and adds a new embedded object to the Realm. - - - - - * - public :ref:`DynamicRealmObject ` - - | :ref:`createObject ` ( - | `String `__ className, - | `Object `__ primaryKeyValue - | ) - - - Creates an object with a given primary key. - - - - - * - public :ref:`DynamicRealmObject ` - - | :ref:`createObject ` ( - | `String `__ className - | ) - - - Instantiates and adds a new object to the Realm. - - - - - * - public **void** - - | :ref:`delete ` ( - | `String `__ className - | ) - - - Deletes all objects of the specified class from the Realm. - - - - - * - public **void** - - | :ref:`executeTransaction ` ( - | :ref:`DynamicRealm.Transaction ` transaction - | ) - - - Executes a given transaction on the DynamicRealm. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`executeTransactionAsync ` ( - | :ref:`DynamicRealm.Transaction ` transaction, - | :ref:`DynamicRealm.Transaction.OnSuccess ` onSuccess, - | :ref:`DynamicRealm.Transaction.OnError ` onError - | ) - - - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnSuccess and OnError callbacks. - - - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`executeTransactionAsync ` ( - | :ref:`DynamicRealm.Transaction ` transaction, - | :ref:`DynamicRealm.Transaction.OnError ` onError - | ) - - - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnError callback. - - - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`executeTransactionAsync ` ( - | :ref:`DynamicRealm.Transaction ` transaction, - | :ref:`DynamicRealm.Transaction.OnSuccess ` onSuccess - | ) - - - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnSuccess callback. - - - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`executeTransactionAsync ` ( - | :ref:`DynamicRealm.Transaction ` transaction - | ) - - - Similar to :ref:`executeTransaction(Transaction) ` but runs asynchronously on a worker thread. - - - - - - - * - public :ref:`DynamicRealm ` - - | :ref:`freeze ` () - | - - - Returns a frozen snapshot of the current Realm. - - - - - * - public static :ref:`DynamicRealm ` - - | :ref:`getInstance ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - Realm static constructor that returns a dynamic variant of the Realm instance defined by provided :ref:`io.realm.RealmConfiguration ` . - - - - - - - * - public static :ref:`RealmAsyncTask ` - - | :ref:`getInstanceAsync ` ( - | :ref:`RealmConfiguration ` configuration, - | :ref:`DynamicRealm.Callback ` callback - | ) - - - The creation of the first Realm instance per :ref:`RealmConfiguration ` in a process can take some time as all initialization code need to run at that point (Setting up the Realm, validating schemas and creating initial data). - - - - - - - * - public :ref:`RealmSchema ` - - | :ref:`getSchema ` () - | - - - Returns the mutable schema for this Realm. - - - - - * - public **boolean** - - | :ref:`isEmpty ` () - | - - - Checks if this :ref:`io.realm.Realm ` contains any objects. - - - - - - - * - public **void** - - | :ref:`removeAllChangeListeners ` () - | - - - Removes all user-defined change listeners. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - Removes the specified change listener. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`where ` ( - | `String `__ className - | ) - - - Returns a RealmQuery, which can be used to query the provided class. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class **io.realm.BaseRealm**: ``setAutoRefresh`` , ``isAutoRefresh`` , ``refresh`` , ``isInTransaction`` , ``addListener`` , ``removeListener`` , ``asFlowable`` , ``removeAllListeners`` , ``writeCopyTo`` , ``writeEncryptedCopyTo`` , ``waitForChange`` , ``stopWaitForChange`` , ``beginTransaction`` , ``commitTransaction`` , ``cancelTransaction`` , ``freeze`` , ``isFrozen`` , ``getNumberOfActiveVersions`` , ``checkIfValid`` , ``checkAllowQueriesOnUiThread`` , ``checkAllowWritesOnUiThread`` , ``checkIfInTransaction`` , ``checkIfValidAndInTransaction`` , ``getPath`` , ``getConfiguration`` , ``getVersion`` , ``close`` , ``isClosed`` , ``isEmpty`` , ``getSchema`` , ``getSubscriptions`` , ``deleteAll`` , ``migrateRealm`` , ``finalize`` - - - - -Method Detail -============= - -.. _addChangeListener: - -.. _addChangeListener__: - -.. _DynamicRealm_addChangeListener: - -.. _DynamicRealm_addChangeListener__: - -.. _io_realm_DynamicRealm_addChangeListener: - -.. _io_realm_DynamicRealm_addChangeListener__: - - - -addChangeListener ------------------ - -.. _io_realm_DynamicRealm_addChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_DynamicRealm_addChangeListener_RealmChangeListener_: - -.. _addChangeListener_io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmChangeListener_: - -.. _DynamicRealm_addChangeListener_io_realm_RealmChangeListener_: - -.. _DynamicRealm_addChangeListener_RealmChangeListener_: - -.. _io_realm_DynamicRealm_addChangeListener_RealmChangeListener_DynamicRealm__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - - - * - Adds a change listener to the Realm.The listeners will be executed when changes are committed by this or another thread. - - Realm instances are cached per thread. For that reason it is important to remember to remove listeners again either using :ref:`removeChangeListener(RealmChangeListener) ` or :ref:`removeAllChangeListeners() ` . Not doing so can cause memory leaks. - - - - - - - - - **Parameters** - - - ``listener`` - the change listener. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - :ref:`removeChangeListener(RealmChangeListener) ` - - - - - :ref:`removeAllChangeListeners() ` - - - - - **refresh()** - - - - - - - - - - - - -.. _asFlowable: - -.. _asFlowable__: - -.. _DynamicRealm_asFlowable: - -.. _DynamicRealm_asFlowable__: - -.. _io_realm_DynamicRealm_asFlowable: - -.. _io_realm_DynamicRealm_asFlowable__: - - - -asFlowable ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`asFlowable ` () - | - - - - - * - Returns an RxJava Flowable that monitors changes to this Realm. It will emit the current state when subscribed to. Items will continually be emitted as the Realm is updated - ``onComplete`` will never be called. - - Items emitted from Realm Flowables are frozen (See **freeze()**. This means that they are immutable and can be read on any thread. - - - - Realm Flowables always emit items from the thread holding the live Realm. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - realm.asFlowable() - .observeOn(Schedulers.computation()) - .map(rxRealm -> doExpensiveWork(rxRealm)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - If you would like the ``asFlowable()`` to stop emitting items, you can instruct RxJava to only emit only the first item by using the ``first()`` operator: - - - - - - .. code-block:: java - - - realm.asFlowable().first().subscribe( ... ); // You only get the results once - - - - - - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - - - **Overrides** - - ``asFlowable`` in class **BaseRealm** - - - - - - -.. _createEmbeddedObject: - -.. _createEmbeddedObject__: - -.. _DynamicRealm_createEmbeddedObject: - -.. _DynamicRealm_createEmbeddedObject__: - -.. _io_realm_DynamicRealm_createEmbeddedObject: - -.. _io_realm_DynamicRealm_createEmbeddedObject__: - - - -createEmbeddedObject --------------------- - -.. _io_realm_DynamicRealm_createEmbeddedObject_java_lang_String_io_realm_DynamicRealmObject_java_lang_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_java_lang_String__io_realm_DynamicRealmObject__java_lang_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_java_lang_String_io_realm_DynamicRealmObject_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_java_lang_String__io_realm_DynamicRealmObject__String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_java_lang_String_DynamicRealmObject_java_lang_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_java_lang_String__DynamicRealmObject__java_lang_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_java_lang_String_DynamicRealmObject_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_java_lang_String__DynamicRealmObject__String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_String_io_realm_DynamicRealmObject_java_lang_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_String__io_realm_DynamicRealmObject__java_lang_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_String_io_realm_DynamicRealmObject_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_String__io_realm_DynamicRealmObject__String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_String_DynamicRealmObject_java_lang_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_String__DynamicRealmObject__java_lang_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_String_DynamicRealmObject_String_: - -.. _io_realm_DynamicRealm_createEmbeddedObject_String__DynamicRealmObject__String_: - -.. _createEmbeddedObject_java_lang_String_io_realm_DynamicRealmObject_java_lang_String_: - -.. _createEmbeddedObject_java_lang_String__io_realm_DynamicRealmObject__java_lang_String_: - -.. _createEmbeddedObject_java_lang_String_io_realm_DynamicRealmObject_String_: - -.. _createEmbeddedObject_java_lang_String__io_realm_DynamicRealmObject__String_: - -.. _createEmbeddedObject_java_lang_String_DynamicRealmObject_java_lang_String_: - -.. _createEmbeddedObject_java_lang_String__DynamicRealmObject__java_lang_String_: - -.. _createEmbeddedObject_java_lang_String_DynamicRealmObject_String_: - -.. _createEmbeddedObject_java_lang_String__DynamicRealmObject__String_: - -.. _createEmbeddedObject_String_io_realm_DynamicRealmObject_java_lang_String_: - -.. _createEmbeddedObject_String__io_realm_DynamicRealmObject__java_lang_String_: - -.. _createEmbeddedObject_String_io_realm_DynamicRealmObject_String_: - -.. _createEmbeddedObject_String__io_realm_DynamicRealmObject__String_: - -.. _createEmbeddedObject_String_DynamicRealmObject_java_lang_String_: - -.. _createEmbeddedObject_String__DynamicRealmObject__java_lang_String_: - -.. _createEmbeddedObject_String_DynamicRealmObject_String_: - -.. _createEmbeddedObject_String__DynamicRealmObject__String_: - -.. _DynamicRealm_createEmbeddedObject_java_lang_String_io_realm_DynamicRealmObject_java_lang_String_: - -.. _DynamicRealm_createEmbeddedObject_java_lang_String__io_realm_DynamicRealmObject__java_lang_String_: - -.. _DynamicRealm_createEmbeddedObject_java_lang_String_io_realm_DynamicRealmObject_String_: - -.. _DynamicRealm_createEmbeddedObject_java_lang_String__io_realm_DynamicRealmObject__String_: - -.. _DynamicRealm_createEmbeddedObject_java_lang_String_DynamicRealmObject_java_lang_String_: - -.. _DynamicRealm_createEmbeddedObject_java_lang_String__DynamicRealmObject__java_lang_String_: - -.. _DynamicRealm_createEmbeddedObject_java_lang_String_DynamicRealmObject_String_: - -.. _DynamicRealm_createEmbeddedObject_java_lang_String__DynamicRealmObject__String_: - -.. _DynamicRealm_createEmbeddedObject_String_io_realm_DynamicRealmObject_java_lang_String_: - -.. _DynamicRealm_createEmbeddedObject_String__io_realm_DynamicRealmObject__java_lang_String_: - -.. _DynamicRealm_createEmbeddedObject_String_io_realm_DynamicRealmObject_String_: - -.. _DynamicRealm_createEmbeddedObject_String__io_realm_DynamicRealmObject__String_: - -.. _DynamicRealm_createEmbeddedObject_String_DynamicRealmObject_java_lang_String_: - -.. _DynamicRealm_createEmbeddedObject_String__DynamicRealmObject__java_lang_String_: - -.. _DynamicRealm_createEmbeddedObject_String_DynamicRealmObject_String_: - -.. _DynamicRealm_createEmbeddedObject_String__DynamicRealmObject__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DynamicRealmObject ` :ref:`createEmbeddedObject ` ( - | `String `__ className, - | :ref:`DynamicRealmObject ` parentObject, - | `String `__ parentProperty - | ) - - - - - * - Instantiates and adds a new embedded object to the Realm.This method should only be used to create objects of types marked as embedded. - - - - - - - **Parameters** - - - ``className`` - the class name of the object to create. - - - - - ``parentObject`` - The parent object which should hold a reference to the embedded object. If the parent property is a list the embedded object will be added to the end of that list. - - - - - ``parentProperty`` - the property in the parent class which holds the reference. - - - - - - - - **Returns** - - the newly created embedded object. - - - - - **Throws** - - - `IllegalArgumentException `__ - if ``clazz`` is not an embedded class or if the property in the parent class cannot hold objects of the appropriate type. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`RealmClass.embedded() ` - - - - - - - - - - - - -.. _createObject: - -.. _createObject__: - -.. _DynamicRealm_createObject: - -.. _DynamicRealm_createObject__: - -.. _io_realm_DynamicRealm_createObject: - -.. _io_realm_DynamicRealm_createObject__: - - - -createObject ------------- - -.. _io_realm_DynamicRealm_createObject_java_lang_String_java_lang_Object_: - -.. _io_realm_DynamicRealm_createObject_java_lang_String__java_lang_Object_: - -.. _io_realm_DynamicRealm_createObject_java_lang_String_Object_: - -.. _io_realm_DynamicRealm_createObject_java_lang_String__Object_: - -.. _io_realm_DynamicRealm_createObject_String_java_lang_Object_: - -.. _io_realm_DynamicRealm_createObject_String__java_lang_Object_: - -.. _io_realm_DynamicRealm_createObject_String_Object_: - -.. _io_realm_DynamicRealm_createObject_String__Object_: - -.. _createObject_java_lang_String_java_lang_Object_: - -.. _createObject_java_lang_String__java_lang_Object_: - -.. _createObject_java_lang_String_Object_: - -.. _createObject_java_lang_String__Object_: - -.. _createObject_String_java_lang_Object_: - -.. _createObject_String__java_lang_Object_: - -.. _createObject_String_Object_: - -.. _createObject_String__Object_: - -.. _DynamicRealm_createObject_java_lang_String_java_lang_Object_: - -.. _DynamicRealm_createObject_java_lang_String__java_lang_Object_: - -.. _DynamicRealm_createObject_java_lang_String_Object_: - -.. _DynamicRealm_createObject_java_lang_String__Object_: - -.. _DynamicRealm_createObject_String_java_lang_Object_: - -.. _DynamicRealm_createObject_String__java_lang_Object_: - -.. _DynamicRealm_createObject_String_Object_: - -.. _DynamicRealm_createObject_String__Object_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DynamicRealmObject ` :ref:`createObject ` ( - | `String `__ className, - | `Object `__ primaryKeyValue - | ) - - - - - * - Creates an object with a given primary key. Classes without a primary key defined must use :ref:`createObject(String) ` } instead. - - - - - - - - - **Returns** - - the new object. All fields will have default values for their type, except for the primary key field which will have the provided value. - - - - - **Throws** - - - :ref:`RealmException ` - if object could not be created due to the primary key being invalid. - - - - - `IllegalStateException `__ - if the model clazz does not have a primary key defined. - - - - - `IllegalArgumentException `__ - if the ``primaryKeyValue`` doesn't have a value that can be converted to the expected value. - - - - - - - - - - - - -.. _io_realm_DynamicRealm_createObject_java_lang_String_: - -.. _io_realm_DynamicRealm_createObject_String_: - -.. _createObject_java_lang_String_: - -.. _createObject_String_: - -.. _DynamicRealm_createObject_java_lang_String_: - -.. _DynamicRealm_createObject_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DynamicRealmObject ` :ref:`createObject ` ( - | `String `__ className - | ) - - - - - * - Instantiates and adds a new object to the Realm. - - - - - **Parameters** - - - ``className`` - the class name of the object to create. - - - - - - - - **Returns** - - the new object. - - - - - **Throws** - - - :ref:`RealmException ` - if the object could not be created. - - - - - - - - - - - - -.. _delete: - -.. _delete__: - -.. _DynamicRealm_delete: - -.. _DynamicRealm_delete__: - -.. _io_realm_DynamicRealm_delete: - -.. _io_realm_DynamicRealm_delete__: - - - -delete ------- - -.. _io_realm_DynamicRealm_delete_java_lang_String_: - -.. _io_realm_DynamicRealm_delete_String_: - -.. _delete_java_lang_String_: - -.. _delete_String_: - -.. _DynamicRealm_delete_java_lang_String_: - -.. _DynamicRealm_delete_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`delete ` ( - | `String `__ className - | ) - - - - - * - Deletes all objects of the specified class from the Realm. - - - - - **Parameters** - - - ``className`` - the class for which all objects should be removed. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the Realm is closed or called from an incorrect thread. - - - - - - - - - - - - -.. _executeTransaction: - -.. _executeTransaction__: - -.. _DynamicRealm_executeTransaction: - -.. _DynamicRealm_executeTransaction__: - -.. _io_realm_DynamicRealm_executeTransaction: - -.. _io_realm_DynamicRealm_executeTransaction__: - - - -executeTransaction ------------------- - -.. _io_realm_DynamicRealm_executeTransaction_io_realm_DynamicRealm_Transaction_: - -.. _io_realm_DynamicRealm_executeTransaction_Transaction_: - -.. _io_realm_DynamicRealm_executeTransaction_DynamicRealm_Transaction_: - -.. _executeTransaction_io_realm_DynamicRealm_Transaction_: - -.. _executeTransaction_Transaction_: - -.. _executeTransaction_DynamicRealm_Transaction_: - -.. _DynamicRealm_executeTransaction_io_realm_DynamicRealm_Transaction_: - -.. _DynamicRealm_executeTransaction_Transaction_: - -.. _DynamicRealm_executeTransaction_DynamicRealm_Transaction_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`executeTransaction ` ( - | :ref:`DynamicRealm.Transaction ` transaction - | ) - - - - - * - Executes a given transaction on the DynamicRealm. **beginTransaction()** and **commitTransaction()** will be called automatically. If any exception is thrown during the transaction **cancelTransaction()** will be called instead of **commitTransaction()**. - - Calling this method from the UI thread will throw a :ref:`RealmException ` . Doing so may result in a drop of frames or even ANRs. We recommend calling this method from a non-UI thread or using :ref:`executeTransactionAsync(Transaction) ` instead. - - - - - - - - - **Parameters** - - - ``transaction`` - :ref:`Transaction ` to execute. - - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` . - - - - - - - :ref:`RealmException ` - if called from the UI thread, unless an explicit opt-in has been declared in :ref:`RealmConfiguration.Builder.allowWritesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _executeTransactionAsync: - -.. _executeTransactionAsync__: - -.. _DynamicRealm_executeTransactionAsync: - -.. _DynamicRealm_executeTransactionAsync__: - -.. _io_realm_DynamicRealm_executeTransactionAsync: - -.. _io_realm_DynamicRealm_executeTransactionAsync__: - - - -executeTransactionAsync ------------------------ - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Transaction__OnSuccess__OnError_: - -.. _executeTransactionAsync_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnSuccess__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess__DynamicRealm_Transaction_OnError_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`executeTransactionAsync ` ( - | :ref:`DynamicRealm.Transaction ` transaction, - | :ref:`DynamicRealm.Transaction.OnSuccess ` onSuccess, - | :ref:`DynamicRealm.Transaction.OnError ` onError - | ) - - - - - * - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnSuccess and OnError callbacks. - - - - - - - **Parameters** - - - ``transaction`` - :ref:`Transaction ` to execute. - - - - - - - ``onSuccess`` - callback invoked when the transaction succeeds. - - - - - ``onError`` - callback invoked when the transaction fails. - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` , or if the realm is opened from another thread. - - - - - - - - - - - - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnError_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__OnError_: - -.. _executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnError_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnError_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnError_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`executeTransactionAsync ` ( - | :ref:`DynamicRealm.Transaction ` transaction, - | :ref:`DynamicRealm.Transaction.OnError ` onError - | ) - - - - - * - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnError callback. - - - - - - - **Parameters** - - - ``transaction`` - :ref:`Transaction ` to execute. - - - - - - - ``onError`` - callback invoked when the transaction fails. - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` , or if the realm is opened from another thread. - - - - - - - - - - - - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction__OnSuccess_: - -.. _executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__OnSuccess_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__io_realm_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_DynamicRealm_Transaction_OnSuccess_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction__DynamicRealm_Transaction_OnSuccess_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`executeTransactionAsync ` ( - | :ref:`DynamicRealm.Transaction ` transaction, - | :ref:`DynamicRealm.Transaction.OnSuccess ` onSuccess - | ) - - - - - * - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnSuccess callback. - - - - - - - **Parameters** - - - ``transaction`` - :ref:`Transaction ` to execute. - - - - - - - ``onSuccess`` - callback invoked when the transaction succeeds. - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` , or if the realm is opened from another thread. - - - - - - - - - - - - -.. _io_realm_DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_Transaction_: - -.. _io_realm_DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_: - -.. _executeTransactionAsync_io_realm_DynamicRealm_Transaction_: - -.. _executeTransactionAsync_Transaction_: - -.. _executeTransactionAsync_DynamicRealm_Transaction_: - -.. _DynamicRealm_executeTransactionAsync_io_realm_DynamicRealm_Transaction_: - -.. _DynamicRealm_executeTransactionAsync_Transaction_: - -.. _DynamicRealm_executeTransactionAsync_DynamicRealm_Transaction_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`executeTransactionAsync ` ( - | :ref:`DynamicRealm.Transaction ` transaction - | ) - - - - - * - Similar to :ref:`executeTransaction(Transaction) ` but runs asynchronously on a worker thread. - - - - - - - **Parameters** - - - ``transaction`` - :ref:`Transaction ` to execute. - - - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` , or if the Realm is opened from another thread. - - - - - - - - - - - - - - -.. _freeze: - -.. _freeze__: - -.. _DynamicRealm_freeze: - -.. _DynamicRealm_freeze__: - -.. _io_realm_DynamicRealm_freeze: - -.. _io_realm_DynamicRealm_freeze__: - - - -freeze ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DynamicRealm ` :ref:`freeze ` () - | - - - - - * - Returns a frozen snapshot of the current Realm. This Realm can be read and queried from any thread without throwing an `IllegalStateException `__ . A frozen Realm has its own lifecycle and can be closed by calling **close()**, but fully closing the Realm that spawned the frozen copy will also close the frozen Realm. - - Frozen data can be queried as normal, but trying to mutate it in any way or attempting to register any listener will throw an `IllegalStateException `__ . - - - - Note: Keeping a large number of Realms with different versions alive can have a negative impact on the filesize of the Realm. In order to avoid such a situation, it is possible to set :ref:`RealmConfiguration.Builder.maxNumberOfActiveVersions(long) ` . - - - - - - - - - - - **Returns** - - a frozen copy of this Realm. - - - - - - - **Overrides** - - ``freeze`` in class **BaseRealm** - - - - - - -.. _getInstance: - -.. _getInstance__: - -.. _DynamicRealm_getInstance: - -.. _DynamicRealm_getInstance__: - -.. _io_realm_DynamicRealm_getInstance: - -.. _io_realm_DynamicRealm_getInstance__: - - - -getInstance ------------ - -.. _io_realm_DynamicRealm_getInstance_io_realm_RealmConfiguration_: - -.. _io_realm_DynamicRealm_getInstance_RealmConfiguration_: - -.. _getInstance_io_realm_RealmConfiguration_: - -.. _getInstance_RealmConfiguration_: - -.. _DynamicRealm_getInstance_io_realm_RealmConfiguration_: - -.. _DynamicRealm_getInstance_RealmConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`DynamicRealm ` :ref:`getInstance ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - - - * - Realm static constructor that returns a dynamic variant of the Realm instance defined by provided :ref:`io.realm.RealmConfiguration ` . Dynamic Realms do not care about schemaVersion and schemas, so opening a DynamicRealm will never trigger a migration. - - - - - - - - - **Returns** - - the DynamicRealm defined by the configuration. - - - - - **Throws** - - - :ref:`RealmFileException ` - if an error happened when accessing the underlying Realm file. - - - - - `IllegalArgumentException `__ - if ``configuration`` argument is ``null`` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`RealmConfiguration for details on how to configure a Realm. ` - - - - - - - - - - - - -.. _getInstanceAsync: - -.. _getInstanceAsync__: - -.. _DynamicRealm_getInstanceAsync: - -.. _DynamicRealm_getInstanceAsync__: - -.. _io_realm_DynamicRealm_getInstanceAsync: - -.. _io_realm_DynamicRealm_getInstanceAsync__: - - - -getInstanceAsync ----------------- - -.. _io_realm_DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration_io_realm_DynamicRealm_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration__io_realm_DynamicRealm_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration__Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration_DynamicRealm_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration__DynamicRealm_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_RealmConfiguration_io_realm_DynamicRealm_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_RealmConfiguration__io_realm_DynamicRealm_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_RealmConfiguration_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_RealmConfiguration__Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_RealmConfiguration_DynamicRealm_Callback_: - -.. _io_realm_DynamicRealm_getInstanceAsync_RealmConfiguration__DynamicRealm_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration_io_realm_DynamicRealm_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration__io_realm_DynamicRealm_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration__Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration_DynamicRealm_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration__DynamicRealm_Callback_: - -.. _getInstanceAsync_RealmConfiguration_io_realm_DynamicRealm_Callback_: - -.. _getInstanceAsync_RealmConfiguration__io_realm_DynamicRealm_Callback_: - -.. _getInstanceAsync_RealmConfiguration_Callback_: - -.. _getInstanceAsync_RealmConfiguration__Callback_: - -.. _getInstanceAsync_RealmConfiguration_DynamicRealm_Callback_: - -.. _getInstanceAsync_RealmConfiguration__DynamicRealm_Callback_: - -.. _DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration_io_realm_DynamicRealm_Callback_: - -.. _DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration__io_realm_DynamicRealm_Callback_: - -.. _DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration_Callback_: - -.. _DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration__Callback_: - -.. _DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration_DynamicRealm_Callback_: - -.. _DynamicRealm_getInstanceAsync_io_realm_RealmConfiguration__DynamicRealm_Callback_: - -.. _DynamicRealm_getInstanceAsync_RealmConfiguration_io_realm_DynamicRealm_Callback_: - -.. _DynamicRealm_getInstanceAsync_RealmConfiguration__io_realm_DynamicRealm_Callback_: - -.. _DynamicRealm_getInstanceAsync_RealmConfiguration_Callback_: - -.. _DynamicRealm_getInstanceAsync_RealmConfiguration__Callback_: - -.. _DynamicRealm_getInstanceAsync_RealmConfiguration_DynamicRealm_Callback_: - -.. _DynamicRealm_getInstanceAsync_RealmConfiguration__DynamicRealm_Callback_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAsyncTask ` :ref:`getInstanceAsync ` ( - | :ref:`RealmConfiguration ` configuration, - | :ref:`DynamicRealm.Callback ` callback - | ) - - - - - * - The creation of the first Realm instance per :ref:`RealmConfiguration ` in a process can take some time as all initialization code need to run at that point (Setting up the Realm, validating schemas and creating initial data). This method places the initialization work in a background thread and deliver the Realm instance to the caller thread asynchronously after the initialization is finished. - - - - - - - **Parameters** - - - ``configuration`` - :ref:`RealmConfiguration ` used to open the Realm. - - - - - - - ``callback`` - invoked to return the results. - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if a null :ref:`RealmConfiguration ` or a null :ref:`Callback ` is provided. - - - - - - - `IllegalStateException `__ - if it is called from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Callback for more details. ` - - - - - - - - - - - - -.. _getSchema: - -.. _getSchema__: - -.. _DynamicRealm_getSchema: - -.. _DynamicRealm_getSchema__: - -.. _io_realm_DynamicRealm_getSchema: - -.. _io_realm_DynamicRealm_getSchema__: - - - -getSchema ---------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSchema ` :ref:`getSchema ` () - | - - - - - * - Returns the mutable schema for this Realm. - - - - - - - **Returns** - - The :ref:`RealmSchema ` for this Realm. - - - - - - - - - **Overrides** - - ``getSchema`` in class **BaseRealm** - - - - - - -.. _isEmpty: - -.. _isEmpty__: - -.. _DynamicRealm_isEmpty: - -.. _DynamicRealm_isEmpty__: - -.. _io_realm_DynamicRealm_isEmpty: - -.. _io_realm_DynamicRealm_isEmpty__: - - - -isEmpty -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEmpty ` () - | - - - - - * - Checks if this :ref:`io.realm.Realm ` contains any objects. - - - - - - - - - **Returns** - - ``true`` if empty, \@{code false} otherwise. - - - - - - - - - **Overrides** - - ``isEmpty`` in class **BaseRealm** - - - - - - -.. _removeAllChangeListeners: - -.. _removeAllChangeListeners__: - -.. _DynamicRealm_removeAllChangeListeners: - -.. _DynamicRealm_removeAllChangeListeners__: - -.. _io_realm_DynamicRealm_removeAllChangeListeners: - -.. _io_realm_DynamicRealm_removeAllChangeListeners__: - - - -removeAllChangeListeners ------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeAllChangeListeners ` () - | - - - - - * - Removes all user-defined change listeners. - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if you try to remove listeners from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _removeChangeListener: - -.. _removeChangeListener__: - -.. _DynamicRealm_removeChangeListener: - -.. _DynamicRealm_removeChangeListener__: - -.. _io_realm_DynamicRealm_removeChangeListener: - -.. _io_realm_DynamicRealm_removeChangeListener__: - - - -removeChangeListener --------------------- - -.. _io_realm_DynamicRealm_removeChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_DynamicRealm_removeChangeListener_RealmChangeListener_: - -.. _removeChangeListener_io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmChangeListener_: - -.. _DynamicRealm_removeChangeListener_io_realm_RealmChangeListener_: - -.. _DynamicRealm_removeChangeListener_RealmChangeListener_: - -.. _io_realm_DynamicRealm_removeChangeListener_RealmChangeListener_DynamicRealm__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _where: - -.. _where__: - -.. _DynamicRealm_where: - -.. _DynamicRealm_where__: - -.. _io_realm_DynamicRealm_where: - -.. _io_realm_DynamicRealm_where__: - - - -where ------ - -.. _io_realm_DynamicRealm_where_java_lang_String_: - -.. _io_realm_DynamicRealm_where_String_: - -.. _where_java_lang_String_: - -.. _where_String_: - -.. _DynamicRealm_where_java_lang_String_: - -.. _DynamicRealm_where_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`where ` ( - | `String `__ className - | ) - - - - - * - Returns a RealmQuery, which can be used to query the provided class. - - - - - **Parameters** - - - ``className`` - the class of the object which is to be queried. - - - - - - - - **Returns** - - a RealmQuery, which can be used to query for specific objects of provided type. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the class doesn't exist. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmQuery ` - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/DynamicRealm/Callback.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Callback.txt deleted file mode 100644 index 7d772b920a..0000000000 --- a/source/sdk/temp/java/api/io/realm/DynamicRealm/Callback.txt +++ /dev/null @@ -1,271 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class DynamicRealm.Callback -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_DynamicRealm_Callback: - - - -io.realm -======== - - - | `java.lang.Object `__ - | **io.realm.BaseRealm.InstanceCallback** - | io.realm.DynamicRealm.Callback - - - - -**Enclosing class:** - -:ref:`DynamicRealm ` - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Callback ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | `Throwable `__ exception - | ) - - - Deliver an error happens when creating the Realm instance to the caller thread. - - - - - * - public abstract **void** - - | :ref:`onSuccess ` ( - | :ref:`DynamicRealm ` realm - | ) - - - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class **io.realm.BaseRealm.InstanceCallback**: ``onSuccess`` , ``onError`` - - - - -Constructor Detail -================== - -.. _Callback: - -.. _Callback__: - -.. _io_realm_DynamicRealm_Callback: - -.. _io_realm_DynamicRealm_Callback__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Callback ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _Callback_onError: - -.. _Callback_onError__: - -.. _DynamicRealm_Callback_onError: - -.. _DynamicRealm_Callback_onError__: - -.. _io_realm_DynamicRealm_Callback_onError: - -.. _io_realm_DynamicRealm_Callback_onError__: - - - -onError -------- - -.. _io_realm_DynamicRealm_Callback_onError_java_lang_Throwable_: - -.. _io_realm_DynamicRealm_Callback_onError_Throwable_: - -.. _onError_java_lang_Throwable_: - -.. _onError_Throwable_: - -.. _DynamicRealm_Callback_onError_java_lang_Throwable_: - -.. _DynamicRealm_Callback_onError_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | `Throwable `__ exception - | ) - - - - - * - Deliver an error happens when creating the Realm instance to the caller thread. The default implementation will throw an exception on the caller thread. - - - - - - - - - - - **Overrides** - - ``onError`` in class **InstanceCallback** - - - - - - -.. _onSuccess: - -.. _onSuccess__: - -.. _Callback_onSuccess: - -.. _Callback_onSuccess__: - -.. _DynamicRealm_Callback_onSuccess: - -.. _DynamicRealm_Callback_onSuccess__: - -.. _io_realm_DynamicRealm_Callback_onSuccess: - -.. _io_realm_DynamicRealm_Callback_onSuccess__: - - - -onSuccess ---------- - -.. _io_realm_DynamicRealm_Callback_onSuccess_io_realm_DynamicRealm_: - -.. _io_realm_DynamicRealm_Callback_onSuccess_DynamicRealm_: - -.. _onSuccess_io_realm_DynamicRealm_: - -.. _onSuccess_DynamicRealm_: - -.. _DynamicRealm_Callback_onSuccess_io_realm_DynamicRealm_: - -.. _DynamicRealm_Callback_onSuccess_DynamicRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract **void** :ref:`onSuccess ` ( - | :ref:`DynamicRealm ` realm - | ) - - - - - * - - - - - - - - - - - - - - **Overrides** - - ``onSuccess`` in class **InstanceCallback** - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction.txt deleted file mode 100644 index c0cb2459ab..0000000000 --- a/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction.txt +++ /dev/null @@ -1,144 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface DynamicRealm.Transaction -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_DynamicRealm_Transaction: - - - -io.realm -======== - - - -**Enclosing class:** - -:ref:`DynamicRealm ` - - - -Encapsulates a Realm transaction.Using this class will automatically handle **io.realm.DynamicRealm.beginTransaction()** and **io.realm.DynamicRealm.commitTransaction()** If any exception is thrown during the transaction **io.realm.DynamicRealm.cancelTransaction()** will be called instead of **io.realm.DynamicRealm.commitTransaction()**. - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static`` - - :ref:`DynamicRealm.Transaction.Callback ` - - - * - ``public static interface`` - - :ref:`DynamicRealm.Transaction.OnSuccess ` - - - * - ``public static interface`` - - :ref:`DynamicRealm.Transaction.OnError ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`execute ` ( - | :ref:`DynamicRealm ` realm - | ) - - - - - - - - - - -Method Detail -============= - -.. _execute: - -.. _execute__: - -.. _Transaction_execute: - -.. _Transaction_execute__: - -.. _DynamicRealm_Transaction_execute: - -.. _DynamicRealm_Transaction_execute__: - -.. _io_realm_DynamicRealm_Transaction_execute: - -.. _io_realm_DynamicRealm_Transaction_execute__: - - - -execute -------- - -.. _io_realm_DynamicRealm_Transaction_execute_io_realm_DynamicRealm_: - -.. _io_realm_DynamicRealm_Transaction_execute_DynamicRealm_: - -.. _execute_io_realm_DynamicRealm_: - -.. _execute_DynamicRealm_: - -.. _DynamicRealm_Transaction_execute_io_realm_DynamicRealm_: - -.. _DynamicRealm_Transaction_execute_DynamicRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`execute ` ( - | :ref:`DynamicRealm ` realm - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/Callback.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/Callback.txt deleted file mode 100644 index 114f1f50c6..0000000000 --- a/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/Callback.txt +++ /dev/null @@ -1,241 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class DynamicRealm.Transaction.Callback -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_DynamicRealm_Transaction_Callback: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.DynamicRealm.Transaction.Callback - - - - -**Enclosing class:** - -:ref:`Transaction ` - - - -Callback invoked to notify the caller thread. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Callback ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | `Exception `__ ignore - | ) - - - - - - - - * - public **void** - - | :ref:`onSuccess ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _Callback: - -.. _Callback__: - -.. _io_realm_DynamicRealm_Transaction_Callback: - -.. _io_realm_DynamicRealm_Transaction_Callback__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Callback ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _Callback_onError: - -.. _Callback_onError__: - -.. _DynamicRealm_Transaction_Callback_onError: - -.. _DynamicRealm_Transaction_Callback_onError__: - -.. _io_realm_DynamicRealm_Transaction_Callback_onError: - -.. _io_realm_DynamicRealm_Transaction_Callback_onError__: - - - -onError -------- - -.. _io_realm_DynamicRealm_Transaction_Callback_onError_java_lang_Exception_: - -.. _io_realm_DynamicRealm_Transaction_Callback_onError_Exception_: - -.. _onError_java_lang_Exception_: - -.. _onError_Exception_: - -.. _DynamicRealm_Transaction_Callback_onError_java_lang_Exception_: - -.. _DynamicRealm_Transaction_Callback_onError_Exception_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | `Exception `__ ignore - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _onSuccess: - -.. _onSuccess__: - -.. _Callback_onSuccess: - -.. _Callback_onSuccess__: - -.. _DynamicRealm_Transaction_Callback_onSuccess: - -.. _DynamicRealm_Transaction_Callback_onSuccess__: - -.. _io_realm_DynamicRealm_Transaction_Callback_onSuccess: - -.. _io_realm_DynamicRealm_Transaction_Callback_onSuccess__: - - - -onSuccess ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onSuccess ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnError.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnError.txt deleted file mode 100644 index a924076447..0000000000 --- a/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnError.txt +++ /dev/null @@ -1,118 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface DynamicRealm.Transaction.OnError -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_DynamicRealm_Transaction_OnError: - - - -io.realm -======== - - - -**Enclosing class:** - -:ref:`Transaction ` - - - -Callback invoked to notify the caller thread about error during the transaction. The transaction will be rolled back and the background Realm will be closed before invoking :ref:`onError(Throwable) ` . - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | `Throwable `__ error - | ) - - - - - - - - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _OnError_onError: - -.. _OnError_onError__: - -.. _DynamicRealm_Transaction_OnError_onError: - -.. _DynamicRealm_Transaction_OnError_onError__: - -.. _io_realm_DynamicRealm_Transaction_OnError_onError: - -.. _io_realm_DynamicRealm_Transaction_OnError_onError__: - - - -onError -------- - -.. _io_realm_DynamicRealm_Transaction_OnError_onError_java_lang_Throwable_: - -.. _io_realm_DynamicRealm_Transaction_OnError_onError_Throwable_: - -.. _onError_java_lang_Throwable_: - -.. _onError_Throwable_: - -.. _DynamicRealm_Transaction_OnError_onError_java_lang_Throwable_: - -.. _DynamicRealm_Transaction_OnError_onError_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | `Throwable `__ error - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt b/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt deleted file mode 100644 index 6098d6fbbb..0000000000 --- a/source/sdk/temp/java/api/io/realm/DynamicRealm/Transaction/OnSuccess.txt +++ /dev/null @@ -1,102 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface DynamicRealm.Transaction.OnSuccess -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_DynamicRealm_Transaction_OnSuccess: - - - -io.realm -======== - - - -**Enclosing class:** - -:ref:`Transaction ` - - - -Callback invoked to notify the caller thread about the success of the transaction. - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onSuccess ` () - | - - - - - - - - - - -Method Detail -============= - -.. _onSuccess: - -.. _onSuccess__: - -.. _OnSuccess_onSuccess: - -.. _OnSuccess_onSuccess__: - -.. _DynamicRealm_Transaction_OnSuccess_onSuccess: - -.. _DynamicRealm_Transaction_OnSuccess_onSuccess__: - -.. _io_realm_DynamicRealm_Transaction_OnSuccess_onSuccess: - -.. _io_realm_DynamicRealm_Transaction_OnSuccess_onSuccess__: - - - -onSuccess ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onSuccess ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/DynamicRealmObject.txt b/source/sdk/temp/java/api/io/realm/DynamicRealmObject.txt deleted file mode 100644 index 40f49b6d74..0000000000 --- a/source/sdk/temp/java/api/io/realm/DynamicRealmObject.txt +++ /dev/null @@ -1,5552 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class DynamicRealmObject -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_DynamicRealmObject: - - - -io.realm -======== - - - | `java.lang.Object `__ - | :ref:`io.realm.RealmObject ` - | io.realm.DynamicRealmObject - - -Class that wraps a normal RealmObject in order to allow dynamic access instead of a typed interface. Using a DynamicRealmObject is slower than using the regular RealmObject class. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`DynamicRealmObject ` ( - | :ref:`RealmModel ` obj - | ) - - - Creates a dynamic Realm object based on an existing object. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public **E** - - | :ref:`get ` <**E** >( - | `String `__ fieldName - | ) - - - Returns the value for the given field. - - - - - * - public **byte** - - | :ref:`getBlob ` ( - | `String `__ fieldName - | ) - - - Returns the ``byte[]`` value for a given field. - - - - - - - * - public **boolean** - - | :ref:`getBoolean ` ( - | `String `__ fieldName - | ) - - - Returns the ``boolean`` value for a given field. - - - - - - - * - public **byte** - - | :ref:`getByte ` ( - | `String `__ fieldName - | ) - - - Returns the ``byte`` value for a given field. - - - - - - - * - public `Date `__ - - | :ref:`getDate ` ( - | `String `__ fieldName - | ) - - - Returns the ``Date`` value for a given field. - - - - - - - * - public **Decimal128** - - | :ref:`getDecimal128 ` ( - | `String `__ fieldName - | ) - - - Returns the ``Decimal128`` value for a given field. - - - - - - - * - public :ref:`RealmDictionary ` - - | :ref:`getDictionary ` <**E** >( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - Returns the :ref:`RealmDictionary ` containing only primitive values. - - - - - - - * - public :ref:`RealmDictionary ` - - | :ref:`getDictionary ` ( - | `String `__ fieldName - | ) - - - Returns the :ref:`RealmDictionary ` of :ref:`DynamicRealmObject ` s being linked from the given field. - - - - - - - * - public **double** - - | :ref:`getDouble ` ( - | `String `__ fieldName - | ) - - - Returns the ``double`` value for a given field. - - - - - - - * - public :ref:`DynamicRealm ` - - | :ref:`getDynamicRealm ` () - | - - - Returns :ref:`DynamicRealm ` instance where this :ref:`DynamicRealmObject ` belongs. - - - - - - - * - public `String `__ - - | :ref:`getFieldNames ` () - | - - - Returns the list of field names on this object. - - - - - * - public :ref:`RealmFieldType ` - - | :ref:`getFieldType ` ( - | `String `__ fieldName - | ) - - - Returns the type used by the underlying storage engine to represent this field. - - - - - * - public **float** - - | :ref:`getFloat ` ( - | `String `__ fieldName - | ) - - - Returns the ``float`` value for a given field. - - - - - - - * - public **int** - - | :ref:`getInt ` ( - | `String `__ fieldName - | ) - - - Returns the ``int`` value for a given field. - - - - - - - * - public :ref:`RealmList ` - - | :ref:`getList ` <**E** >( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - Returns the :ref:`RealmList ` containing only primitive values. - - - - - - - * - public :ref:`RealmList ` - - | :ref:`getList ` ( - | `String `__ fieldName - | ) - - - Returns the :ref:`RealmList ` of :ref:`DynamicRealmObject ` s being linked from the given field. - - - - - - - * - public **long** - - | :ref:`getLong ` ( - | `String `__ fieldName - | ) - - - Returns the ``long`` value for a given field. - - - - - - - * - public :ref:`DynamicRealmObject ` - - | :ref:`getObject ` ( - | `String `__ fieldName - | ) - - - Returns the object being linked to from this field. - - - - - * - public **ObjectId** - - | :ref:`getObjectId ` ( - | `String `__ fieldName - | ) - - - Returns the ``ObjectId`` value for a given field. - - - - - - - * - public :ref:`RealmAny ` - - | :ref:`getRealmAny ` ( - | `String `__ fieldName - | ) - - - Returns the ``RealmAny`` value for a given field. - - - - - - - * - public :ref:`RealmSet ` - - | :ref:`getRealmSet ` <**E** >( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - Returns the :ref:`RealmSet ` containing only primitive values. - - - - - - - * - public :ref:`RealmSet ` - - | :ref:`getRealmSet ` ( - | `String `__ fieldName - | ) - - - Returns the :ref:`RealmSet ` of :ref:`DynamicRealmObject ` s being linked from the given field. - - - - - - - * - public **short** - - | :ref:`getShort ` ( - | `String `__ fieldName - | ) - - - Returns the ``short`` value for a given field. - - - - - - - * - public `String `__ - - | :ref:`getString ` ( - | `String `__ fieldName - | ) - - - Returns the ``String`` value for a given field. - - - - - - - * - public `String `__ - - | :ref:`getType ` () - | - - - Returns the type of object. - - - - - * - public `UUID `__ - - | :ref:`getUUID ` ( - | `String `__ fieldName - | ) - - - Returns the ``UUID`` value for a given field. - - - - - - - * - public **boolean** - - | :ref:`hasField ` ( - | `String `__ fieldName - | ) - - - Checks whether an object has the given field or not. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - Returns a hash code value for the :ref:`DynamicRealmObject ` object. - - - - - - - * - public **boolean** - - | :ref:`isNull ` ( - | `String `__ fieldName - | ) - - - Checks if the value of a given field is ``null`` . - - - - - - - * - public :ref:`RealmResults ` - - | :ref:`linkingObjects ` ( - | `String `__ srcClassName, - | `String `__ srcFieldName - | ) - - - Returns :ref:`RealmResults ` containing all ``srcClassName`` class objects that have a relationship to this object from ``srcFieldName`` field. - - - - - - - * - public **void** - - | :ref:`realm$injectObjectContext ` () - | - - - - - - - - * - public :ref:`ProxyState ` - - | :ref:`realmGet$proxyState ` () - | - - - - - - - - * - public **void** - - | :ref:`set ` ( - | `String `__ fieldName, - | `Object `__ value - | ) - - - Sets the value for the given field. - - - - - * - public **void** - - | :ref:`setBlob ` ( - | `String `__ fieldName, - | **byte[]** value - | ) - - - Sets the binary value of the given field. - - - - - * - public **void** - - | :ref:`setBoolean ` ( - | `String `__ fieldName, - | **boolean** value - | ) - - - Sets the ``boolean`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setByte ` ( - | `String `__ fieldName, - | **byte** value - | ) - - - Sets the ``byte`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setDate ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - Sets the ``Date`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setDecimal128 ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Sets the ``Decimal128`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setDictionary ` <**E** >( - | `String `__ fieldName, - | :ref:`io.realm.RealmDictionary\ ` dictionary - | ) - - - Sets the reference to a :ref:`RealmDictionary ` on the given field. - - - - - - - * - public **void** - - | :ref:`setDouble ` ( - | `String `__ fieldName, - | **double** value - | ) - - - Sets the ``double`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setFloat ` ( - | `String `__ fieldName, - | **float** value - | ) - - - Sets the ``float`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setInt ` ( - | `String `__ fieldName, - | **int** value - | ) - - - Sets the ``int`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setList ` <**E** >( - | `String `__ fieldName, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Sets the reference to a :ref:`RealmList ` on the given field. - - - - - - - * - public **void** - - | :ref:`setLong ` ( - | `String `__ fieldName, - | **long** value - | ) - - - Sets the ``long`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setNull ` ( - | `String `__ fieldName - | ) - - - Sets the value to ``null`` for the given field. - - - - - - - * - public **void** - - | :ref:`setObject ` ( - | `String `__ fieldName, - | :ref:`DynamicRealmObject ` value - | ) - - - Sets a reference to another object on the given field. - - - - - * - public **void** - - | :ref:`setObjectId ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Sets the ``ObjectId`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setRealmAny ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - Sets the ``RealmAny`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setRealmSet ` <**E** >( - | `String `__ fieldName, - | :ref:`io.realm.RealmSet\ ` set - | ) - - - Sets the reference to a :ref:`RealmSet ` on the given field. - - - - - - - * - public **void** - - | :ref:`setShort ` ( - | `String `__ fieldName, - | **short** value - | ) - - - Sets the ``short`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setString ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Sets the ``String`` value of the given field. - - - - - - - * - public **void** - - | :ref:`setUUID ` ( - | `String `__ fieldName, - | `UUID `__ value - | ) - - - Sets the ``UUID`` value of the given field. - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class :ref:`io.realm.RealmObject ` : ``deleteFromRealm`` , ``deleteFromRealm`` , ``isValid`` , ``isValid`` , ``isFrozen`` , ``freeze`` , ``isFrozen`` , ``freeze`` , ``isLoaded`` , ``isLoaded`` , ``isManaged`` , ``isManaged`` , ``getRealm`` , ``getRealm`` , ``load`` , ``load`` , ``addChangeListener`` , ``addChangeListener`` , ``addChangeListener`` , ``addChangeListener`` , ``removeChangeListener`` , ``removeChangeListener`` , ``removeChangeListener`` , ``removeChangeListener`` , ``removeAllChangeListeners`` , ``removeAllChangeListeners`` , ``asFlowable`` , ``asChangesetObservable`` , ``asFlowable`` , ``asChangesetObservable`` - - - - -Constructor Detail -================== - -.. _DynamicRealmObject: - -.. _DynamicRealmObject__: - -.. _io_realm_DynamicRealmObject: - -.. _io_realm_DynamicRealmObject__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DynamicRealmObject ` ( - | :ref:`RealmModel ` obj - | ) - - - - - * - Creates a dynamic Realm object based on an existing object. - - - - - **Parameters** - - - ``obj`` - the Realm object to convert to a dynamic object. Only objects managed by :ref:`Realm ` can be used. - - - - - - - - - - - - - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _DynamicRealmObject_equals: - -.. _DynamicRealmObject_equals__: - -.. _io_realm_DynamicRealmObject_equals: - -.. _io_realm_DynamicRealmObject_equals__: - - - -equals ------- - -.. _io_realm_DynamicRealmObject_equals_java_lang_Object_: - -.. _io_realm_DynamicRealmObject_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _DynamicRealmObject_equals_java_lang_Object_: - -.. _DynamicRealmObject_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _get: - -.. _get__: - -.. _DynamicRealmObject_get: - -.. _DynamicRealmObject_get__: - -.. _io_realm_DynamicRealmObject_get: - -.. _io_realm_DynamicRealmObject_get__: - - - -get ----- - -.. _io_realm_DynamicRealmObject_get_java_lang_String_: - -.. _io_realm_DynamicRealmObject_get_String_: - -.. _get_java_lang_String_: - -.. _get_String_: - -.. _DynamicRealmObject_get_java_lang_String_: - -.. _DynamicRealmObject_get_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`get ` <**E** >( - | `String `__ fieldName - | ) - - - - - * - Returns the value for the given field. - - - - - **Parameters** - - - ``fieldName`` - name of the field. - - - - - - - - **Returns** - - the field value. - - - - - **Throws** - - - `ClassCastException `__ - if the field doesn't contain a field of the defined return type. - - - - - - - - - - - - -.. _getBlob: - -.. _getBlob__: - -.. _DynamicRealmObject_getBlob: - -.. _DynamicRealmObject_getBlob__: - -.. _io_realm_DynamicRealmObject_getBlob: - -.. _io_realm_DynamicRealmObject_getBlob__: - - - -getBlob -------- - -.. _io_realm_DynamicRealmObject_getBlob_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getBlob_String_: - -.. _getBlob_java_lang_String_: - -.. _getBlob_String_: - -.. _DynamicRealmObject_getBlob_java_lang_String_: - -.. _DynamicRealmObject_getBlob_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **byte** :ref:`getBlob ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``byte[]`` value for a given field. - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the byte[] value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain binary data. - - - - - - - - - - - - -.. _getBoolean: - -.. _getBoolean__: - -.. _DynamicRealmObject_getBoolean: - -.. _DynamicRealmObject_getBoolean__: - -.. _io_realm_DynamicRealmObject_getBoolean: - -.. _io_realm_DynamicRealmObject_getBoolean__: - - - -getBoolean ----------- - -.. _io_realm_DynamicRealmObject_getBoolean_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getBoolean_String_: - -.. _getBoolean_java_lang_String_: - -.. _getBoolean_String_: - -.. _DynamicRealmObject_getBoolean_java_lang_String_: - -.. _DynamicRealmObject_getBoolean_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`getBoolean ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``boolean`` value for a given field. - - If the field is nullable, use :ref:`isNull(String) ` to check for ``null`` instead of using this method. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the boolean value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain booleans. - - - - - :ref:`io.realm.exceptions.RealmException ` - if the return value would be ``null`` . - - - - - - - - - - - - - - -.. _getByte: - -.. _getByte__: - -.. _DynamicRealmObject_getByte: - -.. _DynamicRealmObject_getByte__: - -.. _io_realm_DynamicRealmObject_getByte: - -.. _io_realm_DynamicRealmObject_getByte__: - - - -getByte -------- - -.. _io_realm_DynamicRealmObject_getByte_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getByte_String_: - -.. _getByte_java_lang_String_: - -.. _getByte_String_: - -.. _DynamicRealmObject_getByte_java_lang_String_: - -.. _DynamicRealmObject_getByte_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **byte** :ref:`getByte ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``byte`` value for a given field. - - If the field is nullable, use :ref:`isNull(String) ` to check for ``null`` instead of using this method. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the byte value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain integers. - - - - - :ref:`io.realm.exceptions.RealmException ` - if the return value would be ``null`` . - - - - - - - - - - - - - - -.. _getDate: - -.. _getDate__: - -.. _DynamicRealmObject_getDate: - -.. _DynamicRealmObject_getDate__: - -.. _io_realm_DynamicRealmObject_getDate: - -.. _io_realm_DynamicRealmObject_getDate__: - - - -getDate -------- - -.. _io_realm_DynamicRealmObject_getDate_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getDate_String_: - -.. _getDate_java_lang_String_: - -.. _getDate_String_: - -.. _DynamicRealmObject_getDate_java_lang_String_: - -.. _DynamicRealmObject_getDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`getDate ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``Date`` value for a given field. - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the Date value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain Dates. - - - - - - - - - - - - -.. _getDecimal128: - -.. _getDecimal128__: - -.. _DynamicRealmObject_getDecimal128: - -.. _DynamicRealmObject_getDecimal128__: - -.. _io_realm_DynamicRealmObject_getDecimal128: - -.. _io_realm_DynamicRealmObject_getDecimal128__: - - - -getDecimal128 -------------- - -.. _io_realm_DynamicRealmObject_getDecimal128_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getDecimal128_String_: - -.. _getDecimal128_java_lang_String_: - -.. _getDecimal128_String_: - -.. _DynamicRealmObject_getDecimal128_java_lang_String_: - -.. _DynamicRealmObject_getDecimal128_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **Decimal128** :ref:`getDecimal128 ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``Decimal128`` value for a given field. - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the Decimal128 value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain Decimal128. - - - - - - - - - - - - -.. _getDictionary: - -.. _getDictionary__: - -.. _DynamicRealmObject_getDictionary: - -.. _DynamicRealmObject_getDictionary__: - -.. _io_realm_DynamicRealmObject_getDictionary: - -.. _io_realm_DynamicRealmObject_getDictionary__: - - - -getDictionary -------------- - -.. _io_realm_DynamicRealmObject_getDictionary_java_lang_String_java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getDictionary_java_lang_String__java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getDictionary_java_lang_String_Class_: - -.. _io_realm_DynamicRealmObject_getDictionary_java_lang_String__Class_: - -.. _io_realm_DynamicRealmObject_getDictionary_String_java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getDictionary_String__java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getDictionary_String_Class_: - -.. _io_realm_DynamicRealmObject_getDictionary_String__Class_: - -.. _getDictionary_java_lang_String_java_lang_Class_: - -.. _getDictionary_java_lang_String__java_lang_Class_: - -.. _getDictionary_java_lang_String_Class_: - -.. _getDictionary_java_lang_String__Class_: - -.. _getDictionary_String_java_lang_Class_: - -.. _getDictionary_String__java_lang_Class_: - -.. _getDictionary_String_Class_: - -.. _getDictionary_String__Class_: - -.. _DynamicRealmObject_getDictionary_java_lang_String_java_lang_Class_: - -.. _DynamicRealmObject_getDictionary_java_lang_String__java_lang_Class_: - -.. _DynamicRealmObject_getDictionary_java_lang_String_Class_: - -.. _DynamicRealmObject_getDictionary_java_lang_String__Class_: - -.. _DynamicRealmObject_getDictionary_String_java_lang_Class_: - -.. _DynamicRealmObject_getDictionary_String__java_lang_Class_: - -.. _DynamicRealmObject_getDictionary_String_Class_: - -.. _DynamicRealmObject_getDictionary_String__Class_: - -.. _io_realm_DynamicRealmObject_getDictionary_String__Class_E__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmDictionary ` :ref:`getDictionary ` <**E** >( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - - - * - Returns the :ref:`RealmDictionary ` containing only primitive values. - - If the dictionary contains references to other Realm objects, use :ref:`getDictionary(String) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - ``primitiveType`` - the type of elements in the dictionary. Only primitive types are supported. - - - - - - - - **Returns** - - the :ref:`RealmDictionary ` data for this field. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain a dictionary of primitive objects. - - - - - - - - - - -.. _io_realm_DynamicRealmObject_getDictionary_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getDictionary_String_: - -.. _getDictionary_java_lang_String_: - -.. _getDictionary_String_: - -.. _DynamicRealmObject_getDictionary_java_lang_String_: - -.. _DynamicRealmObject_getDictionary_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmDictionary ` :ref:`getDictionary ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the :ref:`RealmDictionary ` of :ref:`DynamicRealmObject ` s being linked from the given field. - - If the dictionary contains primitive types, use :ref:`getDictionary(String, Class) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the :ref:`RealmDictionary ` data for this field. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain a dictionary of objects. - - - - - - - - - - - - -.. _getDouble: - -.. _getDouble__: - -.. _DynamicRealmObject_getDouble: - -.. _DynamicRealmObject_getDouble__: - -.. _io_realm_DynamicRealmObject_getDouble: - -.. _io_realm_DynamicRealmObject_getDouble__: - - - -getDouble ---------- - -.. _io_realm_DynamicRealmObject_getDouble_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getDouble_String_: - -.. _getDouble_java_lang_String_: - -.. _getDouble_String_: - -.. _DynamicRealmObject_getDouble_java_lang_String_: - -.. _DynamicRealmObject_getDouble_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **double** :ref:`getDouble ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``double`` value for a given field. - - If the field is nullable, use :ref:`isNull(String) ` to check for ``null`` instead of using this method. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the double value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain doubles. - - - - - :ref:`io.realm.exceptions.RealmException ` - if the return value would be ``null`` . - - - - - - - - - - - - - - -.. _getDynamicRealm: - -.. _getDynamicRealm__: - -.. _DynamicRealmObject_getDynamicRealm: - -.. _DynamicRealmObject_getDynamicRealm__: - -.. _io_realm_DynamicRealmObject_getDynamicRealm: - -.. _io_realm_DynamicRealmObject_getDynamicRealm__: - - - -getDynamicRealm ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DynamicRealm ` :ref:`getDynamicRealm ` () - | - - - - - * - Returns :ref:`DynamicRealm ` instance where this :ref:`DynamicRealmObject ` belongs. - - You **must not** call **DynamicRealm.close()** against returned instance. - - - - - - - - - - - **Returns** - - :ref:`DynamicRealm ` instance where this object belongs. - - - - - - - **Throws** - - - `IllegalStateException `__ - if this object was deleted or the corresponding :ref:`DynamicRealm ` was already closed. - - - - - - - - - - - - - - -.. _getFieldNames: - -.. _getFieldNames__: - -.. _DynamicRealmObject_getFieldNames: - -.. _DynamicRealmObject_getFieldNames__: - -.. _io_realm_DynamicRealmObject_getFieldNames: - -.. _io_realm_DynamicRealmObject_getFieldNames__: - - - -getFieldNames -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getFieldNames ` () - | - - - - - * - Returns the list of field names on this object. - - - - - - - **Returns** - - list of field names on this objects or the empty list if the object doesn't have any fields. - - - - - - - - - - - -.. _getFieldType: - -.. _getFieldType__: - -.. _DynamicRealmObject_getFieldType: - -.. _DynamicRealmObject_getFieldType__: - -.. _io_realm_DynamicRealmObject_getFieldType: - -.. _io_realm_DynamicRealmObject_getFieldType__: - - - -getFieldType ------------- - -.. _io_realm_DynamicRealmObject_getFieldType_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getFieldType_String_: - -.. _getFieldType_java_lang_String_: - -.. _getFieldType_String_: - -.. _DynamicRealmObject_getFieldType_java_lang_String_: - -.. _DynamicRealmObject_getFieldType_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFieldType ` :ref:`getFieldType ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the type used by the underlying storage engine to represent this field. - - - - - - - **Returns** - - the underlying type used by Realm to represent this field. - - - - - - - - - - - -.. _getFloat: - -.. _getFloat__: - -.. _DynamicRealmObject_getFloat: - -.. _DynamicRealmObject_getFloat__: - -.. _io_realm_DynamicRealmObject_getFloat: - -.. _io_realm_DynamicRealmObject_getFloat__: - - - -getFloat --------- - -.. _io_realm_DynamicRealmObject_getFloat_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getFloat_String_: - -.. _getFloat_java_lang_String_: - -.. _getFloat_String_: - -.. _DynamicRealmObject_getFloat_java_lang_String_: - -.. _DynamicRealmObject_getFloat_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **float** :ref:`getFloat ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``float`` value for a given field. - - If the field is nullable, use :ref:`isNull(String) ` to check for ``null`` instead of using this method. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the float value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain floats. - - - - - :ref:`io.realm.exceptions.RealmException ` - if the return value would be ``null`` . - - - - - - - - - - - - - - -.. _getInt: - -.. _getInt__: - -.. _DynamicRealmObject_getInt: - -.. _DynamicRealmObject_getInt__: - -.. _io_realm_DynamicRealmObject_getInt: - -.. _io_realm_DynamicRealmObject_getInt__: - - - -getInt ------- - -.. _io_realm_DynamicRealmObject_getInt_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getInt_String_: - -.. _getInt_java_lang_String_: - -.. _getInt_String_: - -.. _DynamicRealmObject_getInt_java_lang_String_: - -.. _DynamicRealmObject_getInt_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getInt ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``int`` value for a given field. - - If the field is nullable, use :ref:`isNull(String) ` to check for ``null`` instead of using this method. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the int value. Integer values exceeding ``Integer.MAX_VALUE`` will wrap. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain integers. - - - - - :ref:`io.realm.exceptions.RealmException ` - if the return value would be ``null`` . - - - - - - - - - - - - - - -.. _getList: - -.. _getList__: - -.. _DynamicRealmObject_getList: - -.. _DynamicRealmObject_getList__: - -.. _io_realm_DynamicRealmObject_getList: - -.. _io_realm_DynamicRealmObject_getList__: - - - -getList -------- - -.. _io_realm_DynamicRealmObject_getList_java_lang_String_java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getList_java_lang_String__java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getList_java_lang_String_Class_: - -.. _io_realm_DynamicRealmObject_getList_java_lang_String__Class_: - -.. _io_realm_DynamicRealmObject_getList_String_java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getList_String__java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getList_String_Class_: - -.. _io_realm_DynamicRealmObject_getList_String__Class_: - -.. _getList_java_lang_String_java_lang_Class_: - -.. _getList_java_lang_String__java_lang_Class_: - -.. _getList_java_lang_String_Class_: - -.. _getList_java_lang_String__Class_: - -.. _getList_String_java_lang_Class_: - -.. _getList_String__java_lang_Class_: - -.. _getList_String_Class_: - -.. _getList_String__Class_: - -.. _DynamicRealmObject_getList_java_lang_String_java_lang_Class_: - -.. _DynamicRealmObject_getList_java_lang_String__java_lang_Class_: - -.. _DynamicRealmObject_getList_java_lang_String_Class_: - -.. _DynamicRealmObject_getList_java_lang_String__Class_: - -.. _DynamicRealmObject_getList_String_java_lang_Class_: - -.. _DynamicRealmObject_getList_String__java_lang_Class_: - -.. _DynamicRealmObject_getList_String_Class_: - -.. _DynamicRealmObject_getList_String__Class_: - -.. _io_realm_DynamicRealmObject_getList_String__Class_E__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmList ` :ref:`getList ` <**E** >( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - - - * - Returns the :ref:`RealmList ` containing only primitive values. - - If the list contains references to other Realm objects, use :ref:`getList(String) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - ``primitiveType`` - the type of elements in the list. Only primitive types are supported. - - - - - - - - **Returns** - - the :ref:`RealmList ` data for this field. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain a list of primitive objects. - - - - - - - - - - -.. _io_realm_DynamicRealmObject_getList_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getList_String_: - -.. _getList_java_lang_String_: - -.. _getList_String_: - -.. _DynamicRealmObject_getList_java_lang_String_: - -.. _DynamicRealmObject_getList_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmList ` :ref:`getList ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the :ref:`RealmList ` of :ref:`DynamicRealmObject ` s being linked from the given field. - - If the list contains primitive types, use :ref:`getList(String, Class) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the :ref:`RealmList ` data for this field. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain a list of objects. - - - - - - - - - - - - -.. _getLong: - -.. _getLong__: - -.. _DynamicRealmObject_getLong: - -.. _DynamicRealmObject_getLong__: - -.. _io_realm_DynamicRealmObject_getLong: - -.. _io_realm_DynamicRealmObject_getLong__: - - - -getLong -------- - -.. _io_realm_DynamicRealmObject_getLong_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getLong_String_: - -.. _getLong_java_lang_String_: - -.. _getLong_String_: - -.. _DynamicRealmObject_getLong_java_lang_String_: - -.. _DynamicRealmObject_getLong_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getLong ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``long`` value for a given field. - - If the field is nullable, use :ref:`isNull(String) ` to check for ``null`` instead of using this method. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the long value. Integer values exceeding ``Long.MAX_VALUE`` will wrap. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain integers. - - - - - :ref:`io.realm.exceptions.RealmException ` - if the return value would be ``null`` . - - - - - - - - - - - - - - -.. _getObject: - -.. _getObject__: - -.. _DynamicRealmObject_getObject: - -.. _DynamicRealmObject_getObject__: - -.. _io_realm_DynamicRealmObject_getObject: - -.. _io_realm_DynamicRealmObject_getObject__: - - - -getObject ---------- - -.. _io_realm_DynamicRealmObject_getObject_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getObject_String_: - -.. _getObject_java_lang_String_: - -.. _getObject_String_: - -.. _DynamicRealmObject_getObject_java_lang_String_: - -.. _DynamicRealmObject_getObject_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DynamicRealmObject ` :ref:`getObject ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the object being linked to from this field. - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the :ref:`DynamicRealmObject ` representation of the linked object or ``null`` if no object is linked. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain links to other objects. - - - - - - - - - - - - -.. _getObjectId: - -.. _getObjectId__: - -.. _DynamicRealmObject_getObjectId: - -.. _DynamicRealmObject_getObjectId__: - -.. _io_realm_DynamicRealmObject_getObjectId: - -.. _io_realm_DynamicRealmObject_getObjectId__: - - - -getObjectId ------------ - -.. _io_realm_DynamicRealmObject_getObjectId_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getObjectId_String_: - -.. _getObjectId_java_lang_String_: - -.. _getObjectId_String_: - -.. _DynamicRealmObject_getObjectId_java_lang_String_: - -.. _DynamicRealmObject_getObjectId_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **ObjectId** :ref:`getObjectId ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``ObjectId`` value for a given field. - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the ObjectId value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain ObjectId. - - - - - - - - - - - - -.. _getRealmAny: - -.. _getRealmAny__: - -.. _DynamicRealmObject_getRealmAny: - -.. _DynamicRealmObject_getRealmAny__: - -.. _io_realm_DynamicRealmObject_getRealmAny: - -.. _io_realm_DynamicRealmObject_getRealmAny__: - - - -getRealmAny ------------ - -.. _io_realm_DynamicRealmObject_getRealmAny_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getRealmAny_String_: - -.. _getRealmAny_java_lang_String_: - -.. _getRealmAny_String_: - -.. _DynamicRealmObject_getRealmAny_java_lang_String_: - -.. _DynamicRealmObject_getRealmAny_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAny ` :ref:`getRealmAny ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``RealmAny`` value for a given field. - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the RealmAny value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain RealmAny. - - - - - - - - - - - - -.. _getRealmSet: - -.. _getRealmSet__: - -.. _DynamicRealmObject_getRealmSet: - -.. _DynamicRealmObject_getRealmSet__: - -.. _io_realm_DynamicRealmObject_getRealmSet: - -.. _io_realm_DynamicRealmObject_getRealmSet__: - - - -getRealmSet ------------ - -.. _io_realm_DynamicRealmObject_getRealmSet_java_lang_String_java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getRealmSet_java_lang_String__java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getRealmSet_java_lang_String_Class_: - -.. _io_realm_DynamicRealmObject_getRealmSet_java_lang_String__Class_: - -.. _io_realm_DynamicRealmObject_getRealmSet_String_java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getRealmSet_String__java_lang_Class_: - -.. _io_realm_DynamicRealmObject_getRealmSet_String_Class_: - -.. _io_realm_DynamicRealmObject_getRealmSet_String__Class_: - -.. _getRealmSet_java_lang_String_java_lang_Class_: - -.. _getRealmSet_java_lang_String__java_lang_Class_: - -.. _getRealmSet_java_lang_String_Class_: - -.. _getRealmSet_java_lang_String__Class_: - -.. _getRealmSet_String_java_lang_Class_: - -.. _getRealmSet_String__java_lang_Class_: - -.. _getRealmSet_String_Class_: - -.. _getRealmSet_String__Class_: - -.. _DynamicRealmObject_getRealmSet_java_lang_String_java_lang_Class_: - -.. _DynamicRealmObject_getRealmSet_java_lang_String__java_lang_Class_: - -.. _DynamicRealmObject_getRealmSet_java_lang_String_Class_: - -.. _DynamicRealmObject_getRealmSet_java_lang_String__Class_: - -.. _DynamicRealmObject_getRealmSet_String_java_lang_Class_: - -.. _DynamicRealmObject_getRealmSet_String__java_lang_Class_: - -.. _DynamicRealmObject_getRealmSet_String_Class_: - -.. _DynamicRealmObject_getRealmSet_String__Class_: - -.. _io_realm_DynamicRealmObject_getRealmSet_String__Class_E__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSet ` :ref:`getRealmSet ` <**E** >( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - - - * - Returns the :ref:`RealmSet ` containing only primitive values. - - If the set contains references to other Realm objects, use :ref:`getRealmSet(String) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - ``primitiveType`` - the type of elements in the set. Only primitive types are supported. - - - - - - - - **Returns** - - the :ref:`RealmSet ` data for this field. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain a set of primitive objects. - - - - - - - - - - -.. _io_realm_DynamicRealmObject_getRealmSet_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getRealmSet_String_: - -.. _getRealmSet_java_lang_String_: - -.. _getRealmSet_String_: - -.. _DynamicRealmObject_getRealmSet_java_lang_String_: - -.. _DynamicRealmObject_getRealmSet_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSet ` :ref:`getRealmSet ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the :ref:`RealmSet ` of :ref:`DynamicRealmObject ` s being linked from the given field. - - If the set contains primitive types, use :ref:`getRealmSet(String, Class) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the :ref:`RealmSet ` data for this field. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain a set of objects. - - - - - - - - - - - - -.. _getShort: - -.. _getShort__: - -.. _DynamicRealmObject_getShort: - -.. _DynamicRealmObject_getShort__: - -.. _io_realm_DynamicRealmObject_getShort: - -.. _io_realm_DynamicRealmObject_getShort__: - - - -getShort --------- - -.. _io_realm_DynamicRealmObject_getShort_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getShort_String_: - -.. _getShort_java_lang_String_: - -.. _getShort_String_: - -.. _DynamicRealmObject_getShort_java_lang_String_: - -.. _DynamicRealmObject_getShort_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **short** :ref:`getShort ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``short`` value for a given field. - - If the field is nullable, use :ref:`isNull(String) ` to check for ``null`` instead of using this method. - - - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the short value. Integer values exceeding ``Short.MAX_VALUE`` will wrap. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain integers. - - - - - :ref:`io.realm.exceptions.RealmException ` - if the return value would be ``null`` . - - - - - - - - - - - - - - -.. _getString: - -.. _getString__: - -.. _DynamicRealmObject_getString: - -.. _DynamicRealmObject_getString__: - -.. _io_realm_DynamicRealmObject_getString: - -.. _io_realm_DynamicRealmObject_getString__: - - - -getString ---------- - -.. _io_realm_DynamicRealmObject_getString_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getString_String_: - -.. _getString_java_lang_String_: - -.. _getString_String_: - -.. _DynamicRealmObject_getString_java_lang_String_: - -.. _DynamicRealmObject_getString_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getString ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``String`` value for a given field. - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the String value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain Strings. - - - - - - - - - - - - -.. _getType: - -.. _getType__: - -.. _DynamicRealmObject_getType: - -.. _DynamicRealmObject_getType__: - -.. _io_realm_DynamicRealmObject_getType: - -.. _io_realm_DynamicRealmObject_getType__: - - - -getType -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getType ` () - | - - - - - * - Returns the type of object. This will normally correspond to the name of a class that is extending :ref:`RealmObject ` . - - - - - - - - - **Returns** - - this objects type. - - - - - - - - - - - -.. _getUUID: - -.. _getUUID__: - -.. _DynamicRealmObject_getUUID: - -.. _DynamicRealmObject_getUUID__: - -.. _io_realm_DynamicRealmObject_getUUID: - -.. _io_realm_DynamicRealmObject_getUUID__: - - - -getUUID -------- - -.. _io_realm_DynamicRealmObject_getUUID_java_lang_String_: - -.. _io_realm_DynamicRealmObject_getUUID_String_: - -.. _getUUID_java_lang_String_: - -.. _getUUID_String_: - -.. _DynamicRealmObject_getUUID_java_lang_String_: - -.. _DynamicRealmObject_getUUID_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `UUID `__ :ref:`getUUID ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the ``UUID`` value for a given field. - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - the UUID value. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or it doesn't contain UUID. - - - - - - - - - - - - -.. _hasField: - -.. _hasField__: - -.. _DynamicRealmObject_hasField: - -.. _DynamicRealmObject_hasField__: - -.. _io_realm_DynamicRealmObject_hasField: - -.. _io_realm_DynamicRealmObject_hasField__: - - - -hasField --------- - -.. _io_realm_DynamicRealmObject_hasField_java_lang_String_: - -.. _io_realm_DynamicRealmObject_hasField_String_: - -.. _hasField_java_lang_String_: - -.. _hasField_String_: - -.. _DynamicRealmObject_hasField_java_lang_String_: - -.. _DynamicRealmObject_hasField_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`hasField ` ( - | `String `__ fieldName - | ) - - - - - * - Checks whether an object has the given field or not. - - - - - **Parameters** - - - ``fieldName`` - field name to check. - - - - - - - - **Returns** - - ``true`` if the object has a field with the given name, ``false`` otherwise. - - - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _DynamicRealmObject_hashCode: - -.. _DynamicRealmObject_hashCode__: - -.. _io_realm_DynamicRealmObject_hashCode: - -.. _io_realm_DynamicRealmObject_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - Returns a hash code value for the :ref:`DynamicRealmObject ` object. - - By the general contract of `Object.hashCode() `__ , any two objects for which :ref:`equals ` returns ``true`` must return the same hash code value. - - - - Note that a :ref:`RealmObject ` is a live object, and it might be updated by changes from other threads. This means that a hash code value of the object is not stable, and the value should be neither used as a key in HashMap nor saved in HashSet. - - - - - - - - - - - **Returns** - - a hash code value for the object. - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - .. seealso:: - - - - - :ref:`equals ` - - - - - - - - - - - - -.. _isNull: - -.. _isNull__: - -.. _DynamicRealmObject_isNull: - -.. _DynamicRealmObject_isNull__: - -.. _io_realm_DynamicRealmObject_isNull: - -.. _io_realm_DynamicRealmObject_isNull__: - - - -isNull ------- - -.. _io_realm_DynamicRealmObject_isNull_java_lang_String_: - -.. _io_realm_DynamicRealmObject_isNull_String_: - -.. _isNull_java_lang_String_: - -.. _isNull_String_: - -.. _DynamicRealmObject_isNull_java_lang_String_: - -.. _DynamicRealmObject_isNull_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isNull ` ( - | `String `__ fieldName - | ) - - - - - * - Checks if the value of a given field is ``null`` . - - - - - - - **Parameters** - - - ``fieldName`` - the name of the field. - - - - - - - - **Returns** - - ``true`` if field value is null, ``false`` otherwise. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist. - - - - - - - - - - - - -.. _linkingObjects: - -.. _linkingObjects__: - -.. _DynamicRealmObject_linkingObjects: - -.. _DynamicRealmObject_linkingObjects__: - -.. _io_realm_DynamicRealmObject_linkingObjects: - -.. _io_realm_DynamicRealmObject_linkingObjects__: - - - -linkingObjects --------------- - -.. _io_realm_DynamicRealmObject_linkingObjects_java_lang_String_java_lang_String_: - -.. _io_realm_DynamicRealmObject_linkingObjects_java_lang_String__java_lang_String_: - -.. _io_realm_DynamicRealmObject_linkingObjects_java_lang_String_String_: - -.. _io_realm_DynamicRealmObject_linkingObjects_java_lang_String__String_: - -.. _io_realm_DynamicRealmObject_linkingObjects_String_java_lang_String_: - -.. _io_realm_DynamicRealmObject_linkingObjects_String__java_lang_String_: - -.. _io_realm_DynamicRealmObject_linkingObjects_String_String_: - -.. _io_realm_DynamicRealmObject_linkingObjects_String__String_: - -.. _linkingObjects_java_lang_String_java_lang_String_: - -.. _linkingObjects_java_lang_String__java_lang_String_: - -.. _linkingObjects_java_lang_String_String_: - -.. _linkingObjects_java_lang_String__String_: - -.. _linkingObjects_String_java_lang_String_: - -.. _linkingObjects_String__java_lang_String_: - -.. _linkingObjects_String_String_: - -.. _linkingObjects_String__String_: - -.. _DynamicRealmObject_linkingObjects_java_lang_String_java_lang_String_: - -.. _DynamicRealmObject_linkingObjects_java_lang_String__java_lang_String_: - -.. _DynamicRealmObject_linkingObjects_java_lang_String_String_: - -.. _DynamicRealmObject_linkingObjects_java_lang_String__String_: - -.. _DynamicRealmObject_linkingObjects_String_java_lang_String_: - -.. _DynamicRealmObject_linkingObjects_String__java_lang_String_: - -.. _DynamicRealmObject_linkingObjects_String_String_: - -.. _DynamicRealmObject_linkingObjects_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`linkingObjects ` ( - | `String `__ srcClassName, - | `String `__ srcFieldName - | ) - - - - - * - Returns :ref:`RealmResults ` containing all ``srcClassName`` class objects that have a relationship to this object from ``srcFieldName`` field. - - An entry is added for each reference, e.g. if the same reference is in a list multiple times, the src object will show up here multiple times. - - - - - - - **Parameters** - - - ``srcClassName`` - name of the class returned objects belong to. - - - - - ``srcFieldName`` - name of the field in the source class that holds a reference to this object. Field type must be either ``io.realm.RealmFieldType.OBJECT`` or ``io.realm.RealmFieldType.LIST`` . - - - - - - - - - - **Returns** - - the result. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``srcClassName`` is ``null`` or does not exist, the ``srcFieldName`` is ``null`` or does not exist, type of the source field is not supported. - - - - - - - - - - - - - - -.. _realm_injectObjectContext: - -.. _realm_injectObjectContext__: - -.. _DynamicRealmObject_realm_injectObjectContext: - -.. _DynamicRealmObject_realm_injectObjectContext__: - -.. _io_realm_DynamicRealmObject_realm_injectObjectContext: - -.. _io_realm_DynamicRealmObject_realm_injectObjectContext__: - - - -realm$injectObjectContext -------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`realm$injectObjectContext ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _realmGet_proxyState: - -.. _realmGet_proxyState__: - -.. _DynamicRealmObject_realmGet_proxyState: - -.. _DynamicRealmObject_realmGet_proxyState__: - -.. _io_realm_DynamicRealmObject_realmGet_proxyState: - -.. _io_realm_DynamicRealmObject_realmGet_proxyState__: - - - -realmGet$proxyState -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ProxyState ` :ref:`realmGet$proxyState ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _set: - -.. _set__: - -.. _DynamicRealmObject_set: - -.. _DynamicRealmObject_set__: - -.. _io_realm_DynamicRealmObject_set: - -.. _io_realm_DynamicRealmObject_set__: - - - -set ----- - -.. _io_realm_DynamicRealmObject_set_java_lang_String_java_lang_Object_: - -.. _io_realm_DynamicRealmObject_set_java_lang_String__java_lang_Object_: - -.. _io_realm_DynamicRealmObject_set_java_lang_String_Object_: - -.. _io_realm_DynamicRealmObject_set_java_lang_String__Object_: - -.. _io_realm_DynamicRealmObject_set_String_java_lang_Object_: - -.. _io_realm_DynamicRealmObject_set_String__java_lang_Object_: - -.. _io_realm_DynamicRealmObject_set_String_Object_: - -.. _io_realm_DynamicRealmObject_set_String__Object_: - -.. _set_java_lang_String_java_lang_Object_: - -.. _set_java_lang_String__java_lang_Object_: - -.. _set_java_lang_String_Object_: - -.. _set_java_lang_String__Object_: - -.. _set_String_java_lang_Object_: - -.. _set_String__java_lang_Object_: - -.. _set_String_Object_: - -.. _set_String__Object_: - -.. _DynamicRealmObject_set_java_lang_String_java_lang_Object_: - -.. _DynamicRealmObject_set_java_lang_String__java_lang_Object_: - -.. _DynamicRealmObject_set_java_lang_String_Object_: - -.. _DynamicRealmObject_set_java_lang_String__Object_: - -.. _DynamicRealmObject_set_String_java_lang_Object_: - -.. _DynamicRealmObject_set_String__java_lang_Object_: - -.. _DynamicRealmObject_set_String_Object_: - -.. _DynamicRealmObject_set_String__Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`set ` ( - | `String `__ fieldName, - | `Object `__ value - | ) - - - - - * - Sets the value for the given field. This method will automatically try to convert numbers and booleans that are given as ``String`` to their appropriate type. For example ``"10"`` will be converted to ``10`` if the field type is ``int`` . - - Using the typed setters will be faster than using this method. - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or if the input value cannot be converted to the appropriate input type. - - - - - `NumberFormatException `__ - if a String based number cannot be converted properly. - - - - - :ref:`RealmException ` - if the field is a :ref:`io.realm.annotations.PrimaryKey ` field. - - - - - - - - - - - - - - -.. _setBlob: - -.. _setBlob__: - -.. _DynamicRealmObject_setBlob: - -.. _DynamicRealmObject_setBlob__: - -.. _io_realm_DynamicRealmObject_setBlob: - -.. _io_realm_DynamicRealmObject_setBlob__: - - - -setBlob -------- - -.. _io_realm_DynamicRealmObject_setBlob_java_lang_String_byte_: - -.. _io_realm_DynamicRealmObject_setBlob_java_lang_String__byte_: - -.. _io_realm_DynamicRealmObject_setBlob_java_lang_String_byte____: - -.. _io_realm_DynamicRealmObject_setBlob_java_lang_String__byte____: - -.. _io_realm_DynamicRealmObject_setBlob_String_byte_: - -.. _io_realm_DynamicRealmObject_setBlob_String__byte_: - -.. _io_realm_DynamicRealmObject_setBlob_String_byte____: - -.. _io_realm_DynamicRealmObject_setBlob_String__byte____: - -.. _setBlob_java_lang_String_byte_: - -.. _setBlob_java_lang_String__byte_: - -.. _setBlob_java_lang_String_byte____: - -.. _setBlob_java_lang_String__byte____: - -.. _setBlob_String_byte_: - -.. _setBlob_String__byte_: - -.. _setBlob_String_byte____: - -.. _setBlob_String__byte____: - -.. _DynamicRealmObject_setBlob_java_lang_String_byte_: - -.. _DynamicRealmObject_setBlob_java_lang_String__byte_: - -.. _DynamicRealmObject_setBlob_java_lang_String_byte____: - -.. _DynamicRealmObject_setBlob_java_lang_String__byte____: - -.. _DynamicRealmObject_setBlob_String_byte_: - -.. _DynamicRealmObject_setBlob_String__byte_: - -.. _DynamicRealmObject_setBlob_String_byte____: - -.. _DynamicRealmObject_setBlob_String__byte____: - -.. _io_realm_DynamicRealmObject_setBlob_String__byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setBlob ` ( - | `String `__ fieldName, - | **byte[]** value - | ) - - - - - * - Sets the binary value of the given field. - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a binary field. - - - - - - - - - - - - -.. _setBoolean: - -.. _setBoolean__: - -.. _DynamicRealmObject_setBoolean: - -.. _DynamicRealmObject_setBoolean__: - -.. _io_realm_DynamicRealmObject_setBoolean: - -.. _io_realm_DynamicRealmObject_setBoolean__: - - - -setBoolean ----------- - -.. _io_realm_DynamicRealmObject_setBoolean_java_lang_String_boolean_: - -.. _io_realm_DynamicRealmObject_setBoolean_java_lang_String__boolean_: - -.. _io_realm_DynamicRealmObject_setBoolean_String_boolean_: - -.. _io_realm_DynamicRealmObject_setBoolean_String__boolean_: - -.. _setBoolean_java_lang_String_boolean_: - -.. _setBoolean_java_lang_String__boolean_: - -.. _setBoolean_String_boolean_: - -.. _setBoolean_String__boolean_: - -.. _DynamicRealmObject_setBoolean_java_lang_String_boolean_: - -.. _DynamicRealmObject_setBoolean_java_lang_String__boolean_: - -.. _DynamicRealmObject_setBoolean_String_boolean_: - -.. _DynamicRealmObject_setBoolean_String__boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setBoolean ` ( - | `String `__ fieldName, - | **boolean** value - | ) - - - - - * - Sets the ``boolean`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name to update. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a boolean field. - - - - - - - - - - - - -.. _setByte: - -.. _setByte__: - -.. _DynamicRealmObject_setByte: - -.. _DynamicRealmObject_setByte__: - -.. _io_realm_DynamicRealmObject_setByte: - -.. _io_realm_DynamicRealmObject_setByte__: - - - -setByte -------- - -.. _io_realm_DynamicRealmObject_setByte_java_lang_String_byte_: - -.. _io_realm_DynamicRealmObject_setByte_java_lang_String__byte_: - -.. _io_realm_DynamicRealmObject_setByte_String_byte_: - -.. _io_realm_DynamicRealmObject_setByte_String__byte_: - -.. _setByte_java_lang_String_byte_: - -.. _setByte_java_lang_String__byte_: - -.. _setByte_String_byte_: - -.. _setByte_String__byte_: - -.. _DynamicRealmObject_setByte_java_lang_String_byte_: - -.. _DynamicRealmObject_setByte_java_lang_String__byte_: - -.. _DynamicRealmObject_setByte_String_byte_: - -.. _DynamicRealmObject_setByte_String__byte_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setByte ` ( - | `String `__ fieldName, - | **byte** value - | ) - - - - - * - Sets the ``byte`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't an integer field. - - - - - :ref:`RealmException ` - if the field is a :ref:`io.realm.annotations.PrimaryKey ` field. - - - - - - - - - - - - - - -.. _setDate: - -.. _setDate__: - -.. _DynamicRealmObject_setDate: - -.. _DynamicRealmObject_setDate__: - -.. _io_realm_DynamicRealmObject_setDate: - -.. _io_realm_DynamicRealmObject_setDate__: - - - -setDate -------- - -.. _io_realm_DynamicRealmObject_setDate_java_lang_String_java_util_Date_: - -.. _io_realm_DynamicRealmObject_setDate_java_lang_String__java_util_Date_: - -.. _io_realm_DynamicRealmObject_setDate_java_lang_String_Date_: - -.. _io_realm_DynamicRealmObject_setDate_java_lang_String__Date_: - -.. _io_realm_DynamicRealmObject_setDate_String_java_util_Date_: - -.. _io_realm_DynamicRealmObject_setDate_String__java_util_Date_: - -.. _io_realm_DynamicRealmObject_setDate_String_Date_: - -.. _io_realm_DynamicRealmObject_setDate_String__Date_: - -.. _setDate_java_lang_String_java_util_Date_: - -.. _setDate_java_lang_String__java_util_Date_: - -.. _setDate_java_lang_String_Date_: - -.. _setDate_java_lang_String__Date_: - -.. _setDate_String_java_util_Date_: - -.. _setDate_String__java_util_Date_: - -.. _setDate_String_Date_: - -.. _setDate_String__Date_: - -.. _DynamicRealmObject_setDate_java_lang_String_java_util_Date_: - -.. _DynamicRealmObject_setDate_java_lang_String__java_util_Date_: - -.. _DynamicRealmObject_setDate_java_lang_String_Date_: - -.. _DynamicRealmObject_setDate_java_lang_String__Date_: - -.. _DynamicRealmObject_setDate_String_java_util_Date_: - -.. _DynamicRealmObject_setDate_String__java_util_Date_: - -.. _DynamicRealmObject_setDate_String_Date_: - -.. _DynamicRealmObject_setDate_String__Date_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDate ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - - - * - Sets the ``Date`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a Date field. - - - - - - - - - - - - -.. _setDecimal128: - -.. _setDecimal128__: - -.. _DynamicRealmObject_setDecimal128: - -.. _DynamicRealmObject_setDecimal128__: - -.. _io_realm_DynamicRealmObject_setDecimal128: - -.. _io_realm_DynamicRealmObject_setDecimal128__: - - - -setDecimal128 -------------- - -.. _io_realm_DynamicRealmObject_setDecimal128_java_lang_String_Decimal128_: - -.. _io_realm_DynamicRealmObject_setDecimal128_java_lang_String__Decimal128_: - -.. _io_realm_DynamicRealmObject_setDecimal128_String_Decimal128_: - -.. _io_realm_DynamicRealmObject_setDecimal128_String__Decimal128_: - -.. _setDecimal128_java_lang_String_Decimal128_: - -.. _setDecimal128_java_lang_String__Decimal128_: - -.. _setDecimal128_String_Decimal128_: - -.. _setDecimal128_String__Decimal128_: - -.. _DynamicRealmObject_setDecimal128_java_lang_String_Decimal128_: - -.. _DynamicRealmObject_setDecimal128_java_lang_String__Decimal128_: - -.. _DynamicRealmObject_setDecimal128_String_Decimal128_: - -.. _DynamicRealmObject_setDecimal128_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDecimal128 ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Sets the ``Decimal128`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a Decimal128 field. - - - - - - - - - - - - -.. _setDictionary: - -.. _setDictionary__: - -.. _DynamicRealmObject_setDictionary: - -.. _DynamicRealmObject_setDictionary__: - -.. _io_realm_DynamicRealmObject_setDictionary: - -.. _io_realm_DynamicRealmObject_setDictionary__: - - - -setDictionary -------------- - -.. _io_realm_DynamicRealmObject_setDictionary_java_lang_String_io_realm_RealmDictionary_: - -.. _io_realm_DynamicRealmObject_setDictionary_java_lang_String__io_realm_RealmDictionary_: - -.. _io_realm_DynamicRealmObject_setDictionary_java_lang_String_RealmDictionary_: - -.. _io_realm_DynamicRealmObject_setDictionary_java_lang_String__RealmDictionary_: - -.. _io_realm_DynamicRealmObject_setDictionary_String_io_realm_RealmDictionary_: - -.. _io_realm_DynamicRealmObject_setDictionary_String__io_realm_RealmDictionary_: - -.. _io_realm_DynamicRealmObject_setDictionary_String_RealmDictionary_: - -.. _io_realm_DynamicRealmObject_setDictionary_String__RealmDictionary_: - -.. _setDictionary_java_lang_String_io_realm_RealmDictionary_: - -.. _setDictionary_java_lang_String__io_realm_RealmDictionary_: - -.. _setDictionary_java_lang_String_RealmDictionary_: - -.. _setDictionary_java_lang_String__RealmDictionary_: - -.. _setDictionary_String_io_realm_RealmDictionary_: - -.. _setDictionary_String__io_realm_RealmDictionary_: - -.. _setDictionary_String_RealmDictionary_: - -.. _setDictionary_String__RealmDictionary_: - -.. _DynamicRealmObject_setDictionary_java_lang_String_io_realm_RealmDictionary_: - -.. _DynamicRealmObject_setDictionary_java_lang_String__io_realm_RealmDictionary_: - -.. _DynamicRealmObject_setDictionary_java_lang_String_RealmDictionary_: - -.. _DynamicRealmObject_setDictionary_java_lang_String__RealmDictionary_: - -.. _DynamicRealmObject_setDictionary_String_io_realm_RealmDictionary_: - -.. _DynamicRealmObject_setDictionary_String__io_realm_RealmDictionary_: - -.. _DynamicRealmObject_setDictionary_String_RealmDictionary_: - -.. _DynamicRealmObject_setDictionary_String__RealmDictionary_: - -.. _io_realm_DynamicRealmObject_setDictionary_String__RealmDictionary_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDictionary ` <**E** >( - | `String `__ fieldName, - | :ref:`io.realm.RealmDictionary\ ` dictionary - | ) - - - - - * - Sets the reference to a :ref:`RealmDictionary ` on the given field. - - This will copy all the elements in the dictionary into Realm, but any further changes to the dictionary will not be reflected in the Realm. Use :ref:`getDictionary(String) ` in order to get a reference to the managed dictionary. - - - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``dictionary`` - dictionary of objects. Must either be primitive types or :ref:`DynamicRealmObject ` s. - - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, it is not a dictionary field, the objects in the dictionary doesn't match the expected type or any Realm object in the dictionary belongs to a different Realm. - - - - - - - - - - - - -.. _setDouble: - -.. _setDouble__: - -.. _DynamicRealmObject_setDouble: - -.. _DynamicRealmObject_setDouble__: - -.. _io_realm_DynamicRealmObject_setDouble: - -.. _io_realm_DynamicRealmObject_setDouble__: - - - -setDouble ---------- - -.. _io_realm_DynamicRealmObject_setDouble_java_lang_String_double_: - -.. _io_realm_DynamicRealmObject_setDouble_java_lang_String__double_: - -.. _io_realm_DynamicRealmObject_setDouble_String_double_: - -.. _io_realm_DynamicRealmObject_setDouble_String__double_: - -.. _setDouble_java_lang_String_double_: - -.. _setDouble_java_lang_String__double_: - -.. _setDouble_String_double_: - -.. _setDouble_String__double_: - -.. _DynamicRealmObject_setDouble_java_lang_String_double_: - -.. _DynamicRealmObject_setDouble_java_lang_String__double_: - -.. _DynamicRealmObject_setDouble_String_double_: - -.. _DynamicRealmObject_setDouble_String__double_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDouble ` ( - | `String `__ fieldName, - | **double** value - | ) - - - - - * - Sets the ``double`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a double field. - - - - - - - - - - - - -.. _setFloat: - -.. _setFloat__: - -.. _DynamicRealmObject_setFloat: - -.. _DynamicRealmObject_setFloat__: - -.. _io_realm_DynamicRealmObject_setFloat: - -.. _io_realm_DynamicRealmObject_setFloat__: - - - -setFloat --------- - -.. _io_realm_DynamicRealmObject_setFloat_java_lang_String_float_: - -.. _io_realm_DynamicRealmObject_setFloat_java_lang_String__float_: - -.. _io_realm_DynamicRealmObject_setFloat_String_float_: - -.. _io_realm_DynamicRealmObject_setFloat_String__float_: - -.. _setFloat_java_lang_String_float_: - -.. _setFloat_java_lang_String__float_: - -.. _setFloat_String_float_: - -.. _setFloat_String__float_: - -.. _DynamicRealmObject_setFloat_java_lang_String_float_: - -.. _DynamicRealmObject_setFloat_java_lang_String__float_: - -.. _DynamicRealmObject_setFloat_String_float_: - -.. _DynamicRealmObject_setFloat_String__float_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setFloat ` ( - | `String `__ fieldName, - | **float** value - | ) - - - - - * - Sets the ``float`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a float field. - - - - - - - - - - - - -.. _setInt: - -.. _setInt__: - -.. _DynamicRealmObject_setInt: - -.. _DynamicRealmObject_setInt__: - -.. _io_realm_DynamicRealmObject_setInt: - -.. _io_realm_DynamicRealmObject_setInt__: - - - -setInt ------- - -.. _io_realm_DynamicRealmObject_setInt_java_lang_String_int_: - -.. _io_realm_DynamicRealmObject_setInt_java_lang_String__int_: - -.. _io_realm_DynamicRealmObject_setInt_String_int_: - -.. _io_realm_DynamicRealmObject_setInt_String__int_: - -.. _setInt_java_lang_String_int_: - -.. _setInt_java_lang_String__int_: - -.. _setInt_String_int_: - -.. _setInt_String__int_: - -.. _DynamicRealmObject_setInt_java_lang_String_int_: - -.. _DynamicRealmObject_setInt_java_lang_String__int_: - -.. _DynamicRealmObject_setInt_String_int_: - -.. _DynamicRealmObject_setInt_String__int_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setInt ` ( - | `String `__ fieldName, - | **int** value - | ) - - - - - * - Sets the ``int`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name to update. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't an integer field. - - - - - :ref:`RealmException ` - if the field is a :ref:`io.realm.annotations.PrimaryKey ` field. - - - - - - - - - - - - - - -.. _setList: - -.. _setList__: - -.. _DynamicRealmObject_setList: - -.. _DynamicRealmObject_setList__: - -.. _io_realm_DynamicRealmObject_setList: - -.. _io_realm_DynamicRealmObject_setList__: - - - -setList -------- - -.. _io_realm_DynamicRealmObject_setList_java_lang_String_io_realm_RealmList_: - -.. _io_realm_DynamicRealmObject_setList_java_lang_String__io_realm_RealmList_: - -.. _io_realm_DynamicRealmObject_setList_java_lang_String_RealmList_: - -.. _io_realm_DynamicRealmObject_setList_java_lang_String__RealmList_: - -.. _io_realm_DynamicRealmObject_setList_String_io_realm_RealmList_: - -.. _io_realm_DynamicRealmObject_setList_String__io_realm_RealmList_: - -.. _io_realm_DynamicRealmObject_setList_String_RealmList_: - -.. _io_realm_DynamicRealmObject_setList_String__RealmList_: - -.. _setList_java_lang_String_io_realm_RealmList_: - -.. _setList_java_lang_String__io_realm_RealmList_: - -.. _setList_java_lang_String_RealmList_: - -.. _setList_java_lang_String__RealmList_: - -.. _setList_String_io_realm_RealmList_: - -.. _setList_String__io_realm_RealmList_: - -.. _setList_String_RealmList_: - -.. _setList_String__RealmList_: - -.. _DynamicRealmObject_setList_java_lang_String_io_realm_RealmList_: - -.. _DynamicRealmObject_setList_java_lang_String__io_realm_RealmList_: - -.. _DynamicRealmObject_setList_java_lang_String_RealmList_: - -.. _DynamicRealmObject_setList_java_lang_String__RealmList_: - -.. _DynamicRealmObject_setList_String_io_realm_RealmList_: - -.. _DynamicRealmObject_setList_String__io_realm_RealmList_: - -.. _DynamicRealmObject_setList_String_RealmList_: - -.. _DynamicRealmObject_setList_String__RealmList_: - -.. _io_realm_DynamicRealmObject_setList_String__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setList ` <**E** >( - | `String `__ fieldName, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Sets the reference to a :ref:`RealmList ` on the given field. - - This will copy all the elements in the list into Realm, but any further changes to the list will not be reflected in the Realm. Use :ref:`getList(String) ` in order to get a reference to the managed list. - - - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``list`` - list of objects. Must either be primitive types or :ref:`DynamicRealmObject ` s. - - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, it is not a list field, the objects in the list doesn't match the expected type or any Realm object in the list belongs to a different Realm. - - - - - - - - - - - - -.. _setLong: - -.. _setLong__: - -.. _DynamicRealmObject_setLong: - -.. _DynamicRealmObject_setLong__: - -.. _io_realm_DynamicRealmObject_setLong: - -.. _io_realm_DynamicRealmObject_setLong__: - - - -setLong -------- - -.. _io_realm_DynamicRealmObject_setLong_java_lang_String_long_: - -.. _io_realm_DynamicRealmObject_setLong_java_lang_String__long_: - -.. _io_realm_DynamicRealmObject_setLong_String_long_: - -.. _io_realm_DynamicRealmObject_setLong_String__long_: - -.. _setLong_java_lang_String_long_: - -.. _setLong_java_lang_String__long_: - -.. _setLong_String_long_: - -.. _setLong_String__long_: - -.. _DynamicRealmObject_setLong_java_lang_String_long_: - -.. _DynamicRealmObject_setLong_java_lang_String__long_: - -.. _DynamicRealmObject_setLong_String_long_: - -.. _DynamicRealmObject_setLong_String__long_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setLong ` ( - | `String `__ fieldName, - | **long** value - | ) - - - - - * - Sets the ``long`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't an integer field. - - - - - :ref:`RealmException ` - if the field is a :ref:`io.realm.annotations.PrimaryKey ` field. - - - - - - - - - - - - - - -.. _setNull: - -.. _setNull__: - -.. _DynamicRealmObject_setNull: - -.. _DynamicRealmObject_setNull__: - -.. _io_realm_DynamicRealmObject_setNull: - -.. _io_realm_DynamicRealmObject_setNull__: - - - -setNull -------- - -.. _io_realm_DynamicRealmObject_setNull_java_lang_String_: - -.. _io_realm_DynamicRealmObject_setNull_String_: - -.. _setNull_java_lang_String_: - -.. _setNull_String_: - -.. _DynamicRealmObject_setNull_java_lang_String_: - -.. _DynamicRealmObject_setNull_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setNull ` ( - | `String `__ fieldName - | ) - - - - - * - Sets the value to ``null`` for the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, or the field isn't nullable. - - - - - :ref:`RealmException ` - if the field is a :ref:`io.realm.annotations.PrimaryKey ` field. - - - - - - - - - - - - - - -.. _setObject: - -.. _setObject__: - -.. _DynamicRealmObject_setObject: - -.. _DynamicRealmObject_setObject__: - -.. _io_realm_DynamicRealmObject_setObject: - -.. _io_realm_DynamicRealmObject_setObject__: - - - -setObject ---------- - -.. _io_realm_DynamicRealmObject_setObject_java_lang_String_io_realm_DynamicRealmObject_: - -.. _io_realm_DynamicRealmObject_setObject_java_lang_String__io_realm_DynamicRealmObject_: - -.. _io_realm_DynamicRealmObject_setObject_java_lang_String_DynamicRealmObject_: - -.. _io_realm_DynamicRealmObject_setObject_java_lang_String__DynamicRealmObject_: - -.. _io_realm_DynamicRealmObject_setObject_String_io_realm_DynamicRealmObject_: - -.. _io_realm_DynamicRealmObject_setObject_String__io_realm_DynamicRealmObject_: - -.. _io_realm_DynamicRealmObject_setObject_String_DynamicRealmObject_: - -.. _io_realm_DynamicRealmObject_setObject_String__DynamicRealmObject_: - -.. _setObject_java_lang_String_io_realm_DynamicRealmObject_: - -.. _setObject_java_lang_String__io_realm_DynamicRealmObject_: - -.. _setObject_java_lang_String_DynamicRealmObject_: - -.. _setObject_java_lang_String__DynamicRealmObject_: - -.. _setObject_String_io_realm_DynamicRealmObject_: - -.. _setObject_String__io_realm_DynamicRealmObject_: - -.. _setObject_String_DynamicRealmObject_: - -.. _setObject_String__DynamicRealmObject_: - -.. _DynamicRealmObject_setObject_java_lang_String_io_realm_DynamicRealmObject_: - -.. _DynamicRealmObject_setObject_java_lang_String__io_realm_DynamicRealmObject_: - -.. _DynamicRealmObject_setObject_java_lang_String_DynamicRealmObject_: - -.. _DynamicRealmObject_setObject_java_lang_String__DynamicRealmObject_: - -.. _DynamicRealmObject_setObject_String_io_realm_DynamicRealmObject_: - -.. _DynamicRealmObject_setObject_String__io_realm_DynamicRealmObject_: - -.. _DynamicRealmObject_setObject_String_DynamicRealmObject_: - -.. _DynamicRealmObject_setObject_String__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setObject ` ( - | `String `__ fieldName, - | :ref:`DynamicRealmObject ` value - | ) - - - - - * - Sets a reference to another object on the given field. - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - object to link to. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, it doesn't link to other Realm objects, the type of DynamicRealmObject doesn't match or it belongs to a different Realm. - - - - - - - - - - - - -.. _setObjectId: - -.. _setObjectId__: - -.. _DynamicRealmObject_setObjectId: - -.. _DynamicRealmObject_setObjectId__: - -.. _io_realm_DynamicRealmObject_setObjectId: - -.. _io_realm_DynamicRealmObject_setObjectId__: - - - -setObjectId ------------ - -.. _io_realm_DynamicRealmObject_setObjectId_java_lang_String_ObjectId_: - -.. _io_realm_DynamicRealmObject_setObjectId_java_lang_String__ObjectId_: - -.. _io_realm_DynamicRealmObject_setObjectId_String_ObjectId_: - -.. _io_realm_DynamicRealmObject_setObjectId_String__ObjectId_: - -.. _setObjectId_java_lang_String_ObjectId_: - -.. _setObjectId_java_lang_String__ObjectId_: - -.. _setObjectId_String_ObjectId_: - -.. _setObjectId_String__ObjectId_: - -.. _DynamicRealmObject_setObjectId_java_lang_String_ObjectId_: - -.. _DynamicRealmObject_setObjectId_java_lang_String__ObjectId_: - -.. _DynamicRealmObject_setObjectId_String_ObjectId_: - -.. _DynamicRealmObject_setObjectId_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setObjectId ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Sets the ``ObjectId`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a ObjectId field. - - - - - - - - - - - - -.. _setRealmAny: - -.. _setRealmAny__: - -.. _DynamicRealmObject_setRealmAny: - -.. _DynamicRealmObject_setRealmAny__: - -.. _io_realm_DynamicRealmObject_setRealmAny: - -.. _io_realm_DynamicRealmObject_setRealmAny__: - - - -setRealmAny ------------ - -.. _io_realm_DynamicRealmObject_setRealmAny_java_lang_String_io_realm_RealmAny_: - -.. _io_realm_DynamicRealmObject_setRealmAny_java_lang_String__io_realm_RealmAny_: - -.. _io_realm_DynamicRealmObject_setRealmAny_java_lang_String_RealmAny_: - -.. _io_realm_DynamicRealmObject_setRealmAny_java_lang_String__RealmAny_: - -.. _io_realm_DynamicRealmObject_setRealmAny_String_io_realm_RealmAny_: - -.. _io_realm_DynamicRealmObject_setRealmAny_String__io_realm_RealmAny_: - -.. _io_realm_DynamicRealmObject_setRealmAny_String_RealmAny_: - -.. _io_realm_DynamicRealmObject_setRealmAny_String__RealmAny_: - -.. _setRealmAny_java_lang_String_io_realm_RealmAny_: - -.. _setRealmAny_java_lang_String__io_realm_RealmAny_: - -.. _setRealmAny_java_lang_String_RealmAny_: - -.. _setRealmAny_java_lang_String__RealmAny_: - -.. _setRealmAny_String_io_realm_RealmAny_: - -.. _setRealmAny_String__io_realm_RealmAny_: - -.. _setRealmAny_String_RealmAny_: - -.. _setRealmAny_String__RealmAny_: - -.. _DynamicRealmObject_setRealmAny_java_lang_String_io_realm_RealmAny_: - -.. _DynamicRealmObject_setRealmAny_java_lang_String__io_realm_RealmAny_: - -.. _DynamicRealmObject_setRealmAny_java_lang_String_RealmAny_: - -.. _DynamicRealmObject_setRealmAny_java_lang_String__RealmAny_: - -.. _DynamicRealmObject_setRealmAny_String_io_realm_RealmAny_: - -.. _DynamicRealmObject_setRealmAny_String__io_realm_RealmAny_: - -.. _DynamicRealmObject_setRealmAny_String_RealmAny_: - -.. _DynamicRealmObject_setRealmAny_String__RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setRealmAny ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - - - * - Sets the ``RealmAny`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a RealmAny field. - - - - - - - - - - - - -.. _setRealmSet: - -.. _setRealmSet__: - -.. _DynamicRealmObject_setRealmSet: - -.. _DynamicRealmObject_setRealmSet__: - -.. _io_realm_DynamicRealmObject_setRealmSet: - -.. _io_realm_DynamicRealmObject_setRealmSet__: - - - -setRealmSet ------------ - -.. _io_realm_DynamicRealmObject_setRealmSet_java_lang_String_io_realm_RealmSet_: - -.. _io_realm_DynamicRealmObject_setRealmSet_java_lang_String__io_realm_RealmSet_: - -.. _io_realm_DynamicRealmObject_setRealmSet_java_lang_String_RealmSet_: - -.. _io_realm_DynamicRealmObject_setRealmSet_java_lang_String__RealmSet_: - -.. _io_realm_DynamicRealmObject_setRealmSet_String_io_realm_RealmSet_: - -.. _io_realm_DynamicRealmObject_setRealmSet_String__io_realm_RealmSet_: - -.. _io_realm_DynamicRealmObject_setRealmSet_String_RealmSet_: - -.. _io_realm_DynamicRealmObject_setRealmSet_String__RealmSet_: - -.. _setRealmSet_java_lang_String_io_realm_RealmSet_: - -.. _setRealmSet_java_lang_String__io_realm_RealmSet_: - -.. _setRealmSet_java_lang_String_RealmSet_: - -.. _setRealmSet_java_lang_String__RealmSet_: - -.. _setRealmSet_String_io_realm_RealmSet_: - -.. _setRealmSet_String__io_realm_RealmSet_: - -.. _setRealmSet_String_RealmSet_: - -.. _setRealmSet_String__RealmSet_: - -.. _DynamicRealmObject_setRealmSet_java_lang_String_io_realm_RealmSet_: - -.. _DynamicRealmObject_setRealmSet_java_lang_String__io_realm_RealmSet_: - -.. _DynamicRealmObject_setRealmSet_java_lang_String_RealmSet_: - -.. _DynamicRealmObject_setRealmSet_java_lang_String__RealmSet_: - -.. _DynamicRealmObject_setRealmSet_String_io_realm_RealmSet_: - -.. _DynamicRealmObject_setRealmSet_String__io_realm_RealmSet_: - -.. _DynamicRealmObject_setRealmSet_String_RealmSet_: - -.. _DynamicRealmObject_setRealmSet_String__RealmSet_: - -.. _io_realm_DynamicRealmObject_setRealmSet_String__RealmSet_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setRealmSet ` <**E** >( - | `String `__ fieldName, - | :ref:`io.realm.RealmSet\ ` set - | ) - - - - - * - Sets the reference to a :ref:`RealmSet ` on the given field. - - This will copy all the elements in the set into Realm, but any further changes to the set will not be reflected in the Realm. Use :ref:`getRealmSet(String) ` in order to get a reference to the managed set. - - - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``set`` - set of objects. Must either be primitive types or :ref:`DynamicRealmObject ` s. - - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, it is not a set field, the objects in the set doesn't match the expected type or any Realm object in the set belongs to a different Realm. - - - - - - - - - - - - -.. _setShort: - -.. _setShort__: - -.. _DynamicRealmObject_setShort: - -.. _DynamicRealmObject_setShort__: - -.. _io_realm_DynamicRealmObject_setShort: - -.. _io_realm_DynamicRealmObject_setShort__: - - - -setShort --------- - -.. _io_realm_DynamicRealmObject_setShort_java_lang_String_short_: - -.. _io_realm_DynamicRealmObject_setShort_java_lang_String__short_: - -.. _io_realm_DynamicRealmObject_setShort_String_short_: - -.. _io_realm_DynamicRealmObject_setShort_String__short_: - -.. _setShort_java_lang_String_short_: - -.. _setShort_java_lang_String__short_: - -.. _setShort_String_short_: - -.. _setShort_String__short_: - -.. _DynamicRealmObject_setShort_java_lang_String_short_: - -.. _DynamicRealmObject_setShort_java_lang_String__short_: - -.. _DynamicRealmObject_setShort_String_short_: - -.. _DynamicRealmObject_setShort_String__short_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setShort ` ( - | `String `__ fieldName, - | **short** value - | ) - - - - - * - Sets the ``short`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't an integer field. - - - - - :ref:`RealmException ` - if the field is a :ref:`io.realm.annotations.PrimaryKey ` field. - - - - - - - - - - - - - - -.. _setString: - -.. _setString__: - -.. _DynamicRealmObject_setString: - -.. _DynamicRealmObject_setString__: - -.. _io_realm_DynamicRealmObject_setString: - -.. _io_realm_DynamicRealmObject_setString__: - - - -setString ---------- - -.. _io_realm_DynamicRealmObject_setString_java_lang_String_java_lang_String_: - -.. _io_realm_DynamicRealmObject_setString_java_lang_String__java_lang_String_: - -.. _io_realm_DynamicRealmObject_setString_java_lang_String_String_: - -.. _io_realm_DynamicRealmObject_setString_java_lang_String__String_: - -.. _io_realm_DynamicRealmObject_setString_String_java_lang_String_: - -.. _io_realm_DynamicRealmObject_setString_String__java_lang_String_: - -.. _io_realm_DynamicRealmObject_setString_String_String_: - -.. _io_realm_DynamicRealmObject_setString_String__String_: - -.. _setString_java_lang_String_java_lang_String_: - -.. _setString_java_lang_String__java_lang_String_: - -.. _setString_java_lang_String_String_: - -.. _setString_java_lang_String__String_: - -.. _setString_String_java_lang_String_: - -.. _setString_String__java_lang_String_: - -.. _setString_String_String_: - -.. _setString_String__String_: - -.. _DynamicRealmObject_setString_java_lang_String_java_lang_String_: - -.. _DynamicRealmObject_setString_java_lang_String__java_lang_String_: - -.. _DynamicRealmObject_setString_java_lang_String_String_: - -.. _DynamicRealmObject_setString_java_lang_String__String_: - -.. _DynamicRealmObject_setString_String_java_lang_String_: - -.. _DynamicRealmObject_setString_String__java_lang_String_: - -.. _DynamicRealmObject_setString_String_String_: - -.. _DynamicRealmObject_setString_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setString ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Sets the ``String`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a String field. - - - - - :ref:`RealmException ` - if the field is a :ref:`io.realm.annotations.PrimaryKey ` field. - - - - - - - - - - - - - - -.. _setUUID: - -.. _setUUID__: - -.. _DynamicRealmObject_setUUID: - -.. _DynamicRealmObject_setUUID__: - -.. _io_realm_DynamicRealmObject_setUUID: - -.. _io_realm_DynamicRealmObject_setUUID__: - - - -setUUID -------- - -.. _io_realm_DynamicRealmObject_setUUID_java_lang_String_java_util_UUID_: - -.. _io_realm_DynamicRealmObject_setUUID_java_lang_String__java_util_UUID_: - -.. _io_realm_DynamicRealmObject_setUUID_java_lang_String_UUID_: - -.. _io_realm_DynamicRealmObject_setUUID_java_lang_String__UUID_: - -.. _io_realm_DynamicRealmObject_setUUID_String_java_util_UUID_: - -.. _io_realm_DynamicRealmObject_setUUID_String__java_util_UUID_: - -.. _io_realm_DynamicRealmObject_setUUID_String_UUID_: - -.. _io_realm_DynamicRealmObject_setUUID_String__UUID_: - -.. _setUUID_java_lang_String_java_util_UUID_: - -.. _setUUID_java_lang_String__java_util_UUID_: - -.. _setUUID_java_lang_String_UUID_: - -.. _setUUID_java_lang_String__UUID_: - -.. _setUUID_String_java_util_UUID_: - -.. _setUUID_String__java_util_UUID_: - -.. _setUUID_String_UUID_: - -.. _setUUID_String__UUID_: - -.. _DynamicRealmObject_setUUID_java_lang_String_java_util_UUID_: - -.. _DynamicRealmObject_setUUID_java_lang_String__java_util_UUID_: - -.. _DynamicRealmObject_setUUID_java_lang_String_UUID_: - -.. _DynamicRealmObject_setUUID_java_lang_String__UUID_: - -.. _DynamicRealmObject_setUUID_String_java_util_UUID_: - -.. _DynamicRealmObject_setUUID_String__java_util_UUID_: - -.. _DynamicRealmObject_setUUID_String_UUID_: - -.. _DynamicRealmObject_setUUID_String__UUID_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setUUID ` ( - | `String `__ fieldName, - | `UUID `__ value - | ) - - - - - * - Sets the ``UUID`` value of the given field. - - - - - - - **Parameters** - - - ``fieldName`` - field name. - - - - - ``value`` - value to insert. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or field isn't a UUID field. - - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _DynamicRealmObject_toString: - -.. _DynamicRealmObject_toString__: - -.. _io_realm_DynamicRealmObject_toString: - -.. _io_realm_DynamicRealmObject_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/FieldAttribute.txt b/source/sdk/temp/java/api/io/realm/FieldAttribute.txt deleted file mode 100644 index 8eadabd736..0000000000 --- a/source/sdk/temp/java/api/io/realm/FieldAttribute.txt +++ /dev/null @@ -1,261 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum FieldAttribute -^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_FieldAttribute: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.FieldAttribute - - -This class contains all Realm attributes for a Realm field. These will usually match the annotations found in the ``io.realm.annotation`` package. See the relevant annotation for further information on each modifier. - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`INDEXED ` - - Marks a field as indexed. - - - - - * - :ref:`PRIMARY_KEY ` - - Marks a field as a primary key. - - - - - * - :ref:`REQUIRED ` - - Marks a field as explicitly not allowing null values. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`FieldAttribute ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`FieldAttribute ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_FieldAttribute_INDEXED: - -.. _FieldAttribute_INDEXED: - - - -``INDEXED`` ------------- - -public static final :ref:`FieldAttribute ` - -Marks a field as indexed. - - - -.. _io_realm_FieldAttribute_PRIMARY_KEY: - -.. _FieldAttribute_PRIMARY_KEY: - - - -``PRIMARY_KEY`` ----------------- - -public static final :ref:`FieldAttribute ` - -Marks a field as a primary key. This also implicitly mark it as :ref:`INDEXED ` . - - - - - -.. _io_realm_FieldAttribute_REQUIRED: - -.. _FieldAttribute_REQUIRED: - - - -``REQUIRED`` -------------- - -public static final :ref:`FieldAttribute ` - -Marks a field as explicitly not allowing null values. The default behavior for allowing ``null`` depends on the type of the field. - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _FieldAttribute_valueOf: - -.. _FieldAttribute_valueOf__: - -.. _io_realm_FieldAttribute_valueOf: - -.. _io_realm_FieldAttribute_valueOf__: - - - -valueOf -------- - -.. _io_realm_FieldAttribute_valueOf_java_lang_String_: - -.. _io_realm_FieldAttribute_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _FieldAttribute_valueOf_java_lang_String_: - -.. _FieldAttribute_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`FieldAttribute ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _FieldAttribute_values: - -.. _FieldAttribute_values__: - -.. _io_realm_FieldAttribute_values: - -.. _io_realm_FieldAttribute_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`FieldAttribute ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/FrozenPendingRow.txt b/source/sdk/temp/java/api/io/realm/FrozenPendingRow.txt deleted file mode 100644 index 8d3e1f28f3..0000000000 --- a/source/sdk/temp/java/api/io/realm/FrozenPendingRow.txt +++ /dev/null @@ -1,3275 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum FrozenPendingRow -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_FrozenPendingRow: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.FrozenPendingRow - - -A PendingRow that has been frozen. This behaves in many ways similar to a deleted Row, but will report :ref:`isLoaded() ` as ``as false`` . - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`INSTANCE ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`checkIfAttached ` () - | - - - - - - - - * - public **long** - - | :ref:`createEmbeddedObject ` ( - | **long** columnKey, - | :ref:`RealmFieldType ` parentPropertyType - | ) - - - - - - - - * - public **Row** - - | :ref:`freeze ` ( - | **OsSharedRealm** frozenRealm - | ) - - - - - - - - * - public **byte** - - | :ref:`getBinaryByteArray ` ( - | **long** columnKey - | ) - - - - - - - - * - public **boolean** - - | :ref:`getBoolean ` ( - | **long** columnKey - | ) - - - - - - - - * - public **long** - - | :ref:`getColumnCount ` () - | - - - - - - - - * - public **long** - - | :ref:`getColumnKey ` ( - | `String `__ columnName - | ) - - - - - - - - * - public `String `__ - - | :ref:`getColumnNames ` () - | - - - - - - - - * - public :ref:`RealmFieldType ` - - | :ref:`getColumnType ` ( - | **long** columnKey - | ) - - - - - - - - * - public `Date `__ - - | :ref:`getDate ` ( - | **long** columnKey - | ) - - - - - - - - * - public **Decimal128** - - | :ref:`getDecimal128 ` ( - | **long** columnKey - | ) - - - - - - - - * - public **double** - - | :ref:`getDouble ` ( - | **long** columnKey - | ) - - - - - - - - * - public **float** - - | :ref:`getFloat ` ( - | **long** columnKey - | ) - - - - - - - - * - public **long** - - | :ref:`getLink ` ( - | **long** columnKey - | ) - - - - - - - - * - public **long** - - | :ref:`getLong ` ( - | **long** columnKey - | ) - - - - - - - - * - public **OsList** - - | :ref:`getModelList ` ( - | **long** columnKey - | ) - - - - - - - - * - public **OsMap** - - | :ref:`getModelMap ` ( - | **long** columnKey - | ) - - - - - - - - * - public **OsSet** - - | :ref:`getModelSet ` ( - | **long** columnKey - | ) - - - - - - - - * - public **NativeRealmAny** - - | :ref:`getNativeRealmAny ` ( - | **long** columnKey - | ) - - - - - - - - * - public **ObjectId** - - | :ref:`getObjectId ` ( - | **long** columnKey - | ) - - - - - - - - * - public **long** - - | :ref:`getObjectKey ` () - | - - - - - - - - * - public **OsMap** - - | :ref:`getRealmAnyMap ` ( - | **long** columnKey - | ) - - - - - - - - * - public **OsSet** - - | :ref:`getRealmAnySet ` ( - | **long** columnKey - | ) - - - - - - - - * - public `String `__ - - | :ref:`getString ` ( - | **long** columnKey - | ) - - - - - - - - * - public **Table** - - | :ref:`getTable ` () - | - - - - - - - - * - public `UUID `__ - - | :ref:`getUUID ` ( - | **long** columnKey - | ) - - - - - - - - * - public **OsList** - - | :ref:`getValueList ` ( - | **long** columnKey, - | :ref:`RealmFieldType ` fieldType - | ) - - - - - - - - * - public **OsMap** - - | :ref:`getValueMap ` ( - | **long** columnKey, - | :ref:`RealmFieldType ` fieldType - | ) - - - - - - - - * - public **OsSet** - - | :ref:`getValueSet ` ( - | **long** columnKey, - | :ref:`RealmFieldType ` fieldType - | ) - - - - - - - - * - public **boolean** - - | :ref:`hasColumn ` ( - | `String `__ fieldName - | ) - - - - - - - - * - public **boolean** - - | :ref:`isLoaded ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isNull ` ( - | **long** columnKey - | ) - - - - - - - - * - public **boolean** - - | :ref:`isNullLink ` ( - | **long** columnKey - | ) - - - - - - - - * - public **boolean** - - | :ref:`isValid ` () - | - - - - - - - - * - public **void** - - | :ref:`nullifyLink ` ( - | **long** columnKey - | ) - - - - - - - - * - public **void** - - | :ref:`setBinaryByteArray ` ( - | **long** columnKey, - | **byte[]** data - | ) - - - - - - - - * - public **void** - - | :ref:`setBoolean ` ( - | **long** columnKey, - | **boolean** value - | ) - - - - - - - - * - public **void** - - | :ref:`setDate ` ( - | **long** columnKey, - | `Date `__ date - | ) - - - - - - - - * - public **void** - - | :ref:`setDecimal128 ` ( - | **long** columnKey, - | **Decimal128** value - | ) - - - - - - - - * - public **void** - - | :ref:`setDouble ` ( - | **long** columnKey, - | **double** value - | ) - - - - - - - - * - public **void** - - | :ref:`setFloat ` ( - | **long** columnKey, - | **float** value - | ) - - - - - - - - * - public **void** - - | :ref:`setLink ` ( - | **long** columnKey, - | **long** value - | ) - - - - - - - - * - public **void** - - | :ref:`setLong ` ( - | **long** columnKey, - | **long** value - | ) - - - - - - - - * - public **void** - - | :ref:`setNull ` ( - | **long** columnKey - | ) - - - - - - - - * - public **void** - - | :ref:`setObjectId ` ( - | **long** columnKey, - | **ObjectId** value - | ) - - - - - - - - * - public **void** - - | :ref:`setRealmAny ` ( - | **long** columnKey, - | **long** value - | ) - - - - - - - - * - public **void** - - | :ref:`setString ` ( - | **long** columnKey, - | `String `__ value - | ) - - - - - - - - * - public **void** - - | :ref:`setUUID ` ( - | **long** columnKey, - | `UUID `__ value - | ) - - - - - - - - * - public static :ref:`FrozenPendingRow ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`FrozenPendingRow ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_FrozenPendingRow_INSTANCE: - -.. _FrozenPendingRow_INSTANCE: - - - -``INSTANCE`` -------------- - -public static final :ref:`FrozenPendingRow ` - - - - - - -Method Detail -============= - -.. _checkIfAttached: - -.. _checkIfAttached__: - -.. _FrozenPendingRow_checkIfAttached: - -.. _FrozenPendingRow_checkIfAttached__: - -.. _io_realm_FrozenPendingRow_checkIfAttached: - -.. _io_realm_FrozenPendingRow_checkIfAttached__: - - - -checkIfAttached ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`checkIfAttached ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _createEmbeddedObject: - -.. _createEmbeddedObject__: - -.. _FrozenPendingRow_createEmbeddedObject: - -.. _FrozenPendingRow_createEmbeddedObject__: - -.. _io_realm_FrozenPendingRow_createEmbeddedObject: - -.. _io_realm_FrozenPendingRow_createEmbeddedObject__: - - - -createEmbeddedObject --------------------- - -.. _io_realm_FrozenPendingRow_createEmbeddedObject_long_io_realm_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_createEmbeddedObject_long__io_realm_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_createEmbeddedObject_long_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_createEmbeddedObject_long__RealmFieldType_: - -.. _createEmbeddedObject_long_io_realm_RealmFieldType_: - -.. _createEmbeddedObject_long__io_realm_RealmFieldType_: - -.. _createEmbeddedObject_long_RealmFieldType_: - -.. _createEmbeddedObject_long__RealmFieldType_: - -.. _FrozenPendingRow_createEmbeddedObject_long_io_realm_RealmFieldType_: - -.. _FrozenPendingRow_createEmbeddedObject_long__io_realm_RealmFieldType_: - -.. _FrozenPendingRow_createEmbeddedObject_long_RealmFieldType_: - -.. _FrozenPendingRow_createEmbeddedObject_long__RealmFieldType_: - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`createEmbeddedObject ` ( - | **long** columnKey, - | :ref:`RealmFieldType ` parentPropertyType - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _freeze: - -.. _freeze__: - -.. _FrozenPendingRow_freeze: - -.. _FrozenPendingRow_freeze__: - -.. _io_realm_FrozenPendingRow_freeze: - -.. _io_realm_FrozenPendingRow_freeze__: - - - -freeze ------- - -.. _io_realm_FrozenPendingRow_freeze_OsSharedRealm_: - -.. _freeze_OsSharedRealm_: - -.. _FrozenPendingRow_freeze_OsSharedRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public **Row** :ref:`freeze ` ( - | **OsSharedRealm** frozenRealm - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getBinaryByteArray: - -.. _getBinaryByteArray__: - -.. _FrozenPendingRow_getBinaryByteArray: - -.. _FrozenPendingRow_getBinaryByteArray__: - -.. _io_realm_FrozenPendingRow_getBinaryByteArray: - -.. _io_realm_FrozenPendingRow_getBinaryByteArray__: - - - -getBinaryByteArray ------------------- - -.. _io_realm_FrozenPendingRow_getBinaryByteArray_long_: - -.. _getBinaryByteArray_long_: - -.. _FrozenPendingRow_getBinaryByteArray_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **byte** :ref:`getBinaryByteArray ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getBoolean: - -.. _getBoolean__: - -.. _FrozenPendingRow_getBoolean: - -.. _FrozenPendingRow_getBoolean__: - -.. _io_realm_FrozenPendingRow_getBoolean: - -.. _io_realm_FrozenPendingRow_getBoolean__: - - - -getBoolean ----------- - -.. _io_realm_FrozenPendingRow_getBoolean_long_: - -.. _getBoolean_long_: - -.. _FrozenPendingRow_getBoolean_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`getBoolean ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getColumnCount: - -.. _getColumnCount__: - -.. _FrozenPendingRow_getColumnCount: - -.. _FrozenPendingRow_getColumnCount__: - -.. _io_realm_FrozenPendingRow_getColumnCount: - -.. _io_realm_FrozenPendingRow_getColumnCount__: - - - -getColumnCount --------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getColumnCount ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getColumnKey: - -.. _getColumnKey__: - -.. _FrozenPendingRow_getColumnKey: - -.. _FrozenPendingRow_getColumnKey__: - -.. _io_realm_FrozenPendingRow_getColumnKey: - -.. _io_realm_FrozenPendingRow_getColumnKey__: - - - -getColumnKey ------------- - -.. _io_realm_FrozenPendingRow_getColumnKey_java_lang_String_: - -.. _io_realm_FrozenPendingRow_getColumnKey_String_: - -.. _getColumnKey_java_lang_String_: - -.. _getColumnKey_String_: - -.. _FrozenPendingRow_getColumnKey_java_lang_String_: - -.. _FrozenPendingRow_getColumnKey_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getColumnKey ` ( - | `String `__ columnName - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getColumnNames: - -.. _getColumnNames__: - -.. _FrozenPendingRow_getColumnNames: - -.. _FrozenPendingRow_getColumnNames__: - -.. _io_realm_FrozenPendingRow_getColumnNames: - -.. _io_realm_FrozenPendingRow_getColumnNames__: - - - -getColumnNames --------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getColumnNames ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getColumnType: - -.. _getColumnType__: - -.. _FrozenPendingRow_getColumnType: - -.. _FrozenPendingRow_getColumnType__: - -.. _io_realm_FrozenPendingRow_getColumnType: - -.. _io_realm_FrozenPendingRow_getColumnType__: - - - -getColumnType -------------- - -.. _io_realm_FrozenPendingRow_getColumnType_long_: - -.. _getColumnType_long_: - -.. _FrozenPendingRow_getColumnType_long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFieldType ` :ref:`getColumnType ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getDate: - -.. _getDate__: - -.. _FrozenPendingRow_getDate: - -.. _FrozenPendingRow_getDate__: - -.. _io_realm_FrozenPendingRow_getDate: - -.. _io_realm_FrozenPendingRow_getDate__: - - - -getDate -------- - -.. _io_realm_FrozenPendingRow_getDate_long_: - -.. _getDate_long_: - -.. _FrozenPendingRow_getDate_long_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`getDate ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getDecimal128: - -.. _getDecimal128__: - -.. _FrozenPendingRow_getDecimal128: - -.. _FrozenPendingRow_getDecimal128__: - -.. _io_realm_FrozenPendingRow_getDecimal128: - -.. _io_realm_FrozenPendingRow_getDecimal128__: - - - -getDecimal128 -------------- - -.. _io_realm_FrozenPendingRow_getDecimal128_long_: - -.. _getDecimal128_long_: - -.. _FrozenPendingRow_getDecimal128_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **Decimal128** :ref:`getDecimal128 ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getDouble: - -.. _getDouble__: - -.. _FrozenPendingRow_getDouble: - -.. _FrozenPendingRow_getDouble__: - -.. _io_realm_FrozenPendingRow_getDouble: - -.. _io_realm_FrozenPendingRow_getDouble__: - - - -getDouble ---------- - -.. _io_realm_FrozenPendingRow_getDouble_long_: - -.. _getDouble_long_: - -.. _FrozenPendingRow_getDouble_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **double** :ref:`getDouble ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getFloat: - -.. _getFloat__: - -.. _FrozenPendingRow_getFloat: - -.. _FrozenPendingRow_getFloat__: - -.. _io_realm_FrozenPendingRow_getFloat: - -.. _io_realm_FrozenPendingRow_getFloat__: - - - -getFloat --------- - -.. _io_realm_FrozenPendingRow_getFloat_long_: - -.. _getFloat_long_: - -.. _FrozenPendingRow_getFloat_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **float** :ref:`getFloat ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getLink: - -.. _getLink__: - -.. _FrozenPendingRow_getLink: - -.. _FrozenPendingRow_getLink__: - -.. _io_realm_FrozenPendingRow_getLink: - -.. _io_realm_FrozenPendingRow_getLink__: - - - -getLink -------- - -.. _io_realm_FrozenPendingRow_getLink_long_: - -.. _getLink_long_: - -.. _FrozenPendingRow_getLink_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getLink ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getLong: - -.. _getLong__: - -.. _FrozenPendingRow_getLong: - -.. _FrozenPendingRow_getLong__: - -.. _io_realm_FrozenPendingRow_getLong: - -.. _io_realm_FrozenPendingRow_getLong__: - - - -getLong -------- - -.. _io_realm_FrozenPendingRow_getLong_long_: - -.. _getLong_long_: - -.. _FrozenPendingRow_getLong_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getLong ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getModelList: - -.. _getModelList__: - -.. _FrozenPendingRow_getModelList: - -.. _FrozenPendingRow_getModelList__: - -.. _io_realm_FrozenPendingRow_getModelList: - -.. _io_realm_FrozenPendingRow_getModelList__: - - - -getModelList ------------- - -.. _io_realm_FrozenPendingRow_getModelList_long_: - -.. _getModelList_long_: - -.. _FrozenPendingRow_getModelList_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **OsList** :ref:`getModelList ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getModelMap: - -.. _getModelMap__: - -.. _FrozenPendingRow_getModelMap: - -.. _FrozenPendingRow_getModelMap__: - -.. _io_realm_FrozenPendingRow_getModelMap: - -.. _io_realm_FrozenPendingRow_getModelMap__: - - - -getModelMap ------------ - -.. _io_realm_FrozenPendingRow_getModelMap_long_: - -.. _getModelMap_long_: - -.. _FrozenPendingRow_getModelMap_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **OsMap** :ref:`getModelMap ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getModelSet: - -.. _getModelSet__: - -.. _FrozenPendingRow_getModelSet: - -.. _FrozenPendingRow_getModelSet__: - -.. _io_realm_FrozenPendingRow_getModelSet: - -.. _io_realm_FrozenPendingRow_getModelSet__: - - - -getModelSet ------------ - -.. _io_realm_FrozenPendingRow_getModelSet_long_: - -.. _getModelSet_long_: - -.. _FrozenPendingRow_getModelSet_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **OsSet** :ref:`getModelSet ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getNativeRealmAny: - -.. _getNativeRealmAny__: - -.. _FrozenPendingRow_getNativeRealmAny: - -.. _FrozenPendingRow_getNativeRealmAny__: - -.. _io_realm_FrozenPendingRow_getNativeRealmAny: - -.. _io_realm_FrozenPendingRow_getNativeRealmAny__: - - - -getNativeRealmAny ------------------ - -.. _io_realm_FrozenPendingRow_getNativeRealmAny_long_: - -.. _getNativeRealmAny_long_: - -.. _FrozenPendingRow_getNativeRealmAny_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **NativeRealmAny** :ref:`getNativeRealmAny ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getObjectId: - -.. _getObjectId__: - -.. _FrozenPendingRow_getObjectId: - -.. _FrozenPendingRow_getObjectId__: - -.. _io_realm_FrozenPendingRow_getObjectId: - -.. _io_realm_FrozenPendingRow_getObjectId__: - - - -getObjectId ------------ - -.. _io_realm_FrozenPendingRow_getObjectId_long_: - -.. _getObjectId_long_: - -.. _FrozenPendingRow_getObjectId_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **ObjectId** :ref:`getObjectId ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getObjectKey: - -.. _getObjectKey__: - -.. _FrozenPendingRow_getObjectKey: - -.. _FrozenPendingRow_getObjectKey__: - -.. _io_realm_FrozenPendingRow_getObjectKey: - -.. _io_realm_FrozenPendingRow_getObjectKey__: - - - -getObjectKey ------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getObjectKey ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getRealmAnyMap: - -.. _getRealmAnyMap__: - -.. _FrozenPendingRow_getRealmAnyMap: - -.. _FrozenPendingRow_getRealmAnyMap__: - -.. _io_realm_FrozenPendingRow_getRealmAnyMap: - -.. _io_realm_FrozenPendingRow_getRealmAnyMap__: - - - -getRealmAnyMap --------------- - -.. _io_realm_FrozenPendingRow_getRealmAnyMap_long_: - -.. _getRealmAnyMap_long_: - -.. _FrozenPendingRow_getRealmAnyMap_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **OsMap** :ref:`getRealmAnyMap ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getRealmAnySet: - -.. _getRealmAnySet__: - -.. _FrozenPendingRow_getRealmAnySet: - -.. _FrozenPendingRow_getRealmAnySet__: - -.. _io_realm_FrozenPendingRow_getRealmAnySet: - -.. _io_realm_FrozenPendingRow_getRealmAnySet__: - - - -getRealmAnySet --------------- - -.. _io_realm_FrozenPendingRow_getRealmAnySet_long_: - -.. _getRealmAnySet_long_: - -.. _FrozenPendingRow_getRealmAnySet_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **OsSet** :ref:`getRealmAnySet ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getString: - -.. _getString__: - -.. _FrozenPendingRow_getString: - -.. _FrozenPendingRow_getString__: - -.. _io_realm_FrozenPendingRow_getString: - -.. _io_realm_FrozenPendingRow_getString__: - - - -getString ---------- - -.. _io_realm_FrozenPendingRow_getString_long_: - -.. _getString_long_: - -.. _FrozenPendingRow_getString_long_: - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getString ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getTable: - -.. _getTable__: - -.. _FrozenPendingRow_getTable: - -.. _FrozenPendingRow_getTable__: - -.. _io_realm_FrozenPendingRow_getTable: - -.. _io_realm_FrozenPendingRow_getTable__: - - - -getTable --------- - -.. list-table:: - :header-rows: 1 - - * - | public **Table** :ref:`getTable ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getUUID: - -.. _getUUID__: - -.. _FrozenPendingRow_getUUID: - -.. _FrozenPendingRow_getUUID__: - -.. _io_realm_FrozenPendingRow_getUUID: - -.. _io_realm_FrozenPendingRow_getUUID__: - - - -getUUID -------- - -.. _io_realm_FrozenPendingRow_getUUID_long_: - -.. _getUUID_long_: - -.. _FrozenPendingRow_getUUID_long_: - -.. list-table:: - :header-rows: 1 - - * - | public `UUID `__ :ref:`getUUID ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getValueList: - -.. _getValueList__: - -.. _FrozenPendingRow_getValueList: - -.. _FrozenPendingRow_getValueList__: - -.. _io_realm_FrozenPendingRow_getValueList: - -.. _io_realm_FrozenPendingRow_getValueList__: - - - -getValueList ------------- - -.. _io_realm_FrozenPendingRow_getValueList_long_io_realm_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueList_long__io_realm_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueList_long_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueList_long__RealmFieldType_: - -.. _getValueList_long_io_realm_RealmFieldType_: - -.. _getValueList_long__io_realm_RealmFieldType_: - -.. _getValueList_long_RealmFieldType_: - -.. _getValueList_long__RealmFieldType_: - -.. _FrozenPendingRow_getValueList_long_io_realm_RealmFieldType_: - -.. _FrozenPendingRow_getValueList_long__io_realm_RealmFieldType_: - -.. _FrozenPendingRow_getValueList_long_RealmFieldType_: - -.. _FrozenPendingRow_getValueList_long__RealmFieldType_: - -.. list-table:: - :header-rows: 1 - - * - | public **OsList** :ref:`getValueList ` ( - | **long** columnKey, - | :ref:`RealmFieldType ` fieldType - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getValueMap: - -.. _getValueMap__: - -.. _FrozenPendingRow_getValueMap: - -.. _FrozenPendingRow_getValueMap__: - -.. _io_realm_FrozenPendingRow_getValueMap: - -.. _io_realm_FrozenPendingRow_getValueMap__: - - - -getValueMap ------------ - -.. _io_realm_FrozenPendingRow_getValueMap_long_io_realm_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueMap_long__io_realm_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueMap_long_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueMap_long__RealmFieldType_: - -.. _getValueMap_long_io_realm_RealmFieldType_: - -.. _getValueMap_long__io_realm_RealmFieldType_: - -.. _getValueMap_long_RealmFieldType_: - -.. _getValueMap_long__RealmFieldType_: - -.. _FrozenPendingRow_getValueMap_long_io_realm_RealmFieldType_: - -.. _FrozenPendingRow_getValueMap_long__io_realm_RealmFieldType_: - -.. _FrozenPendingRow_getValueMap_long_RealmFieldType_: - -.. _FrozenPendingRow_getValueMap_long__RealmFieldType_: - -.. list-table:: - :header-rows: 1 - - * - | public **OsMap** :ref:`getValueMap ` ( - | **long** columnKey, - | :ref:`RealmFieldType ` fieldType - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getValueSet: - -.. _getValueSet__: - -.. _FrozenPendingRow_getValueSet: - -.. _FrozenPendingRow_getValueSet__: - -.. _io_realm_FrozenPendingRow_getValueSet: - -.. _io_realm_FrozenPendingRow_getValueSet__: - - - -getValueSet ------------ - -.. _io_realm_FrozenPendingRow_getValueSet_long_io_realm_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueSet_long__io_realm_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueSet_long_RealmFieldType_: - -.. _io_realm_FrozenPendingRow_getValueSet_long__RealmFieldType_: - -.. _getValueSet_long_io_realm_RealmFieldType_: - -.. _getValueSet_long__io_realm_RealmFieldType_: - -.. _getValueSet_long_RealmFieldType_: - -.. _getValueSet_long__RealmFieldType_: - -.. _FrozenPendingRow_getValueSet_long_io_realm_RealmFieldType_: - -.. _FrozenPendingRow_getValueSet_long__io_realm_RealmFieldType_: - -.. _FrozenPendingRow_getValueSet_long_RealmFieldType_: - -.. _FrozenPendingRow_getValueSet_long__RealmFieldType_: - -.. list-table:: - :header-rows: 1 - - * - | public **OsSet** :ref:`getValueSet ` ( - | **long** columnKey, - | :ref:`RealmFieldType ` fieldType - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _hasColumn: - -.. _hasColumn__: - -.. _FrozenPendingRow_hasColumn: - -.. _FrozenPendingRow_hasColumn__: - -.. _io_realm_FrozenPendingRow_hasColumn: - -.. _io_realm_FrozenPendingRow_hasColumn__: - - - -hasColumn ---------- - -.. _io_realm_FrozenPendingRow_hasColumn_java_lang_String_: - -.. _io_realm_FrozenPendingRow_hasColumn_String_: - -.. _hasColumn_java_lang_String_: - -.. _hasColumn_String_: - -.. _FrozenPendingRow_hasColumn_java_lang_String_: - -.. _FrozenPendingRow_hasColumn_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`hasColumn ` ( - | `String `__ fieldName - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _isLoaded: - -.. _isLoaded__: - -.. _FrozenPendingRow_isLoaded: - -.. _FrozenPendingRow_isLoaded__: - -.. _io_realm_FrozenPendingRow_isLoaded: - -.. _io_realm_FrozenPendingRow_isLoaded__: - - - -isLoaded --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isLoaded ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _isNull: - -.. _isNull__: - -.. _FrozenPendingRow_isNull: - -.. _FrozenPendingRow_isNull__: - -.. _io_realm_FrozenPendingRow_isNull: - -.. _io_realm_FrozenPendingRow_isNull__: - - - -isNull ------- - -.. _io_realm_FrozenPendingRow_isNull_long_: - -.. _isNull_long_: - -.. _FrozenPendingRow_isNull_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isNull ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _isNullLink: - -.. _isNullLink__: - -.. _FrozenPendingRow_isNullLink: - -.. _FrozenPendingRow_isNullLink__: - -.. _io_realm_FrozenPendingRow_isNullLink: - -.. _io_realm_FrozenPendingRow_isNullLink__: - - - -isNullLink ----------- - -.. _io_realm_FrozenPendingRow_isNullLink_long_: - -.. _isNullLink_long_: - -.. _FrozenPendingRow_isNullLink_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isNullLink ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _isValid: - -.. _isValid__: - -.. _FrozenPendingRow_isValid: - -.. _FrozenPendingRow_isValid__: - -.. _io_realm_FrozenPendingRow_isValid: - -.. _io_realm_FrozenPendingRow_isValid__: - - - -isValid -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isValid ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _nullifyLink: - -.. _nullifyLink__: - -.. _FrozenPendingRow_nullifyLink: - -.. _FrozenPendingRow_nullifyLink__: - -.. _io_realm_FrozenPendingRow_nullifyLink: - -.. _io_realm_FrozenPendingRow_nullifyLink__: - - - -nullifyLink ------------ - -.. _io_realm_FrozenPendingRow_nullifyLink_long_: - -.. _nullifyLink_long_: - -.. _FrozenPendingRow_nullifyLink_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`nullifyLink ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setBinaryByteArray: - -.. _setBinaryByteArray__: - -.. _FrozenPendingRow_setBinaryByteArray: - -.. _FrozenPendingRow_setBinaryByteArray__: - -.. _io_realm_FrozenPendingRow_setBinaryByteArray: - -.. _io_realm_FrozenPendingRow_setBinaryByteArray__: - - - -setBinaryByteArray ------------------- - -.. _io_realm_FrozenPendingRow_setBinaryByteArray_long_byte_: - -.. _io_realm_FrozenPendingRow_setBinaryByteArray_long__byte_: - -.. _io_realm_FrozenPendingRow_setBinaryByteArray_long_byte____: - -.. _io_realm_FrozenPendingRow_setBinaryByteArray_long__byte____: - -.. _setBinaryByteArray_long_byte_: - -.. _setBinaryByteArray_long__byte_: - -.. _setBinaryByteArray_long_byte____: - -.. _setBinaryByteArray_long__byte____: - -.. _FrozenPendingRow_setBinaryByteArray_long_byte_: - -.. _FrozenPendingRow_setBinaryByteArray_long__byte_: - -.. _FrozenPendingRow_setBinaryByteArray_long_byte____: - -.. _FrozenPendingRow_setBinaryByteArray_long__byte____: - -.. _io_realm_FrozenPendingRow_setBinaryByteArray_long__byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setBinaryByteArray ` ( - | **long** columnKey, - | **byte[]** data - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setBoolean: - -.. _setBoolean__: - -.. _FrozenPendingRow_setBoolean: - -.. _FrozenPendingRow_setBoolean__: - -.. _io_realm_FrozenPendingRow_setBoolean: - -.. _io_realm_FrozenPendingRow_setBoolean__: - - - -setBoolean ----------- - -.. _io_realm_FrozenPendingRow_setBoolean_long_boolean_: - -.. _io_realm_FrozenPendingRow_setBoolean_long__boolean_: - -.. _setBoolean_long_boolean_: - -.. _setBoolean_long__boolean_: - -.. _FrozenPendingRow_setBoolean_long_boolean_: - -.. _FrozenPendingRow_setBoolean_long__boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setBoolean ` ( - | **long** columnKey, - | **boolean** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setDate: - -.. _setDate__: - -.. _FrozenPendingRow_setDate: - -.. _FrozenPendingRow_setDate__: - -.. _io_realm_FrozenPendingRow_setDate: - -.. _io_realm_FrozenPendingRow_setDate__: - - - -setDate -------- - -.. _io_realm_FrozenPendingRow_setDate_long_java_util_Date_: - -.. _io_realm_FrozenPendingRow_setDate_long__java_util_Date_: - -.. _io_realm_FrozenPendingRow_setDate_long_Date_: - -.. _io_realm_FrozenPendingRow_setDate_long__Date_: - -.. _setDate_long_java_util_Date_: - -.. _setDate_long__java_util_Date_: - -.. _setDate_long_Date_: - -.. _setDate_long__Date_: - -.. _FrozenPendingRow_setDate_long_java_util_Date_: - -.. _FrozenPendingRow_setDate_long__java_util_Date_: - -.. _FrozenPendingRow_setDate_long_Date_: - -.. _FrozenPendingRow_setDate_long__Date_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDate ` ( - | **long** columnKey, - | `Date `__ date - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setDecimal128: - -.. _setDecimal128__: - -.. _FrozenPendingRow_setDecimal128: - -.. _FrozenPendingRow_setDecimal128__: - -.. _io_realm_FrozenPendingRow_setDecimal128: - -.. _io_realm_FrozenPendingRow_setDecimal128__: - - - -setDecimal128 -------------- - -.. _io_realm_FrozenPendingRow_setDecimal128_long_Decimal128_: - -.. _io_realm_FrozenPendingRow_setDecimal128_long__Decimal128_: - -.. _setDecimal128_long_Decimal128_: - -.. _setDecimal128_long__Decimal128_: - -.. _FrozenPendingRow_setDecimal128_long_Decimal128_: - -.. _FrozenPendingRow_setDecimal128_long__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDecimal128 ` ( - | **long** columnKey, - | **Decimal128** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setDouble: - -.. _setDouble__: - -.. _FrozenPendingRow_setDouble: - -.. _FrozenPendingRow_setDouble__: - -.. _io_realm_FrozenPendingRow_setDouble: - -.. _io_realm_FrozenPendingRow_setDouble__: - - - -setDouble ---------- - -.. _io_realm_FrozenPendingRow_setDouble_long_double_: - -.. _io_realm_FrozenPendingRow_setDouble_long__double_: - -.. _setDouble_long_double_: - -.. _setDouble_long__double_: - -.. _FrozenPendingRow_setDouble_long_double_: - -.. _FrozenPendingRow_setDouble_long__double_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDouble ` ( - | **long** columnKey, - | **double** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setFloat: - -.. _setFloat__: - -.. _FrozenPendingRow_setFloat: - -.. _FrozenPendingRow_setFloat__: - -.. _io_realm_FrozenPendingRow_setFloat: - -.. _io_realm_FrozenPendingRow_setFloat__: - - - -setFloat --------- - -.. _io_realm_FrozenPendingRow_setFloat_long_float_: - -.. _io_realm_FrozenPendingRow_setFloat_long__float_: - -.. _setFloat_long_float_: - -.. _setFloat_long__float_: - -.. _FrozenPendingRow_setFloat_long_float_: - -.. _FrozenPendingRow_setFloat_long__float_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setFloat ` ( - | **long** columnKey, - | **float** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setLink: - -.. _setLink__: - -.. _FrozenPendingRow_setLink: - -.. _FrozenPendingRow_setLink__: - -.. _io_realm_FrozenPendingRow_setLink: - -.. _io_realm_FrozenPendingRow_setLink__: - - - -setLink -------- - -.. _io_realm_FrozenPendingRow_setLink_long_long_: - -.. _io_realm_FrozenPendingRow_setLink_long__long_: - -.. _setLink_long_long_: - -.. _setLink_long__long_: - -.. _FrozenPendingRow_setLink_long_long_: - -.. _FrozenPendingRow_setLink_long__long_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setLink ` ( - | **long** columnKey, - | **long** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setLong: - -.. _setLong__: - -.. _FrozenPendingRow_setLong: - -.. _FrozenPendingRow_setLong__: - -.. _io_realm_FrozenPendingRow_setLong: - -.. _io_realm_FrozenPendingRow_setLong__: - - - -setLong -------- - -.. _io_realm_FrozenPendingRow_setLong_long_long_: - -.. _io_realm_FrozenPendingRow_setLong_long__long_: - -.. _setLong_long_long_: - -.. _setLong_long__long_: - -.. _FrozenPendingRow_setLong_long_long_: - -.. _FrozenPendingRow_setLong_long__long_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setLong ` ( - | **long** columnKey, - | **long** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setNull: - -.. _setNull__: - -.. _FrozenPendingRow_setNull: - -.. _FrozenPendingRow_setNull__: - -.. _io_realm_FrozenPendingRow_setNull: - -.. _io_realm_FrozenPendingRow_setNull__: - - - -setNull -------- - -.. _io_realm_FrozenPendingRow_setNull_long_: - -.. _setNull_long_: - -.. _FrozenPendingRow_setNull_long_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setNull ` ( - | **long** columnKey - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setObjectId: - -.. _setObjectId__: - -.. _FrozenPendingRow_setObjectId: - -.. _FrozenPendingRow_setObjectId__: - -.. _io_realm_FrozenPendingRow_setObjectId: - -.. _io_realm_FrozenPendingRow_setObjectId__: - - - -setObjectId ------------ - -.. _io_realm_FrozenPendingRow_setObjectId_long_ObjectId_: - -.. _io_realm_FrozenPendingRow_setObjectId_long__ObjectId_: - -.. _setObjectId_long_ObjectId_: - -.. _setObjectId_long__ObjectId_: - -.. _FrozenPendingRow_setObjectId_long_ObjectId_: - -.. _FrozenPendingRow_setObjectId_long__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setObjectId ` ( - | **long** columnKey, - | **ObjectId** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setRealmAny: - -.. _setRealmAny__: - -.. _FrozenPendingRow_setRealmAny: - -.. _FrozenPendingRow_setRealmAny__: - -.. _io_realm_FrozenPendingRow_setRealmAny: - -.. _io_realm_FrozenPendingRow_setRealmAny__: - - - -setRealmAny ------------ - -.. _io_realm_FrozenPendingRow_setRealmAny_long_long_: - -.. _io_realm_FrozenPendingRow_setRealmAny_long__long_: - -.. _setRealmAny_long_long_: - -.. _setRealmAny_long__long_: - -.. _FrozenPendingRow_setRealmAny_long_long_: - -.. _FrozenPendingRow_setRealmAny_long__long_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setRealmAny ` ( - | **long** columnKey, - | **long** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setString: - -.. _setString__: - -.. _FrozenPendingRow_setString: - -.. _FrozenPendingRow_setString__: - -.. _io_realm_FrozenPendingRow_setString: - -.. _io_realm_FrozenPendingRow_setString__: - - - -setString ---------- - -.. _io_realm_FrozenPendingRow_setString_long_java_lang_String_: - -.. _io_realm_FrozenPendingRow_setString_long__java_lang_String_: - -.. _io_realm_FrozenPendingRow_setString_long_String_: - -.. _io_realm_FrozenPendingRow_setString_long__String_: - -.. _setString_long_java_lang_String_: - -.. _setString_long__java_lang_String_: - -.. _setString_long_String_: - -.. _setString_long__String_: - -.. _FrozenPendingRow_setString_long_java_lang_String_: - -.. _FrozenPendingRow_setString_long__java_lang_String_: - -.. _FrozenPendingRow_setString_long_String_: - -.. _FrozenPendingRow_setString_long__String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setString ` ( - | **long** columnKey, - | `String `__ value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setUUID: - -.. _setUUID__: - -.. _FrozenPendingRow_setUUID: - -.. _FrozenPendingRow_setUUID__: - -.. _io_realm_FrozenPendingRow_setUUID: - -.. _io_realm_FrozenPendingRow_setUUID__: - - - -setUUID -------- - -.. _io_realm_FrozenPendingRow_setUUID_long_java_util_UUID_: - -.. _io_realm_FrozenPendingRow_setUUID_long__java_util_UUID_: - -.. _io_realm_FrozenPendingRow_setUUID_long_UUID_: - -.. _io_realm_FrozenPendingRow_setUUID_long__UUID_: - -.. _setUUID_long_java_util_UUID_: - -.. _setUUID_long__java_util_UUID_: - -.. _setUUID_long_UUID_: - -.. _setUUID_long__UUID_: - -.. _FrozenPendingRow_setUUID_long_java_util_UUID_: - -.. _FrozenPendingRow_setUUID_long__java_util_UUID_: - -.. _FrozenPendingRow_setUUID_long_UUID_: - -.. _FrozenPendingRow_setUUID_long__UUID_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setUUID ` ( - | **long** columnKey, - | `UUID `__ value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _FrozenPendingRow_valueOf: - -.. _FrozenPendingRow_valueOf__: - -.. _io_realm_FrozenPendingRow_valueOf: - -.. _io_realm_FrozenPendingRow_valueOf__: - - - -valueOf -------- - -.. _io_realm_FrozenPendingRow_valueOf_java_lang_String_: - -.. _io_realm_FrozenPendingRow_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _FrozenPendingRow_valueOf_java_lang_String_: - -.. _FrozenPendingRow_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`FrozenPendingRow ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _FrozenPendingRow_values: - -.. _FrozenPendingRow_values__: - -.. _io_realm_FrozenPendingRow_values: - -.. _io_realm_FrozenPendingRow_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`FrozenPendingRow ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/ImportFlag.txt b/source/sdk/temp/java/api/io/realm/ImportFlag.txt deleted file mode 100644 index 069222f6f8..0000000000 --- a/source/sdk/temp/java/api/io/realm/ImportFlag.txt +++ /dev/null @@ -1,249 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum ImportFlag -^^^^^^^^^^^^^^^ - -.. _io_realm_ImportFlag: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.ImportFlag - - -This class describe how data is saved to Realm when saving whole objects. - - -.. seealso:: - - - - - :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` - - - - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`CHECK_SAME_VALUES_BEFORE_SET ` - - With this flag enabled, fields will not be written to the Realm file if they contain the same value as the value already present in the Realm. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`ImportFlag ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`ImportFlag ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_ImportFlag_CHECK_SAME_VALUES_BEFORE_SET: - -.. _ImportFlag_CHECK_SAME_VALUES_BEFORE_SET: - - - -``CHECK_SAME_VALUES_BEFORE_SET`` ---------------------------------- - -public static final :ref:`ImportFlag ` - -With this flag enabled, fields will not be written to the Realm file if they contain the same value as the value already present in the Realm.For local Realms this only has an impact on change listeners which will not report changes to those fields that were not written. - -For synchronized Realms this also impacts the server, which will see improved performance as there are fewer changes to upload and merge into the server Realm. - -It also impacts how the server merges changes from different devices. Realm uses a last-write-wins approach when merging individual fields in an object, so if a field is not written it will be considered "older" than other fields modified. - -E.g: - - - -1. Server starts out with (Field A = 1, Field B = 1) - - -#. Device 1 writes (Field A = 2, Field B = 2). - - -#. Device 2 writes (Field A = 3, Field B = 1) but ignores (Field B = 1), because that is the value in the Realm file at this point. - - -#. Device 1 uploads its changes to the server making the server (Field A = 2, Field B = 2). Then Device 2 uploads its changes. Due to last-write-wins, the server version now becomes (Field A = 3, Field B = 2). - - - - -This is normally the desired behavior as the final object is the merged result of the latest changes from both devices, however if all the fields in an object are considered an atomic unit, then this flag should not be set as it will ensure that all fields are set and thus have the same "age" when data are sent to the server. - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _ImportFlag_valueOf: - -.. _ImportFlag_valueOf__: - -.. _io_realm_ImportFlag_valueOf: - -.. _io_realm_ImportFlag_valueOf__: - - - -valueOf -------- - -.. _io_realm_ImportFlag_valueOf_java_lang_String_: - -.. _io_realm_ImportFlag_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _ImportFlag_valueOf_java_lang_String_: - -.. _ImportFlag_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ImportFlag ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _ImportFlag_values: - -.. _ImportFlag_values__: - -.. _io_realm_ImportFlag_values: - -.. _io_realm_ImportFlag_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ImportFlag ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/MapChangeListener.txt b/source/sdk/temp/java/api/io/realm/MapChangeListener.txt deleted file mode 100644 index efa98b2959..0000000000 --- a/source/sdk/temp/java/api/io/realm/MapChangeListener.txt +++ /dev/null @@ -1,176 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface MapChangeListener -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_MapChangeListener: - - - -io.realm -======== - -:ref:`MapChangeListener ` can be registered with a :ref:`RealmMap ` to receive a notification with a :ref:`MapChangeSet ` to describe the details of what have been changed in the map since last time. - -Realm instances on a thread without an `android.os.Looper `__ cannot register a :ref:`MapChangeListener ` . - - - - - - -.. seealso:: - - - - - :ref:`RealmMap.addChangeListener(MapChangeListener) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onChange ` ( - | :ref:`io.realm.RealmMap\ ` map, - | :ref:`io.realm.MapChangeSet\ ` changes - | ) - - - This will be called when the async query is finished the first time or the collection of objects has changed. - - - - - - - -Method Detail -============= - -.. _onChange: - -.. _onChange__: - -.. _MapChangeListener_onChange: - -.. _MapChangeListener_onChange__: - -.. _io_realm_MapChangeListener_onChange: - -.. _io_realm_MapChangeListener_onChange__: - - - -onChange --------- - -.. _io_realm_MapChangeListener_onChange_io_realm_RealmMap_io_realm_MapChangeSet_: - -.. _io_realm_MapChangeListener_onChange_io_realm_RealmMap__io_realm_MapChangeSet_: - -.. _io_realm_MapChangeListener_onChange_io_realm_RealmMap_MapChangeSet_: - -.. _io_realm_MapChangeListener_onChange_io_realm_RealmMap__MapChangeSet_: - -.. _io_realm_MapChangeListener_onChange_RealmMap_io_realm_MapChangeSet_: - -.. _io_realm_MapChangeListener_onChange_RealmMap__io_realm_MapChangeSet_: - -.. _io_realm_MapChangeListener_onChange_RealmMap_MapChangeSet_: - -.. _io_realm_MapChangeListener_onChange_RealmMap__MapChangeSet_: - -.. _onChange_io_realm_RealmMap_io_realm_MapChangeSet_: - -.. _onChange_io_realm_RealmMap__io_realm_MapChangeSet_: - -.. _onChange_io_realm_RealmMap_MapChangeSet_: - -.. _onChange_io_realm_RealmMap__MapChangeSet_: - -.. _onChange_RealmMap_io_realm_MapChangeSet_: - -.. _onChange_RealmMap__io_realm_MapChangeSet_: - -.. _onChange_RealmMap_MapChangeSet_: - -.. _onChange_RealmMap__MapChangeSet_: - -.. _MapChangeListener_onChange_io_realm_RealmMap_io_realm_MapChangeSet_: - -.. _MapChangeListener_onChange_io_realm_RealmMap__io_realm_MapChangeSet_: - -.. _MapChangeListener_onChange_io_realm_RealmMap_MapChangeSet_: - -.. _MapChangeListener_onChange_io_realm_RealmMap__MapChangeSet_: - -.. _MapChangeListener_onChange_RealmMap_io_realm_MapChangeSet_: - -.. _MapChangeListener_onChange_RealmMap__io_realm_MapChangeSet_: - -.. _MapChangeListener_onChange_RealmMap_MapChangeSet_: - -.. _MapChangeListener_onChange_RealmMap__MapChangeSet_: - -.. _io_realm_MapChangeListener_onChange_RealmMap_K__V___MapChangeSet_K__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onChange ` ( - | :ref:`io.realm.RealmMap\ ` map, - | :ref:`io.realm.MapChangeSet\ ` changes - | ) - - - - - * - This will be called when the async query is finished the first time or the collection of objects has changed. - - - - - **Parameters** - - - ``map`` - the map this listener is registered to. - - - - - ``changes`` - object with information about the change. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/MapChangeSet.txt b/source/sdk/temp/java/api/io/realm/MapChangeSet.txt deleted file mode 100644 index 25f7639d65..0000000000 --- a/source/sdk/temp/java/api/io/realm/MapChangeSet.txt +++ /dev/null @@ -1,270 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface MapChangeSet -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_MapChangeSet: - - - -io.realm -======== - -This interface describes the changes made to a map during the last update.:ref:`MapChangeSet ` is passed to the :ref:`MapChangeListener ` which is registered by :ref:`RealmMap.addChangeListener(MapChangeListener) ` . - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **T** - - | :ref:`getChanges ` () - | - - - Array containing the keys that have been modified in the previous version of the map. - - - - - * - public **T** - - | :ref:`getDeletions ` () - | - - - The number of entries that have been deleted in the previous version of the map. - - - - - * - public **T** - - | :ref:`getInsertions ` () - | - - - Array containing the keys that have been inserted in the previous version of the map. - - - - - * - public **boolean** - - | :ref:`isEmpty ` () - | - - - Whether the change set is empty or not. - - - - - - - -Method Detail -============= - -.. _getChanges: - -.. _getChanges__: - -.. _MapChangeSet_getChanges: - -.. _MapChangeSet_getChanges__: - -.. _io_realm_MapChangeSet_getChanges: - -.. _io_realm_MapChangeSet_getChanges__: - - - -getChanges ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`getChanges ` () - | - - - - - * - Array containing the keys that have been modified in the previous version of the map. - - - - - - - **Returns** - - array with the keys that have been modified. - - - - - - - - - - - -.. _getDeletions: - -.. _getDeletions__: - -.. _MapChangeSet_getDeletions: - -.. _MapChangeSet_getDeletions__: - -.. _io_realm_MapChangeSet_getDeletions: - -.. _io_realm_MapChangeSet_getDeletions__: - - - -getDeletions ------------- - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`getDeletions ` () - | - - - - - * - The number of entries that have been deleted in the previous version of the map. - - - - - - - **Returns** - - array with the keys that have been deleted. - - - - - - - - - - - -.. _getInsertions: - -.. _getInsertions__: - -.. _MapChangeSet_getInsertions: - -.. _MapChangeSet_getInsertions__: - -.. _io_realm_MapChangeSet_getInsertions: - -.. _io_realm_MapChangeSet_getInsertions__: - - - -getInsertions -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`getInsertions ` () - | - - - - - * - Array containing the keys that have been inserted in the previous version of the map. - - - - - - - **Returns** - - array with the keys that have been inserted. - - - - - - - - - - - -.. _isEmpty: - -.. _isEmpty__: - -.. _MapChangeSet_isEmpty: - -.. _MapChangeSet_isEmpty__: - -.. _io_realm_MapChangeSet_isEmpty: - -.. _io_realm_MapChangeSet_isEmpty__: - - - -isEmpty -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEmpty ` () - | - - - - - * - Whether the change set is empty or not. This is needed to detect whether a notification has been triggered right after subscription. - - - - - - - **Returns** - - whether the change set contains changes. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/MutableRealmInteger.txt b/source/sdk/temp/java/api/io/realm/MutableRealmInteger.txt deleted file mode 100644 index 8fe85c95cc..0000000000 --- a/source/sdk/temp/java/api/io/realm/MutableRealmInteger.txt +++ /dev/null @@ -1,1027 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class MutableRealmInteger -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_MutableRealmInteger: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.MutableRealmInteger - - -**Implemented interfaces:** - - - -- `java.lang.Comparable `__ - - -A ``MutableRealmInteger`` is a mutable, `Long `__ -like numeric quantity. It behaves almost exactly as a reference to a `Long `__ . More specifically: - - - -- A ``MutableRealmInteger`` may have the value ``null`` . - - - - -- The :ref:`equals ` operator compares the contained `Long `__ values. ``null`` -valued ``MutableRealmInteger`` are ``.equals`` - - - - -- The :ref:`compareTo ` operator compares the contained `Long `__ values. It considers ``null`` < any non-``null`` value. - - - - -- The :ref:`increment ` and :ref:`decrement ` operators throw `IllegalStateException `__ when applied to a ``null`` -valued ``MutableRealmInteger`` . - - - - - - -``MutableRealmInteger`` s are most interesting as members of a managed :ref:`RealmModel ` object. When managed, the :ref:`increment ` and :ref:`decrement ` operators implement a - -`conflict free replicated data type `__ : Simultaneous increments and decrements from multiple distributed clients will be aggregated correctly. For instance, if the value of ``counter`` field for the object representing user "Fred" is currently 0, then the following code, executed on two different devices, simultaneously, even if connected by only a slow, unreliable network, will - -**always** cause the value of ``counter`` to converge, eventually on the value 2. - - - - - -.. code-block:: java - - MutableRealmInteger counter = realm.where(Users.class) - .equalTo("name", Fred) - .findFirst() - .counter.increment(1); - - -Note that the :ref:`set(Long) ` operator must be used with extreme care. It will quash the effects of any prior calls to :ref:`increment(long) ` or :ref:`decrement(long) ` . Although the value of a ``MutableRealmInteger`` will always converge across devices, the specific value on which it converges will depend on the actual order in which operations took place. Mixing :ref:`set(Long) ` with :ref:`increment(long) ` and :ref:`decrement(long) ` is, therefore, not advised, unless fuzzy counting is acceptable. - -``MutableRealmInteger`` s may not be primary keys. Their implementations are not thread safe. Like all managed Realm objects, managed ``MutableRealmInteger`` s may not be moved across threads. Unmanaged ``MutableRealmInteger`` s may be moved across threads but require safe publication. - - - -A ``MutableRealmInteger`` , in a model class, must always be declared ``final`` . For instance: - - - - ``public final MutableRealmInteger counter = MutableRealmInteger.ofNull();`` - - -Although initializing the ``MutableRealmInteger`` as ``null`` may work very limited circumstances, developers are advised - -**not** to do it: - -.. code-block:: java - - - public final MutableRealmInteger counter = null; // DO NOT DO THIS! - - - - -Also note that when a ``MutableRealmInteger`` is ``@Required`` , it is better, though not required, to initialize it with a non-null value. - - - \@Required - public final MutableRealmInteger counter = MutableRealmInteger.valueOf(0L); - - -A reference to a managed ``MutableRealmInteger`` is subject to all of the constraints that apply to the model object from which it was obtained: It can only be mutated within a transaction and it becomes invalid if the Realm backing it is closed. Use the ``isManaged()`` and ``isValid()`` operators to determine whether a ``MutableRealmInteger`` is in a consistent state. Note, in particular, that a reference to a managed ``MutableRealmInteger`` retains a reference to the model object to which it belongs. For example in this code: - - - - ``MutableRealmInteger counter = realm.where(Users.class).findFirst().counter;`` - - -the ``counter`` holds a reference to the ``User`` model object from which it was obtained. Neither can be GCed until all references to both are unreachable. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public final **int** - - | :ref:`compareTo ` ( - | :ref:`MutableRealmInteger ` o - | ) - - - ``MutableRealmInteger`` s compare strictly by their values. - - - - - - - * - public abstract **void** - - | :ref:`decrement ` ( - | **long** dec - | ) - - - Decrements the ``MutableRealmInteger`` , subtracting the value of the argument. - - - - - - - * - public final **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - Two ``MutableRealmInteger`` s are ``.equals`` if and only if their ``longValues`` are equal. - - - - - - - * - public abstract `Long `__ - - | :ref:`get ` () - | - - - Gets the ``MutableRealmInteger`` value. - - - - - - - * - public final **int** - - | :ref:`hashCode ` () - | - - - A ``MutableRealmInteger`` 's hash code is, exactly, the hash code of its value. - - - - - - - * - public abstract **void** - - | :ref:`increment ` ( - | **long** inc - | ) - - - Increments the ``MutableRealmInteger`` , adding the value of the argument. - - - - - - - * - public final **boolean** - - | :ref:`isNull ` () - | - - - - - - - - * - public static :ref:`MutableRealmInteger ` - - | :ref:`ofNull ` () - | - - - Creates a new, unmanaged ``MutableRealmInteger`` whose value is ``null`` . - - - - - - - * - public final **void** - - | :ref:`set ` ( - | **long** newValue - | ) - - - Sets the ``MutableRealmInteger`` value. - - - - - - - * - public abstract **void** - - | :ref:`set ` ( - | `Long `__ newValue - | ) - - - Sets the ``MutableRealmInteger`` value. - - - - - - - * - public static :ref:`MutableRealmInteger ` - - | :ref:`valueOf ` ( - | `String `__ value - | ) - - - Creates a new, unmanaged ``MutableRealmInteger`` with the specified initial value. - - - - - - - * - public static :ref:`MutableRealmInteger ` - - | :ref:`valueOf ` ( - | **long** value - | ) - - - Creates a new, unmanaged ``MutableRealmInteger`` with the specified initial value. - - - - - - - * - public static :ref:`MutableRealmInteger ` - - | :ref:`valueOf ` ( - | `Long `__ value - | ) - - - Creates a new, unmanaged ``MutableRealmInteger`` with the specified initial value. - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _compareTo: - -.. _compareTo__: - -.. _MutableRealmInteger_compareTo: - -.. _MutableRealmInteger_compareTo__: - -.. _io_realm_MutableRealmInteger_compareTo: - -.. _io_realm_MutableRealmInteger_compareTo__: - - - -compareTo ---------- - -.. _io_realm_MutableRealmInteger_compareTo_io_realm_MutableRealmInteger_: - -.. _io_realm_MutableRealmInteger_compareTo_MutableRealmInteger_: - -.. _compareTo_io_realm_MutableRealmInteger_: - -.. _compareTo_MutableRealmInteger_: - -.. _MutableRealmInteger_compareTo_io_realm_MutableRealmInteger_: - -.. _MutableRealmInteger_compareTo_MutableRealmInteger_: - -.. list-table:: - :header-rows: 1 - - * - | public final **int** :ref:`compareTo ` ( - | :ref:`MutableRealmInteger ` o - | ) - - - - - * - ``MutableRealmInteger`` s compare strictly by their values. Null is a legal value for a ``MutableRealmInteger`` and ``null`` < any non-``null`` value - - - - - - - **Parameters** - - - ``o`` - the compare target - - - - - - - - **Returns** - - -1, 0, or 1, depending on whether this object's value is <, =, or > the target's. - - - - - - - - - - - -.. _decrement: - -.. _decrement__: - -.. _MutableRealmInteger_decrement: - -.. _MutableRealmInteger_decrement__: - -.. _io_realm_MutableRealmInteger_decrement: - -.. _io_realm_MutableRealmInteger_decrement__: - - - -decrement ---------- - -.. _io_realm_MutableRealmInteger_decrement_long_: - -.. _decrement_long_: - -.. _MutableRealmInteger_decrement_long_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract **void** :ref:`decrement ` ( - | **long** dec - | ) - - - - - * - Decrements the ``MutableRealmInteger`` , subtracting the value of the argument. Increment/decrement from all devices are reflected in the new value, which is guaranteed to converge. - - - - - - - **Parameters** - - - ``dec`` - quantity to be subtracted from the ``MutableRealmInteger`` . - - - - - - - - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _MutableRealmInteger_equals: - -.. _MutableRealmInteger_equals__: - -.. _io_realm_MutableRealmInteger_equals: - -.. _io_realm_MutableRealmInteger_equals__: - - - -equals ------- - -.. _io_realm_MutableRealmInteger_equals_java_lang_Object_: - -.. _io_realm_MutableRealmInteger_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _MutableRealmInteger_equals_java_lang_Object_: - -.. _MutableRealmInteger_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public final **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - Two ``MutableRealmInteger`` s are ``.equals`` if and only if their ``longValues`` are equal. - - - - - - - **Parameters** - - - ``o`` - compare target - - - - - - - - **Returns** - - true if the target has the same value. - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _get: - -.. _get__: - -.. _MutableRealmInteger_get: - -.. _MutableRealmInteger_get__: - -.. _io_realm_MutableRealmInteger_get: - -.. _io_realm_MutableRealmInteger_get__: - - - -get ----- - -.. list-table:: - :header-rows: 1 - - * - | public abstract `Long `__ :ref:`get ` () - | - - - - - * - Gets the ``MutableRealmInteger`` value. The value may be null. - - - - - - - - - **Returns** - - the value. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _MutableRealmInteger_hashCode: - -.. _MutableRealmInteger_hashCode__: - -.. _io_realm_MutableRealmInteger_hashCode: - -.. _io_realm_MutableRealmInteger_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public final **int** :ref:`hashCode ` () - | - - - - - * - A ``MutableRealmInteger`` 's hash code is, exactly, the hash code of its value. - - - - - - - - - **Returns** - - true if the target has the same value. - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _increment: - -.. _increment__: - -.. _MutableRealmInteger_increment: - -.. _MutableRealmInteger_increment__: - -.. _io_realm_MutableRealmInteger_increment: - -.. _io_realm_MutableRealmInteger_increment__: - - - -increment ---------- - -.. _io_realm_MutableRealmInteger_increment_long_: - -.. _increment_long_: - -.. _MutableRealmInteger_increment_long_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract **void** :ref:`increment ` ( - | **long** inc - | ) - - - - - * - Increments the ``MutableRealmInteger`` , adding the value of the argument. Increment/decrement from all devices are reflected in the new value, which is guaranteed to converge. - - - - - - - **Parameters** - - - ``inc`` - quantity to be added to the ``MutableRealmInteger`` . - - - - - - - - - - - - - - - - - - -.. _isNull: - -.. _isNull__: - -.. _MutableRealmInteger_isNull: - -.. _MutableRealmInteger_isNull__: - -.. _io_realm_MutableRealmInteger_isNull: - -.. _io_realm_MutableRealmInteger_isNull__: - - - -isNull ------- - -.. list-table:: - :header-rows: 1 - - * - | public final **boolean** :ref:`isNull ` () - | - - - - - * - - - - - - - - **Returns** - - true if and only if :ref:`get ` will return ``null`` . - - - - - - - - - - - - - -.. _ofNull: - -.. _ofNull__: - -.. _MutableRealmInteger_ofNull: - -.. _MutableRealmInteger_ofNull__: - -.. _io_realm_MutableRealmInteger_ofNull: - -.. _io_realm_MutableRealmInteger_ofNull__: - - - -ofNull ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`MutableRealmInteger ` :ref:`ofNull ` () - | - - - - - * - Creates a new, unmanaged ``MutableRealmInteger`` whose value is ``null`` . - - - - - - - - - - - - - - - - - -.. _set: - -.. _set__: - -.. _MutableRealmInteger_set: - -.. _MutableRealmInteger_set__: - -.. _io_realm_MutableRealmInteger_set: - -.. _io_realm_MutableRealmInteger_set__: - - - -set ----- - -.. _io_realm_MutableRealmInteger_set_long_: - -.. _set_long_: - -.. _MutableRealmInteger_set_long_: - -.. list-table:: - :header-rows: 1 - - * - | public final **void** :ref:`set ` ( - | **long** newValue - | ) - - - - - * - Sets the ``MutableRealmInteger`` value. Calling :ref:`set ` forcibly sets the ``MutableRealmInteger`` to the provided value. Doing this obliterates the effects of any calls to :ref:`increment ` and :ref:`decrement ` perceived before the call to :ref:`set ` . - - - - - - - **Parameters** - - - ``newValue`` - new value. - - - - - - - - - - - - - - -.. _io_realm_MutableRealmInteger_set_java_lang_Long_: - -.. _io_realm_MutableRealmInteger_set_Long_: - -.. _set_java_lang_Long_: - -.. _set_Long_: - -.. _MutableRealmInteger_set_java_lang_Long_: - -.. _MutableRealmInteger_set_Long_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract **void** :ref:`set ` ( - | `Long `__ newValue - | ) - - - - - * - Sets the ``MutableRealmInteger`` value. Calling ``set`` forcibly sets the ``MutableRealmInteger`` to the provided value. Doing this obliterates the effects of any calls to :ref:`increment ` and :ref:`decrement ` perceived before the call to ``set`` . - - - - - - - **Parameters** - - - ``newValue`` - new value. - - - - - - - - - - - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _MutableRealmInteger_valueOf: - -.. _MutableRealmInteger_valueOf__: - -.. _io_realm_MutableRealmInteger_valueOf: - -.. _io_realm_MutableRealmInteger_valueOf__: - - - -valueOf -------- - -.. _io_realm_MutableRealmInteger_valueOf_java_lang_String_: - -.. _io_realm_MutableRealmInteger_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _MutableRealmInteger_valueOf_java_lang_String_: - -.. _MutableRealmInteger_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`MutableRealmInteger ` :ref:`valueOf ` ( - | `String `__ value - | ) - - - - - * - Creates a new, unmanaged ``MutableRealmInteger`` with the specified initial value. - - - - - - - **Parameters** - - - ``value`` - initial value: parsed by `Long.parseLong `__ . - - - - - - - - - - - - - - - - -.. _io_realm_MutableRealmInteger_valueOf_long_: - -.. _valueOf_long_: - -.. _MutableRealmInteger_valueOf_long_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`MutableRealmInteger ` :ref:`valueOf ` ( - | **long** value - | ) - - - - - * - Creates a new, unmanaged ``MutableRealmInteger`` with the specified initial value. - - - - - - - **Parameters** - - - ``value`` - initial value. - - - - - - - - - - - - - - -.. _io_realm_MutableRealmInteger_valueOf_java_lang_Long_: - -.. _io_realm_MutableRealmInteger_valueOf_Long_: - -.. _valueOf_java_lang_Long_: - -.. _valueOf_Long_: - -.. _MutableRealmInteger_valueOf_java_lang_Long_: - -.. _MutableRealmInteger_valueOf_Long_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`MutableRealmInteger ` :ref:`valueOf ` ( - | `Long `__ value - | ) - - - - - * - Creates a new, unmanaged ``MutableRealmInteger`` with the specified initial value. - - - - - - - **Parameters** - - - ``value`` - initial value. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/ObjectChangeSet.txt b/source/sdk/temp/java/api/io/realm/ObjectChangeSet.txt deleted file mode 100644 index 41a37b8776..0000000000 --- a/source/sdk/temp/java/api/io/realm/ObjectChangeSet.txt +++ /dev/null @@ -1,249 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface ObjectChangeSet -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_ObjectChangeSet: - - - -io.realm -======== - -Information about the changes made to an object. - - -.. seealso:: - - - - - :ref:`RealmObject.addChangeListener(RealmObjectChangeListener) . ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public `String `__ - - | :ref:`getChangedFields ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isDeleted ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isFieldChanged ` ( - | `String `__ fieldName - | ) - - - Checks if a given field has been changed. - - - - - - - -Method Detail -============= - -.. _getChangedFields: - -.. _getChangedFields__: - -.. _ObjectChangeSet_getChangedFields: - -.. _ObjectChangeSet_getChangedFields__: - -.. _io_realm_ObjectChangeSet_getChangedFields: - -.. _io_realm_ObjectChangeSet_getChangedFields__: - - - -getChangedFields ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getChangedFields ` () - | - - - - - * - - - - - - - - **Returns** - - the names of changed fields if the object still exists and there are field changes. Returns an empty ``String[]`` if the object has been deleted. - - - - - - - - - - - - - -.. _isDeleted: - -.. _isDeleted__: - -.. _ObjectChangeSet_isDeleted: - -.. _ObjectChangeSet_isDeleted__: - -.. _io_realm_ObjectChangeSet_isDeleted: - -.. _io_realm_ObjectChangeSet_isDeleted__: - - - -isDeleted ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isDeleted ` () - | - - - - - * - - - - - - - - **Returns** - - true if the object has been deleted from the Realm. - - - - - - - - - - - -.. _isFieldChanged: - -.. _isFieldChanged__: - -.. _ObjectChangeSet_isFieldChanged: - -.. _ObjectChangeSet_isFieldChanged__: - -.. _io_realm_ObjectChangeSet_isFieldChanged: - -.. _io_realm_ObjectChangeSet_isFieldChanged__: - - - -isFieldChanged --------------- - -.. _io_realm_ObjectChangeSet_isFieldChanged_java_lang_String_: - -.. _io_realm_ObjectChangeSet_isFieldChanged_String_: - -.. _isFieldChanged_java_lang_String_: - -.. _isFieldChanged_String_: - -.. _ObjectChangeSet_isFieldChanged_java_lang_String_: - -.. _ObjectChangeSet_isFieldChanged_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isFieldChanged ` ( - | `String `__ fieldName - | ) - - - - - * - Checks if a given field has been changed. - - - - - **Parameters** - - - ``fieldName`` - to be checked if its value has been changed. - - - - - - - - **Returns** - - ``true`` if the field has been changed. It returns ``false`` if the object is deleted, the field cannot be found or the field hasn't been changed. - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet.txt b/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet.txt deleted file mode 100644 index a591795ee7..0000000000 --- a/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet.txt +++ /dev/null @@ -1,548 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface OrderedCollectionChangeSet -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_OrderedCollectionChangeSet: - - - -io.realm -======== - -This interface describes the changes made to a collection during the last update.:ref:`OrderedCollectionChangeSet ` is passed to the :ref:`OrderedRealmCollectionChangeListener ` which is registered by :ref:`RealmResults.addChangeListener(OrderedRealmCollectionChangeListener) ` . - - - -The change information is available in two formats: a simple array of row indices in the collection for each type of change, or an array of :ref:`Range ` s. - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static final`` - - :ref:`OrderedCollectionChangeSet.State ` - - - * - ``public static`` - - :ref:`OrderedCollectionChangeSet.Range ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`OrderedCollectionChangeSet.Range ` - - | :ref:`getChangeRanges ` () - | - - - The modified ranges of objects in the new version of the collection. - - - - - * - public **int** - - | :ref:`getChanges ` () - | - - - The modified indices in the new version of the collection. - - - - - * - public :ref:`OrderedCollectionChangeSet.Range ` - - | :ref:`getDeletionRanges ` () - | - - - The deleted ranges of objects in the previous version of the collection. - - - - - * - public **int** - - | :ref:`getDeletions ` () - | - - - The deleted indices in the previous version of the collection. - - - - - * - public `Throwable `__ - - | :ref:`getError ` () - | - - - Returns any error that happened. - - - - - * - public :ref:`OrderedCollectionChangeSet.Range ` - - | :ref:`getInsertionRanges ` () - | - - - The inserted ranges of objects in the new version of the collection. - - - - - * - public **int** - - | :ref:`getInsertions ` () - | - - - The inserted indices in the new version of the collection. - - - - - * - public :ref:`OrderedCollectionChangeSet.State ` - - | :ref:`getState ` () - | - - - Returns the state represented by this change. - - - - - - - -Method Detail -============= - -.. _getChangeRanges: - -.. _getChangeRanges__: - -.. _OrderedCollectionChangeSet_getChangeRanges: - -.. _OrderedCollectionChangeSet_getChangeRanges__: - -.. _io_realm_OrderedCollectionChangeSet_getChangeRanges: - -.. _io_realm_OrderedCollectionChangeSet_getChangeRanges__: - - - -getChangeRanges ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedCollectionChangeSet.Range ` :ref:`getChangeRanges ` () - | - - - - - * - The modified ranges of objects in the new version of the collection. - - - - - - - **Returns** - - the :ref:`Range ` array. A zero-sized array will be returned if no objects were modified. - - - - - - - - - - - - - -.. _getChanges: - -.. _getChanges__: - -.. _OrderedCollectionChangeSet_getChanges: - -.. _OrderedCollectionChangeSet_getChanges__: - -.. _io_realm_OrderedCollectionChangeSet_getChanges: - -.. _io_realm_OrderedCollectionChangeSet_getChanges__: - - - -getChanges ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getChanges ` () - | - - - - - * - The modified indices in the new version of the collection.For :ref:`RealmResults ` , this means that one or more of the properties of the object at the given index were modified (or an object linked to by that object was modified). - - - - - - - - - - - **Returns** - - the indices array. A zero-sized array will be returned if objects were modified. - - - - - - - - - - - -.. _getDeletionRanges: - -.. _getDeletionRanges__: - -.. _OrderedCollectionChangeSet_getDeletionRanges: - -.. _OrderedCollectionChangeSet_getDeletionRanges__: - -.. _io_realm_OrderedCollectionChangeSet_getDeletionRanges: - -.. _io_realm_OrderedCollectionChangeSet_getDeletionRanges__: - - - -getDeletionRanges ------------------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedCollectionChangeSet.Range ` :ref:`getDeletionRanges ` () - | - - - - - * - The deleted ranges of objects in the previous version of the collection. - - - - - - - **Returns** - - the :ref:`Range ` array. A zero-sized array will be returned if no objects were deleted. - - - - - - - - - - - - - -.. _getDeletions: - -.. _getDeletions__: - -.. _OrderedCollectionChangeSet_getDeletions: - -.. _OrderedCollectionChangeSet_getDeletions__: - -.. _io_realm_OrderedCollectionChangeSet_getDeletions: - -.. _io_realm_OrderedCollectionChangeSet_getDeletions__: - - - -getDeletions ------------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getDeletions ` () - | - - - - - * - The deleted indices in the previous version of the collection. - - - - - - - **Returns** - - the indices array. A zero-sized array will be returned if no objects were deleted. - - - - - - - - - - - -.. _getError: - -.. _getError__: - -.. _OrderedCollectionChangeSet_getError: - -.. _OrderedCollectionChangeSet_getError__: - -.. _io_realm_OrderedCollectionChangeSet_getError: - -.. _io_realm_OrderedCollectionChangeSet_getError__: - - - -getError --------- - -.. list-table:: - :header-rows: 1 - - * - | public `Throwable `__ :ref:`getError ` () - | - - - - - * - Returns any error that happened. If an error has happened, the state of the collection and other changeset information is undefined. It is possible for a collection to go into an error state after being created and starting to send updates. - - - - - - - **Returns** - - the error that happened. - - - - - - - - - - - -.. _getInsertionRanges: - -.. _getInsertionRanges__: - -.. _OrderedCollectionChangeSet_getInsertionRanges: - -.. _OrderedCollectionChangeSet_getInsertionRanges__: - -.. _io_realm_OrderedCollectionChangeSet_getInsertionRanges: - -.. _io_realm_OrderedCollectionChangeSet_getInsertionRanges__: - - - -getInsertionRanges ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedCollectionChangeSet.Range ` :ref:`getInsertionRanges ` () - | - - - - - * - The inserted ranges of objects in the new version of the collection. - - - - - - - **Returns** - - the :ref:`Range ` array. A zero-sized array will be returned if no objects were inserted. - - - - - - - - - - - - - -.. _getInsertions: - -.. _getInsertions__: - -.. _OrderedCollectionChangeSet_getInsertions: - -.. _OrderedCollectionChangeSet_getInsertions__: - -.. _io_realm_OrderedCollectionChangeSet_getInsertions: - -.. _io_realm_OrderedCollectionChangeSet_getInsertions__: - - - -getInsertions -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getInsertions ` () - | - - - - - * - The inserted indices in the new version of the collection. - - - - - - - **Returns** - - the indices array. A zero-sized array will be returned if no objects were inserted. - - - - - - - - - - - -.. _getState: - -.. _getState__: - -.. _OrderedCollectionChangeSet_getState: - -.. _OrderedCollectionChangeSet_getState__: - -.. _io_realm_OrderedCollectionChangeSet_getState: - -.. _io_realm_OrderedCollectionChangeSet_getState__: - - - -getState --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedCollectionChangeSet.State ` :ref:`getState ` () - | - - - - - * - Returns the state represented by this change. See :ref:`State ` for a description of the different states a changeset can be in. - - - - - - - - - **Returns** - - what kind of state is represented by this changeset. - - - - - - - - - .. seealso:: - - - - - :ref:`State ` - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/Range.txt b/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/Range.txt deleted file mode 100644 index 8366cfd7aa..0000000000 --- a/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/Range.txt +++ /dev/null @@ -1,248 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class OrderedCollectionChangeSet.Range -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_OrderedCollectionChangeSet_Range: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.OrderedCollectionChangeSet.Range - - - - -**Enclosing class:** - -:ref:`OrderedCollectionChangeSet ` - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Range ` ( - | **int** startIndex, - | **int** length - | ) - - - Creates a :ref:`Range ` with given start index and length. - - - - - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public final **int** - - - - :ref:`length ` - - How many elements are inside this range. - - - * - public final **int** - - - - :ref:`startIndex ` - - The start index of this change range. - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_OrderedCollectionChangeSet_Range_length: - - - -``length`` ------------ - -How many elements are inside this range. - - -.. _io_realm_OrderedCollectionChangeSet_Range_startIndex: - - - -``startIndex`` ---------------- - -The start index of this change range. - - - - -Constructor Detail -================== - -.. _Range: - -.. _Range__: - -.. _io_realm_OrderedCollectionChangeSet_Range: - -.. _io_realm_OrderedCollectionChangeSet_Range__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Range ` ( - | **int** startIndex, - | **int** length - | ) - - - - - * - Creates a :ref:`Range ` with given start index and length. - - - - - - - **Parameters** - - - ``startIndex`` - the start index of this change range. - - - - - ``length`` - how many elements are inside this range. - - - - - - - - - - - - - - -Method Detail -============= - -.. _toString: - -.. _toString__: - -.. _Range_toString: - -.. _Range_toString__: - -.. _OrderedCollectionChangeSet_Range_toString: - -.. _OrderedCollectionChangeSet_Range_toString__: - -.. _io_realm_OrderedCollectionChangeSet_Range_toString: - -.. _io_realm_OrderedCollectionChangeSet_Range_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/State.txt b/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/State.txt deleted file mode 100644 index c0e7acfdfe..0000000000 --- a/source/sdk/temp/java/api/io/realm/OrderedCollectionChangeSet/State.txt +++ /dev/null @@ -1,273 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum OrderedCollectionChangeSet.State -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_OrderedCollectionChangeSet_State: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.OrderedCollectionChangeSet.State - - - - -**Enclosing class:** - -:ref:`OrderedCollectionChangeSet ` - - - -State describing the nature of the changeset. - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`ERROR ` - - This state is used if some error occurred on the background evaluating the query. - - - - - * - :ref:`INITIAL ` - - This state is used first time the callback is invoked. - - - - - * - :ref:`UPDATE ` - - This state is used for every subsequent update after the first. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`OrderedCollectionChangeSet.State ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`OrderedCollectionChangeSet.State ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_OrderedCollectionChangeSet_State_ERROR: - -.. _OrderedCollectionChangeSet_State_ERROR: - - - -``ERROR`` ----------- - -public static final :ref:`OrderedCollectionChangeSet.State ` - -This state is used if some error occurred on the background evaluating the query.For local and fully synchronized Realms, this state should only be encountered if the Realm could not be succesfully opened in the background,. - - - - - -.. _io_realm_OrderedCollectionChangeSet_State_INITIAL: - -.. _OrderedCollectionChangeSet_State_INITIAL: - - - -``INITIAL`` ------------- - -public static final :ref:`OrderedCollectionChangeSet.State ` - -This state is used first time the callback is invoked. The query will have completed and data is ready for the UI. - - - -.. _io_realm_OrderedCollectionChangeSet_State_UPDATE: - -.. _OrderedCollectionChangeSet_State_UPDATE: - - - -``UPDATE`` ------------ - -public static final :ref:`OrderedCollectionChangeSet.State ` - -This state is used for every subsequent update after the first. - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _State_valueOf: - -.. _State_valueOf__: - -.. _OrderedCollectionChangeSet_State_valueOf: - -.. _OrderedCollectionChangeSet_State_valueOf__: - -.. _io_realm_OrderedCollectionChangeSet_State_valueOf: - -.. _io_realm_OrderedCollectionChangeSet_State_valueOf__: - - - -valueOf -------- - -.. _io_realm_OrderedCollectionChangeSet_State_valueOf_java_lang_String_: - -.. _io_realm_OrderedCollectionChangeSet_State_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _OrderedCollectionChangeSet_State_valueOf_java_lang_String_: - -.. _OrderedCollectionChangeSet_State_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`OrderedCollectionChangeSet.State ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _State_values: - -.. _State_values__: - -.. _OrderedCollectionChangeSet_State_values: - -.. _OrderedCollectionChangeSet_State_values__: - -.. _io_realm_OrderedCollectionChangeSet_State_values: - -.. _io_realm_OrderedCollectionChangeSet_State_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`OrderedCollectionChangeSet.State ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/OrderedRealmCollection.txt b/source/sdk/temp/java/api/io/realm/OrderedRealmCollection.txt deleted file mode 100644 index 47a9b70620..0000000000 --- a/source/sdk/temp/java/api/io/realm/OrderedRealmCollection.txt +++ /dev/null @@ -1,1327 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface OrderedRealmCollection -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_OrderedRealmCollection: - - - -io.realm -======== - -**Implemented interfaces:** - - - -- `java.util.List `__ -- :ref:`io.realm.RealmCollection ` -- `java.util.Collection `__ -- `java.lang.Iterable `__ -- `java.util.Collection `__ -- `java.lang.Iterable `__ - - -An ``OrderedRealmCollection`` is a collection which maintains an ordering for its elements. Every element in the ``OrderedRealmCollection`` has an index. Each element can thus be accessed by its index, with the first index being zero. Normally, ``OrderedRealmCollection`` s allow duplicate elements, as compared to Sets, where elements have to be unique. - -There are three types of :ref:`OrderedRealmCollection ` . :ref:`RealmResults ` and :ref:`RealmList ` are live collections. They are up-to-date all the time and they will never contain an invalid :ref:`RealmObject ` . :ref:`OrderedRealmCollectionSnapshot ` is different. An :ref:`OrderedRealmCollectionSnapshot ` can be created from another :ref:`OrderedRealmCollection ` . Its size and elements order stay the same as the original collection's when it was created. :ref:`OrderedRealmCollectionSnapshot ` may contain invalid :ref:`RealmObject ` s if the objects get deleted. - - - -Using iterators to iterate on :ref:`OrderedRealmCollection ` will always work. You can delete or modify the elements without impacting the iterator. See below example: - - - -.. code-block:: java - - - RealmResults dogs = realm.where(Dog.class).findAll(); - int s = dogs.size(); // 10 - realm.beginTransaction(); - for (Dog dog : dogs) { - dog.deleteFromRealm(); - s = dogs.size(); // This will be decreased by 1 every time after a dog is removed. - } - realm.commitTransaction(); - s = dogs.size(); // 0 - - - - - -An iterator created from a live collection will create a stable view when the iterator is created, allowing you to delete and modify elements while iterating without impacting the iterator. However, the ``RealmResults`` backing the iterator will still be live updated meaning that size and order of elements can change when iterating. :ref:`RealmList ` has the same behaviour as :ref:`RealmResults ` since they are both live collections. - - - -A simple for-loop is different. See below example: - - - -.. code-block:: java - - - RealmResults dogs = realm.where(Dog.class).findAll(); - realm.beginTransaction(); - for (int i = 0; i < dogs.size(); i++) { - dogs.get(i).deleteFromRealm(); - } - realm.commitTransaction(); - s = dogs.size(); // 5 - - - - - -The above example only deletes half of elements in the :ref:`RealmResults ` . This is because of ``dogs.size()`` decreased by 1 for every loop. The deletion happens in the loop will immediately impact the size of ``RealmResults`` . To solve this problem, you can create a :ref:`OrderedRealmCollectionSnapshot ` from the :ref:`RealmResults ` or :ref:`RealmList ` and do simple for-loop on that instead: - - - - - -.. code-block:: java - - - RealmResults dogs = realm.where(Dog.class).findAll(); - OrderedRealmCollectionSnapshot snapshot = dogs.createSnapshot(); - // dogs.size() == 10 && snapshot.size() == 10 - realm.beginTransaction(); - for (int i = 0; i < snapshot.size(); i++) { - snapshot.get(0).deleteFromRealm(); - // snapshot.get(0).isValid() == false - } - realm.commitTransaction(); - // dogs.size() == 0 && snapshot.size() == 10 - - - - - -As you can see, after deletion, the size and elements order of snapshot stay the same as before. But the element at the position becomes invalid. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`OrderedRealmCollectionSnapshot ` - - | :ref:`createSnapshot ` () - | - - - Creates a snapshot from this :ref:`OrderedRealmCollection ` . - - - - - - - * - public **boolean** - - | :ref:`deleteFirstFromRealm ` () - | - - - Deletes the first object from the Realm. - - - - - * - public **void** - - | :ref:`deleteFromRealm ` ( - | **int** location - | ) - - - Deletes the object at the given index from the Realm. - - - - - * - public **boolean** - - | :ref:`deleteLastFromRealm ` () - | - - - Deletes the last object from the Realm. - - - - - * - public **E** - - | :ref:`first ` ( - | **E** defaultValue - | ) - - - Gets the first object from the collection. - - - - - * - public **E** - - | :ref:`first ` () - | - - - Gets the first object from the collection. - - - - - * - public **E** - - | :ref:`last ` ( - | **E** defaultValue - | ) - - - Gets the last object from the collection. - - - - - * - public **E** - - | :ref:`last ` () - | - - - Gets the last object from the collection. - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `java.lang.String[] `__ fieldNames, - | :ref:`io.realm.Sort[] ` sortOrders - | ) - - - Sorts a collection based on the provided fields and sort orders. - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - Sorts a collection based on the provided fields and sort orders. - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName, - | :ref:`Sort ` sortOrder - | ) - - - Sorts a collection based on the provided field and sort order. - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName - | ) - - - Sorts a collection based on the provided field in ascending order. - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _createSnapshot: - -.. _createSnapshot__: - -.. _OrderedRealmCollection_createSnapshot: - -.. _OrderedRealmCollection_createSnapshot__: - -.. _io_realm_OrderedRealmCollection_createSnapshot: - -.. _io_realm_OrderedRealmCollection_createSnapshot__: - - - -createSnapshot --------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedRealmCollectionSnapshot ` :ref:`createSnapshot ` () - | - - - - - * - Creates a snapshot from this :ref:`OrderedRealmCollection ` . - - - - - - - - - **Returns** - - the snapshot of this collection. - - - - - **Throws** - - - `java.lang.IllegalStateException `__ - if the Realm is closed or the method is called from the wrong thread. - - - - - `UnsupportedOperationException `__ - if the collection is unmanaged. - - - - - - - - - - .. seealso:: - - - - - :ref:`OrderedRealmCollectionSnapshot ` - - - - - - - - - - - - -.. _deleteFirstFromRealm: - -.. _deleteFirstFromRealm__: - -.. _OrderedRealmCollection_deleteFirstFromRealm: - -.. _OrderedRealmCollection_deleteFirstFromRealm__: - -.. _io_realm_OrderedRealmCollection_deleteFirstFromRealm: - -.. _io_realm_OrderedRealmCollection_deleteFirstFromRealm__: - - - -deleteFirstFromRealm --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteFirstFromRealm ` () - | - - - - - * - Deletes the first object from the Realm. This also removes it from this collection. - - - - - - - **Returns** - - ``true`` if an object was deleted, ``false`` otherwise. - - - - - - - **Throws** - - - `java.lang.IllegalStateException `__ - if the Realm is closed or the method is called on the wrong thread. - - - - - `UnsupportedOperationException `__ - if the collection is unmanaged. - - - - - - - - - - - - -.. _deleteFromRealm: - -.. _deleteFromRealm__: - -.. _OrderedRealmCollection_deleteFromRealm: - -.. _OrderedRealmCollection_deleteFromRealm__: - -.. _io_realm_OrderedRealmCollection_deleteFromRealm: - -.. _io_realm_OrderedRealmCollection_deleteFromRealm__: - - - -deleteFromRealm ---------------- - -.. _io_realm_OrderedRealmCollection_deleteFromRealm_int_: - -.. _deleteFromRealm_int_: - -.. _OrderedRealmCollection_deleteFromRealm_int_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`deleteFromRealm ` ( - | **int** location - | ) - - - - - * - Deletes the object at the given index from the Realm. This also removes it from the collection. - - - - - **Parameters** - - - ``location`` - the array index identifying the object to be removed. - - - - - - - - - - **Throws** - - - `IndexOutOfBoundsException `__ - if ``location < 0 || location >= size()`` . - - - - - - - `java.lang.IllegalStateException `__ - if the Realm is closed or the method is called from the wrong thread. - - - - - `UnsupportedOperationException `__ - if the collection is unmanaged. - - - - - - - - - - - - -.. _deleteLastFromRealm: - -.. _deleteLastFromRealm__: - -.. _OrderedRealmCollection_deleteLastFromRealm: - -.. _OrderedRealmCollection_deleteLastFromRealm__: - -.. _io_realm_OrderedRealmCollection_deleteLastFromRealm: - -.. _io_realm_OrderedRealmCollection_deleteLastFromRealm__: - - - -deleteLastFromRealm -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteLastFromRealm ` () - | - - - - - * - Deletes the last object from the Realm. This also removes it from this collection. - - - - - - - **Returns** - - ``true`` if an object was deleted, ``false`` otherwise. - - - - - - - **Throws** - - - `java.lang.IllegalStateException `__ - if the Realm is closed or the method is called from the wrong thread. - - - - - `UnsupportedOperationException `__ - if the collection is unmanaged. - - - - - - - - - - - - -.. _first: - -.. _first__: - -.. _OrderedRealmCollection_first: - -.. _OrderedRealmCollection_first__: - -.. _io_realm_OrderedRealmCollection_first: - -.. _io_realm_OrderedRealmCollection_first__: - - - -first ------ - -.. _io_realm_OrderedRealmCollection_first_E_: - -.. _first_E_: - -.. _OrderedRealmCollection_first_E_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`first ` ( - | **E** defaultValue - | ) - - - - - * - Gets the first object from the collection. If the collection is empty, the provided default will be used instead. - - - - - - - **Returns** - - the first object or the provided default. - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`first ` () - | - - - - - * - Gets the first object from the collection. - - - - - - - **Returns** - - the first object. - - - - - **Throws** - - - `IndexOutOfBoundsException `__ - if the collection is empty. - - - - - - - - - - - - -.. _last: - -.. _last__: - -.. _OrderedRealmCollection_last: - -.. _OrderedRealmCollection_last__: - -.. _io_realm_OrderedRealmCollection_last: - -.. _io_realm_OrderedRealmCollection_last__: - - - -last ----- - -.. _io_realm_OrderedRealmCollection_last_E_: - -.. _last_E_: - -.. _OrderedRealmCollection_last_E_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`last ` ( - | **E** defaultValue - | ) - - - - - * - Gets the last object from the collection. If the collection is empty, the provided default will be used instead. - - - - - - - **Returns** - - the last object or the provided default. - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`last ` () - | - - - - - * - Gets the last object from the collection. - - - - - - - **Returns** - - the last object. - - - - - **Throws** - - - `IndexOutOfBoundsException `__ - if the collection is empty. - - - - - - - - - - - - -.. _sort: - -.. _sort__: - -.. _OrderedRealmCollection_sort: - -.. _OrderedRealmCollection_sort__: - -.. _io_realm_OrderedRealmCollection_sort: - -.. _io_realm_OrderedRealmCollection_sort__: - - - -sort ----- - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_Sort____: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__Sort____: - -.. _io_realm_OrderedRealmCollection_sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_Sort____: - -.. _io_realm_OrderedRealmCollection_sort_String__Sort____: - -.. _io_realm_OrderedRealmCollection_sort_String____io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_____io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String____Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_____Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String____Sort____: - -.. _io_realm_OrderedRealmCollection_sort_String_____Sort____: - -.. _sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort____: - -.. _sort_java_lang_String__Sort____: - -.. _sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort_: - -.. _sort_String_Sort_: - -.. _sort_String__Sort_: - -.. _sort_String_Sort____: - -.. _sort_String__Sort____: - -.. _sort_String____io_realm_Sort_: - -.. _sort_String_____io_realm_Sort_: - -.. _sort_String____Sort_: - -.. _sort_String_____Sort_: - -.. _sort_String____Sort____: - -.. _sort_String_____Sort____: - -.. _OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_Sort____: - -.. _OrderedRealmCollection_sort_java_lang_String__Sort____: - -.. _OrderedRealmCollection_sort_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String_Sort_: - -.. _OrderedRealmCollection_sort_String__Sort_: - -.. _OrderedRealmCollection_sort_String_Sort____: - -.. _OrderedRealmCollection_sort_String__Sort____: - -.. _OrderedRealmCollection_sort_String____io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String_____io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String____Sort_: - -.. _OrderedRealmCollection_sort_String_____Sort_: - -.. _OrderedRealmCollection_sort_String____Sort____: - -.. _OrderedRealmCollection_sort_String_____Sort____: - -.. _io_realm_OrderedRealmCollection_sort_String[]__Sort[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `java.lang.String[] `__ fieldNames, - | :ref:`io.realm.Sort[] ` sortOrders - | ) - - - - - * - Sorts a collection based on the provided fields and sort orders. - - - - - **Parameters** - - - ``fieldNames`` - an array of field names to sort by. Only fields of type boolean, short, int, long, float, double, Date, and String are supported. - - - - - ``sortOrders`` - the directions to sort by. - - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if a field name does not exist or has an invalid type. - - - - - `java.lang.IllegalStateException `__ - if the Realm is closed, called on the wrong thread or the collection is an unmanaged collection. - - - - - - - - - - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_Sort_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__Sort__String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_io_realm_Sort_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__io_realm_Sort__String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_Sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__Sort__java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_Sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__Sort__String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_Sort_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__Sort__String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_String_Sort_: - -.. _sort_java_lang_String__Sort__String__Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_String_Sort_: - -.. _sort_String__io_realm_Sort__String__Sort_: - -.. _sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_Sort_java_lang_String_Sort_: - -.. _sort_String__Sort__java_lang_String__Sort_: - -.. _sort_String_Sort_String_io_realm_Sort_: - -.. _sort_String__Sort__String__io_realm_Sort_: - -.. _sort_String_Sort_String_Sort_: - -.. _sort_String__Sort__String__Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_Sort_String_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__Sort__String__Sort_: - -.. _OrderedRealmCollection_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _OrderedRealmCollection_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _OrderedRealmCollection_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String_io_realm_Sort_String_Sort_: - -.. _OrderedRealmCollection_sort_String__io_realm_Sort__String__Sort_: - -.. _OrderedRealmCollection_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String_Sort_java_lang_String_Sort_: - -.. _OrderedRealmCollection_sort_String__Sort__java_lang_String__Sort_: - -.. _OrderedRealmCollection_sort_String_Sort_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String__Sort__String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String_Sort_String_Sort_: - -.. _OrderedRealmCollection_sort_String__Sort__String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - - - * - Sorts a collection based on the provided fields and sort orders. - - - - - **Parameters** - - - ``fieldName1`` - first field name. Only fields of type boolean, short, int, long, float, double, Date, and String are supported. - - - - - ``sortOrder1`` - sort order for first field. - - - - - ``fieldName2`` - second field name. Only fields of type boolean, short, int, long, float, double, Date, and String are supported. - - - - - ``sortOrder2`` - sort order for second field. - - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if a field name does not exist or has an invalid type. - - - - - `java.lang.IllegalStateException `__ - if the Realm is closed, called on the wrong thread or the collection is an unmanaged collection. - - - - - - - - - - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String_Sort_: - -.. _io_realm_OrderedRealmCollection_sort_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort_: - -.. _sort_String_Sort_: - -.. _sort_String__Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String_Sort_: - -.. _OrderedRealmCollection_sort_java_lang_String__Sort_: - -.. _OrderedRealmCollection_sort_String_io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String__io_realm_Sort_: - -.. _OrderedRealmCollection_sort_String_Sort_: - -.. _OrderedRealmCollection_sort_String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName, - | :ref:`Sort ` sortOrder - | ) - - - - - * - Sorts a collection based on the provided field and sort order. - - - - - **Parameters** - - - ``fieldName`` - the field name to sort by. Only fields of type boolean, short, int, long, float, double, Date, and String are supported. - - - - - ``sortOrder`` - the direction to sort by. - - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if field name does not exist or has an invalid type. - - - - - `java.lang.IllegalStateException `__ - if the Realm is closed, called on the wrong thread or the collection is an unmanaged collection. - - - - - - - - - - -.. _io_realm_OrderedRealmCollection_sort_java_lang_String_: - -.. _io_realm_OrderedRealmCollection_sort_String_: - -.. _sort_java_lang_String_: - -.. _sort_String_: - -.. _OrderedRealmCollection_sort_java_lang_String_: - -.. _OrderedRealmCollection_sort_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName - | ) - - - - - * - Sorts a collection based on the provided field in ascending order. - - - - - **Parameters** - - - ``fieldName`` - the field name to sort by. Only fields of type boolean, short, int, long, float, double, Date, and String are supported. - - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if field name does not exist or it has an invalid type. - - - - - `java.lang.IllegalStateException `__ - if the Realm is closed, called on the wrong thread or the collection is an unmanaged collection. - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/OrderedRealmCollectionChangeListener.txt b/source/sdk/temp/java/api/io/realm/OrderedRealmCollectionChangeListener.txt deleted file mode 100644 index d3d6a1740a..0000000000 --- a/source/sdk/temp/java/api/io/realm/OrderedRealmCollectionChangeListener.txt +++ /dev/null @@ -1,150 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface OrderedRealmCollectionChangeListener -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_OrderedRealmCollectionChangeListener: - - - -io.realm -======== - -:ref:`OrderedRealmCollectionChangeListener ` can be registered with a :ref:`RealmResults ` to receive a notification with a :ref:`OrderedCollectionChangeSet ` to describe the details of what have been changed in the collection since last time. - -Realm instances on a thread without an `android.os.Looper `__ cannot register a :ref:`OrderedRealmCollectionChangeListener ` . - - - - - - -.. seealso:: - - - - - :ref:`RealmResults.addChangeListener(OrderedRealmCollectionChangeListener) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onChange ` ( - | **T** t, - | :ref:`OrderedCollectionChangeSet ` changeSet - | ) - - - This will be called when the async query is finished the first time or the collection of objects has changed. - - - - - - - -Method Detail -============= - -.. _onChange: - -.. _onChange__: - -.. _OrderedRealmCollectionChangeListener_onChange: - -.. _OrderedRealmCollectionChangeListener_onChange__: - -.. _io_realm_OrderedRealmCollectionChangeListener_onChange: - -.. _io_realm_OrderedRealmCollectionChangeListener_onChange__: - - - -onChange --------- - -.. _io_realm_OrderedRealmCollectionChangeListener_onChange_T_io_realm_OrderedCollectionChangeSet_: - -.. _io_realm_OrderedRealmCollectionChangeListener_onChange_T__io_realm_OrderedCollectionChangeSet_: - -.. _io_realm_OrderedRealmCollectionChangeListener_onChange_T_OrderedCollectionChangeSet_: - -.. _io_realm_OrderedRealmCollectionChangeListener_onChange_T__OrderedCollectionChangeSet_: - -.. _onChange_T_io_realm_OrderedCollectionChangeSet_: - -.. _onChange_T__io_realm_OrderedCollectionChangeSet_: - -.. _onChange_T_OrderedCollectionChangeSet_: - -.. _onChange_T__OrderedCollectionChangeSet_: - -.. _OrderedRealmCollectionChangeListener_onChange_T_io_realm_OrderedCollectionChangeSet_: - -.. _OrderedRealmCollectionChangeListener_onChange_T__io_realm_OrderedCollectionChangeSet_: - -.. _OrderedRealmCollectionChangeListener_onChange_T_OrderedCollectionChangeSet_: - -.. _OrderedRealmCollectionChangeListener_onChange_T__OrderedCollectionChangeSet_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onChange ` ( - | **T** t, - | :ref:`OrderedCollectionChangeSet ` changeSet - | ) - - - - - * - This will be called when the async query is finished the first time or the collection of objects has changed. - - - - - **Parameters** - - - ``t`` - the collection this listener is registered to. - - - - - ``changeSet`` - object with information about the change. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/OrderedRealmCollectionSnapshot.txt b/source/sdk/temp/java/api/io/realm/OrderedRealmCollectionSnapshot.txt deleted file mode 100644 index 78c96304ef..0000000000 --- a/source/sdk/temp/java/api/io/realm/OrderedRealmCollectionSnapshot.txt +++ /dev/null @@ -1,1432 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class OrderedRealmCollectionSnapshot -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_OrderedRealmCollectionSnapshot: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.util.AbstractCollection `__ - | `java.util.AbstractList `__ - | **io.realm.OrderedRealmCollectionImpl** - | io.realm.OrderedRealmCollectionSnapshot - - -An :ref:`OrderedRealmCollectionSnapshot ` is a special type of :ref:`OrderedRealmCollection ` . It can be created by calling :ref:`OrderedRealmCollection.createSnapshot() ` . Unlike :ref:`RealmResults ` and :ref:`RealmList ` , its size and order of elements will never be changed after creation. - -:ref:`OrderedRealmCollectionSnapshot ` is useful when making changes which may impact the size or order of the collection in simple loops. For example: - - - - - -.. code-block:: java - - - final RealmResults dogs = realm.where(Dog.class).findAll(); - final OrderedRealmCollectionSnapshot snapshot = dogs.createSnapshot(); - final int dogsCount = snapshot.size(); // dogs.size() == snapshot.size() == 10 - realm.executeTransaction(new Realm.Transaction() { - /@Override - public void execute(Realm realm) { - for (int i = 0; i < dogsCount; i++) { - // This won't work since RealmResults is always up-to-date, its size gets decreased by 1 after every loop. An - // IndexOutOfBoundsException will be thrown after 5 loops. - // dogs.deleteFromRealm(i); - snapshot.deleteFromRealm(i); // Deletion on OrderedRealmCollectionSnapshot won't change the size of it. - } - } - }); - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`OrderedRealmCollectionSnapshot ` - - | :ref:`createSnapshot ` () - | - - - Creates a snapshot from this :ref:`OrderedRealmCollection ` . - - - - - - - * - public **boolean** - - | :ref:`deleteAllFromRealm ` () - | - - - This deletes all objects in the collection from the underlying Realm. - - - - - * - public **boolean** - - | :ref:`deleteFirstFromRealm ` () - | - - - Deletes the first object from the Realm. - - - - - * - public **void** - - | :ref:`deleteFromRealm ` ( - | **int** location - | ) - - - Deletes the object at the given index from the Realm. - - - - - * - public **boolean** - - | :ref:`deleteLastFromRealm ` () - | - - - Deletes the last object from the Realm. - - - - - * - public :ref:`OrderedRealmCollection ` - - | :ref:`freeze ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isFrozen ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isLoaded ` () - | - - - Checks if a collection has finished loading its data yet. - - - - - * - public **boolean** - - | :ref:`load ` () - | - - - Blocks the collection until all data are available. - - - - - * - public **int** - - | :ref:`size ` () - | - - - Returns the number of elements in this query result. - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `java.lang.String[] `__ fieldNames, - | :ref:`io.realm.Sort[] ` sortOrders - | ) - - - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . - - - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . - - - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName, - | :ref:`Sort ` sortOrder - | ) - - - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . - - - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName - | ) - - - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`where ` () - | - - - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.util.AbstractCollection `__ : ``iterator`` , ``size`` , ``isEmpty`` , ``contains`` , ``toArray`` , ``toArray`` , ``add`` , ``remove`` , ``containsAll`` , ``addAll`` , ``removeAll`` , ``retainAll`` , ``clear`` , ``toString`` -- Methods inherited from class `java.util.AbstractList `__ : ``add`` , ``get`` , ``set`` , ``add`` , ``remove`` , ``indexOf`` , ``lastIndexOf`` , ``clear`` , ``addAll`` , ``iterator`` , ``listIterator`` , ``listIterator`` , ``subList`` , ``equals`` , ``hashCode`` , ``removeRange`` -- Methods inherited from class **io.realm.OrderedRealmCollectionImpl**: ``isValid`` , ``isManaged`` , ``contains`` , ``get`` , ``first`` , ``first`` , ``last`` , ``last`` , ``deleteFromRealm`` , ``deleteAllFromRealm`` , ``iterator`` , ``listIterator`` , ``listIterator`` , ``sort`` , ``sort`` , ``sort`` , ``sort`` , ``size`` , ``min`` , ``minDate`` , ``max`` , ``maxDate`` , ``sum`` , ``average`` , ``remove`` , ``remove`` , ``removeAll`` , ``set`` , ``retainAll`` , ``deleteLastFromRealm`` , ``deleteFirstFromRealm`` , ``clear`` , ``add`` , ``add`` , ``addAll`` , ``addAll`` , ``createSnapshot`` , ``getRealm`` , ``getCollectionOperator`` - - - - -Method Detail -============= - -.. _createSnapshot: - -.. _createSnapshot__: - -.. _OrderedRealmCollectionSnapshot_createSnapshot: - -.. _OrderedRealmCollectionSnapshot_createSnapshot__: - -.. _io_realm_OrderedRealmCollectionSnapshot_createSnapshot: - -.. _io_realm_OrderedRealmCollectionSnapshot_createSnapshot__: - - - -createSnapshot --------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedRealmCollectionSnapshot ` :ref:`createSnapshot ` () - | - - - - - * - Creates a snapshot from this :ref:`OrderedRealmCollection ` . - - - - - - - - - **Returns** - - the snapshot of this collection. - - - - - - - **Overrides** - - ``createSnapshot`` in class **OrderedRealmCollectionImpl** - - - - - - -.. _deleteAllFromRealm: - -.. _deleteAllFromRealm__: - -.. _OrderedRealmCollectionSnapshot_deleteAllFromRealm: - -.. _OrderedRealmCollectionSnapshot_deleteAllFromRealm__: - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteAllFromRealm: - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteAllFromRealm__: - - - -deleteAllFromRealm ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteAllFromRealm ` () - | - - - - - * - This deletes all objects in the collection from the underlying Realm. All objects in the collection snapshot will become invalid. - - - - - - - **Returns** - - ``true`` if objects was deleted, ``false`` otherwise. - - - - - - - **Throws** - - - `IllegalStateException `__ - if the corresponding Realm is closed or in an incorrect thread. - - - - - `java.lang.IllegalStateException `__ - if the Realm has been closed or called from an incorrect thread. - - - - - - - - **Overrides** - - ``deleteAllFromRealm`` in class **OrderedRealmCollectionImpl** - - - - - - -.. _deleteFirstFromRealm: - -.. _deleteFirstFromRealm__: - -.. _OrderedRealmCollectionSnapshot_deleteFirstFromRealm: - -.. _OrderedRealmCollectionSnapshot_deleteFirstFromRealm__: - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteFirstFromRealm: - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteFirstFromRealm__: - - - -deleteFirstFromRealm --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteFirstFromRealm ` () - | - - - - - * - Deletes the first object from the Realm. The first object will become invalid. - - - - - - - **Returns** - - ``true`` if an object was deleted, ``false`` otherwise. - - - - - - - **Throws** - - - `java.lang.IllegalStateException `__ - if the Realm is closed or the method is called on the wrong thread. - - - - - - - - **Overrides** - - ``deleteFirstFromRealm`` in class **OrderedRealmCollectionImpl** - - - - - - -.. _deleteFromRealm: - -.. _deleteFromRealm__: - -.. _OrderedRealmCollectionSnapshot_deleteFromRealm: - -.. _OrderedRealmCollectionSnapshot_deleteFromRealm__: - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteFromRealm: - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteFromRealm__: - - - -deleteFromRealm ---------------- - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteFromRealm_int_: - -.. _deleteFromRealm_int_: - -.. _OrderedRealmCollectionSnapshot_deleteFromRealm_int_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`deleteFromRealm ` ( - | **int** location - | ) - - - - - * - Deletes the object at the given index from the Realm. The object at the given index will become invalid. Just returns if the object is invalid already. - - - - - **Parameters** - - - ``location`` - the array index identifying the object to be removed. - - - - - - - - - - **Throws** - - - `IndexOutOfBoundsException `__ - if ``location < 0 || location >= size()`` . - - - - - - - `java.lang.IllegalStateException `__ - if the Realm is closed or the method is called from the wrong thread. - - - - - - - - **Overrides** - - ``deleteFromRealm`` in class **OrderedRealmCollectionImpl** - - - - - - -.. _deleteLastFromRealm: - -.. _deleteLastFromRealm__: - -.. _OrderedRealmCollectionSnapshot_deleteLastFromRealm: - -.. _OrderedRealmCollectionSnapshot_deleteLastFromRealm__: - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteLastFromRealm: - -.. _io_realm_OrderedRealmCollectionSnapshot_deleteLastFromRealm__: - - - -deleteLastFromRealm -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteLastFromRealm ` () - | - - - - - * - Deletes the last object from the Realm. The last object will become invalid. - - - - - - - **Returns** - - ``true`` if an object was deleted, ``false`` otherwise. - - - - - - - **Throws** - - - `java.lang.IllegalStateException `__ - if the Realm is closed or the method is called from the wrong thread. - - - - - - - - **Overrides** - - ``deleteLastFromRealm`` in class **OrderedRealmCollectionImpl** - - - - - - -.. _freeze: - -.. _freeze__: - -.. _OrderedRealmCollectionSnapshot_freeze: - -.. _OrderedRealmCollectionSnapshot_freeze__: - -.. _io_realm_OrderedRealmCollectionSnapshot_freeze: - -.. _io_realm_OrderedRealmCollectionSnapshot_freeze__: - - - -freeze ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedRealmCollection ` :ref:`freeze ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _isFrozen: - -.. _isFrozen__: - -.. _OrderedRealmCollectionSnapshot_isFrozen: - -.. _OrderedRealmCollectionSnapshot_isFrozen__: - -.. _io_realm_OrderedRealmCollectionSnapshot_isFrozen: - -.. _io_realm_OrderedRealmCollectionSnapshot_isFrozen__: - - - -isFrozen --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isFrozen ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _isLoaded: - -.. _isLoaded__: - -.. _OrderedRealmCollectionSnapshot_isLoaded: - -.. _OrderedRealmCollectionSnapshot_isLoaded__: - -.. _io_realm_OrderedRealmCollectionSnapshot_isLoaded: - -.. _io_realm_OrderedRealmCollectionSnapshot_isLoaded__: - - - -isLoaded --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isLoaded ` () - | - - - - - * - Checks if a collection has finished loading its data yet. - - - - - - - **Returns** - - ``true`` if data has been loaded and is available, ``false`` if data is still being loaded. - - - - - - - - - - - - - -.. _load: - -.. _load__: - -.. _OrderedRealmCollectionSnapshot_load: - -.. _OrderedRealmCollectionSnapshot_load__: - -.. _io_realm_OrderedRealmCollectionSnapshot_load: - -.. _io_realm_OrderedRealmCollectionSnapshot_load__: - - - -load ----- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`load ` () - | - - - - - * - Blocks the collection until all data are available. - - - - - - - **Returns** - - ``true`` if the data could be successfully loaded, ``false`` otherwise. - - - - - - - - - - - - - -.. _size: - -.. _size__: - -.. _OrderedRealmCollectionSnapshot_size: - -.. _OrderedRealmCollectionSnapshot_size__: - -.. _io_realm_OrderedRealmCollectionSnapshot_size: - -.. _io_realm_OrderedRealmCollectionSnapshot_size__: - - - -size ----- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`size ` () - | - - - - - * - Returns the number of elements in this query result. - - - - - - - **Returns** - - the number of elements in this query result. - - - - - - - **Overrides** - - ``size`` in class **OrderedRealmCollectionImpl** - - - - - - -.. _sort: - -.. _sort__: - -.. _OrderedRealmCollectionSnapshot_sort: - -.. _OrderedRealmCollectionSnapshot_sort__: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort__: - - - -sort ----- - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort____: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort____: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_Sort____: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__Sort____: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String____io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_____io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String____Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_____Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String____Sort____: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_____Sort____: - -.. _sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort____: - -.. _sort_java_lang_String__Sort____: - -.. _sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort_: - -.. _sort_String_Sort_: - -.. _sort_String__Sort_: - -.. _sort_String_Sort____: - -.. _sort_String__Sort____: - -.. _sort_String____io_realm_Sort_: - -.. _sort_String_____io_realm_Sort_: - -.. _sort_String____Sort_: - -.. _sort_String_____Sort_: - -.. _sort_String____Sort____: - -.. _sort_String_____Sort____: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort____: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort____: - -.. _OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_Sort____: - -.. _OrderedRealmCollectionSnapshot_sort_String__Sort____: - -.. _OrderedRealmCollectionSnapshot_sort_String____io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_____io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String____Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_____Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String____Sort____: - -.. _OrderedRealmCollectionSnapshot_sort_String_____Sort____: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String[]__Sort[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `java.lang.String[] `__ fieldNames, - | :ref:`io.realm.Sort[] ` sortOrders - | ) - - - - - * - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . Use 'sort()' on the original :ref:`OrderedRealmCollection ` instead. - - - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - - - - - - - - - **Overrides** - - ``sort`` in class **OrderedRealmCollectionImpl** - - - - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort__String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort__String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_Sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__Sort__java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_Sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__Sort__String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_Sort_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__Sort__String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_String_Sort_: - -.. _sort_java_lang_String__Sort__String__Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_String_Sort_: - -.. _sort_String__io_realm_Sort__String__Sort_: - -.. _sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_Sort_java_lang_String_Sort_: - -.. _sort_String__Sort__java_lang_String__Sort_: - -.. _sort_String_Sort_String_io_realm_Sort_: - -.. _sort_String__Sort__String__io_realm_Sort_: - -.. _sort_String_Sort_String_Sort_: - -.. _sort_String__Sort__String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort__String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort__String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_Sort_java_lang_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__Sort__java_lang_String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_Sort_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__Sort__String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_Sort_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__Sort__String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - - - * - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . Use 'sort()' on the original :ref:`OrderedRealmCollection ` instead. - - - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - - - - - - - - - **Overrides** - - ``sort`` in class **OrderedRealmCollectionImpl** - - - - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_Sort_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort_: - -.. _sort_String_Sort_: - -.. _sort_String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String__Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__io_realm_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String_Sort_: - -.. _OrderedRealmCollectionSnapshot_sort_String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName, - | :ref:`Sort ` sortOrder - | ) - - - - - * - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . Use 'sort()' on the original :ref:`OrderedRealmCollection ` instead. - - - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - - - - - - - - - **Overrides** - - ``sort`` in class **OrderedRealmCollectionImpl** - - - - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_java_lang_String_: - -.. _io_realm_OrderedRealmCollectionSnapshot_sort_String_: - -.. _sort_java_lang_String_: - -.. _sort_String_: - -.. _OrderedRealmCollectionSnapshot_sort_java_lang_String_: - -.. _OrderedRealmCollectionSnapshot_sort_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName - | ) - - - - - * - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . Use 'sort()' on the original :ref:`OrderedRealmCollection ` instead. - - - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - - - - - - - - - **Overrides** - - ``sort`` in class **OrderedRealmCollectionImpl** - - - - - - -.. _where: - -.. _where__: - -.. _OrderedRealmCollectionSnapshot_where: - -.. _OrderedRealmCollectionSnapshot_where__: - -.. _io_realm_OrderedRealmCollectionSnapshot_where: - -.. _io_realm_OrderedRealmCollectionSnapshot_where__: - - - -where ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`where ` () - | - - - - - * - Not supported by :ref:`OrderedRealmCollectionSnapshot ` . Use 'where()' on the original :ref:`OrderedRealmCollection ` instead. - - - - - - - - - **Returns** - - a RealmQuery object. - - - - - **Throws** - - - `UnsupportedOperationException `__ - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/ProxyState.txt b/source/sdk/temp/java/api/io/realm/ProxyState.txt deleted file mode 100644 index ac05c97cfb..0000000000 --- a/source/sdk/temp/java/api/io/realm/ProxyState.txt +++ /dev/null @@ -1,1141 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class ProxyState -^^^^^^^^^^^^^^^^ - -.. _io_realm_ProxyState: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.ProxyState - - -This implements ``RealmObjectProxy`` interface, to eliminate copying logic between :ref:`RealmObject ` and :ref:`DynamicRealmObject ` . - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`ProxyState ` () - | - - - - - - - - * - | :ref:`ProxyState ` ( - | **E** model - | ) - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmObjectChangeListener\ ` listener - | ) - - - - - - - - * - public **void** - - | :ref:`checkValidObject ` ( - | :ref:`RealmModel ` value - | ) - - - Check that object is a valid and managed object by this Realm. - - - - - * - public **boolean** - - | :ref:`getAcceptDefaultValue$realm ` () - | - - - - - - - - * - public `List `__ - - | :ref:`getExcludeFields$realm ` () - | - - - - - - - - * - public **BaseRealm** - - | :ref:`getRealm$realm ` () - | - - - - - - - - * - public **Row** - - | :ref:`getRow$realm ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isLoaded ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isUnderConstruction ` () - | - - - - - - - - * - public **void** - - | :ref:`load ` () - | - - - - - - - - * - public **void** - - | :ref:`onQueryFinished ` ( - | **Row** row - | ) - - - - - - - - * - public **void** - - | :ref:`removeAllChangeListeners ` () - | - - - - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmObjectChangeListener\ ` listener - | ) - - - - - - - - * - public **void** - - | :ref:`setAcceptDefaultValue$realm ` ( - | **boolean** acceptDefaultValue - | ) - - - - - - - - * - public **void** - - | :ref:`setConstructionFinished ` () - | - - - - - - - - * - public **void** - - | :ref:`setExcludeFields$realm ` ( - | `java.util.List\ `__ excludeFields - | ) - - - - - - - - * - public **void** - - | :ref:`setRealm$realm ` ( - | **BaseRealm** realm - | ) - - - - - - - - * - public **void** - - | :ref:`setRow$realm ` ( - | **Row** row - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _ProxyState: - -.. _ProxyState__: - -.. _io_realm_ProxyState: - -.. _io_realm_ProxyState__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ProxyState ` () - | - - - - - * - - - - - - - - - - - - -.. _ProxyState: - -.. _ProxyState__: - -.. _io_realm_ProxyState: - -.. _io_realm_ProxyState__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ProxyState ` ( - | **E** model - | ) - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _addChangeListener: - -.. _addChangeListener__: - -.. _ProxyState_addChangeListener: - -.. _ProxyState_addChangeListener__: - -.. _io_realm_ProxyState_addChangeListener: - -.. _io_realm_ProxyState_addChangeListener__: - - - -addChangeListener ------------------ - -.. _io_realm_ProxyState_addChangeListener_io_realm_RealmObjectChangeListener_: - -.. _io_realm_ProxyState_addChangeListener_RealmObjectChangeListener_: - -.. _addChangeListener_io_realm_RealmObjectChangeListener_: - -.. _addChangeListener_RealmObjectChangeListener_: - -.. _ProxyState_addChangeListener_io_realm_RealmObjectChangeListener_: - -.. _ProxyState_addChangeListener_RealmObjectChangeListener_: - -.. _io_realm_ProxyState_addChangeListener_RealmObjectChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmObjectChangeListener\ ` listener - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _checkValidObject: - -.. _checkValidObject__: - -.. _ProxyState_checkValidObject: - -.. _ProxyState_checkValidObject__: - -.. _io_realm_ProxyState_checkValidObject: - -.. _io_realm_ProxyState_checkValidObject__: - - - -checkValidObject ----------------- - -.. _io_realm_ProxyState_checkValidObject_io_realm_RealmModel_: - -.. _io_realm_ProxyState_checkValidObject_RealmModel_: - -.. _checkValidObject_io_realm_RealmModel_: - -.. _checkValidObject_RealmModel_: - -.. _ProxyState_checkValidObject_io_realm_RealmModel_: - -.. _ProxyState_checkValidObject_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`checkValidObject ` ( - | :ref:`RealmModel ` value - | ) - - - - - * - Check that object is a valid and managed object by this Realm. Used by proxy classes to verify input. - - - - - **Parameters** - - - ``value`` - model object - - - - - - - - - - - - - - - - -.. _getAcceptDefaultValue_realm: - -.. _getAcceptDefaultValue_realm__: - -.. _ProxyState_getAcceptDefaultValue_realm: - -.. _ProxyState_getAcceptDefaultValue_realm__: - -.. _io_realm_ProxyState_getAcceptDefaultValue_realm: - -.. _io_realm_ProxyState_getAcceptDefaultValue_realm__: - - - -getAcceptDefaultValue$realm ---------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`getAcceptDefaultValue$realm ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getExcludeFields_realm: - -.. _getExcludeFields_realm__: - -.. _ProxyState_getExcludeFields_realm: - -.. _ProxyState_getExcludeFields_realm__: - -.. _io_realm_ProxyState_getExcludeFields_realm: - -.. _io_realm_ProxyState_getExcludeFields_realm__: - - - -getExcludeFields$realm ----------------------- - -.. list-table:: - :header-rows: 1 - - * - | public `List `__ :ref:`getExcludeFields$realm ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getRealm_realm: - -.. _getRealm_realm__: - -.. _ProxyState_getRealm_realm: - -.. _ProxyState_getRealm_realm__: - -.. _io_realm_ProxyState_getRealm_realm: - -.. _io_realm_ProxyState_getRealm_realm__: - - - -getRealm$realm --------------- - -.. list-table:: - :header-rows: 1 - - * - | public **BaseRealm** :ref:`getRealm$realm ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getRow_realm: - -.. _getRow_realm__: - -.. _ProxyState_getRow_realm: - -.. _ProxyState_getRow_realm__: - -.. _io_realm_ProxyState_getRow_realm: - -.. _io_realm_ProxyState_getRow_realm__: - - - -getRow$realm ------------- - -.. list-table:: - :header-rows: 1 - - * - | public **Row** :ref:`getRow$realm ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _isLoaded: - -.. _isLoaded__: - -.. _ProxyState_isLoaded: - -.. _ProxyState_isLoaded__: - -.. _io_realm_ProxyState_isLoaded: - -.. _io_realm_ProxyState_isLoaded__: - - - -isLoaded --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isLoaded ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _isUnderConstruction: - -.. _isUnderConstruction__: - -.. _ProxyState_isUnderConstruction: - -.. _ProxyState_isUnderConstruction__: - -.. _io_realm_ProxyState_isUnderConstruction: - -.. _io_realm_ProxyState_isUnderConstruction__: - - - -isUnderConstruction -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isUnderConstruction ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _load: - -.. _load__: - -.. _ProxyState_load: - -.. _ProxyState_load__: - -.. _io_realm_ProxyState_load: - -.. _io_realm_ProxyState_load__: - - - -load ----- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`load ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _onQueryFinished: - -.. _onQueryFinished__: - -.. _ProxyState_onQueryFinished: - -.. _ProxyState_onQueryFinished__: - -.. _io_realm_ProxyState_onQueryFinished: - -.. _io_realm_ProxyState_onQueryFinished__: - - - -onQueryFinished ---------------- - -.. _io_realm_ProxyState_onQueryFinished_Row_: - -.. _onQueryFinished_Row_: - -.. _ProxyState_onQueryFinished_Row_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onQueryFinished ` ( - | **Row** row - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _removeAllChangeListeners: - -.. _removeAllChangeListeners__: - -.. _ProxyState_removeAllChangeListeners: - -.. _ProxyState_removeAllChangeListeners__: - -.. _io_realm_ProxyState_removeAllChangeListeners: - -.. _io_realm_ProxyState_removeAllChangeListeners__: - - - -removeAllChangeListeners ------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeAllChangeListeners ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _removeChangeListener: - -.. _removeChangeListener__: - -.. _ProxyState_removeChangeListener: - -.. _ProxyState_removeChangeListener__: - -.. _io_realm_ProxyState_removeChangeListener: - -.. _io_realm_ProxyState_removeChangeListener__: - - - -removeChangeListener --------------------- - -.. _io_realm_ProxyState_removeChangeListener_io_realm_RealmObjectChangeListener_: - -.. _io_realm_ProxyState_removeChangeListener_RealmObjectChangeListener_: - -.. _removeChangeListener_io_realm_RealmObjectChangeListener_: - -.. _removeChangeListener_RealmObjectChangeListener_: - -.. _ProxyState_removeChangeListener_io_realm_RealmObjectChangeListener_: - -.. _ProxyState_removeChangeListener_RealmObjectChangeListener_: - -.. _io_realm_ProxyState_removeChangeListener_RealmObjectChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmObjectChangeListener\ ` listener - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setAcceptDefaultValue_realm: - -.. _setAcceptDefaultValue_realm__: - -.. _ProxyState_setAcceptDefaultValue_realm: - -.. _ProxyState_setAcceptDefaultValue_realm__: - -.. _io_realm_ProxyState_setAcceptDefaultValue_realm: - -.. _io_realm_ProxyState_setAcceptDefaultValue_realm__: - - - -setAcceptDefaultValue$realm ---------------------------- - -.. _io_realm_ProxyState_setAcceptDefaultValue_realm_boolean_: - -.. _setAcceptDefaultValue_realm_boolean_: - -.. _ProxyState_setAcceptDefaultValue_realm_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setAcceptDefaultValue$realm ` ( - | **boolean** acceptDefaultValue - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setConstructionFinished: - -.. _setConstructionFinished__: - -.. _ProxyState_setConstructionFinished: - -.. _ProxyState_setConstructionFinished__: - -.. _io_realm_ProxyState_setConstructionFinished: - -.. _io_realm_ProxyState_setConstructionFinished__: - - - -setConstructionFinished ------------------------ - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setConstructionFinished ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _setExcludeFields_realm: - -.. _setExcludeFields_realm__: - -.. _ProxyState_setExcludeFields_realm: - -.. _ProxyState_setExcludeFields_realm__: - -.. _io_realm_ProxyState_setExcludeFields_realm: - -.. _io_realm_ProxyState_setExcludeFields_realm__: - - - -setExcludeFields$realm ----------------------- - -.. _io_realm_ProxyState_setExcludeFields_realm_java_util_List_: - -.. _io_realm_ProxyState_setExcludeFields_realm_List_: - -.. _setExcludeFields_realm_java_util_List_: - -.. _setExcludeFields_realm_List_: - -.. _ProxyState_setExcludeFields_realm_java_util_List_: - -.. _ProxyState_setExcludeFields_realm_List_: - -.. _io_realm_ProxyState_setExcludeFields_realm_List_String__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setExcludeFields$realm ` ( - | `java.util.List\ `__ excludeFields - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setRealm_realm: - -.. _setRealm_realm__: - -.. _ProxyState_setRealm_realm: - -.. _ProxyState_setRealm_realm__: - -.. _io_realm_ProxyState_setRealm_realm: - -.. _io_realm_ProxyState_setRealm_realm__: - - - -setRealm$realm --------------- - -.. _io_realm_ProxyState_setRealm_realm_io_realm_BaseRealm_: - -.. _io_realm_ProxyState_setRealm_realm_BaseRealm_: - -.. _setRealm_realm_io_realm_BaseRealm_: - -.. _setRealm_realm_BaseRealm_: - -.. _ProxyState_setRealm_realm_io_realm_BaseRealm_: - -.. _ProxyState_setRealm_realm_BaseRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setRealm$realm ` ( - | **BaseRealm** realm - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setRow_realm: - -.. _setRow_realm__: - -.. _ProxyState_setRow_realm: - -.. _ProxyState_setRow_realm__: - -.. _io_realm_ProxyState_setRow_realm: - -.. _io_realm_ProxyState_setRow_realm__: - - - -setRow$realm ------------- - -.. _io_realm_ProxyState_setRow_realm_Row_: - -.. _setRow_realm_Row_: - -.. _ProxyState_setRow_realm_Row_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setRow$realm ` ( - | **Row** row - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/Realm.txt b/source/sdk/temp/java/api/io/realm/Realm.txt deleted file mode 100644 index 77d2e92a68..0000000000 --- a/source/sdk/temp/java/api/io/realm/Realm.txt +++ /dev/null @@ -1,6101 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Realm -^^^^^^^^^^^ - -.. _io_realm_Realm: - - - -io.realm -======== - - - | `java.lang.Object `__ - | **io.realm.BaseRealm** - | io.realm.Realm - - -The Realm class is the storage and transactional manager of your object persistent store. It is in charge of creating instances of your RealmObjects. Objects within a Realm can be queried and read at any time. Creating, modifying, and deleting objects must be done while inside a transaction. See :ref:`executeTransaction(Transaction) ` - -The transactions ensure that multiple instances (on multiple threads) can access the same objects in a consistent state with full ACID guarantees. - -It is important to remember to call the **close()** method when done with a Realm instance. Failing to do so can lead to `java.lang.OutOfMemoryError `__ as the native resources cannot be freed. - - - -Realm instances cannot be used across different threads. This means that you have to open an instance on each thread you want to use Realm. Realm instances are cached automatically per thread using reference counting, so as long as the reference count doesn't reach zero, calling :ref:`getInstance(RealmConfiguration) ` will just return the cached Realm and should be considered a lightweight operation. - - - -For the UI thread this means that opening and closing Realms should occur in either onCreate/onDestroy or onStart/onStop. - -Realm instances coordinate their state across threads using the `android.os.Handler `__ mechanism. This also means that Realm instances on threads without an `android.os.Looper `__ cannot receive updates unless **refresh()** is manually called. - - - -A standard pattern for working with Realm in Android activities can be seen below: - - - -.. code-block:: java - - public class RealmApplication extends Application { - - @Override - public void onCreate() { - super.onCreate(); - - // The Realm file will be located in package's "files" directory. - RealmConfiguration realmConfig = new RealmConfiguration.Builder(this).build(); - Realm.setDefaultConfiguration(realmConfig); - } - } - - public class RealmActivity extends Activity { - - private Realm realm; - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - setContentView(R.layout.layout_main); - realm = Realm.getDefaultInstance(); - } - - @Override - protected void onDestroy() { - super.onDestroy(); - realm.close(); - } - } - - -Realm supports String and byte fields containing up to 16 MB. - - - - -.. seealso:: - - - - - `ACID `__ - - - - - - `Examples using Realm `__ - - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static interface`` - - :ref:`Realm.Transaction ` - - - * - ``public abstract static`` - - :ref:`Realm.Callback ` - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static final `String `__ - - - - :ref:`DEFAULT_REALM_NAME ` - - - - - * - public static final **int** - - - - :ref:`ENCRYPTION_KEY_LENGTH ` - - The required length for encryption keys used to encrypt Realm data. - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - Adds a change listener to the Realm. - - - - - * - public **** - - | :ref:`asFlowable ` () - | - - - Returns an RxJava Flowable that monitors changes to this Realm. - - - - - * - public static **boolean** - - | :ref:`compactRealm ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - Compacts a Realm file. - - - - - * - public **E** - - | :ref:`copyFromRealm ` <**E** >( - | **E** realmObject, - | **int** maxDepth - | ) - - - Makes an unmanaged in-memory copy of an already persisted :ref:`RealmObject ` . - - - - - - - * - public **E** - - | :ref:`copyFromRealm ` <**E** >( - | **E** realmObject - | ) - - - Makes an unmanaged in-memory copy of an already persisted :ref:`RealmObject ` . - - - - - - - * - public `List `__ - - | :ref:`copyFromRealm ` <**E** >( - | `java.lang.Iterable\ `__ realmObjects, - | **int** maxDepth - | ) - - - Makes an unmanaged in-memory copy of already persisted RealmObjects. - - - - - * - public `List `__ - - | :ref:`copyFromRealm ` <**E** >( - | `java.lang.Iterable\ `__ realmObjects - | ) - - - Makes an unmanaged in-memory copy of already persisted RealmObjects. - - - - - * - public `List `__ - - | :ref:`copyToRealm ` <**E** >( - | `java.lang.Iterable\ `__ objects, - | :ref:`io.realm.ImportFlag[] ` flags - | ) - - - Copies a collection of RealmObjects to the Realm instance and returns their copy. - - - - - * - public **E** - - | :ref:`copyToRealm ` <**E** >( - | **E** object, - | :ref:`io.realm.ImportFlag[] ` flags - | ) - - - Copies a RealmObject to the Realm instance and returns the copy. - - - - - * - public `List `__ - - | :ref:`copyToRealmOrUpdate ` <**E** >( - | `java.lang.Iterable\ `__ objects, - | :ref:`io.realm.ImportFlag[] ` flags - | ) - - - Updates a list of existing RealmObjects that is identified by their :ref:`io.realm.annotations.PrimaryKey ` or creates a new copy if no existing object could be found. - - - - - - - * - public **E** - - | :ref:`copyToRealmOrUpdate ` <**E** >( - | **E** object, - | :ref:`io.realm.ImportFlag[] ` flags - | ) - - - Updates an existing RealmObject that is identified by the same :ref:`io.realm.annotations.PrimaryKey ` or creates a new copy if no existing object could be found. - - - - - - - * - public **void** - - | :ref:`createAllFromJson ` <**E** >( - | `java.lang.Class\ `__ clazz, - | **JSONArray** json - | ) - - - Creates a Realm object for each object in a JSON array. - - - - - * - public **E** - - | :ref:`createEmbeddedObject ` <**E** >( - | `java.lang.Class\ `__ clazz, - | :ref:`RealmModel ` parentObject, - | `String `__ parentProperty - | ) - - - Instantiates and adds a new embedded object to the Realm. - - - - - * - public **E** - - | :ref:`createObject ` <**E** >( - | `java.lang.Class\ `__ clazz, - | `Object `__ primaryKeyValue - | ) - - - Instantiates and adds a new object to the Realm with the primary key value already set. - - - - - * - public **E** - - | :ref:`createObject ` <**E** >( - | `java.lang.Class\ `__ clazz - | ) - - - Instantiates and adds a new object to the Realm. - - - - - * - public **E** - - | :ref:`createObjectFromJson ` <**E** >( - | `java.lang.Class\ `__ clazz, - | **JSONObject** json - | ) - - - Creates a Realm object pre-filled with data from a JSON object. - - - - - * - public **void** - - | :ref:`createOrUpdateAllFromJson ` <**E** >( - | `java.lang.Class\ `__ clazz, - | **JSONArray** json - | ) - - - Tries to update a list of existing objects identified by their primary key with new JSON data. - - - - - * - public **E** - - | :ref:`createOrUpdateObjectFromJson ` <**E** >( - | `java.lang.Class\ `__ clazz, - | **JSONObject** json - | ) - - - Tries to update an existing object defined by its primary key with new JSON data. - - - - - * - public **void** - - | :ref:`delete ` ( - | `java.lang.Class\ `__ clazz - | ) - - - Deletes all objects of the specified class from the Realm. - - - - - * - public static **boolean** - - | :ref:`deleteRealm ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - Deletes the Realm file along with the related temporary files specified by the given :ref:`RealmConfiguration ` from the filesystem. - - - - - - - * - public **void** - - | :ref:`executeTransaction ` ( - | :ref:`Realm.Transaction ` transaction - | ) - - - Executes a given transaction on the Realm. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`executeTransactionAsync ` ( - | :ref:`Realm.Transaction ` transaction, - | :ref:`Realm.Transaction.OnSuccess ` onSuccess, - | :ref:`Realm.Transaction.OnError ` onError - | ) - - - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnSuccess and OnError callbacks. - - - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`executeTransactionAsync ` ( - | :ref:`Realm.Transaction ` transaction, - | :ref:`Realm.Transaction.OnError ` onError - | ) - - - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnError callback. - - - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`executeTransactionAsync ` ( - | :ref:`Realm.Transaction ` transaction, - | :ref:`Realm.Transaction.OnSuccess ` onSuccess - | ) - - - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnSuccess callback. - - - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`executeTransactionAsync ` ( - | :ref:`Realm.Transaction ` transaction - | ) - - - Similar to :ref:`executeTransaction(Transaction) ` but runs asynchronously on a worker thread. - - - - - - - * - public :ref:`Realm ` - - | :ref:`freeze ` () - | - - - Returns a frozen snapshot of the current Realm. - - - - - * - public static **Context** - - | :ref:`getApplicationContext ` () - | - - - Get the application context used when initializing Realm with :ref:`Realm.init(Context) ` or :ref:`Realm.init(Context, String) ` . - - - - - - - * - public static :ref:`RealmConfiguration ` - - | :ref:`getDefaultConfiguration ` () - | - - - Returns the default configuration for :ref:`getDefaultInstance() ` . - - - - - - - * - public static :ref:`Realm ` - - | :ref:`getDefaultInstance ` () - | - - - Realm static constructor that returns the Realm instance defined by the :ref:`io.realm.RealmConfiguration ` set by :ref:`setDefaultConfiguration(RealmConfiguration) ` - - - - - - - * - public static `Object `__ - - | :ref:`getDefaultModule ` () - | - - - Returns the default Realm module. - - - - - * - public static **int** - - | :ref:`getGlobalInstanceCount ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - Returns the current number of open Realm instances across all threads in current process that are using this configuration. - - - - - * - public static :ref:`Realm ` - - | :ref:`getInstance ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - Realm static constructor that returns the Realm instance defined by provided :ref:`io.realm.RealmConfiguration ` - - - - - - - * - public static :ref:`RealmAsyncTask ` - - | :ref:`getInstanceAsync ` ( - | :ref:`RealmConfiguration ` configuration, - | :ref:`Realm.Callback ` callback - | ) - - - The creation of the first Realm instance per :ref:`RealmConfiguration ` in a process can take some time as all initialization code need to run at that point (setting up the Realm, validating schemas and creating initial data). - - - - - - - * - public static **int** - - | :ref:`getLocalInstanceCount ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - Returns the current number of open Realm instances on the thread calling this method. - - - - - * - public :ref:`RealmSchema ` - - | :ref:`getSchema ` () - | - - - Returns the schema for this Realm. - - - - - * - public static synchronized **void** - - | :ref:`init ` ( - | **Context** context, - | `String `__ userAgent - | ) - - - Initializes the Realm library and creates a default configuration that is ready to use. - - - - - * - public static synchronized **void** - - | :ref:`init ` ( - | **Context** context - | ) - - - Initializes the Realm library and creates a default configuration that is ready to use. - - - - - * - public **void** - - | :ref:`insert ` ( - | :ref:`RealmModel ` object - | ) - - - Inserts an unmanaged RealmObject. - - - - - * - public **void** - - | :ref:`insert ` ( - | `java.util.Collection\ `__ objects - | ) - - - Inserts a list of an unmanaged RealmObjects. - - - - - * - public **void** - - | :ref:`insertOrUpdate ` ( - | :ref:`RealmModel ` object - | ) - - - Inserts or updates an unmanaged RealmObject. - - - - - * - public **void** - - | :ref:`insertOrUpdate ` ( - | `java.util.Collection\ `__ objects - | ) - - - Inserts or updates a list of unmanaged RealmObjects. - - - - - * - public **boolean** - - | :ref:`isEmpty ` () - | - - - Checks if this :ref:`io.realm.Realm ` contains any objects. - - - - - - - * - public static **void** - - | :ref:`migrateRealm ` ( - | :ref:`RealmConfiguration ` configuration, - | :ref:`RealmMigration ` migration - | ) - - - Manually triggers a migration on a RealmMigration. - - - - - * - public static **void** - - | :ref:`migrateRealm ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - Manually triggers the migration associated with a given RealmConfiguration. - - - - - * - public **void** - - | :ref:`removeAllChangeListeners ` () - | - - - Removes all user-defined change listeners. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - Removes the specified change listener. - - - - - * - public static **void** - - | :ref:`removeDefaultConfiguration ` () - | - - - Removes the current default configuration (if any). - - - - - * - public static **void** - - | :ref:`setDefaultConfiguration ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - Sets the :ref:`io.realm.RealmConfiguration ` used when calling :ref:`getDefaultInstance() ` . - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`where ` <**E** >( - | `java.lang.Class\ `__ clazz - | ) - - - Returns a typed RealmQuery, which can be used to query for specific objects of this type - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class **io.realm.BaseRealm**: ``setAutoRefresh`` , ``isAutoRefresh`` , ``refresh`` , ``isInTransaction`` , ``addListener`` , ``removeListener`` , ``asFlowable`` , ``removeAllListeners`` , ``writeCopyTo`` , ``writeEncryptedCopyTo`` , ``waitForChange`` , ``stopWaitForChange`` , ``beginTransaction`` , ``commitTransaction`` , ``cancelTransaction`` , ``freeze`` , ``isFrozen`` , ``getNumberOfActiveVersions`` , ``checkIfValid`` , ``checkAllowQueriesOnUiThread`` , ``checkAllowWritesOnUiThread`` , ``checkIfInTransaction`` , ``checkIfValidAndInTransaction`` , ``getPath`` , ``getConfiguration`` , ``getVersion`` , ``close`` , ``isClosed`` , ``isEmpty`` , ``getSchema`` , ``getSubscriptions`` , ``deleteAll`` , ``migrateRealm`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_Realm_DEFAULT_REALM_NAME: - - - -``DEFAULT_REALM_NAME`` ------------------------ - - - - -.. _io_realm_Realm_ENCRYPTION_KEY_LENGTH: - - - -``ENCRYPTION_KEY_LENGTH`` --------------------------- - -The required length for encryption keys used to encrypt Realm data. - - - - -Method Detail -============= - -.. _addChangeListener: - -.. _addChangeListener__: - -.. _Realm_addChangeListener: - -.. _Realm_addChangeListener__: - -.. _io_realm_Realm_addChangeListener: - -.. _io_realm_Realm_addChangeListener__: - - - -addChangeListener ------------------ - -.. _io_realm_Realm_addChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_Realm_addChangeListener_RealmChangeListener_: - -.. _addChangeListener_io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmChangeListener_: - -.. _Realm_addChangeListener_io_realm_RealmChangeListener_: - -.. _Realm_addChangeListener_RealmChangeListener_: - -.. _io_realm_Realm_addChangeListener_RealmChangeListener_Realm__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - - - * - Adds a change listener to the Realm.The listeners will be executed when changes are committed by this or another thread. - - Realm instances are per thread singletons and cached, so listeners should be removed manually even if calling **close()**. Otherwise there is a risk of memory leaks. - - - - - - - - - **Parameters** - - - ``listener`` - the change listener. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to register a listener from a non-Looper or **IntentService** thread. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - :ref:`removeChangeListener(RealmChangeListener) ` - - - - - :ref:`removeAllChangeListeners() ` - - - - - - - - - - - - -.. _asFlowable: - -.. _asFlowable__: - -.. _Realm_asFlowable: - -.. _Realm_asFlowable__: - -.. _io_realm_Realm_asFlowable: - -.. _io_realm_Realm_asFlowable__: - - - -asFlowable ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`asFlowable ` () - | - - - - - * - Returns an RxJava Flowable that monitors changes to this Realm. It will emit the current state when subscribed to. Items will continually be emitted as the Realm is updated - ``onComplete`` will never be called. - - Items emitted from Realm Flowables are frozen (See **freeze()**. This means that they are immutable and can be read on any thread. - - - - Realm Flowables always emit items from the thread holding the live Realm. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - realm.asFlowable() - .observeOn(Schedulers.computation()) - .map(rxRealm -> doExpensiveWork(rxRealm)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - If you would like the ``asFlowable()`` to stop emitting items, you can instruct RxJava to only emit only the first item by using the ``first()`` operator: - - - - - - .. code-block:: java - - - realm.asFlowable().first().subscribe( ... ); // You only get the results once - - - - - - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - - - **Overrides** - - ``asFlowable`` in class **BaseRealm** - - - - - - -.. _compactRealm: - -.. _compactRealm__: - -.. _Realm_compactRealm: - -.. _Realm_compactRealm__: - -.. _io_realm_Realm_compactRealm: - -.. _io_realm_Realm_compactRealm__: - - - -compactRealm ------------- - -.. _io_realm_Realm_compactRealm_io_realm_RealmConfiguration_: - -.. _io_realm_Realm_compactRealm_RealmConfiguration_: - -.. _compactRealm_io_realm_RealmConfiguration_: - -.. _compactRealm_RealmConfiguration_: - -.. _Realm_compactRealm_io_realm_RealmConfiguration_: - -.. _Realm_compactRealm_RealmConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public static **boolean** :ref:`compactRealm ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - - - * - Compacts a Realm file. A Realm file usually contain free/unused space. This method removes this free space and the file size is thereby reduced. Objects within the Realm files are untouched.The file must be closed before this method is called, otherwise ``false`` will be returned. - - - | The file system should have free space for at least a copy of the Realm file. - | The Realm file is left untouched if any file operation fails. - | - - - - - - - **Parameters** - - - ``configuration`` - a :ref:`RealmConfiguration ` pointing to a Realm file. - - - - - - - - - - **Returns** - - ``true`` if successful, ``false`` if any file operation failed. - - - - - - - - - - - - - -.. _copyFromRealm: - -.. _copyFromRealm__: - -.. _Realm_copyFromRealm: - -.. _Realm_copyFromRealm__: - -.. _io_realm_Realm_copyFromRealm: - -.. _io_realm_Realm_copyFromRealm__: - - - -copyFromRealm -------------- - -.. _io_realm_Realm_copyFromRealm_E_int_: - -.. _io_realm_Realm_copyFromRealm_E__int_: - -.. _io_realm_Realm_copyFromRealm_RealmModel_int_: - -.. _io_realm_Realm_copyFromRealm_RealmModel__int_: - -.. _copyFromRealm_E_int_: - -.. _copyFromRealm_E__int_: - -.. _copyFromRealm_RealmModel_int_: - -.. _copyFromRealm_RealmModel__int_: - -.. _Realm_copyFromRealm_E_int_: - -.. _Realm_copyFromRealm_E__int_: - -.. _Realm_copyFromRealm_RealmModel_int_: - -.. _Realm_copyFromRealm_RealmModel__int_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`copyFromRealm ` <**E** >( - | **E** realmObject, - | **int** maxDepth - | ) - - - - - * - Makes an unmanaged in-memory copy of an already persisted :ref:`RealmObject ` . This is a deep copy that will copy all referenced objects up to the defined depth. - - The copied object(s) are all detached from Realm and they will no longer be automatically updated. This means that the copied objects might contain data that are no longer consistent with other managed Realm objects. - - \*WARNING\*: Any changes to copied objects can be merged back into Realm using :ref:`copyToRealmOrUpdate(RealmModel, ImportFlag...) ` , but all fields will be overridden, not just those that were changed. This includes references to other objects even though they might be ``null`` due to ``maxDepth`` being reached. This can also potentially override changes made by other threads. This behaviour can be modified using :ref:`ImportFlag ` s. - - - - - - - **Type Parameters** - - - ``E`` - type of object. - - - - - - - - **Parameters** - - - ``realmObject`` - :ref:`RealmObject ` to copy. - - - - - - - ``maxDepth`` - limit of the deep copy. All references after this depth will be ``null`` . Starting depth is ``0`` . - - - - - - - - - - **Returns** - - an in-memory detached copy of the managed :ref:`RealmObject ` . - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if ``maxDepth < 0`` , the RealmObject is no longer accessible or it is a :ref:`DynamicRealmObject ` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`copyToRealmOrUpdate(RealmModel, ImportFlag...) ` - - - - - - - - - - -.. _io_realm_Realm_copyFromRealm_E_: - -.. _io_realm_Realm_copyFromRealm_RealmModel_: - -.. _copyFromRealm_E_: - -.. _copyFromRealm_RealmModel_: - -.. _Realm_copyFromRealm_E_: - -.. _Realm_copyFromRealm_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`copyFromRealm ` <**E** >( - | **E** realmObject - | ) - - - - - * - Makes an unmanaged in-memory copy of an already persisted :ref:`RealmObject ` . This is a deep copy that will copy all referenced objects. - - The copied object(s) are all detached from Realm and they will no longer be automatically updated. This means that the copied objects might contain data that are no longer consistent with other managed Realm objects. - - \*WARNING\*: Any changes to copied objects can be merged back into Realm using :ref:`copyToRealmOrUpdate(RealmModel, ImportFlag...) ` , but all fields will be overridden, not just those that were changed. This includes references to other objects, and can potentially override changes made by other threads. This behaviour can be modified using :ref:`ImportFlag ` s. - - - - - - - **Type Parameters** - - - ``E`` - type of object. - - - - - - - - **Parameters** - - - ``realmObject`` - :ref:`RealmObject ` to copy. - - - - - - - - - - **Returns** - - an in-memory detached copy of the managed :ref:`RealmObject ` . - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the RealmObject is no longer accessible or it is a :ref:`DynamicRealmObject ` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`copyToRealmOrUpdate(RealmModel, ImportFlag...) ` - - - - - - - - - - -.. _io_realm_Realm_copyFromRealm_java_lang_Iterable_int_: - -.. _io_realm_Realm_copyFromRealm_java_lang_Iterable__int_: - -.. _io_realm_Realm_copyFromRealm_Iterable_int_: - -.. _io_realm_Realm_copyFromRealm_Iterable__int_: - -.. _copyFromRealm_java_lang_Iterable_int_: - -.. _copyFromRealm_java_lang_Iterable__int_: - -.. _copyFromRealm_Iterable_int_: - -.. _copyFromRealm_Iterable__int_: - -.. _Realm_copyFromRealm_java_lang_Iterable_int_: - -.. _Realm_copyFromRealm_java_lang_Iterable__int_: - -.. _Realm_copyFromRealm_Iterable_int_: - -.. _Realm_copyFromRealm_Iterable__int_: - -.. _io_realm_Realm_copyFromRealm_Iterable_E___int_: - -.. list-table:: - :header-rows: 1 - - * - | public `List `__ :ref:`copyFromRealm ` <**E** >( - | `java.lang.Iterable\ `__ realmObjects, - | **int** maxDepth - | ) - - - - - * - Makes an unmanaged in-memory copy of already persisted RealmObjects. This is a deep copy that will copy all referenced objects up to the defined depth.The copied objects are all detached from Realm and they will no longer be automatically updated. This means that the copied objects might contain data that are no longer consistent with other managed Realm objects. - - \*WARNING\*: Any changes to copied objects can be merged back into Realm using :ref:`copyToRealmOrUpdate(Iterable, ImportFlag...) ` , but all fields will be overridden, not just those that were changed. This includes references to other objects even though they might be ``null`` due to ``maxDepth`` being reached. This can also potentially override changes made by other threads. This behaviour can be modified using :ref:`ImportFlag ` s. - - - - - - - **Type Parameters** - - - ``E`` - type of object. - - - - - - - - **Parameters** - - - ``realmObjects`` - RealmObjects to copy. - - - - - ``maxDepth`` - limit of the deep copy. All references after this depth will be ``null`` . Starting depth is ``0`` . - - - - - - - - - - **Returns** - - an in-memory detached copy of the RealmObjects. - - - - - **Throws** - - - `IllegalArgumentException `__ - if ``maxDepth < 0`` , the RealmObject is no longer accessible or it is a :ref:`DynamicRealmObject ` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`copyToRealmOrUpdate(Iterable, ImportFlag...) ` - - - - - - - - - - -.. _io_realm_Realm_copyFromRealm_java_lang_Iterable_: - -.. _io_realm_Realm_copyFromRealm_Iterable_: - -.. _copyFromRealm_java_lang_Iterable_: - -.. _copyFromRealm_Iterable_: - -.. _Realm_copyFromRealm_java_lang_Iterable_: - -.. _Realm_copyFromRealm_Iterable_: - -.. _io_realm_Realm_copyFromRealm_Iterable_E__: - -.. list-table:: - :header-rows: 1 - - * - | public `List `__ :ref:`copyFromRealm ` <**E** >( - | `java.lang.Iterable\ `__ realmObjects - | ) - - - - - * - Makes an unmanaged in-memory copy of already persisted RealmObjects. This is a deep copy that will copy all referenced objects.The copied objects are all detached from Realm and they will no longer be automatically updated. This means that the copied objects might contain data that are no longer consistent with other managed Realm objects. - - \*WARNING\*: Any changes to copied objects can be merged back into Realm using :ref:`copyToRealmOrUpdate(RealmModel, ImportFlag...) ` , but all fields will be overridden, not just those that were changed. This includes references to other objects, and can potentially override changes made by other threads. This behaviour can be modified using :ref:`ImportFlag ` s. - - - - - - - **Type Parameters** - - - ``E`` - type of object. - - - - - - - - **Parameters** - - - ``realmObjects`` - RealmObjects to copy. - - - - - - - - **Returns** - - an in-memory detached copy of managed RealmObjects. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the RealmObject is no longer accessible or it is a :ref:`DynamicRealmObject ` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`copyToRealmOrUpdate(Iterable, ImportFlag...) ` - - - - - - - - - - - - -.. _copyToRealm: - -.. _copyToRealm__: - -.. _Realm_copyToRealm: - -.. _Realm_copyToRealm__: - -.. _io_realm_Realm_copyToRealm: - -.. _io_realm_Realm_copyToRealm__: - - - -copyToRealm ------------ - -.. _io_realm_Realm_copyToRealm_java_lang_Iterable_io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_java_lang_Iterable__io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_java_lang_Iterable_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_java_lang_Iterable__ImportFlag_: - -.. _io_realm_Realm_copyToRealm_java_lang_Iterable_ImportFlag____: - -.. _io_realm_Realm_copyToRealm_java_lang_Iterable__ImportFlag____: - -.. _io_realm_Realm_copyToRealm_Iterable_io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_Iterable__io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_Iterable_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_Iterable__ImportFlag_: - -.. _io_realm_Realm_copyToRealm_Iterable_ImportFlag____: - -.. _io_realm_Realm_copyToRealm_Iterable__ImportFlag____: - -.. _copyToRealm_java_lang_Iterable_io_realm_ImportFlag_: - -.. _copyToRealm_java_lang_Iterable__io_realm_ImportFlag_: - -.. _copyToRealm_java_lang_Iterable_ImportFlag_: - -.. _copyToRealm_java_lang_Iterable__ImportFlag_: - -.. _copyToRealm_java_lang_Iterable_ImportFlag____: - -.. _copyToRealm_java_lang_Iterable__ImportFlag____: - -.. _copyToRealm_Iterable_io_realm_ImportFlag_: - -.. _copyToRealm_Iterable__io_realm_ImportFlag_: - -.. _copyToRealm_Iterable_ImportFlag_: - -.. _copyToRealm_Iterable__ImportFlag_: - -.. _copyToRealm_Iterable_ImportFlag____: - -.. _copyToRealm_Iterable__ImportFlag____: - -.. _Realm_copyToRealm_java_lang_Iterable_io_realm_ImportFlag_: - -.. _Realm_copyToRealm_java_lang_Iterable__io_realm_ImportFlag_: - -.. _Realm_copyToRealm_java_lang_Iterable_ImportFlag_: - -.. _Realm_copyToRealm_java_lang_Iterable__ImportFlag_: - -.. _Realm_copyToRealm_java_lang_Iterable_ImportFlag____: - -.. _Realm_copyToRealm_java_lang_Iterable__ImportFlag____: - -.. _Realm_copyToRealm_Iterable_io_realm_ImportFlag_: - -.. _Realm_copyToRealm_Iterable__io_realm_ImportFlag_: - -.. _Realm_copyToRealm_Iterable_ImportFlag_: - -.. _Realm_copyToRealm_Iterable__ImportFlag_: - -.. _Realm_copyToRealm_Iterable_ImportFlag____: - -.. _Realm_copyToRealm_Iterable__ImportFlag____: - -.. _io_realm_Realm_copyToRealm_Iterable_E___ImportFlag____: - -.. list-table:: - :header-rows: 1 - - * - | public `List `__ :ref:`copyToRealm ` <**E** >( - | `java.lang.Iterable\ `__ objects, - | :ref:`io.realm.ImportFlag[] ` flags - | ) - - - - - * - Copies a collection of RealmObjects to the Realm instance and returns their copy. Any further changes to the original RealmObjects will not be reflected in the Realm copies. This is a deep copy i.e., all referenced objects will be copied. Objects already in this Realm will be ignored.Please note, copying an object will copy all field values. Any unset field in the objects and child objects will be set to their default value if not provided. - - - - - - - **Parameters** - - - ``objects`` - the RealmObjects to copy to the Realm. - - - - - ``flags`` - any flag that modifies the behaviour of inserting the data into the Realm. - - - - - - - - **Returns** - - a list of the the converted RealmObjects that all has their properties managed by the Realm. - - - - - **Throws** - - - :ref:`io.realm.exceptions.RealmException ` - if any of the objects has already been added to Realm. - - - - - `java.lang.IllegalArgumentException `__ - if any of the elements in the input collection is ``null`` . - - - - - - - - - - - - -.. _io_realm_Realm_copyToRealm_E_io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_E__io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_E_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_E__ImportFlag_: - -.. _io_realm_Realm_copyToRealm_E_ImportFlag____: - -.. _io_realm_Realm_copyToRealm_E__ImportFlag____: - -.. _io_realm_Realm_copyToRealm_RealmModel_io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_RealmModel__io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_RealmModel_ImportFlag_: - -.. _io_realm_Realm_copyToRealm_RealmModel__ImportFlag_: - -.. _io_realm_Realm_copyToRealm_RealmModel_ImportFlag____: - -.. _io_realm_Realm_copyToRealm_RealmModel__ImportFlag____: - -.. _copyToRealm_E_io_realm_ImportFlag_: - -.. _copyToRealm_E__io_realm_ImportFlag_: - -.. _copyToRealm_E_ImportFlag_: - -.. _copyToRealm_E__ImportFlag_: - -.. _copyToRealm_E_ImportFlag____: - -.. _copyToRealm_E__ImportFlag____: - -.. _copyToRealm_RealmModel_io_realm_ImportFlag_: - -.. _copyToRealm_RealmModel__io_realm_ImportFlag_: - -.. _copyToRealm_RealmModel_ImportFlag_: - -.. _copyToRealm_RealmModel__ImportFlag_: - -.. _copyToRealm_RealmModel_ImportFlag____: - -.. _copyToRealm_RealmModel__ImportFlag____: - -.. _Realm_copyToRealm_E_io_realm_ImportFlag_: - -.. _Realm_copyToRealm_E__io_realm_ImportFlag_: - -.. _Realm_copyToRealm_E_ImportFlag_: - -.. _Realm_copyToRealm_E__ImportFlag_: - -.. _Realm_copyToRealm_E_ImportFlag____: - -.. _Realm_copyToRealm_E__ImportFlag____: - -.. _Realm_copyToRealm_RealmModel_io_realm_ImportFlag_: - -.. _Realm_copyToRealm_RealmModel__io_realm_ImportFlag_: - -.. _Realm_copyToRealm_RealmModel_ImportFlag_: - -.. _Realm_copyToRealm_RealmModel__ImportFlag_: - -.. _Realm_copyToRealm_RealmModel_ImportFlag____: - -.. _Realm_copyToRealm_RealmModel__ImportFlag____: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`copyToRealm ` <**E** >( - | **E** object, - | :ref:`io.realm.ImportFlag[] ` flags - | ) - - - - - * - Copies a RealmObject to the Realm instance and returns the copy. Any further changes to the original RealmObject will not be reflected in the Realm copy. This is a deep copy, so all referenced objects will be copied. Objects already in this Realm will be ignored.Please note, copying an object will copy all field values. Any unset field in this and child objects will be set to their default value if not provided. - - - - - - - **Parameters** - - - ``object`` - the :ref:`io.realm.RealmObject ` to copy to the Realm. - - - - - - - ``flags`` - any flag that modifies the behaviour of inserting the data into the Realm. - - - - - - - - **Returns** - - a managed RealmObject with its properties backed by the Realm. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the object is ``null`` or it belongs to a Realm instance in a different thread. - - - - - - - - - - - - - - -.. _copyToRealmOrUpdate: - -.. _copyToRealmOrUpdate__: - -.. _Realm_copyToRealmOrUpdate: - -.. _Realm_copyToRealmOrUpdate__: - -.. _io_realm_Realm_copyToRealmOrUpdate: - -.. _io_realm_Realm_copyToRealmOrUpdate__: - - - -copyToRealmOrUpdate -------------------- - -.. _io_realm_Realm_copyToRealmOrUpdate_java_lang_Iterable_io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_java_lang_Iterable__io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_java_lang_Iterable_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_java_lang_Iterable__ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_java_lang_Iterable_ImportFlag____: - -.. _io_realm_Realm_copyToRealmOrUpdate_java_lang_Iterable__ImportFlag____: - -.. _io_realm_Realm_copyToRealmOrUpdate_Iterable_io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_Iterable__io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_Iterable_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_Iterable__ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_Iterable_ImportFlag____: - -.. _io_realm_Realm_copyToRealmOrUpdate_Iterable__ImportFlag____: - -.. _copyToRealmOrUpdate_java_lang_Iterable_io_realm_ImportFlag_: - -.. _copyToRealmOrUpdate_java_lang_Iterable__io_realm_ImportFlag_: - -.. _copyToRealmOrUpdate_java_lang_Iterable_ImportFlag_: - -.. _copyToRealmOrUpdate_java_lang_Iterable__ImportFlag_: - -.. _copyToRealmOrUpdate_java_lang_Iterable_ImportFlag____: - -.. _copyToRealmOrUpdate_java_lang_Iterable__ImportFlag____: - -.. _copyToRealmOrUpdate_Iterable_io_realm_ImportFlag_: - -.. _copyToRealmOrUpdate_Iterable__io_realm_ImportFlag_: - -.. _copyToRealmOrUpdate_Iterable_ImportFlag_: - -.. _copyToRealmOrUpdate_Iterable__ImportFlag_: - -.. _copyToRealmOrUpdate_Iterable_ImportFlag____: - -.. _copyToRealmOrUpdate_Iterable__ImportFlag____: - -.. _Realm_copyToRealmOrUpdate_java_lang_Iterable_io_realm_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_java_lang_Iterable__io_realm_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_java_lang_Iterable_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_java_lang_Iterable__ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_java_lang_Iterable_ImportFlag____: - -.. _Realm_copyToRealmOrUpdate_java_lang_Iterable__ImportFlag____: - -.. _Realm_copyToRealmOrUpdate_Iterable_io_realm_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_Iterable__io_realm_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_Iterable_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_Iterable__ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_Iterable_ImportFlag____: - -.. _Realm_copyToRealmOrUpdate_Iterable__ImportFlag____: - -.. _io_realm_Realm_copyToRealmOrUpdate_Iterable_E___ImportFlag____: - -.. list-table:: - :header-rows: 1 - - * - | public `List `__ :ref:`copyToRealmOrUpdate ` <**E** >( - | `java.lang.Iterable\ `__ objects, - | :ref:`io.realm.ImportFlag[] ` flags - | ) - - - - - * - Updates a list of existing RealmObjects that is identified by their :ref:`io.realm.annotations.PrimaryKey ` or creates a new copy if no existing object could be found. This is a deep copy or update i.e., all referenced objects will be either copied or updated. - - Please note, copying an object will copy all field values. Any unset field in the objects and child objects will be set to their default value if not provided. - - - - - - - **Parameters** - - - ``objects`` - a list of objects to update or copy into Realm. - - - - - ``flags`` - any flag that modifies the behaviour of inserting the data into the Realm. - - - - - - - - **Returns** - - a list of all the new or updated RealmObjects. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if RealmObject is ``null`` or doesn't have a Primary key defined. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`copyToRealm(Iterable, ImportFlag...) ` - - - - - - - - - - -.. _io_realm_Realm_copyToRealmOrUpdate_E_io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_E__io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_E_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_E__ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_E_ImportFlag____: - -.. _io_realm_Realm_copyToRealmOrUpdate_E__ImportFlag____: - -.. _io_realm_Realm_copyToRealmOrUpdate_RealmModel_io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_RealmModel__io_realm_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_RealmModel_ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_RealmModel__ImportFlag_: - -.. _io_realm_Realm_copyToRealmOrUpdate_RealmModel_ImportFlag____: - -.. _io_realm_Realm_copyToRealmOrUpdate_RealmModel__ImportFlag____: - -.. _copyToRealmOrUpdate_E_io_realm_ImportFlag_: - -.. _copyToRealmOrUpdate_E__io_realm_ImportFlag_: - -.. _copyToRealmOrUpdate_E_ImportFlag_: - -.. _copyToRealmOrUpdate_E__ImportFlag_: - -.. _copyToRealmOrUpdate_E_ImportFlag____: - -.. _copyToRealmOrUpdate_E__ImportFlag____: - -.. _copyToRealmOrUpdate_RealmModel_io_realm_ImportFlag_: - -.. _copyToRealmOrUpdate_RealmModel__io_realm_ImportFlag_: - -.. _copyToRealmOrUpdate_RealmModel_ImportFlag_: - -.. _copyToRealmOrUpdate_RealmModel__ImportFlag_: - -.. _copyToRealmOrUpdate_RealmModel_ImportFlag____: - -.. _copyToRealmOrUpdate_RealmModel__ImportFlag____: - -.. _Realm_copyToRealmOrUpdate_E_io_realm_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_E__io_realm_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_E_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_E__ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_E_ImportFlag____: - -.. _Realm_copyToRealmOrUpdate_E__ImportFlag____: - -.. _Realm_copyToRealmOrUpdate_RealmModel_io_realm_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_RealmModel__io_realm_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_RealmModel_ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_RealmModel__ImportFlag_: - -.. _Realm_copyToRealmOrUpdate_RealmModel_ImportFlag____: - -.. _Realm_copyToRealmOrUpdate_RealmModel__ImportFlag____: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`copyToRealmOrUpdate ` <**E** >( - | **E** object, - | :ref:`io.realm.ImportFlag[] ` flags - | ) - - - - - * - Updates an existing RealmObject that is identified by the same :ref:`io.realm.annotations.PrimaryKey ` or creates a new copy if no existing object could be found. This is a deep copy or update i.e., all referenced objects will be either copied or updated. - - Please note, copying an object will copy all field values. Any unset field in the object and child objects will be set to their default value if not provided. - - - - - - - **Parameters** - - - ``object`` - :ref:`io.realm.RealmObject ` to copy or update. - - - - - - - ``flags`` - any flag that modifies the behaviour of inserting the data into the Realm. - - - - - - - - **Returns** - - the new or updated RealmObject with all its properties backed by the Realm. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the object is ``null`` or doesn't have a Primary key defined or it belongs to a Realm instance in a different thread. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`copyToRealm(RealmModel, ImportFlag...) ` - - - - - - - - - - - - -.. _createAllFromJson: - -.. _createAllFromJson__: - -.. _Realm_createAllFromJson: - -.. _Realm_createAllFromJson__: - -.. _io_realm_Realm_createAllFromJson: - -.. _io_realm_Realm_createAllFromJson__: - - - -createAllFromJson ------------------ - -.. _io_realm_Realm_createAllFromJson_java_lang_Class_JSONArray_: - -.. _io_realm_Realm_createAllFromJson_java_lang_Class__JSONArray_: - -.. _io_realm_Realm_createAllFromJson_Class_JSONArray_: - -.. _io_realm_Realm_createAllFromJson_Class__JSONArray_: - -.. _createAllFromJson_java_lang_Class_JSONArray_: - -.. _createAllFromJson_java_lang_Class__JSONArray_: - -.. _createAllFromJson_Class_JSONArray_: - -.. _createAllFromJson_Class__JSONArray_: - -.. _Realm_createAllFromJson_java_lang_Class_JSONArray_: - -.. _Realm_createAllFromJson_java_lang_Class__JSONArray_: - -.. _Realm_createAllFromJson_Class_JSONArray_: - -.. _Realm_createAllFromJson_Class__JSONArray_: - -.. _io_realm_Realm_createAllFromJson_Class_E___JSONArray_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`createAllFromJson ` <**E** >( - | `java.lang.Class\ `__ clazz, - | **JSONArray** json - | ) - - - - - * - Creates a Realm object for each object in a JSON array. This must be done within a transaction.JSON properties with unknown properties will be ignored. If a :ref:`RealmObject ` field is not present in the JSON object the :ref:`RealmObject ` field will be set to the default value for that type. - - - - This method currently does not support value list field. - - - - - - - **Parameters** - - - ``clazz`` - type of Realm objects to create. - - - - - ``json`` - an array where each JSONObject must map to the specified class. - - - - - - - - - - **Throws** - - - :ref:`RealmException ` - if mapping from JSON fails. - - - - - `IllegalArgumentException `__ - if the JSON object doesn't have a primary key property but the corresponding :ref:`RealmObjectSchema ` has a :ref:`io.realm.annotations.PrimaryKey ` defined. - - - - - - - `UnsupportedOperationException `__ - if the object to insert contains a :ref:`RealmDictionary ` or a :ref:`RealmSet ` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`RealmSet ` - - - - - :ref:`RealmDictionary ` - - - - - :ref:`RealmMap ` - - - - - - - - - - - - -.. _createEmbeddedObject: - -.. _createEmbeddedObject__: - -.. _Realm_createEmbeddedObject: - -.. _Realm_createEmbeddedObject__: - -.. _io_realm_Realm_createEmbeddedObject: - -.. _io_realm_Realm_createEmbeddedObject__: - - - -createEmbeddedObject --------------------- - -.. _io_realm_Realm_createEmbeddedObject_java_lang_Class_io_realm_RealmModel_java_lang_String_: - -.. _io_realm_Realm_createEmbeddedObject_java_lang_Class__io_realm_RealmModel__java_lang_String_: - -.. _io_realm_Realm_createEmbeddedObject_java_lang_Class_io_realm_RealmModel_String_: - -.. _io_realm_Realm_createEmbeddedObject_java_lang_Class__io_realm_RealmModel__String_: - -.. _io_realm_Realm_createEmbeddedObject_java_lang_Class_RealmModel_java_lang_String_: - -.. _io_realm_Realm_createEmbeddedObject_java_lang_Class__RealmModel__java_lang_String_: - -.. _io_realm_Realm_createEmbeddedObject_java_lang_Class_RealmModel_String_: - -.. _io_realm_Realm_createEmbeddedObject_java_lang_Class__RealmModel__String_: - -.. _io_realm_Realm_createEmbeddedObject_Class_io_realm_RealmModel_java_lang_String_: - -.. _io_realm_Realm_createEmbeddedObject_Class__io_realm_RealmModel__java_lang_String_: - -.. _io_realm_Realm_createEmbeddedObject_Class_io_realm_RealmModel_String_: - -.. _io_realm_Realm_createEmbeddedObject_Class__io_realm_RealmModel__String_: - -.. _io_realm_Realm_createEmbeddedObject_Class_RealmModel_java_lang_String_: - -.. _io_realm_Realm_createEmbeddedObject_Class__RealmModel__java_lang_String_: - -.. _io_realm_Realm_createEmbeddedObject_Class_RealmModel_String_: - -.. _io_realm_Realm_createEmbeddedObject_Class__RealmModel__String_: - -.. _createEmbeddedObject_java_lang_Class_io_realm_RealmModel_java_lang_String_: - -.. _createEmbeddedObject_java_lang_Class__io_realm_RealmModel__java_lang_String_: - -.. _createEmbeddedObject_java_lang_Class_io_realm_RealmModel_String_: - -.. _createEmbeddedObject_java_lang_Class__io_realm_RealmModel__String_: - -.. _createEmbeddedObject_java_lang_Class_RealmModel_java_lang_String_: - -.. _createEmbeddedObject_java_lang_Class__RealmModel__java_lang_String_: - -.. _createEmbeddedObject_java_lang_Class_RealmModel_String_: - -.. _createEmbeddedObject_java_lang_Class__RealmModel__String_: - -.. _createEmbeddedObject_Class_io_realm_RealmModel_java_lang_String_: - -.. _createEmbeddedObject_Class__io_realm_RealmModel__java_lang_String_: - -.. _createEmbeddedObject_Class_io_realm_RealmModel_String_: - -.. _createEmbeddedObject_Class__io_realm_RealmModel__String_: - -.. _createEmbeddedObject_Class_RealmModel_java_lang_String_: - -.. _createEmbeddedObject_Class__RealmModel__java_lang_String_: - -.. _createEmbeddedObject_Class_RealmModel_String_: - -.. _createEmbeddedObject_Class__RealmModel__String_: - -.. _Realm_createEmbeddedObject_java_lang_Class_io_realm_RealmModel_java_lang_String_: - -.. _Realm_createEmbeddedObject_java_lang_Class__io_realm_RealmModel__java_lang_String_: - -.. _Realm_createEmbeddedObject_java_lang_Class_io_realm_RealmModel_String_: - -.. _Realm_createEmbeddedObject_java_lang_Class__io_realm_RealmModel__String_: - -.. _Realm_createEmbeddedObject_java_lang_Class_RealmModel_java_lang_String_: - -.. _Realm_createEmbeddedObject_java_lang_Class__RealmModel__java_lang_String_: - -.. _Realm_createEmbeddedObject_java_lang_Class_RealmModel_String_: - -.. _Realm_createEmbeddedObject_java_lang_Class__RealmModel__String_: - -.. _Realm_createEmbeddedObject_Class_io_realm_RealmModel_java_lang_String_: - -.. _Realm_createEmbeddedObject_Class__io_realm_RealmModel__java_lang_String_: - -.. _Realm_createEmbeddedObject_Class_io_realm_RealmModel_String_: - -.. _Realm_createEmbeddedObject_Class__io_realm_RealmModel__String_: - -.. _Realm_createEmbeddedObject_Class_RealmModel_java_lang_String_: - -.. _Realm_createEmbeddedObject_Class__RealmModel__java_lang_String_: - -.. _Realm_createEmbeddedObject_Class_RealmModel_String_: - -.. _Realm_createEmbeddedObject_Class__RealmModel__String_: - -.. _io_realm_Realm_createEmbeddedObject_Class_E___RealmModel__String_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`createEmbeddedObject ` <**E** >( - | `java.lang.Class\ `__ clazz, - | :ref:`RealmModel ` parentObject, - | `String `__ parentProperty - | ) - - - - - * - Instantiates and adds a new embedded object to the Realm.This method should only be used to create objects of types marked as embedded. - - - - - - - **Parameters** - - - ``clazz`` - the Class of the object to create. It must be marked with ``@RealmClass(embedded = true)`` . - - - - - - - ``parentObject`` - The parent object which should hold a reference to the embedded object. - - - - - ``parentProperty`` - the property in the parent class which holds the reference. If the parent property is a list the embedded object will be added to the end of that list. - - - - - - - - **Returns** - - the newly created embedded object. - - - - - **Throws** - - - `IllegalArgumentException `__ - if ``clazz`` is not an embedded class or if the property in the parent class cannot hold objects of the appropriate type. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`RealmClass.embedded() ` - - - - - - - - - - - - -.. _createObject: - -.. _createObject__: - -.. _Realm_createObject: - -.. _Realm_createObject__: - -.. _io_realm_Realm_createObject: - -.. _io_realm_Realm_createObject__: - - - -createObject ------------- - -.. _io_realm_Realm_createObject_java_lang_Class_java_lang_Object_: - -.. _io_realm_Realm_createObject_java_lang_Class__java_lang_Object_: - -.. _io_realm_Realm_createObject_java_lang_Class_Object_: - -.. _io_realm_Realm_createObject_java_lang_Class__Object_: - -.. _io_realm_Realm_createObject_Class_java_lang_Object_: - -.. _io_realm_Realm_createObject_Class__java_lang_Object_: - -.. _io_realm_Realm_createObject_Class_Object_: - -.. _io_realm_Realm_createObject_Class__Object_: - -.. _createObject_java_lang_Class_java_lang_Object_: - -.. _createObject_java_lang_Class__java_lang_Object_: - -.. _createObject_java_lang_Class_Object_: - -.. _createObject_java_lang_Class__Object_: - -.. _createObject_Class_java_lang_Object_: - -.. _createObject_Class__java_lang_Object_: - -.. _createObject_Class_Object_: - -.. _createObject_Class__Object_: - -.. _Realm_createObject_java_lang_Class_java_lang_Object_: - -.. _Realm_createObject_java_lang_Class__java_lang_Object_: - -.. _Realm_createObject_java_lang_Class_Object_: - -.. _Realm_createObject_java_lang_Class__Object_: - -.. _Realm_createObject_Class_java_lang_Object_: - -.. _Realm_createObject_Class__java_lang_Object_: - -.. _Realm_createObject_Class_Object_: - -.. _Realm_createObject_Class__Object_: - -.. _io_realm_Realm_createObject_Class_E___Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`createObject ` <**E** >( - | `java.lang.Class\ `__ clazz, - | `Object `__ primaryKeyValue - | ) - - - - - * - Instantiates and adds a new object to the Realm with the primary key value already set.If the value violates the primary key constraint, no object will be added and a :ref:`RealmException ` will be thrown. The default value for primary key provided by the model class will be ignored. - - - - - - - - - **Parameters** - - - ``clazz`` - the Class of the object to create. - - - - - ``primaryKeyValue`` - value for the primary key field. - - - - - - - - **Returns** - - the new object. - - - - - **Throws** - - - :ref:`RealmException ` - if object could not be created due to the primary key being invalid. - - - - - `IllegalStateException `__ - if the model class does not have an primary key defined. - - - - - `IllegalArgumentException `__ - if the ``primaryKeyValue`` doesn't have a value that can be converted to the expected value. - - - - - - - - - - - - -.. _io_realm_Realm_createObject_java_lang_Class_: - -.. _io_realm_Realm_createObject_Class_: - -.. _createObject_java_lang_Class_: - -.. _createObject_Class_: - -.. _Realm_createObject_java_lang_Class_: - -.. _Realm_createObject_Class_: - -.. _io_realm_Realm_createObject_Class_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`createObject ` <**E** >( - | `java.lang.Class\ `__ clazz - | ) - - - - - * - Instantiates and adds a new object to the Realm.This method is only available for model classes with no \@PrimaryKey annotation. If you like to create an object that has a primary key, use :ref:`createObject(Class, Object) ` or :ref:`copyToRealm(RealmModel, ImportFlag...) ` instead. - - - - - - - - - **Parameters** - - - ``clazz`` - the Class of the object to create. - - - - - - - - **Returns** - - the new object. - - - - - **Throws** - - - :ref:`RealmException ` - if the primary key is defined in the model class or an object cannot be created. - - - - - - - - - - .. seealso:: - - - - - :ref:`createObject(Class, Object) ` - - - - - - - - - - - - -.. _createObjectFromJson: - -.. _createObjectFromJson__: - -.. _Realm_createObjectFromJson: - -.. _Realm_createObjectFromJson__: - -.. _io_realm_Realm_createObjectFromJson: - -.. _io_realm_Realm_createObjectFromJson__: - - - -createObjectFromJson --------------------- - -.. _io_realm_Realm_createObjectFromJson_java_lang_Class_JSONObject_: - -.. _io_realm_Realm_createObjectFromJson_java_lang_Class__JSONObject_: - -.. _io_realm_Realm_createObjectFromJson_Class_JSONObject_: - -.. _io_realm_Realm_createObjectFromJson_Class__JSONObject_: - -.. _createObjectFromJson_java_lang_Class_JSONObject_: - -.. _createObjectFromJson_java_lang_Class__JSONObject_: - -.. _createObjectFromJson_Class_JSONObject_: - -.. _createObjectFromJson_Class__JSONObject_: - -.. _Realm_createObjectFromJson_java_lang_Class_JSONObject_: - -.. _Realm_createObjectFromJson_java_lang_Class__JSONObject_: - -.. _Realm_createObjectFromJson_Class_JSONObject_: - -.. _Realm_createObjectFromJson_Class__JSONObject_: - -.. _io_realm_Realm_createObjectFromJson_Class_E___JSONObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`createObjectFromJson ` <**E** >( - | `java.lang.Class\ `__ clazz, - | **JSONObject** json - | ) - - - - - * - Creates a Realm object pre-filled with data from a JSON object. This must be done inside a transaction. JSON properties with unknown properties will be ignored. If a :ref:`RealmObject ` field is not present in the JSON object the :ref:`RealmObject ` field will be set to the default value for that type. - - This method currently does not support value list field. - - - - - - - **Parameters** - - - ``clazz`` - type of Realm object to create. - - - - - ``json`` - the JSONObject with object data. - - - - - - - - **Returns** - - created object or ``null`` if no JSON data was provided. - - - - - - - **Throws** - - - :ref:`RealmException ` - if the mapping from JSON fails. - - - - - `IllegalArgumentException `__ - if the JSON object doesn't have a primary key property but the corresponding :ref:`RealmObjectSchema ` has a :ref:`io.realm.annotations.PrimaryKey ` defined. - - - - - - - `UnsupportedOperationException `__ - if the object to insert contains a :ref:`RealmDictionary ` or a :ref:`RealmSet ` . - - - - - - - - - - - - .. seealso:: - - - - - **createOrUpdateObjectFromJson(Class, org.json.JSONObject)** - - - - - :ref:`RealmSet ` - - - - - :ref:`RealmDictionary ` - - - - - :ref:`RealmMap ` - - - - - - - - - - - - -.. _createOrUpdateAllFromJson: - -.. _createOrUpdateAllFromJson__: - -.. _Realm_createOrUpdateAllFromJson: - -.. _Realm_createOrUpdateAllFromJson__: - -.. _io_realm_Realm_createOrUpdateAllFromJson: - -.. _io_realm_Realm_createOrUpdateAllFromJson__: - - - -createOrUpdateAllFromJson -------------------------- - -.. _io_realm_Realm_createOrUpdateAllFromJson_java_lang_Class_JSONArray_: - -.. _io_realm_Realm_createOrUpdateAllFromJson_java_lang_Class__JSONArray_: - -.. _io_realm_Realm_createOrUpdateAllFromJson_Class_JSONArray_: - -.. _io_realm_Realm_createOrUpdateAllFromJson_Class__JSONArray_: - -.. _createOrUpdateAllFromJson_java_lang_Class_JSONArray_: - -.. _createOrUpdateAllFromJson_java_lang_Class__JSONArray_: - -.. _createOrUpdateAllFromJson_Class_JSONArray_: - -.. _createOrUpdateAllFromJson_Class__JSONArray_: - -.. _Realm_createOrUpdateAllFromJson_java_lang_Class_JSONArray_: - -.. _Realm_createOrUpdateAllFromJson_java_lang_Class__JSONArray_: - -.. _Realm_createOrUpdateAllFromJson_Class_JSONArray_: - -.. _Realm_createOrUpdateAllFromJson_Class__JSONArray_: - -.. _io_realm_Realm_createOrUpdateAllFromJson_Class_E___JSONArray_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`createOrUpdateAllFromJson ` <**E** >( - | `java.lang.Class\ `__ clazz, - | **JSONArray** json - | ) - - - - - * - Tries to update a list of existing objects identified by their primary key with new JSON data. If an existing object could not be found in the Realm, a new object will be created. This must happen within a transaction. If updating a :ref:`RealmObject ` and a field is not found in the JSON object, that field will not be updated. If a new :ref:`RealmObject ` is created and a field is not found in the JSON object, that field will be assigned the default value for the field type. - - This method currently does not support value list field. - - - - - - - **Parameters** - - - ``clazz`` - type of :ref:`io.realm.RealmObject ` to create or update. It must have a primary key defined. - - - - - - - ``json`` - array with object data. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if trying to update a class without a :ref:`io.realm.annotations.PrimaryKey ` . - - - - - - - `IllegalArgumentException `__ - if the JSON object doesn't have a primary key property but the corresponding :ref:`RealmObjectSchema ` has a :ref:`io.realm.annotations.PrimaryKey ` defined. - - - - - - - :ref:`RealmException ` - if unable to map JSON. - - - - - `UnsupportedOperationException `__ - if the object to insert contains a :ref:`RealmDictionary ` or a :ref:`RealmSet ` . - - - - - - - - - - - - .. seealso:: - - - - - **createAllFromJson(Class, org.json.JSONArray)** - - - - - :ref:`RealmSet ` - - - - - :ref:`RealmDictionary ` - - - - - :ref:`RealmMap ` - - - - - - - - - - - - -.. _createOrUpdateObjectFromJson: - -.. _createOrUpdateObjectFromJson__: - -.. _Realm_createOrUpdateObjectFromJson: - -.. _Realm_createOrUpdateObjectFromJson__: - -.. _io_realm_Realm_createOrUpdateObjectFromJson: - -.. _io_realm_Realm_createOrUpdateObjectFromJson__: - - - -createOrUpdateObjectFromJson ----------------------------- - -.. _io_realm_Realm_createOrUpdateObjectFromJson_java_lang_Class_JSONObject_: - -.. _io_realm_Realm_createOrUpdateObjectFromJson_java_lang_Class__JSONObject_: - -.. _io_realm_Realm_createOrUpdateObjectFromJson_Class_JSONObject_: - -.. _io_realm_Realm_createOrUpdateObjectFromJson_Class__JSONObject_: - -.. _createOrUpdateObjectFromJson_java_lang_Class_JSONObject_: - -.. _createOrUpdateObjectFromJson_java_lang_Class__JSONObject_: - -.. _createOrUpdateObjectFromJson_Class_JSONObject_: - -.. _createOrUpdateObjectFromJson_Class__JSONObject_: - -.. _Realm_createOrUpdateObjectFromJson_java_lang_Class_JSONObject_: - -.. _Realm_createOrUpdateObjectFromJson_java_lang_Class__JSONObject_: - -.. _Realm_createOrUpdateObjectFromJson_Class_JSONObject_: - -.. _Realm_createOrUpdateObjectFromJson_Class__JSONObject_: - -.. _io_realm_Realm_createOrUpdateObjectFromJson_Class_E___JSONObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`createOrUpdateObjectFromJson ` <**E** >( - | `java.lang.Class\ `__ clazz, - | **JSONObject** json - | ) - - - - - * - Tries to update an existing object defined by its primary key with new JSON data. If no existing object could be found a new object will be saved in the Realm. This must happen within a transaction. If updating a :ref:`RealmObject ` and a field is not found in the JSON object, that field will not be updated. If a new :ref:`RealmObject ` is created and a field is not found in the JSON object, that field will be assigned the default value for the field type. - - This method currently does not support value list field. - - - - - - - **Parameters** - - - ``clazz`` - Type of :ref:`io.realm.RealmObject ` to create or update. It must have a primary key defined. - - - - - - - ``json`` - **org.json.JSONObject** with object data. - - - - - - - - - - **Returns** - - created or updated :ref:`io.realm.RealmObject ` . - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if trying to update a class without a :ref:`io.realm.annotations.PrimaryKey ` . - - - - - - - `IllegalArgumentException `__ - if the JSON object doesn't have a primary key property but the corresponding :ref:`RealmObjectSchema ` has a :ref:`io.realm.annotations.PrimaryKey ` defined. - - - - - - - :ref:`RealmException ` - if JSON data cannot be mapped. - - - - - `UnsupportedOperationException `__ - if the object to insert contains a :ref:`RealmDictionary ` or a :ref:`RealmSet ` . - - - - - - - - - - - - .. seealso:: - - - - - **createObjectFromJson(Class, org.json.JSONObject)** - - - - - :ref:`RealmSet ` - - - - - :ref:`RealmDictionary ` - - - - - :ref:`RealmMap ` - - - - - - - - - - - - -.. _delete: - -.. _delete__: - -.. _Realm_delete: - -.. _Realm_delete__: - -.. _io_realm_Realm_delete: - -.. _io_realm_Realm_delete__: - - - -delete ------- - -.. _io_realm_Realm_delete_java_lang_Class_: - -.. _io_realm_Realm_delete_Class_: - -.. _io_realm_Realm_delete_RealmModel__: - -.. _delete_java_lang_Class_: - -.. _delete_Class_: - -.. _delete_RealmModel__: - -.. _Realm_delete_java_lang_Class_: - -.. _Realm_delete_Class_: - -.. _Realm_delete_RealmModel__: - -.. _io_realm_Realm_delete_Class___extends_RealmModel__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`delete ` ( - | `java.lang.Class\ `__ clazz - | ) - - - - - * - Deletes all objects of the specified class from the Realm. - - - - - **Parameters** - - - ``clazz`` - the class which objects should be removed. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the Realm is closed or called from an incorrect thread. - - - - - - - - - - - - -.. _deleteRealm: - -.. _deleteRealm__: - -.. _Realm_deleteRealm: - -.. _Realm_deleteRealm__: - -.. _io_realm_Realm_deleteRealm: - -.. _io_realm_Realm_deleteRealm__: - - - -deleteRealm ------------ - -.. _io_realm_Realm_deleteRealm_io_realm_RealmConfiguration_: - -.. _io_realm_Realm_deleteRealm_RealmConfiguration_: - -.. _deleteRealm_io_realm_RealmConfiguration_: - -.. _deleteRealm_RealmConfiguration_: - -.. _Realm_deleteRealm_io_realm_RealmConfiguration_: - -.. _Realm_deleteRealm_RealmConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public static **boolean** :ref:`deleteRealm ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - - - * - Deletes the Realm file along with the related temporary files specified by the given :ref:`RealmConfiguration ` from the filesystem. Temporary file with ".lock" extension won't be deleted. - - All Realm instances must be closed before calling this method. - - WARNING: For synchronized Realm, there is a chance that an internal Realm instance on the background thread is not closed even all the user controlled Realm instances are closed. This will result an ``IllegalStateException`` . See issue https://github.com/realm/realm-java/issues/5416 . - - - - - - - - - **Parameters** - - - ``configuration`` - a :ref:`RealmConfiguration ` . - - - - - - - - - - **Returns** - - ``false`` if the Realm file could not be deleted. Temporary files deletion failure won't impact the return value. All of the failing file deletions will be logged. - - - - - - - **Throws** - - - `IllegalStateException `__ - if there are Realm instances opened on other threads or other processes. - - - - - - - - - - - - -.. _executeTransaction: - -.. _executeTransaction__: - -.. _Realm_executeTransaction: - -.. _Realm_executeTransaction__: - -.. _io_realm_Realm_executeTransaction: - -.. _io_realm_Realm_executeTransaction__: - - - -executeTransaction ------------------- - -.. _io_realm_Realm_executeTransaction_io_realm_Realm_Transaction_: - -.. _io_realm_Realm_executeTransaction_Transaction_: - -.. _io_realm_Realm_executeTransaction_Realm_Transaction_: - -.. _executeTransaction_io_realm_Realm_Transaction_: - -.. _executeTransaction_Transaction_: - -.. _executeTransaction_Realm_Transaction_: - -.. _Realm_executeTransaction_io_realm_Realm_Transaction_: - -.. _Realm_executeTransaction_Transaction_: - -.. _Realm_executeTransaction_Realm_Transaction_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`executeTransaction ` ( - | :ref:`Realm.Transaction ` transaction - | ) - - - - - * - Executes a given transaction on the Realm. **beginTransaction()** and **commitTransaction()** will be called automatically. If any exception is thrown during the transaction **cancelTransaction()** will be called instead of **commitTransaction()**. - - Calling this method from the UI thread will throw a :ref:`RealmException ` . Doing so may result in a drop of frames or even ANRs. We recommend calling this method from a non-UI thread or using :ref:`executeTransactionAsync(Transaction) ` instead. - - - - - - - - - **Parameters** - - - ``transaction`` - the :ref:`io.realm.Realm.Transaction ` to execute. - - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` . - - - - - - - :ref:`RealmMigrationNeededException ` - if the latest version contains incompatible schema changes. - - - - - :ref:`RealmException ` - if called from the UI thread, unless an explicit opt-in has been declared in :ref:`RealmConfiguration.Builder.allowWritesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _executeTransactionAsync: - -.. _executeTransactionAsync__: - -.. _Realm_executeTransactionAsync: - -.. _Realm_executeTransactionAsync__: - -.. _io_realm_Realm_executeTransactionAsync: - -.. _io_realm_Realm_executeTransactionAsync__: - - - -executeTransactionAsync ------------------------ - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Transaction__OnSuccess__OnError_: - -.. _executeTransactionAsync_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__OnSuccess__OnError_: - -.. _executeTransactionAsync_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__OnSuccess__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess__Realm_Transaction_OnError_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`executeTransactionAsync ` ( - | :ref:`Realm.Transaction ` transaction, - | :ref:`Realm.Transaction.OnSuccess ` onSuccess, - | :ref:`Realm.Transaction.OnError ` onError - | ) - - - - - * - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnSuccess and OnError callbacks. - - - - - - - **Parameters** - - - ``transaction`` - :ref:`io.realm.Realm.Transaction ` to execute. - - - - - - - ``onSuccess`` - callback invoked when the transaction succeeds. - - - - - ``onError`` - callback invoked when the transaction fails. - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` , or if the realm is opened from another thread. - - - - - - - - - - - - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnError_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__OnError_: - -.. _executeTransactionAsync_Transaction_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Transaction__Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__OnError_: - -.. _executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnError_: - -.. _executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__OnError_: - -.. _Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnError_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnError_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`executeTransactionAsync ` ( - | :ref:`Realm.Transaction ` transaction, - | :ref:`Realm.Transaction.OnError ` onError - | ) - - - - - * - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnError callback. - - - - - - - **Parameters** - - - ``transaction`` - :ref:`io.realm.Realm.Transaction ` to execute. - - - - - - - ``onError`` - callback invoked when the transaction fails. - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` , or if the realm is opened from another thread. - - - - - - - - - - - - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction__OnSuccess_: - -.. _executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Realm_Transaction__OnSuccess_: - -.. _executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_: - -.. _executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__OnSuccess_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction__Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Transaction__OnSuccess_: - -.. _Realm_executeTransactionAsync_Transaction_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Transaction__Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_io_realm_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__io_realm_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__OnSuccess_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_Realm_Transaction_OnSuccess_: - -.. _Realm_executeTransactionAsync_Realm_Transaction__Realm_Transaction_OnSuccess_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`executeTransactionAsync ` ( - | :ref:`Realm.Transaction ` transaction, - | :ref:`Realm.Transaction.OnSuccess ` onSuccess - | ) - - - - - * - Similar to :ref:`executeTransactionAsync(Transaction) ` , but also accepts an OnSuccess callback. - - - - - - - **Parameters** - - - ``transaction`` - :ref:`io.realm.Realm.Transaction ` to execute. - - - - - - - ``onSuccess`` - callback invoked when the transaction succeeds. - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` , or if the realm is opened from another thread. - - - - - - - - - - - - -.. _io_realm_Realm_executeTransactionAsync_io_realm_Realm_Transaction_: - -.. _io_realm_Realm_executeTransactionAsync_Transaction_: - -.. _io_realm_Realm_executeTransactionAsync_Realm_Transaction_: - -.. _executeTransactionAsync_io_realm_Realm_Transaction_: - -.. _executeTransactionAsync_Transaction_: - -.. _executeTransactionAsync_Realm_Transaction_: - -.. _Realm_executeTransactionAsync_io_realm_Realm_Transaction_: - -.. _Realm_executeTransactionAsync_Transaction_: - -.. _Realm_executeTransactionAsync_Realm_Transaction_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`executeTransactionAsync ` ( - | :ref:`Realm.Transaction ` transaction - | ) - - - - - * - Similar to :ref:`executeTransaction(Transaction) ` but runs asynchronously on a worker thread. - - - - - - - **Parameters** - - - ``transaction`` - :ref:`io.realm.Realm.Transaction ` to execute. - - - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``transaction`` is ``null`` , or if the Realm is opened from another thread. - - - - - - - - - - - - - - -.. _freeze: - -.. _freeze__: - -.. _Realm_freeze: - -.. _Realm_freeze__: - -.. _io_realm_Realm_freeze: - -.. _io_realm_Realm_freeze__: - - - -freeze ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Realm ` :ref:`freeze ` () - | - - - - - * - Returns a frozen snapshot of the current Realm. This Realm can be read and queried from any thread without throwing an `IllegalStateException `__ . A frozen Realm has its own lifecycle and can be closed by calling **close()**, but fully closing the Realm that spawned the frozen copy will also close the frozen Realm. - - Frozen data can be queried as normal, but trying to mutate it in any way or attempting to register any listener will throw an `IllegalStateException `__ . - - - - Note: Keeping a large number of Realms with different versions alive can have a negative impact on the filesize of the Realm. In order to avoid such a situation, it is possible to set :ref:`RealmConfiguration.Builder.maxNumberOfActiveVersions(long) ` . - - - - - - - - - - - **Returns** - - a frozen copy of this Realm. - - - - - - - **Overrides** - - ``freeze`` in class **BaseRealm** - - - - - - -.. _getApplicationContext: - -.. _getApplicationContext__: - -.. _Realm_getApplicationContext: - -.. _Realm_getApplicationContext__: - -.. _io_realm_Realm_getApplicationContext: - -.. _io_realm_Realm_getApplicationContext__: - - - -getApplicationContext ---------------------- - -.. list-table:: - :header-rows: 1 - - * - | public static **Context** :ref:`getApplicationContext ` () - | - - - - - * - Get the application context used when initializing Realm with :ref:`Realm.init(Context) ` or :ref:`Realm.init(Context, String) ` . - - - - - - - - - **Returns** - - the application context used when initializing Realm with :ref:`Realm.init(Context) ` or :ref:`Realm.init(Context, String) ` , or null if Realm has not been initialized yet. - - - - - - - - - - - - - -.. _getDefaultConfiguration: - -.. _getDefaultConfiguration__: - -.. _Realm_getDefaultConfiguration: - -.. _Realm_getDefaultConfiguration__: - -.. _io_realm_Realm_getDefaultConfiguration: - -.. _io_realm_Realm_getDefaultConfiguration__: - - - -getDefaultConfiguration ------------------------ - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmConfiguration ` :ref:`getDefaultConfiguration ` () - | - - - - - * - Returns the default configuration for :ref:`getDefaultInstance() ` . - - - - - - - - - **Returns** - - default configuration object or ``null`` if no default configuration is specified. - - - - - - - - - - - - - -.. _getDefaultInstance: - -.. _getDefaultInstance__: - -.. _Realm_getDefaultInstance: - -.. _Realm_getDefaultInstance__: - -.. _io_realm_Realm_getDefaultInstance: - -.. _io_realm_Realm_getDefaultInstance__: - - - -getDefaultInstance ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Realm ` :ref:`getDefaultInstance ` () - | - - - - - * - Realm static constructor that returns the Realm instance defined by the :ref:`io.realm.RealmConfiguration ` set by :ref:`setDefaultConfiguration(RealmConfiguration) ` - - - - - - - - - **Returns** - - an instance of the Realm class. - - - - - **Throws** - - - `java.lang.NullPointerException `__ - if no default configuration has been defined. - - - - - :ref:`RealmMigrationNeededException ` - if no migration has been provided by the default configuration and the - - - - - :ref:`RealmFileException ` - if an error happened when accessing the underlying Realm file. was set and the thread opening the Realm was interrupted while the download was in progress. - - - - - - - - - - - - -.. _getDefaultModule: - -.. _getDefaultModule__: - -.. _Realm_getDefaultModule: - -.. _Realm_getDefaultModule__: - -.. _io_realm_Realm_getDefaultModule: - -.. _io_realm_Realm_getDefaultModule__: - - - -getDefaultModule ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public static `Object `__ :ref:`getDefaultModule ` () - | - - - - - * - Returns the default Realm module. This module contains all Realm classes in the current project, but not those from library or project dependencies. Realm classes in these should be exposed using their own module. - - - - - - - **Returns** - - the default Realm module or ``null`` if no default module exists. - - - - - - - **Throws** - - - :ref:`RealmException ` - if unable to create an instance of the module. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmConfiguration.Builder.modules(Object, Object...) ` - - - - - - - - - - - - -.. _getGlobalInstanceCount: - -.. _getGlobalInstanceCount__: - -.. _Realm_getGlobalInstanceCount: - -.. _Realm_getGlobalInstanceCount__: - -.. _io_realm_Realm_getGlobalInstanceCount: - -.. _io_realm_Realm_getGlobalInstanceCount__: - - - -getGlobalInstanceCount ----------------------- - -.. _io_realm_Realm_getGlobalInstanceCount_io_realm_RealmConfiguration_: - -.. _io_realm_Realm_getGlobalInstanceCount_RealmConfiguration_: - -.. _getGlobalInstanceCount_io_realm_RealmConfiguration_: - -.. _getGlobalInstanceCount_RealmConfiguration_: - -.. _Realm_getGlobalInstanceCount_io_realm_RealmConfiguration_: - -.. _Realm_getGlobalInstanceCount_RealmConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public static **int** :ref:`getGlobalInstanceCount ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - - - * - Returns the current number of open Realm instances across all threads in current process that are using this configuration. This includes both dynamic and normal Realms. - - - - - **Parameters** - - - ``configuration`` - the :ref:`io.realm.RealmConfiguration ` for the Realm. - - - - - - - - - - **Returns** - - number of open Realm instances across all threads. - - - - - - - - - - - -.. _getInstance: - -.. _getInstance__: - -.. _Realm_getInstance: - -.. _Realm_getInstance__: - -.. _io_realm_Realm_getInstance: - -.. _io_realm_Realm_getInstance__: - - - -getInstance ------------ - -.. _io_realm_Realm_getInstance_io_realm_RealmConfiguration_: - -.. _io_realm_Realm_getInstance_RealmConfiguration_: - -.. _getInstance_io_realm_RealmConfiguration_: - -.. _getInstance_RealmConfiguration_: - -.. _Realm_getInstance_io_realm_RealmConfiguration_: - -.. _Realm_getInstance_RealmConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Realm ` :ref:`getInstance ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - - - * - Realm static constructor that returns the Realm instance defined by provided :ref:`io.realm.RealmConfiguration ` - - - - - - - **Parameters** - - - ``configuration`` - :ref:`RealmConfiguration ` used to open the Realm - - - - - - - - - - **Returns** - - an instance of the Realm class - - - - - **Throws** - - - :ref:`RealmMigrationNeededException ` - if no migration has been provided by the configuration and the RealmObject classes or version has has changed so a migration is required. - - - - - :ref:`RealmFileException ` - if an error happened when accessing the underlying Realm file. - - - - - `IllegalArgumentException `__ - if a null :ref:`RealmConfiguration ` is provided. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`RealmConfiguration for details on how to configure a Realm. ` - - - - - - - - - - - - -.. _getInstanceAsync: - -.. _getInstanceAsync__: - -.. _Realm_getInstanceAsync: - -.. _Realm_getInstanceAsync__: - -.. _io_realm_Realm_getInstanceAsync: - -.. _io_realm_Realm_getInstanceAsync__: - - - -getInstanceAsync ----------------- - -.. _io_realm_Realm_getInstanceAsync_io_realm_RealmConfiguration_io_realm_Realm_Callback_: - -.. _io_realm_Realm_getInstanceAsync_io_realm_RealmConfiguration__io_realm_Realm_Callback_: - -.. _io_realm_Realm_getInstanceAsync_io_realm_RealmConfiguration_Callback_: - -.. _io_realm_Realm_getInstanceAsync_io_realm_RealmConfiguration__Callback_: - -.. _io_realm_Realm_getInstanceAsync_io_realm_RealmConfiguration_Realm_Callback_: - -.. _io_realm_Realm_getInstanceAsync_io_realm_RealmConfiguration__Realm_Callback_: - -.. _io_realm_Realm_getInstanceAsync_RealmConfiguration_io_realm_Realm_Callback_: - -.. _io_realm_Realm_getInstanceAsync_RealmConfiguration__io_realm_Realm_Callback_: - -.. _io_realm_Realm_getInstanceAsync_RealmConfiguration_Callback_: - -.. _io_realm_Realm_getInstanceAsync_RealmConfiguration__Callback_: - -.. _io_realm_Realm_getInstanceAsync_RealmConfiguration_Realm_Callback_: - -.. _io_realm_Realm_getInstanceAsync_RealmConfiguration__Realm_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration_io_realm_Realm_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration__io_realm_Realm_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration__Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration_Realm_Callback_: - -.. _getInstanceAsync_io_realm_RealmConfiguration__Realm_Callback_: - -.. _getInstanceAsync_RealmConfiguration_io_realm_Realm_Callback_: - -.. _getInstanceAsync_RealmConfiguration__io_realm_Realm_Callback_: - -.. _getInstanceAsync_RealmConfiguration_Callback_: - -.. _getInstanceAsync_RealmConfiguration__Callback_: - -.. _getInstanceAsync_RealmConfiguration_Realm_Callback_: - -.. _getInstanceAsync_RealmConfiguration__Realm_Callback_: - -.. _Realm_getInstanceAsync_io_realm_RealmConfiguration_io_realm_Realm_Callback_: - -.. _Realm_getInstanceAsync_io_realm_RealmConfiguration__io_realm_Realm_Callback_: - -.. _Realm_getInstanceAsync_io_realm_RealmConfiguration_Callback_: - -.. _Realm_getInstanceAsync_io_realm_RealmConfiguration__Callback_: - -.. _Realm_getInstanceAsync_io_realm_RealmConfiguration_Realm_Callback_: - -.. _Realm_getInstanceAsync_io_realm_RealmConfiguration__Realm_Callback_: - -.. _Realm_getInstanceAsync_RealmConfiguration_io_realm_Realm_Callback_: - -.. _Realm_getInstanceAsync_RealmConfiguration__io_realm_Realm_Callback_: - -.. _Realm_getInstanceAsync_RealmConfiguration_Callback_: - -.. _Realm_getInstanceAsync_RealmConfiguration__Callback_: - -.. _Realm_getInstanceAsync_RealmConfiguration_Realm_Callback_: - -.. _Realm_getInstanceAsync_RealmConfiguration__Realm_Callback_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAsyncTask ` :ref:`getInstanceAsync ` ( - | :ref:`RealmConfiguration ` configuration, - | :ref:`Realm.Callback ` callback - | ) - - - - - * - The creation of the first Realm instance per :ref:`RealmConfiguration ` in a process can take some time as all initialization code need to run at that point (setting up the Realm, validating schemas and creating initial data). This method places the initialization work in a background thread and deliver the Realm instance to the caller thread asynchronously after the initialization is finished. - - - - - - - **Parameters** - - - ``configuration`` - :ref:`RealmConfiguration ` used to open the Realm. - - - - - - - ``callback`` - invoked to return the results. - - - - - - - - **Returns** - - a :ref:`RealmAsyncTask ` representing a cancellable task. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if a null :ref:`RealmConfiguration ` or a null :ref:`Callback ` is provided. - - - - - - - `IllegalStateException `__ - if it is called from a non-Looper or **IntentService** thread. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Callback for more details. ` - - - - - - - - - - - - -.. _getLocalInstanceCount: - -.. _getLocalInstanceCount__: - -.. _Realm_getLocalInstanceCount: - -.. _Realm_getLocalInstanceCount__: - -.. _io_realm_Realm_getLocalInstanceCount: - -.. _io_realm_Realm_getLocalInstanceCount__: - - - -getLocalInstanceCount ---------------------- - -.. _io_realm_Realm_getLocalInstanceCount_io_realm_RealmConfiguration_: - -.. _io_realm_Realm_getLocalInstanceCount_RealmConfiguration_: - -.. _getLocalInstanceCount_io_realm_RealmConfiguration_: - -.. _getLocalInstanceCount_RealmConfiguration_: - -.. _Realm_getLocalInstanceCount_io_realm_RealmConfiguration_: - -.. _Realm_getLocalInstanceCount_RealmConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public static **int** :ref:`getLocalInstanceCount ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - - - * - Returns the current number of open Realm instances on the thread calling this method. This include both dynamic and normal Realms. - - - - - **Parameters** - - - ``configuration`` - the :ref:`io.realm.RealmConfiguration ` for the Realm. - - - - - - - - - - **Returns** - - number of open Realm instances on the caller thread. - - - - - - - - - - - -.. _getSchema: - -.. _getSchema__: - -.. _Realm_getSchema: - -.. _Realm_getSchema__: - -.. _io_realm_Realm_getSchema: - -.. _io_realm_Realm_getSchema__: - - - -getSchema ---------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSchema ` :ref:`getSchema ` () - | - - - - - * - Returns the schema for this Realm. The schema is immutable. Any attempt to modify it will result in an `UnsupportedOperationException `__ . - - The schema can only be modified using :ref:`DynamicRealm.getSchema() ` or through an migration. - - - - - - - - - - - **Returns** - - The :ref:`RealmSchema ` for this Realm. - - - - - - - - - **Overrides** - - ``getSchema`` in class **BaseRealm** - - - - - - -.. _init: - -.. _init__: - -.. _Realm_init: - -.. _Realm_init__: - -.. _io_realm_Realm_init: - -.. _io_realm_Realm_init__: - - - -init ----- - -.. _io_realm_Realm_init_Context_java_lang_String_: - -.. _io_realm_Realm_init_Context__java_lang_String_: - -.. _io_realm_Realm_init_Context_String_: - -.. _io_realm_Realm_init_Context__String_: - -.. _init_Context_java_lang_String_: - -.. _init_Context__java_lang_String_: - -.. _init_Context_String_: - -.. _init_Context__String_: - -.. _Realm_init_Context_java_lang_String_: - -.. _Realm_init_Context__java_lang_String_: - -.. _Realm_init_Context_String_: - -.. _Realm_init_Context__String_: - -.. list-table:: - :header-rows: 1 - - * - | public static synchronized **void** :ref:`init ` ( - | **Context** context, - | `String `__ userAgent - | ) - - - - - * - Initializes the Realm library and creates a default configuration that is ready to use. It is required to call this method before interacting with any other of the Realm API's.A good place is in an `android.app.Application `__ subclass: - - - - - - .. code-block:: java - - - public class MyApplication extends Application { - @Override - public void onCreate() { - super.onCreate(); - Realm.init(this, "MyApp/" + BuildConfig.VERSION_NAME); - } - } - - - - - - Remember to register it in the ``AndroidManifest.xml`` file: - - - - - - .. code-block:: java - - - - - - // ... - - - - - - - - - - - - - **Parameters** - - - ``context`` - the Application Context. - - - - - ``userAgent`` - optional user defined string that will be sent to the Realm Object Server as part of a ``User-Agent`` header when a session is established. This setting will not be used by non-synchronized Realms. - - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if a ``null`` context or userAgent is provided. - - - - - - - `IllegalStateException `__ - if **Context.getFilesDir()** could not be found. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`getDefaultInstance() ` - - - - - - - - - - -.. _io_realm_Realm_init_Context_: - -.. _init_Context_: - -.. _Realm_init_Context_: - -.. list-table:: - :header-rows: 1 - - * - | public static synchronized **void** :ref:`init ` ( - | **Context** context - | ) - - - - - * - Initializes the Realm library and creates a default configuration that is ready to use. It is required to call this method before interacting with any other of the Realm API's.A good place is in an `android.app.Application `__ subclass: - - - - - - .. code-block:: java - - - public class MyApplication extends Application { - @Override - public void onCreate() { - super.onCreate(); - Realm.init(this); - } - } - - - - - - Remember to register it in the ``AndroidManifest.xml`` file: - - - - - - .. code-block:: java - - - - - - // ... - - - - - - - - - - - - - **Parameters** - - - ``context`` - the Application Context. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if a ``null`` context is provided. - - - - - - - `IllegalStateException `__ - if **Context.getFilesDir()** could not be found. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`getDefaultInstance() ` - - - - - - - - - - - - -.. _insert: - -.. _insert__: - -.. _Realm_insert: - -.. _Realm_insert__: - -.. _io_realm_Realm_insert: - -.. _io_realm_Realm_insert__: - - - -insert ------- - -.. _io_realm_Realm_insert_io_realm_RealmModel_: - -.. _io_realm_Realm_insert_RealmModel_: - -.. _insert_io_realm_RealmModel_: - -.. _insert_RealmModel_: - -.. _Realm_insert_io_realm_RealmModel_: - -.. _Realm_insert_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`insert ` ( - | :ref:`RealmModel ` object - | ) - - - - - * - Inserts an unmanaged RealmObject. This is generally faster than :ref:`copyToRealm(RealmModel, ImportFlag...) ` since it doesn't return the inserted elements, and performs minimum allocations and checks. After being inserted any changes to the original object will not be persisted. - - Please note: - - - - - We don't check if the provided objects are already managed or not, so inserting a managed object might duplicate it. Duplication will only happen if the object doesn't have a primary key. Objects with primary keys will never get duplicated. - - - - We don't create (nor return) a managed :ref:`RealmObject ` for each element - - - - - - Copying an object will copy all field values. Any unset field in the object and child objects will be set to their default value if not provided - - - - - If you want the managed :ref:`RealmObject ` returned, use :ref:`copyToRealm(RealmModel, ImportFlag...) ` , otherwise if you have a large number of object this method is generally faster. - - - - - - - - - **Parameters** - - - ``object`` - RealmObjects to insert. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the corresponding Realm is closed, called from an incorrect thread or not in a transaction. - - - - - :ref:`io.realm.exceptions.RealmPrimaryKeyConstraintException ` - if two objects with the same primary key is inserted or if a primary key value already exists in the Realm. - - - - - - - - - - -.. _io_realm_Realm_insert_java_util_Collection_: - -.. _io_realm_Realm_insert_Collection_: - -.. _io_realm_Realm_insert_RealmModel__: - -.. _insert_java_util_Collection_: - -.. _insert_Collection_: - -.. _insert_RealmModel__: - -.. _Realm_insert_java_util_Collection_: - -.. _Realm_insert_Collection_: - -.. _Realm_insert_RealmModel__: - -.. _io_realm_Realm_insert_Collection___extends_RealmModel__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`insert ` ( - | `java.util.Collection\ `__ objects - | ) - - - - - * - Inserts a list of an unmanaged RealmObjects. This is generally faster than :ref:`copyToRealm(Iterable, ImportFlag...) ` since it doesn't return the inserted elements, and performs minimum allocations and checks. After being inserted any changes to the original objects will not be persisted. - - Please note: - - - - - We don't check if the provided objects are already managed or not, so inserting a managed object might duplicate it. Duplication will only happen if the object doesn't have a primary key. Objects with primary keys will never get duplicated. - - - - We don't create (nor return) a managed :ref:`RealmObject ` for each element - - - - - - Copying an object will copy all field values. Any unset field in the object and child objects will be set to their default value if not provided - - - - - If you want the managed :ref:`RealmObject ` returned, use :ref:`copyToRealm(Iterable, ImportFlag...) ` , otherwise if you have a large number of object this method is generally faster. - - - - - - - - - **Parameters** - - - ``objects`` - RealmObjects to insert. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the corresponding Realm is closed, called from an incorrect thread or not in a transaction. - - - - - - - - - - - - -.. _insertOrUpdate: - -.. _insertOrUpdate__: - -.. _Realm_insertOrUpdate: - -.. _Realm_insertOrUpdate__: - -.. _io_realm_Realm_insertOrUpdate: - -.. _io_realm_Realm_insertOrUpdate__: - - - -insertOrUpdate --------------- - -.. _io_realm_Realm_insertOrUpdate_io_realm_RealmModel_: - -.. _io_realm_Realm_insertOrUpdate_RealmModel_: - -.. _insertOrUpdate_io_realm_RealmModel_: - -.. _insertOrUpdate_RealmModel_: - -.. _Realm_insertOrUpdate_io_realm_RealmModel_: - -.. _Realm_insertOrUpdate_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`insertOrUpdate ` ( - | :ref:`RealmModel ` object - | ) - - - - - * - Inserts or updates an unmanaged RealmObject. This is generally faster than :ref:`copyToRealmOrUpdate(RealmModel, ImportFlag...) ` since it doesn't return the inserted elements, and performs minimum allocations and checks. After being inserted any changes to the original object will not be persisted. - - Please note: - - - - - We don't check if the provided objects are already managed or not, so inserting a managed object might duplicate it. Duplication will only happen if the object doesn't have a primary key. Objects with primary keys will never get duplicated. - - - - We don't create (nor return) a managed :ref:`RealmObject ` for each element - - - - - - Copying an object will copy all field values. Any unset field in the object and child objects will be set to their default value if not provided - - - - - If you want the managed :ref:`RealmObject ` returned, use :ref:`copyToRealm(RealmModel, ImportFlag...) ` , otherwise if you have a large number of object this method is generally faster. - - - - - - - - - **Parameters** - - - ``object`` - RealmObjects to insert. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the corresponding Realm is closed, called from an incorrect thread or not in a transaction. - - - - - - - - - - -.. _io_realm_Realm_insertOrUpdate_java_util_Collection_: - -.. _io_realm_Realm_insertOrUpdate_Collection_: - -.. _io_realm_Realm_insertOrUpdate_RealmModel__: - -.. _insertOrUpdate_java_util_Collection_: - -.. _insertOrUpdate_Collection_: - -.. _insertOrUpdate_RealmModel__: - -.. _Realm_insertOrUpdate_java_util_Collection_: - -.. _Realm_insertOrUpdate_Collection_: - -.. _Realm_insertOrUpdate_RealmModel__: - -.. _io_realm_Realm_insertOrUpdate_Collection___extends_RealmModel__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`insertOrUpdate ` ( - | `java.util.Collection\ `__ objects - | ) - - - - - * - Inserts or updates a list of unmanaged RealmObjects. This is generally faster than :ref:`copyToRealmOrUpdate(Iterable, ImportFlag...) ` since it doesn't return the inserted elements, and performs minimum allocations and checks. After being inserted any changes to the original objects will not be persisted. - - Please note: - - - - - We don't check if the provided objects are already managed or not, so inserting a managed object might duplicate it. Duplication will only happen if the object doesn't have a primary key. Objects with primary keys will never get duplicated. - - - - We don't create (nor return) a managed :ref:`RealmObject ` for each element - - - - - - Copying an object will copy all field values. Any unset field in the object and child objects will be set to their default value if not provided - - - - - If you want the managed :ref:`RealmObject ` returned, use :ref:`copyToRealm(Iterable, ImportFlag...) ` , otherwise if you have a large number of object this method is generally faster. - - - - - - - - - **Parameters** - - - ``objects`` - RealmObjects to insert. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the corresponding Realm is closed, called from an incorrect thread or not in a transaction. - - - - - :ref:`io.realm.exceptions.RealmPrimaryKeyConstraintException ` - if two objects with the same primary key is inserted or if a primary key value already exists in the Realm. - - - - - - - - - - - - -.. _isEmpty: - -.. _isEmpty__: - -.. _Realm_isEmpty: - -.. _Realm_isEmpty__: - -.. _io_realm_Realm_isEmpty: - -.. _io_realm_Realm_isEmpty__: - - - -isEmpty -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEmpty ` () - | - - - - - * - Checks if this :ref:`io.realm.Realm ` contains any objects. - - - - - - - - - **Returns** - - ``true`` if empty, \@{code false} otherwise. - - - - - - - - - **Overrides** - - ``isEmpty`` in class **BaseRealm** - - - - - - -.. _migrateRealm: - -.. _migrateRealm__: - -.. _Realm_migrateRealm: - -.. _Realm_migrateRealm__: - -.. _io_realm_Realm_migrateRealm: - -.. _io_realm_Realm_migrateRealm__: - - - -migrateRealm ------------- - -.. _io_realm_Realm_migrateRealm_io_realm_RealmConfiguration_io_realm_RealmMigration_: - -.. _io_realm_Realm_migrateRealm_io_realm_RealmConfiguration__io_realm_RealmMigration_: - -.. _io_realm_Realm_migrateRealm_io_realm_RealmConfiguration_RealmMigration_: - -.. _io_realm_Realm_migrateRealm_io_realm_RealmConfiguration__RealmMigration_: - -.. _io_realm_Realm_migrateRealm_RealmConfiguration_io_realm_RealmMigration_: - -.. _io_realm_Realm_migrateRealm_RealmConfiguration__io_realm_RealmMigration_: - -.. _io_realm_Realm_migrateRealm_RealmConfiguration_RealmMigration_: - -.. _io_realm_Realm_migrateRealm_RealmConfiguration__RealmMigration_: - -.. _migrateRealm_io_realm_RealmConfiguration_io_realm_RealmMigration_: - -.. _migrateRealm_io_realm_RealmConfiguration__io_realm_RealmMigration_: - -.. _migrateRealm_io_realm_RealmConfiguration_RealmMigration_: - -.. _migrateRealm_io_realm_RealmConfiguration__RealmMigration_: - -.. _migrateRealm_RealmConfiguration_io_realm_RealmMigration_: - -.. _migrateRealm_RealmConfiguration__io_realm_RealmMigration_: - -.. _migrateRealm_RealmConfiguration_RealmMigration_: - -.. _migrateRealm_RealmConfiguration__RealmMigration_: - -.. _Realm_migrateRealm_io_realm_RealmConfiguration_io_realm_RealmMigration_: - -.. _Realm_migrateRealm_io_realm_RealmConfiguration__io_realm_RealmMigration_: - -.. _Realm_migrateRealm_io_realm_RealmConfiguration_RealmMigration_: - -.. _Realm_migrateRealm_io_realm_RealmConfiguration__RealmMigration_: - -.. _Realm_migrateRealm_RealmConfiguration_io_realm_RealmMigration_: - -.. _Realm_migrateRealm_RealmConfiguration__io_realm_RealmMigration_: - -.. _Realm_migrateRealm_RealmConfiguration_RealmMigration_: - -.. _Realm_migrateRealm_RealmConfiguration__RealmMigration_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`migrateRealm ` ( - | :ref:`RealmConfiguration ` configuration, - | :ref:`RealmMigration ` migration - | ) - - - - - * - Manually triggers a migration on a RealmMigration. - - - - - **Parameters** - - - ``configuration`` - the:ref:`RealmConfiguration ` . - - - - - - - ``migration`` - the :ref:`RealmMigration ` to run on the Realm. This will override any migration set on the configuration. - - - - - - - - - - - - **Throws** - - - `FileNotFoundException `__ - if the Realm file doesn't exist. - - - - - - - - - - -.. _io_realm_Realm_migrateRealm_io_realm_RealmConfiguration_: - -.. _io_realm_Realm_migrateRealm_RealmConfiguration_: - -.. _migrateRealm_io_realm_RealmConfiguration_: - -.. _migrateRealm_RealmConfiguration_: - -.. _Realm_migrateRealm_io_realm_RealmConfiguration_: - -.. _Realm_migrateRealm_RealmConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`migrateRealm ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - - - * - Manually triggers the migration associated with a given RealmConfiguration. If Realm is already at the latest version, nothing will happen. - - - - - **Parameters** - - - ``configuration`` - :ref:`RealmConfiguration ` - - - - - - - - - - - - **Throws** - - - `FileNotFoundException `__ - if the Realm file doesn't exist. - - - - - - - - - - - - -.. _removeAllChangeListeners: - -.. _removeAllChangeListeners__: - -.. _Realm_removeAllChangeListeners: - -.. _Realm_removeAllChangeListeners__: - -.. _io_realm_Realm_removeAllChangeListeners: - -.. _io_realm_Realm_removeAllChangeListeners__: - - - -removeAllChangeListeners ------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeAllChangeListeners ` () - | - - - - - * - Removes all user-defined change listeners. - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if you try to remove listeners from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _removeChangeListener: - -.. _removeChangeListener__: - -.. _Realm_removeChangeListener: - -.. _Realm_removeChangeListener__: - -.. _io_realm_Realm_removeChangeListener: - -.. _io_realm_Realm_removeChangeListener__: - - - -removeChangeListener --------------------- - -.. _io_realm_Realm_removeChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_Realm_removeChangeListener_RealmChangeListener_: - -.. _removeChangeListener_io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmChangeListener_: - -.. _Realm_removeChangeListener_io_realm_RealmChangeListener_: - -.. _Realm_removeChangeListener_RealmChangeListener_: - -.. _io_realm_Realm_removeChangeListener_RealmChangeListener_Realm__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _removeDefaultConfiguration: - -.. _removeDefaultConfiguration__: - -.. _Realm_removeDefaultConfiguration: - -.. _Realm_removeDefaultConfiguration__: - -.. _io_realm_Realm_removeDefaultConfiguration: - -.. _io_realm_Realm_removeDefaultConfiguration__: - - - -removeDefaultConfiguration --------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`removeDefaultConfiguration ` () - | - - - - - * - Removes the current default configuration (if any). Any further calls to :ref:`getDefaultInstance() ` will fail until a new default configuration has been set using :ref:`setDefaultConfiguration(RealmConfiguration) ` . - - - - - - - - - - - - - - - - - -.. _setDefaultConfiguration: - -.. _setDefaultConfiguration__: - -.. _Realm_setDefaultConfiguration: - -.. _Realm_setDefaultConfiguration__: - -.. _io_realm_Realm_setDefaultConfiguration: - -.. _io_realm_Realm_setDefaultConfiguration__: - - - -setDefaultConfiguration ------------------------ - -.. _io_realm_Realm_setDefaultConfiguration_io_realm_RealmConfiguration_: - -.. _io_realm_Realm_setDefaultConfiguration_RealmConfiguration_: - -.. _setDefaultConfiguration_io_realm_RealmConfiguration_: - -.. _setDefaultConfiguration_RealmConfiguration_: - -.. _Realm_setDefaultConfiguration_io_realm_RealmConfiguration_: - -.. _Realm_setDefaultConfiguration_RealmConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`setDefaultConfiguration ` ( - | :ref:`RealmConfiguration ` configuration - | ) - - - - - * - Sets the :ref:`io.realm.RealmConfiguration ` used when calling :ref:`getDefaultInstance() ` . - - - - - - - **Parameters** - - - ``configuration`` - the :ref:`io.realm.RealmConfiguration ` to use as the default configuration. - - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if a null :ref:`RealmConfiguration ` is provided. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`RealmConfiguration for details on how to configure a Realm. ` - - - - - - - - - - - - -.. _where: - -.. _where__: - -.. _Realm_where: - -.. _Realm_where__: - -.. _io_realm_Realm_where: - -.. _io_realm_Realm_where__: - - - -where ------ - -.. _io_realm_Realm_where_java_lang_Class_: - -.. _io_realm_Realm_where_Class_: - -.. _where_java_lang_Class_: - -.. _where_Class_: - -.. _Realm_where_java_lang_Class_: - -.. _Realm_where_Class_: - -.. _io_realm_Realm_where_Class_E__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`where ` <**E** >( - | `java.lang.Class\ `__ clazz - | ) - - - - - * - Returns a typed RealmQuery, which can be used to query for specific objects of this type - - - - - **Parameters** - - - ``clazz`` - the class of the object which is to be queried for. - - - - - - - - **Returns** - - a typed RealmQuery, which can be used to query for specific objects of this type. - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmQuery ` - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/Realm/Callback.txt b/source/sdk/temp/java/api/io/realm/Realm/Callback.txt deleted file mode 100644 index c324ef21dd..0000000000 --- a/source/sdk/temp/java/api/io/realm/Realm/Callback.txt +++ /dev/null @@ -1,271 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Realm.Callback -^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_Realm_Callback: - - - -io.realm -======== - - - | `java.lang.Object `__ - | **io.realm.BaseRealm.InstanceCallback** - | io.realm.Realm.Callback - - - - -**Enclosing class:** - -:ref:`Realm ` - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Callback ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | `Throwable `__ exception - | ) - - - Deliver an error happens when creating the Realm instance to the caller thread. - - - - - * - public abstract **void** - - | :ref:`onSuccess ` ( - | :ref:`Realm ` realm - | ) - - - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class **io.realm.BaseRealm.InstanceCallback**: ``onSuccess`` , ``onError`` - - - - -Constructor Detail -================== - -.. _Callback: - -.. _Callback__: - -.. _io_realm_Realm_Callback: - -.. _io_realm_Realm_Callback__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Callback ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _Callback_onError: - -.. _Callback_onError__: - -.. _Realm_Callback_onError: - -.. _Realm_Callback_onError__: - -.. _io_realm_Realm_Callback_onError: - -.. _io_realm_Realm_Callback_onError__: - - - -onError -------- - -.. _io_realm_Realm_Callback_onError_java_lang_Throwable_: - -.. _io_realm_Realm_Callback_onError_Throwable_: - -.. _onError_java_lang_Throwable_: - -.. _onError_Throwable_: - -.. _Realm_Callback_onError_java_lang_Throwable_: - -.. _Realm_Callback_onError_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | `Throwable `__ exception - | ) - - - - - * - Deliver an error happens when creating the Realm instance to the caller thread. The default implementation will throw an exception on the caller thread. - - - - - - - - - - - **Overrides** - - ``onError`` in class **InstanceCallback** - - - - - - -.. _onSuccess: - -.. _onSuccess__: - -.. _Callback_onSuccess: - -.. _Callback_onSuccess__: - -.. _Realm_Callback_onSuccess: - -.. _Realm_Callback_onSuccess__: - -.. _io_realm_Realm_Callback_onSuccess: - -.. _io_realm_Realm_Callback_onSuccess__: - - - -onSuccess ---------- - -.. _io_realm_Realm_Callback_onSuccess_io_realm_Realm_: - -.. _io_realm_Realm_Callback_onSuccess_Realm_: - -.. _onSuccess_io_realm_Realm_: - -.. _onSuccess_Realm_: - -.. _Realm_Callback_onSuccess_io_realm_Realm_: - -.. _Realm_Callback_onSuccess_Realm_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract **void** :ref:`onSuccess ` ( - | :ref:`Realm ` realm - | ) - - - - - * - - - - - - - - - - - - - - **Overrides** - - ``onSuccess`` in class **InstanceCallback** - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/Realm/Transaction.txt b/source/sdk/temp/java/api/io/realm/Realm/Transaction.txt deleted file mode 100644 index 388751c75b..0000000000 --- a/source/sdk/temp/java/api/io/realm/Realm/Transaction.txt +++ /dev/null @@ -1,144 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface Realm.Transaction -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_Realm_Transaction: - - - -io.realm -======== - - - -**Enclosing class:** - -:ref:`Realm ` - - - -Encapsulates a Realm transaction.Using this class will automatically handle **io.realm.Realm.beginTransaction()** and **io.realm.Realm.commitTransaction()** If any exception is thrown during the transaction **io.realm.Realm.cancelTransaction()** will be called instead of **io.realm.Realm.commitTransaction()**. - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static`` - - :ref:`Realm.Transaction.Callback ` - - - * - ``public static interface`` - - :ref:`Realm.Transaction.OnSuccess ` - - - * - ``public static interface`` - - :ref:`Realm.Transaction.OnError ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`execute ` ( - | :ref:`Realm ` realm - | ) - - - - - - - - - - -Method Detail -============= - -.. _execute: - -.. _execute__: - -.. _Transaction_execute: - -.. _Transaction_execute__: - -.. _Realm_Transaction_execute: - -.. _Realm_Transaction_execute__: - -.. _io_realm_Realm_Transaction_execute: - -.. _io_realm_Realm_Transaction_execute__: - - - -execute -------- - -.. _io_realm_Realm_Transaction_execute_io_realm_Realm_: - -.. _io_realm_Realm_Transaction_execute_Realm_: - -.. _execute_io_realm_Realm_: - -.. _execute_Realm_: - -.. _Realm_Transaction_execute_io_realm_Realm_: - -.. _Realm_Transaction_execute_Realm_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`execute ` ( - | :ref:`Realm ` realm - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/Realm/Transaction/Callback.txt b/source/sdk/temp/java/api/io/realm/Realm/Transaction/Callback.txt deleted file mode 100644 index da30f154cd..0000000000 --- a/source/sdk/temp/java/api/io/realm/Realm/Transaction/Callback.txt +++ /dev/null @@ -1,241 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Realm.Transaction.Callback -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_Realm_Transaction_Callback: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.Realm.Transaction.Callback - - - - -**Enclosing class:** - -:ref:`Transaction ` - - - -Callback invoked to notify the caller thread. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Callback ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | `Exception `__ ignore - | ) - - - - - - - - * - public **void** - - | :ref:`onSuccess ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _Callback: - -.. _Callback__: - -.. _io_realm_Realm_Transaction_Callback: - -.. _io_realm_Realm_Transaction_Callback__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Callback ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _Callback_onError: - -.. _Callback_onError__: - -.. _Realm_Transaction_Callback_onError: - -.. _Realm_Transaction_Callback_onError__: - -.. _io_realm_Realm_Transaction_Callback_onError: - -.. _io_realm_Realm_Transaction_Callback_onError__: - - - -onError -------- - -.. _io_realm_Realm_Transaction_Callback_onError_java_lang_Exception_: - -.. _io_realm_Realm_Transaction_Callback_onError_Exception_: - -.. _onError_java_lang_Exception_: - -.. _onError_Exception_: - -.. _Realm_Transaction_Callback_onError_java_lang_Exception_: - -.. _Realm_Transaction_Callback_onError_Exception_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | `Exception `__ ignore - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _onSuccess: - -.. _onSuccess__: - -.. _Callback_onSuccess: - -.. _Callback_onSuccess__: - -.. _Realm_Transaction_Callback_onSuccess: - -.. _Realm_Transaction_Callback_onSuccess__: - -.. _io_realm_Realm_Transaction_Callback_onSuccess: - -.. _io_realm_Realm_Transaction_Callback_onSuccess__: - - - -onSuccess ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onSuccess ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/Realm/Transaction/OnError.txt b/source/sdk/temp/java/api/io/realm/Realm/Transaction/OnError.txt deleted file mode 100644 index eb85864f27..0000000000 --- a/source/sdk/temp/java/api/io/realm/Realm/Transaction/OnError.txt +++ /dev/null @@ -1,118 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface Realm.Transaction.OnError -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_Realm_Transaction_OnError: - - - -io.realm -======== - - - -**Enclosing class:** - -:ref:`Transaction ` - - - -Callback invoked to notify the caller thread about error during the transaction. The transaction will be rolled back and the background Realm will be closed before invoking :ref:`onError(Throwable) ` . - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | `Throwable `__ error - | ) - - - - - - - - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _OnError_onError: - -.. _OnError_onError__: - -.. _Realm_Transaction_OnError_onError: - -.. _Realm_Transaction_OnError_onError__: - -.. _io_realm_Realm_Transaction_OnError_onError: - -.. _io_realm_Realm_Transaction_OnError_onError__: - - - -onError -------- - -.. _io_realm_Realm_Transaction_OnError_onError_java_lang_Throwable_: - -.. _io_realm_Realm_Transaction_OnError_onError_Throwable_: - -.. _onError_java_lang_Throwable_: - -.. _onError_Throwable_: - -.. _Realm_Transaction_OnError_onError_java_lang_Throwable_: - -.. _Realm_Transaction_OnError_onError_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | `Throwable `__ error - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/Realm/Transaction/OnSuccess.txt b/source/sdk/temp/java/api/io/realm/Realm/Transaction/OnSuccess.txt deleted file mode 100644 index 8b43e6368a..0000000000 --- a/source/sdk/temp/java/api/io/realm/Realm/Transaction/OnSuccess.txt +++ /dev/null @@ -1,102 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface Realm.Transaction.OnSuccess -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_Realm_Transaction_OnSuccess: - - - -io.realm -======== - - - -**Enclosing class:** - -:ref:`Transaction ` - - - -Callback invoked to notify the caller thread about the success of the transaction. - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onSuccess ` () - | - - - - - - - - - - -Method Detail -============= - -.. _onSuccess: - -.. _onSuccess__: - -.. _OnSuccess_onSuccess: - -.. _OnSuccess_onSuccess__: - -.. _Realm_Transaction_OnSuccess_onSuccess: - -.. _Realm_Transaction_OnSuccess_onSuccess__: - -.. _io_realm_Realm_Transaction_OnSuccess_onSuccess: - -.. _io_realm_Realm_Transaction_OnSuccess_onSuccess__: - - - -onSuccess ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onSuccess ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmAny.txt b/source/sdk/temp/java/api/io/realm/RealmAny.txt deleted file mode 100644 index 042a6630df..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmAny.txt +++ /dev/null @@ -1,2368 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmAny -^^^^^^^^^^^^^^ - -.. _io_realm_RealmAny: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmAny - - -:ref:`io.realm.RealmAny ` is used to represent a polymorphic Realm value. - -At any particular moment an instance of this class stores a definite value of a definite type. If, for instance, that is an double value, you may call asDouble() to extract that value. You may call getType() to discover what type of value is currently stored. Calling asDouble() on an instance that does not store an double would raise a `java.lang.ClassCastException `__ . - - - -RealmAny behaves like a value type on all the supported types except on Realm objects. It means that Realm will not persist any change to the RealmAny value except when the type is Realm object. When a RealmAny holds a Realm object, it just holds the reference to it, not a copy of the object. So modifications to the Realm object are reflected in the RealmAny value, including if the object is deleted. Because RealmAny instances are immutable, a new instance is needed to update a RealmAny attribute. - - - -.. code-block:: java - - - anObject.realmAnyAttribute = RealmAny.valueOf(5); - anObject.realmAnyAttribute = RealmAny.valueOf(10.f); - - - -It is crucial to understand that the act of extracting a value of a particular type requires definite knowledge about the stored type. Calling a getter method for any particular type, that is not the same type as the stored value, would raise an exception.Our recommendation to handle the RealmAny polymorphism is to write a switch case around the RealmAny type and its inner value class. - - - -.. code-block:: java - - - RealmAny realmAny = aRealmObject.realmAnyAttribute; - - switch (realmAny.getType()) { - case OBJECT: - if (realmAny.getValueClass().equals(DogRealmModel.class)) { - DogRealmModel value = realmAny.asRealmModel(DogRealmModel.class); - } - case INTEGER: - performAction(realmAny.asInteger()); - break; - case BOOLEAN: - performAction(realmAny.asBoolean()); - break; - case STRING: - performAction(realmAny.asString()); - break; - case BINARY: - performAction(realmAny.asBinary()); - break; - case DATE: - performAction(realmAny.asDate()); - break; - case FLOAT: - performAction(realmAny.asFloat()); - break; - case DOUBLE: - performAction(realmAny.asDouble()); - break; - case DECIMAL128: - performAction(realmAny.asDecimal128()); - break; - case OBJECT_ID: - performAction(realmAny.asObjectId()); - break; - case UUID: - performAction(realmAny.asUUID()); - break; - case NULL: - performNullAction(); - break; - } - - - -getValueClass() returns the Java class that represents the inner value wrapped by the RealmAny instance. If the resulting class is a realization of :ref:`io.realm.RealmModel ` asRealmModel() can be called to cast the RealmAny value to a Realm object reference. - - - -RealmAny values can also be sorted. The sorting order used between different RealmAny types, from lowest to highest, is: - - - -1. Boolean - - -#. Byte/Short/Integer/Long/Float/Double/Decimal128 - - -#. byte[]/String - - -#. Date - - -#. ObjectId - - -#. UUID - - -#. RealmObject - - - - -This has implications on how :ref:`RealmQuery.sort(String) ` , :ref:`RealmQuery.minRealmAny(String) ` and :ref:`RealmQuery.maxRealmAny(String) ` work. Especially ``min()`` and ``max()`` will not only take numeric fields into account, but will use the sorting order to determine the "largest" or "lowest" value. - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static final`` - - :ref:`RealmAny.Type ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **byte** - - | :ref:`asBinary ` () - | - - - Gets this value as a byte[] if it is one, otherwise throws exception. - - - - - * - public `Boolean `__ - - | :ref:`asBoolean ` () - | - - - Gets this value as a Boolean if it is one, otherwise throws exception. - - - - - * - public `Byte `__ - - | :ref:`asByte ` () - | - - - Gets this value as a Byte if it is one, otherwise throws exception. - - - - - * - public `Date `__ - - | :ref:`asDate ` () - | - - - Gets this value as a Date if it is one, otherwise throws exception. - - - - - * - public **Decimal128** - - | :ref:`asDecimal128 ` () - | - - - Gets this value as a Decimal128 if it is one, otherwise throws exception. - - - - - * - public `Double `__ - - | :ref:`asDouble ` () - | - - - Gets this value as a Double if it is one, otherwise throws exception. - - - - - * - public `Float `__ - - | :ref:`asFloat ` () - | - - - Gets this value as a Float if it is one, otherwise throws exception. - - - - - * - public `Integer `__ - - | :ref:`asInteger ` () - | - - - Gets this value as a Integer if it is one, otherwise throws exception. - - - - - * - public `Long `__ - - | :ref:`asLong ` () - | - - - Gets this value as a Long if it is one, otherwise throws exception. - - - - - * - public **ObjectId** - - | :ref:`asObjectId ` () - | - - - Gets this value as a ObjectId if it is one, otherwise throws exception. - - - - - * - public **T** - - | :ref:`asRealmModel ` <**T** >( - | `java.lang.Class\ `__ clazz - | ) - - - Gets this value as a RealmModel if it is one, otherwise throws exception. - - - - - * - public `Short `__ - - | :ref:`asShort ` () - | - - - Gets this value as a Short if it is one, otherwise throws exception. - - - - - * - public `String `__ - - | :ref:`asString ` () - | - - - Gets this value as a String if it is one, otherwise throws exception. - - - - - * - public `UUID `__ - - | :ref:`asUUID ` () - | - - - Gets this value as a UUID if it is one, otherwise throws exception. - - - - - * - public final **boolean** - - | :ref:`coercedEquals ` ( - | :ref:`RealmAny ` other - | ) - - - - - - - - * - public final **boolean** - - | :ref:`equals ` ( - | `Object `__ other - | ) - - - Two ``RealmAny`` s are ``.equals`` if and only if their contents are equal. - - - - - - - * - public :ref:`RealmAny.Type ` - - | :ref:`getType ` () - | - - - Gets the inner type of this RealmAny object. - - - - - * - public `Class `__ - - | :ref:`getValueClass ` () - | - - - Returns the Java class that represents the inner value wrapped by this RealmAny value. - - - - - * - public final **int** - - | :ref:`hashCode ` () - | - - - A ``RealmAny`` 's hash code is, exactly, the hash code of its value. - - - - - - - * - public **boolean** - - | :ref:`isNull ` () - | - - - Returns true if the inner value is null, false otherwise. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`nullValue ` () - | - - - Creates a new RealmAny of a null value. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | **Decimal128** value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | **ObjectId** value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `Date `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | **byte[]** value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `String `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `Double `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `Float `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `Boolean `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `Long `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `Integer `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `Short `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - * - public static :ref:`RealmAny ` - - | :ref:`valueOf ` ( - | `Byte `__ value - | ) - - - Creates a new RealmAny with the specified value. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _asBinary: - -.. _asBinary__: - -.. _RealmAny_asBinary: - -.. _RealmAny_asBinary__: - -.. _io_realm_RealmAny_asBinary: - -.. _io_realm_RealmAny_asBinary__: - - - -asBinary --------- - -.. list-table:: - :header-rows: 1 - - * - | public **byte** :ref:`asBinary ` () - | - - - - - * - Gets this value as a byte[] if it is one, otherwise throws exception. - - - - - - - **Returns** - - a byte[]. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asBoolean: - -.. _asBoolean__: - -.. _RealmAny_asBoolean: - -.. _RealmAny_asBoolean__: - -.. _io_realm_RealmAny_asBoolean: - -.. _io_realm_RealmAny_asBoolean__: - - - -asBoolean ---------- - -.. list-table:: - :header-rows: 1 - - * - | public `Boolean `__ :ref:`asBoolean ` () - | - - - - - * - Gets this value as a Boolean if it is one, otherwise throws exception. - - - - - - - **Returns** - - a Boolean. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asByte: - -.. _asByte__: - -.. _RealmAny_asByte: - -.. _RealmAny_asByte__: - -.. _io_realm_RealmAny_asByte: - -.. _io_realm_RealmAny_asByte__: - - - -asByte ------- - -.. list-table:: - :header-rows: 1 - - * - | public `Byte `__ :ref:`asByte ` () - | - - - - - * - Gets this value as a Byte if it is one, otherwise throws exception. - - - - - - - **Returns** - - a Byte. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asDate: - -.. _asDate__: - -.. _RealmAny_asDate: - -.. _RealmAny_asDate__: - -.. _io_realm_RealmAny_asDate: - -.. _io_realm_RealmAny_asDate__: - - - -asDate ------- - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`asDate ` () - | - - - - - * - Gets this value as a Date if it is one, otherwise throws exception. - - - - - - - **Returns** - - a Date. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asDecimal128: - -.. _asDecimal128__: - -.. _RealmAny_asDecimal128: - -.. _RealmAny_asDecimal128__: - -.. _io_realm_RealmAny_asDecimal128: - -.. _io_realm_RealmAny_asDecimal128__: - - - -asDecimal128 ------------- - -.. list-table:: - :header-rows: 1 - - * - | public **Decimal128** :ref:`asDecimal128 ` () - | - - - - - * - Gets this value as a Decimal128 if it is one, otherwise throws exception. - - - - - - - **Returns** - - a Decimal128. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asDouble: - -.. _asDouble__: - -.. _RealmAny_asDouble: - -.. _RealmAny_asDouble__: - -.. _io_realm_RealmAny_asDouble: - -.. _io_realm_RealmAny_asDouble__: - - - -asDouble --------- - -.. list-table:: - :header-rows: 1 - - * - | public `Double `__ :ref:`asDouble ` () - | - - - - - * - Gets this value as a Double if it is one, otherwise throws exception. - - - - - - - **Returns** - - a Double. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asFloat: - -.. _asFloat__: - -.. _RealmAny_asFloat: - -.. _RealmAny_asFloat__: - -.. _io_realm_RealmAny_asFloat: - -.. _io_realm_RealmAny_asFloat__: - - - -asFloat -------- - -.. list-table:: - :header-rows: 1 - - * - | public `Float `__ :ref:`asFloat ` () - | - - - - - * - Gets this value as a Float if it is one, otherwise throws exception. - - - - - - - **Returns** - - a Float. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asInteger: - -.. _asInteger__: - -.. _RealmAny_asInteger: - -.. _RealmAny_asInteger__: - -.. _io_realm_RealmAny_asInteger: - -.. _io_realm_RealmAny_asInteger__: - - - -asInteger ---------- - -.. list-table:: - :header-rows: 1 - - * - | public `Integer `__ :ref:`asInteger ` () - | - - - - - * - Gets this value as a Integer if it is one, otherwise throws exception. - - - - - - - **Returns** - - an Integer. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asLong: - -.. _asLong__: - -.. _RealmAny_asLong: - -.. _RealmAny_asLong__: - -.. _io_realm_RealmAny_asLong: - -.. _io_realm_RealmAny_asLong__: - - - -asLong ------- - -.. list-table:: - :header-rows: 1 - - * - | public `Long `__ :ref:`asLong ` () - | - - - - - * - Gets this value as a Long if it is one, otherwise throws exception. - - - - - - - **Returns** - - a Long. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asObjectId: - -.. _asObjectId__: - -.. _RealmAny_asObjectId: - -.. _RealmAny_asObjectId__: - -.. _io_realm_RealmAny_asObjectId: - -.. _io_realm_RealmAny_asObjectId__: - - - -asObjectId ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **ObjectId** :ref:`asObjectId ` () - | - - - - - * - Gets this value as a ObjectId if it is one, otherwise throws exception. - - - - - - - **Returns** - - an ObjectId. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asRealmModel: - -.. _asRealmModel__: - -.. _RealmAny_asRealmModel: - -.. _RealmAny_asRealmModel__: - -.. _io_realm_RealmAny_asRealmModel: - -.. _io_realm_RealmAny_asRealmModel__: - - - -asRealmModel ------------- - -.. _io_realm_RealmAny_asRealmModel_java_lang_Class_: - -.. _io_realm_RealmAny_asRealmModel_Class_: - -.. _asRealmModel_java_lang_Class_: - -.. _asRealmModel_Class_: - -.. _RealmAny_asRealmModel_java_lang_Class_: - -.. _RealmAny_asRealmModel_Class_: - -.. _io_realm_RealmAny_asRealmModel_Class_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`asRealmModel ` <**T** >( - | `java.lang.Class\ `__ clazz - | ) - - - - - * - Gets this value as a RealmModel if it is one, otherwise throws exception. - - - **Type Parameters** - - - ``T`` - the RealmModel type to cast the inner value to. - - - - - - - - - - **Returns** - - a RealmModel of the T type. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asShort: - -.. _asShort__: - -.. _RealmAny_asShort: - -.. _RealmAny_asShort__: - -.. _io_realm_RealmAny_asShort: - -.. _io_realm_RealmAny_asShort__: - - - -asShort -------- - -.. list-table:: - :header-rows: 1 - - * - | public `Short `__ :ref:`asShort ` () - | - - - - - * - Gets this value as a Short if it is one, otherwise throws exception. - - - - - - - **Returns** - - a Short. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asString: - -.. _asString__: - -.. _RealmAny_asString: - -.. _RealmAny_asString__: - -.. _io_realm_RealmAny_asString: - -.. _io_realm_RealmAny_asString__: - - - -asString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`asString ` () - | - - - - - * - Gets this value as a String if it is one, otherwise throws exception. - - - - - - - **Returns** - - a String. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _asUUID: - -.. _asUUID__: - -.. _RealmAny_asUUID: - -.. _RealmAny_asUUID__: - -.. _io_realm_RealmAny_asUUID: - -.. _io_realm_RealmAny_asUUID__: - - - -asUUID ------- - -.. list-table:: - :header-rows: 1 - - * - | public `UUID `__ :ref:`asUUID ` () - | - - - - - * - Gets this value as a UUID if it is one, otherwise throws exception. - - - - - - - **Returns** - - an UUID. - - - - - **Throws** - - - `java.lang.ClassCastException `__ - if this value is not of the expected type. - - - - - - - - - - - - -.. _coercedEquals: - -.. _coercedEquals__: - -.. _RealmAny_coercedEquals: - -.. _RealmAny_coercedEquals__: - -.. _io_realm_RealmAny_coercedEquals: - -.. _io_realm_RealmAny_coercedEquals__: - - - -coercedEquals -------------- - -.. _io_realm_RealmAny_coercedEquals_io_realm_RealmAny_: - -.. _io_realm_RealmAny_coercedEquals_RealmAny_: - -.. _coercedEquals_io_realm_RealmAny_: - -.. _coercedEquals_RealmAny_: - -.. _RealmAny_coercedEquals_io_realm_RealmAny_: - -.. _RealmAny_coercedEquals_RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public final **boolean** :ref:`coercedEquals ` ( - | :ref:`RealmAny ` other - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _RealmAny_equals: - -.. _RealmAny_equals__: - -.. _io_realm_RealmAny_equals: - -.. _io_realm_RealmAny_equals__: - - - -equals ------- - -.. _io_realm_RealmAny_equals_java_lang_Object_: - -.. _io_realm_RealmAny_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _RealmAny_equals_java_lang_Object_: - -.. _RealmAny_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public final **boolean** :ref:`equals ` ( - | `Object `__ other - | ) - - - - - * - Two ``RealmAny`` s are ``.equals`` if and only if their contents are equal. - - - - - - - **Parameters** - - - ``other`` - compare target - - - - - - - - **Returns** - - true if the target has the same value - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getType: - -.. _getType__: - -.. _RealmAny_getType: - -.. _RealmAny_getType__: - -.. _io_realm_RealmAny_getType: - -.. _io_realm_RealmAny_getType__: - - - -getType -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAny.Type ` :ref:`getType ` () - | - - - - - * - Gets the inner type of this RealmAny object. - - - - - - - **Returns** - - the inner RealmAny.Type - - - - - - - - - - - -.. _getValueClass: - -.. _getValueClass__: - -.. _RealmAny_getValueClass: - -.. _RealmAny_getValueClass__: - -.. _io_realm_RealmAny_getValueClass: - -.. _io_realm_RealmAny_getValueClass__: - - - -getValueClass -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Class `__ :ref:`getValueClass ` () - | - - - - - * - Returns the Java class that represents the inner value wrapped by this RealmAny value. - - - - - - - **Returns** - - the class that represents the inner value wrapped by this RealmAny value. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _RealmAny_hashCode: - -.. _RealmAny_hashCode__: - -.. _io_realm_RealmAny_hashCode: - -.. _io_realm_RealmAny_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public final **int** :ref:`hashCode ` () - | - - - - - * - A ``RealmAny`` 's hash code is, exactly, the hash code of its value. - - - - - - - - - **Returns** - - true if the target has the same value - - - - - **Throws** - - - `NullPointerException `__ - if the inner value is null - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _isNull: - -.. _isNull__: - -.. _RealmAny_isNull: - -.. _RealmAny_isNull__: - -.. _io_realm_RealmAny_isNull: - -.. _io_realm_RealmAny_isNull__: - - - -isNull ------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isNull ` () - | - - - - - * - Returns true if the inner value is null, false otherwise. - - - - - - - **Returns** - - true if the inner value is null, false otherwise. - - - - - - - - - - - -.. _nullValue: - -.. _nullValue__: - -.. _RealmAny_nullValue: - -.. _RealmAny_nullValue__: - -.. _io_realm_RealmAny_nullValue: - -.. _io_realm_RealmAny_nullValue__: - - - -nullValue ---------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`nullValue ` () - | - - - - - * - Creates a new RealmAny of a null value. - - - - - - - **Returns** - - a new RealmAny instance of a null value. - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _RealmAny_toString: - -.. _RealmAny_toString__: - -.. _io_realm_RealmAny_toString: - -.. _io_realm_RealmAny_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _RealmAny_valueOf: - -.. _RealmAny_valueOf__: - -.. _io_realm_RealmAny_valueOf: - -.. _io_realm_RealmAny_valueOf__: - - - -valueOf -------- - -.. _io_realm_RealmAny_valueOf_Decimal128_: - -.. _valueOf_Decimal128_: - -.. _RealmAny_valueOf_Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | **Decimal128** value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.DECIMAL128 ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a Decimal128. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_ObjectId_: - -.. _valueOf_ObjectId_: - -.. _RealmAny_valueOf_ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | **ObjectId** value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.OBJECT_ID ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of an ObjectId. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_util_Date_: - -.. _io_realm_RealmAny_valueOf_Date_: - -.. _valueOf_java_util_Date_: - -.. _valueOf_Date_: - -.. _RealmAny_valueOf_java_util_Date_: - -.. _RealmAny_valueOf_Date_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `Date `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.DATE ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a Date. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_byte_: - -.. _io_realm_RealmAny_valueOf_byte____: - -.. _valueOf_byte_: - -.. _valueOf_byte____: - -.. _RealmAny_valueOf_byte_: - -.. _RealmAny_valueOf_byte____: - -.. _io_realm_RealmAny_valueOf_byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | **byte[]** value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.BINARY ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a byte[]. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_lang_String_: - -.. _io_realm_RealmAny_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _RealmAny_valueOf_java_lang_String_: - -.. _RealmAny_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `String `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.STRING ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a String. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_lang_Double_: - -.. _io_realm_RealmAny_valueOf_Double_: - -.. _valueOf_java_lang_Double_: - -.. _valueOf_Double_: - -.. _RealmAny_valueOf_java_lang_Double_: - -.. _RealmAny_valueOf_Double_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `Double `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.DOUBLE ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a Double. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_lang_Float_: - -.. _io_realm_RealmAny_valueOf_Float_: - -.. _valueOf_java_lang_Float_: - -.. _valueOf_Float_: - -.. _RealmAny_valueOf_java_lang_Float_: - -.. _RealmAny_valueOf_Float_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `Float `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.FLOAT ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a Float. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_lang_Boolean_: - -.. _io_realm_RealmAny_valueOf_Boolean_: - -.. _valueOf_java_lang_Boolean_: - -.. _valueOf_Boolean_: - -.. _RealmAny_valueOf_java_lang_Boolean_: - -.. _RealmAny_valueOf_Boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `Boolean `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.BOOLEAN ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a Boolean. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_lang_Long_: - -.. _io_realm_RealmAny_valueOf_Long_: - -.. _valueOf_java_lang_Long_: - -.. _valueOf_Long_: - -.. _RealmAny_valueOf_java_lang_Long_: - -.. _RealmAny_valueOf_Long_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `Long `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.INTEGER ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a Long. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_lang_Integer_: - -.. _io_realm_RealmAny_valueOf_Integer_: - -.. _valueOf_java_lang_Integer_: - -.. _valueOf_Integer_: - -.. _RealmAny_valueOf_java_lang_Integer_: - -.. _RealmAny_valueOf_Integer_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `Integer `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.INTEGER ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a Integer. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_lang_Short_: - -.. _io_realm_RealmAny_valueOf_Short_: - -.. _valueOf_java_lang_Short_: - -.. _valueOf_Short_: - -.. _RealmAny_valueOf_java_lang_Short_: - -.. _RealmAny_valueOf_Short_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `Short `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.INTEGER ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny of a Short. - - - - - - - - - -.. _io_realm_RealmAny_valueOf_java_lang_Byte_: - -.. _io_realm_RealmAny_valueOf_Byte_: - -.. _valueOf_java_lang_Byte_: - -.. _valueOf_Byte_: - -.. _RealmAny_valueOf_java_lang_Byte_: - -.. _RealmAny_valueOf_Byte_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny ` :ref:`valueOf ` ( - | `Byte `__ value - | ) - - - - - * - Creates a new RealmAny with the specified value. If the value is not null the type will be :ref:`RealmAny.Type.INTEGER ` , :ref:`RealmAny.Type.NULL ` otherwise. - - - - - - - **Parameters** - - - ``value`` - the RealmAny value. - - - - - - - - **Returns** - - a new RealmAny containing a Byte value. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmAny/Type.txt b/source/sdk/temp/java/api/io/realm/RealmAny/Type.txt deleted file mode 100644 index 29c3ba197c..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmAny/Type.txt +++ /dev/null @@ -1,589 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum RealmAny.Type -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmAny_Type: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.RealmAny.Type - - - - -**Enclosing class:** - -:ref:`RealmAny ` - - - -Enum describing all the types supported by RealmAny. - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`BINARY ` - - - - - - - * - :ref:`BOOLEAN ` - - - - - - - * - :ref:`DATE ` - - - - - - - * - :ref:`DECIMAL128 ` - - - - - - - * - :ref:`DOUBLE ` - - - - - - - * - :ref:`FLOAT ` - - - - - - - * - :ref:`INTEGER ` - - - - - - - * - :ref:`NULL ` - - - - - - - * - :ref:`OBJECT ` - - - - - - - * - :ref:`OBJECT_ID ` - - - - - - - * - :ref:`STRING ` - - - - - - - * - :ref:`UUID ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`RealmAny.Type ` - - | :ref:`fromNativeValue ` ( - | **int** realmFieldType - | ) - - - - - - - - * - public `Class `__ - - | :ref:`getTypedClass ` () - | - - - - - - - - * - public static :ref:`RealmAny.Type ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`RealmAny.Type ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_RealmAny_Type_BINARY: - -.. _RealmAny_Type_BINARY: - - - -``BINARY`` ------------ - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_BOOLEAN: - -.. _RealmAny_Type_BOOLEAN: - - - -``BOOLEAN`` ------------- - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_DATE: - -.. _RealmAny_Type_DATE: - - - -``DATE`` ---------- - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_DECIMAL128: - -.. _RealmAny_Type_DECIMAL128: - - - -``DECIMAL128`` ---------------- - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_DOUBLE: - -.. _RealmAny_Type_DOUBLE: - - - -``DOUBLE`` ------------ - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_FLOAT: - -.. _RealmAny_Type_FLOAT: - - - -``FLOAT`` ----------- - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_INTEGER: - -.. _RealmAny_Type_INTEGER: - - - -``INTEGER`` ------------- - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_NULL: - -.. _RealmAny_Type_NULL: - - - -``NULL`` ---------- - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_OBJECT: - -.. _RealmAny_Type_OBJECT: - - - -``OBJECT`` ------------ - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_OBJECT_ID: - -.. _RealmAny_Type_OBJECT_ID: - - - -``OBJECT_ID`` --------------- - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_STRING: - -.. _RealmAny_Type_STRING: - - - -``STRING`` ------------ - -public static final :ref:`RealmAny.Type ` - - - - - -.. _io_realm_RealmAny_Type_UUID: - -.. _RealmAny_Type_UUID: - - - -``UUID`` ---------- - -public static final :ref:`RealmAny.Type ` - - - - - - -Method Detail -============= - -.. _fromNativeValue: - -.. _fromNativeValue__: - -.. _Type_fromNativeValue: - -.. _Type_fromNativeValue__: - -.. _RealmAny_Type_fromNativeValue: - -.. _RealmAny_Type_fromNativeValue__: - -.. _io_realm_RealmAny_Type_fromNativeValue: - -.. _io_realm_RealmAny_Type_fromNativeValue__: - - - -fromNativeValue ---------------- - -.. _io_realm_RealmAny_Type_fromNativeValue_int_: - -.. _fromNativeValue_int_: - -.. _RealmAny_Type_fromNativeValue_int_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny.Type ` :ref:`fromNativeValue ` ( - | **int** realmFieldType - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getTypedClass: - -.. _getTypedClass__: - -.. _Type_getTypedClass: - -.. _Type_getTypedClass__: - -.. _RealmAny_Type_getTypedClass: - -.. _RealmAny_Type_getTypedClass__: - -.. _io_realm_RealmAny_Type_getTypedClass: - -.. _io_realm_RealmAny_Type_getTypedClass__: - - - -getTypedClass -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Class `__ :ref:`getTypedClass ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _Type_valueOf: - -.. _Type_valueOf__: - -.. _RealmAny_Type_valueOf: - -.. _RealmAny_Type_valueOf__: - -.. _io_realm_RealmAny_Type_valueOf: - -.. _io_realm_RealmAny_Type_valueOf__: - - - -valueOf -------- - -.. _io_realm_RealmAny_Type_valueOf_java_lang_String_: - -.. _io_realm_RealmAny_Type_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _RealmAny_Type_valueOf_java_lang_String_: - -.. _RealmAny_Type_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny.Type ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _Type_values: - -.. _Type_values__: - -.. _RealmAny_Type_values: - -.. _RealmAny_Type_values__: - -.. _io_realm_RealmAny_Type_values: - -.. _io_realm_RealmAny_Type_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmAny.Type ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt b/source/sdk/temp/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt deleted file mode 100644 index 8029b18716..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmAnyNativeFunctionsImpl.txt +++ /dev/null @@ -1,394 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmAnyNativeFunctionsImpl -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmAnyNativeFunctionsImpl: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmAnyNativeFunctionsImpl - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmAnyNativeFunctionsImpl ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`callRawPredicate ` ( - | **TableQuery** query, - | **OsKeyPathMapping** mapping, - | `String `__ predicate, - | :ref:`io.realm.RealmAny[] ` arguments - | ) - - - - - - - - * - public **void** - - | :ref:`handleItem ` ( - | **long** containerPtr, - | `java.util.Map.Entry\ `__ entry - | ) - - - - - - - - * - public **void** - - | :ref:`handleItem ` ( - | **long** listPtr, - | :ref:`RealmAny ` realmAny - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _RealmAnyNativeFunctionsImpl: - -.. _RealmAnyNativeFunctionsImpl__: - -.. _io_realm_RealmAnyNativeFunctionsImpl: - -.. _io_realm_RealmAnyNativeFunctionsImpl__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAnyNativeFunctionsImpl ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _callRawPredicate: - -.. _callRawPredicate__: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate__: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate__: - - - -callRawPredicate ----------------- - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_io_realm_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__io_realm_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_RealmAny____: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__RealmAny____: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_String_io_realm_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__String__io_realm_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_String_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__String__RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_String_RealmAny____: - -.. _io_realm_RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__String__RealmAny____: - -.. _callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_io_realm_RealmAny_: - -.. _callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__io_realm_RealmAny_: - -.. _callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_RealmAny_: - -.. _callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__RealmAny_: - -.. _callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_RealmAny____: - -.. _callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__RealmAny____: - -.. _callRawPredicate_TableQuery_OsKeyPathMapping_String_io_realm_RealmAny_: - -.. _callRawPredicate_TableQuery__OsKeyPathMapping__String__io_realm_RealmAny_: - -.. _callRawPredicate_TableQuery_OsKeyPathMapping_String_RealmAny_: - -.. _callRawPredicate_TableQuery__OsKeyPathMapping__String__RealmAny_: - -.. _callRawPredicate_TableQuery_OsKeyPathMapping_String_RealmAny____: - -.. _callRawPredicate_TableQuery__OsKeyPathMapping__String__RealmAny____: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_io_realm_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__io_realm_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_java_lang_String_RealmAny____: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__java_lang_String__RealmAny____: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_String_io_realm_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__String__io_realm_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_String_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__String__RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery_OsKeyPathMapping_String_RealmAny____: - -.. _RealmAnyNativeFunctionsImpl_callRawPredicate_TableQuery__OsKeyPathMapping__String__RealmAny____: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`callRawPredicate ` ( - | **TableQuery** query, - | **OsKeyPathMapping** mapping, - | `String `__ predicate, - | :ref:`io.realm.RealmAny[] ` arguments - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _handleItem: - -.. _handleItem__: - -.. _RealmAnyNativeFunctionsImpl_handleItem: - -.. _RealmAnyNativeFunctionsImpl_handleItem__: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem__: - - - -handleItem ----------- - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long_java_util_Map_Entry_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long__java_util_Map_Entry_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long_Entry_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long__Entry_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long_Map_Entry_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long__Map_Entry_: - -.. _handleItem_long_java_util_Map_Entry_: - -.. _handleItem_long__java_util_Map_Entry_: - -.. _handleItem_long_Entry_: - -.. _handleItem_long__Entry_: - -.. _handleItem_long_Map_Entry_: - -.. _handleItem_long__Map_Entry_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long_java_util_Map_Entry_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long__java_util_Map_Entry_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long_Entry_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long__Entry_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long_Map_Entry_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long__Map_Entry_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long__Map_Entry_String__RealmAny__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`handleItem ` ( - | **long** containerPtr, - | `java.util.Map.Entry\ `__ entry - | ) - - - - - * - - - - - - - - - - - - - - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long_io_realm_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long__io_realm_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long_RealmAny_: - -.. _io_realm_RealmAnyNativeFunctionsImpl_handleItem_long__RealmAny_: - -.. _handleItem_long_io_realm_RealmAny_: - -.. _handleItem_long__io_realm_RealmAny_: - -.. _handleItem_long_RealmAny_: - -.. _handleItem_long__RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long_io_realm_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long__io_realm_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long_RealmAny_: - -.. _RealmAnyNativeFunctionsImpl_handleItem_long__RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`handleItem ` ( - | **long** listPtr, - | :ref:`RealmAny ` realmAny - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmAnyOperator.txt b/source/sdk/temp/java/api/io/realm/RealmAnyOperator.txt deleted file mode 100644 index 0cdb860ae0..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmAnyOperator.txt +++ /dev/null @@ -1,171 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmAnyOperator -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmAnyOperator: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmAnyOperator - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`checkValidObject ` ( - | **BaseRealm** realm - | ) - - - - - - - - * - protected abstract **NativeRealmAny** - - | :ref:`createNativeRealmAny ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _checkValidObject: - -.. _checkValidObject__: - -.. _RealmAnyOperator_checkValidObject: - -.. _RealmAnyOperator_checkValidObject__: - -.. _io_realm_RealmAnyOperator_checkValidObject: - -.. _io_realm_RealmAnyOperator_checkValidObject__: - - - -checkValidObject ----------------- - -.. _io_realm_RealmAnyOperator_checkValidObject_io_realm_BaseRealm_: - -.. _io_realm_RealmAnyOperator_checkValidObject_BaseRealm_: - -.. _checkValidObject_io_realm_BaseRealm_: - -.. _checkValidObject_BaseRealm_: - -.. _RealmAnyOperator_checkValidObject_io_realm_BaseRealm_: - -.. _RealmAnyOperator_checkValidObject_BaseRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`checkValidObject ` ( - | **BaseRealm** realm - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _createNativeRealmAny: - -.. _createNativeRealmAny__: - -.. _RealmAnyOperator_createNativeRealmAny: - -.. _RealmAnyOperator_createNativeRealmAny__: - -.. _io_realm_RealmAnyOperator_createNativeRealmAny: - -.. _io_realm_RealmAnyOperator_createNativeRealmAny__: - - - -createNativeRealmAny --------------------- - -.. list-table:: - :header-rows: 1 - - * - | protected abstract **NativeRealmAny** :ref:`createNativeRealmAny ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmAsyncTask.txt b/source/sdk/temp/java/api/io/realm/RealmAsyncTask.txt deleted file mode 100644 index f63ff8fee1..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmAsyncTask.txt +++ /dev/null @@ -1,153 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmAsyncTask -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmAsyncTask: - - - -io.realm -======== - -Represents a pending asynchronous Realm task, like asynchronous transactions.Users are responsible for maintaining a reference to ``RealmAsyncTask`` in order to call :ref:`cancel() ` in case of a configuration change for example (to avoid memory leak, as the transaction will post the result to the caller's thread callback). - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`cancel ` () - | - - - Attempts to cancel execution of this transaction (if it hasn't already completed or previously cancelled). - - - - - * - public **boolean** - - | :ref:`isCancelled ` () - | - - - Checks whether an attempt to cancel the transaction was performed. - - - - - - - -Method Detail -============= - -.. _cancel: - -.. _cancel__: - -.. _RealmAsyncTask_cancel: - -.. _RealmAsyncTask_cancel__: - -.. _io_realm_RealmAsyncTask_cancel: - -.. _io_realm_RealmAsyncTask_cancel__: - - - -cancel ------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`cancel ` () - | - - - - - * - Attempts to cancel execution of this transaction (if it hasn't already completed or previously cancelled). - - - - - - - - - - - - - - - -.. _isCancelled: - -.. _isCancelled__: - -.. _RealmAsyncTask_isCancelled: - -.. _RealmAsyncTask_isCancelled__: - -.. _io_realm_RealmAsyncTask_isCancelled: - -.. _io_realm_RealmAsyncTask_isCancelled__: - - - -isCancelled ------------ - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isCancelled ` () - | - - - - - * - Checks whether an attempt to cancel the transaction was performed. - - - - - - - **Returns** - - ``true`` if :ref:`cancel() ` has already been called, ``false`` otherwise. - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmChangeListener.txt b/source/sdk/temp/java/api/io/realm/RealmChangeListener.txt deleted file mode 100644 index 5d87fcc65f..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmChangeListener.txt +++ /dev/null @@ -1,134 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmChangeListener -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmChangeListener: - - - -io.realm -======== - -RealmChangeListener can be registered with a :ref:`Realm ` , :ref:`RealmResults ` or :ref:`RealmObject ` to receive a notification about updates. - -When registered against a ``Realm`` you'll get notified when a Realm instance has been updated. Register against a ``RealmResults`` , ``RealmList`` , ``RealmDictionary`` or ``RealmObject`` to only get notified about changes to them. - - - -Realm instances on a thread without an `android.os.Looper `__ cannot register a RealmChangeListener. - - - -All :ref:`io.realm.RealmObject ` and :ref:`io.realm.RealmResults ` will automatically contain their new values when the **onChange(Object)** method is called. Normally this means that it isn't necessary to query again for those objects, but just invalidate any UI elements that are using them. If there is a chance that a object has been been deleted, it can be verified by using :ref:`RealmObject.isValid() ` . - - - - - - -.. seealso:: - - - - - :ref:`Realm.addChangeListener(RealmChangeListener) ` - - - - - :ref:`Realm.removeAllChangeListeners() ` - - - - - :ref:`Realm.removeChangeListener(RealmChangeListener) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onChange ` ( - | **T** t - | ) - - - Called when a transaction is committed. - - - - - - - -Method Detail -============= - -.. _onChange: - -.. _onChange__: - -.. _RealmChangeListener_onChange: - -.. _RealmChangeListener_onChange__: - -.. _io_realm_RealmChangeListener_onChange: - -.. _io_realm_RealmChangeListener_onChange__: - - - -onChange --------- - -.. _io_realm_RealmChangeListener_onChange_T_: - -.. _onChange_T_: - -.. _RealmChangeListener_onChange_T_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onChange ` ( - | **T** t - | ) - - - - - * - Called when a transaction is committed. - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmCollection.txt b/source/sdk/temp/java/api/io/realm/RealmCollection.txt deleted file mode 100644 index 1dd3c095d6..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmCollection.txt +++ /dev/null @@ -1,1108 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmCollection -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmCollection: - - - -io.realm -======== - -**Implemented interfaces:** - - - -- `java.util.Collection `__ -- `java.lang.Iterable `__ - - -``RealmCollection`` is the root of the collection hierarchy that Realm supports. It defines operations on data collections and the behavior that they will have in all implementations of ``RealmCollection`` s. - -Realm collections are "live" views to the underlying data. This means that they automatically will be kept up to date. As a consequence, using methods like `Collections.unmodifiableCollection(Collection) `__ will not prevent a collection from being modified. - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **double** - - | :ref:`average ` ( - | `String `__ fieldName - | ) - - - Returns the average of a given field. - - - - - * - public **boolean** - - | :ref:`contains ` ( - | `Object `__ object - | ) - - - Tests whether this ``Collection`` contains the specified object. - - - - - - - * - public **boolean** - - | :ref:`deleteAllFromRealm ` () - | - - - This deletes all objects in the collection from the underlying Realm as well as from the collection. - - - - - * - public **boolean** - - | :ref:`isLoaded ` () - | - - - Checks if a collection has finished loading its data yet. - - - - - * - public **boolean** - - | :ref:`isManaged ` () - | - - - Checks if the collection is managed by Realm. - - - - - * - public **boolean** - - | :ref:`isValid ` () - | - - - Checks if the collection is still valid to use, i.e., the :ref:`io.realm.Realm ` instance hasn't been closed. - - - - - - - * - public **boolean** - - | :ref:`load ` () - | - - - Blocks the collection until all data are available. - - - - - * - public `Number `__ - - | :ref:`max ` ( - | `String `__ fieldName - | ) - - - Finds the maximum value of a field. - - - - - * - public `Date `__ - - | :ref:`maxDate ` ( - | `String `__ fieldName - | ) - - - Finds the maximum date. - - - - - * - public `Number `__ - - | :ref:`min ` ( - | `String `__ fieldName - | ) - - - Finds the minimum value of a field. - - - - - * - public `Date `__ - - | :ref:`minDate ` ( - | `String `__ fieldName - | ) - - - Finds the minimum date. - - - - - * - public `Number `__ - - | :ref:`sum ` ( - | `String `__ fieldName - | ) - - - Calculates the sum of a given field. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`where ` () - | - - - Returns a :ref:`RealmQuery ` , which can be used to query for specific objects from this collection. - - - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _average: - -.. _average__: - -.. _RealmCollection_average: - -.. _RealmCollection_average__: - -.. _io_realm_RealmCollection_average: - -.. _io_realm_RealmCollection_average__: - - - -average -------- - -.. _io_realm_RealmCollection_average_java_lang_String_: - -.. _io_realm_RealmCollection_average_String_: - -.. _average_java_lang_String_: - -.. _average_String_: - -.. _RealmCollection_average_java_lang_String_: - -.. _RealmCollection_average_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **double** :ref:`average ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the average of a given field. - - - - - **Parameters** - - - ``fieldName`` - the field to calculate average on. Only number fields are supported. - - - - - - - - **Returns** - - the average for the given field amongst objects in query results. This will be of type double for all types of number fields. If no objects exist or they all have ``null`` as the value for the given field, ``0`` will be returned. When computing the average, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a number type. - - - - - `java.lang.IllegalStateException `__ - if the Realm has been closed or called from an incorrect thread. - - - - - - - - - - - - -.. _contains: - -.. _contains__: - -.. _RealmCollection_contains: - -.. _RealmCollection_contains__: - -.. _io_realm_RealmCollection_contains: - -.. _io_realm_RealmCollection_contains__: - - - -contains --------- - -.. _io_realm_RealmCollection_contains_java_lang_Object_: - -.. _io_realm_RealmCollection_contains_Object_: - -.. _contains_java_lang_Object_: - -.. _contains_Object_: - -.. _RealmCollection_contains_java_lang_Object_: - -.. _RealmCollection_contains_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`contains ` ( - | `Object `__ object - | ) - - - - - * - Tests whether this ``Collection`` contains the specified object. Returns ``true`` if and only if at least one element ``elem`` in this ``Collection`` meets following requirement: ``(object==null ? elem==null : object.equals(elem))`` . - - - - - - - **Parameters** - - - ``object`` - the object to search for. - - - - - - - - **Returns** - - ``true`` if object is an element of this ``Collection`` , ``false`` otherwise. - - - - - - - **Throws** - - - `NullPointerException `__ - if the object to look for is ``null`` and this ``Collection`` doesn't support ``null`` elements. - - - - - - - - - - - - - - -.. _deleteAllFromRealm: - -.. _deleteAllFromRealm__: - -.. _RealmCollection_deleteAllFromRealm: - -.. _RealmCollection_deleteAllFromRealm__: - -.. _io_realm_RealmCollection_deleteAllFromRealm: - -.. _io_realm_RealmCollection_deleteAllFromRealm__: - - - -deleteAllFromRealm ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteAllFromRealm ` () - | - - - - - * - This deletes all objects in the collection from the underlying Realm as well as from the collection. - - - - - - - **Returns** - - ``true`` if objects was deleted, ``false`` otherwise. - - - - - - - **Throws** - - - `IllegalStateException `__ - if the corresponding Realm is closed or in an incorrect thread. - - - - - `java.lang.IllegalStateException `__ - if the Realm has been closed or called from an incorrect thread. - - - - - - - - - - - - -.. _isLoaded: - -.. _isLoaded__: - -.. _RealmCollection_isLoaded: - -.. _RealmCollection_isLoaded__: - -.. _io_realm_RealmCollection_isLoaded: - -.. _io_realm_RealmCollection_isLoaded__: - - - -isLoaded --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isLoaded ` () - | - - - - - * - Checks if a collection has finished loading its data yet. - - - - - - - **Returns** - - ``true`` if data has been loaded and is available, ``false`` if data is still being loaded. - - - - - - - - - - - - - -.. _isManaged: - -.. _isManaged__: - -.. _RealmCollection_isManaged: - -.. _RealmCollection_isManaged__: - -.. _io_realm_RealmCollection_isManaged: - -.. _io_realm_RealmCollection_isManaged__: - - - -isManaged ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isManaged ` () - | - - - - - * - Checks if the collection is managed by Realm. A managed collection is just a wrapper around the data in the underlying Realm file. On Looper threads, a managed collection will be live-updated so it always points to the latest data. Managed collections are thread confined so that they cannot be accessed from other threads than the one that created them.If this method returns ``false`` , the collection is unmanaged. An unmanaged collection is just a normal java collection, so it will not be live updated. - - - - - - - - - - - **Returns** - - ``true`` if this is a managed :ref:`RealmCollection ` , ``false`` otherwise. - - - - - - - - - - - - - -.. _isValid: - -.. _isValid__: - -.. _RealmCollection_isValid: - -.. _RealmCollection_isValid__: - -.. _io_realm_RealmCollection_isValid: - -.. _io_realm_RealmCollection_isValid__: - - - -isValid -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isValid ` () - | - - - - - * - Checks if the collection is still valid to use, i.e., the :ref:`io.realm.Realm ` instance hasn't been closed. It will always return ``true`` for an unmanaged collection. - - - - - - - - - **Returns** - - ``true`` if it is still valid to use or an unmanaged collection, ``false`` otherwise. - - - - - - - - - - - - - -.. _load: - -.. _load__: - -.. _RealmCollection_load: - -.. _RealmCollection_load__: - -.. _io_realm_RealmCollection_load: - -.. _io_realm_RealmCollection_load__: - - - -load ----- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`load ` () - | - - - - - * - Blocks the collection until all data are available. - - - - - - - **Returns** - - ``true`` if the data could be successfully loaded, ``false`` otherwise. - - - - - - - - - - - - - -.. _max: - -.. _max__: - -.. _RealmCollection_max: - -.. _RealmCollection_max__: - -.. _io_realm_RealmCollection_max: - -.. _io_realm_RealmCollection_max__: - - - -max ----- - -.. _io_realm_RealmCollection_max_java_lang_String_: - -.. _io_realm_RealmCollection_max_String_: - -.. _max_java_lang_String_: - -.. _max_String_: - -.. _RealmCollection_max_java_lang_String_: - -.. _RealmCollection_max_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`max ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum value of a field. - - - - - **Parameters** - - - ``fieldName`` - the field to look for a maximum on. Only number fields are supported. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given field, ``null`` will be returned. Otherwise the maximum value is returned. When determining the maximum value, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a number type. - - - - - `java.lang.IllegalStateException `__ - if the Realm has been closed or called from an incorrect thread. - - - - - - - - - - - - -.. _maxDate: - -.. _maxDate__: - -.. _RealmCollection_maxDate: - -.. _RealmCollection_maxDate__: - -.. _io_realm_RealmCollection_maxDate: - -.. _io_realm_RealmCollection_maxDate__: - - - -maxDate -------- - -.. _io_realm_RealmCollection_maxDate_java_lang_String_: - -.. _io_realm_RealmCollection_maxDate_String_: - -.. _maxDate_java_lang_String_: - -.. _maxDate_String_: - -.. _RealmCollection_maxDate_java_lang_String_: - -.. _RealmCollection_maxDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`maxDate ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum date. - - - - - **Parameters** - - - ``fieldName`` - the field to look for the maximum date. If fieldName is not of Date type, an exception is thrown. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given date field, ``null`` will be returned. Otherwise the maximum date is returned. When determining the maximum date, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if fieldName is not a Date field. - - - - - `java.lang.IllegalStateException `__ - if the Realm has been closed or called from an incorrect thread. - - - - - - - - - - - - -.. _min: - -.. _min__: - -.. _RealmCollection_min: - -.. _RealmCollection_min__: - -.. _io_realm_RealmCollection_min: - -.. _io_realm_RealmCollection_min__: - - - -min ----- - -.. _io_realm_RealmCollection_min_java_lang_String_: - -.. _io_realm_RealmCollection_min_String_: - -.. _min_java_lang_String_: - -.. _min_String_: - -.. _RealmCollection_min_java_lang_String_: - -.. _RealmCollection_min_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`min ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum value of a field. - - - - - **Parameters** - - - ``fieldName`` - the field to look for a minimum on. Only number fields are supported. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given field, ``null`` will be returned. Otherwise the minimum value is returned. When determining the minimum value, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a number type. - - - - - `java.lang.IllegalStateException `__ - if the Realm has been closed or called from an incorrect thread. - - - - - - - - - - - - -.. _minDate: - -.. _minDate__: - -.. _RealmCollection_minDate: - -.. _RealmCollection_minDate__: - -.. _io_realm_RealmCollection_minDate: - -.. _io_realm_RealmCollection_minDate__: - - - -minDate -------- - -.. _io_realm_RealmCollection_minDate_java_lang_String_: - -.. _io_realm_RealmCollection_minDate_String_: - -.. _minDate_java_lang_String_: - -.. _minDate_String_: - -.. _RealmCollection_minDate_java_lang_String_: - -.. _RealmCollection_minDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`minDate ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum date. - - - - - **Parameters** - - - ``fieldName`` - the field to look for the minimum date. If fieldName is not of Date type, an exception is thrown. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given date field, ``null`` will be returned. Otherwise the minimum date is returned. When determining the minimum date, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if fieldName is not a Date field. - - - - - `java.lang.IllegalStateException `__ - if the Realm has been closed or called from an incorrect thread. - - - - - - - - - - - - -.. _sum: - -.. _sum__: - -.. _RealmCollection_sum: - -.. _RealmCollection_sum__: - -.. _io_realm_RealmCollection_sum: - -.. _io_realm_RealmCollection_sum__: - - - -sum ----- - -.. _io_realm_RealmCollection_sum_java_lang_String_: - -.. _io_realm_RealmCollection_sum_String_: - -.. _sum_java_lang_String_: - -.. _sum_String_: - -.. _RealmCollection_sum_java_lang_String_: - -.. _RealmCollection_sum_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`sum ` ( - | `String `__ fieldName - | ) - - - - - * - Calculates the sum of a given field. - - - - - **Parameters** - - - ``fieldName`` - the field to sum. Only number fields are supported. - - - - - - - - **Returns** - - the sum. If no objects exist or they all have ``null`` as the value for the given field, ``0`` will be returned. When computing the sum, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a number type. - - - - - `java.lang.IllegalStateException `__ - if the Realm has been closed or called from an incorrect thread. - - - - - - - - - - - - -.. _where: - -.. _where__: - -.. _RealmCollection_where: - -.. _RealmCollection_where__: - -.. _io_realm_RealmCollection_where: - -.. _io_realm_RealmCollection_where__: - - - -where ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`where ` () - | - - - - - * - Returns a :ref:`RealmQuery ` , which can be used to query for specific objects from this collection. - - - - - - - - - **Returns** - - a RealmQuery object. - - - - - **Throws** - - - `IllegalStateException `__ - if the Realm instance has been closed or queries are not otherwise available. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmQuery ` - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmConfiguration.txt b/source/sdk/temp/java/api/io/realm/RealmConfiguration.txt deleted file mode 100644 index c8d5ca2704..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmConfiguration.txt +++ /dev/null @@ -1,1960 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmConfiguration -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmConfiguration: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmConfiguration - - -A RealmConfiguration is used to setup a specific Realm instance.Instances of a RealmConfiguration can only created by using the :ref:`io.realm.RealmConfiguration.Builder ` and calling its :ref:`io.realm.RealmConfiguration.Builder.build() ` method. - - - -A commonly used RealmConfiguration can easily be accessed by first saving it as :ref:`Realm.setDefaultConfiguration(RealmConfiguration) ` and then using :ref:`io.realm.Realm.getDefaultInstance() ` . - - - -A minimal configuration can be created using: - -``RealmConfiguration config = new RealmConfiguration.Builder().build()`` - - - -This will create a RealmConfiguration with the following properties. - - - -- Realm file is called "default.realm" - - -- It is saved in Context.getFilesDir() - - -- It has its schema version set to 0. - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static`` - - :ref:`RealmConfiguration.Builder ` - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static final `String `__ - - - - :ref:`DEFAULT_REALM_NAME ` - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - protected static **RealmProxyMediator** - - | :ref:`createSchemaMediator ` ( - | `java.util.Set\ `__ modules, - | `java.util.Set\> `__ debugSchema, - | **boolean** excludeDebugSchema - | ) - - - - - - - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ obj - | ) - - - - - - - - * - protected static :ref:`RealmConfiguration ` - - | :ref:`forRecovery ` ( - | `String `__ canonicalPath, - | **byte[]** encryptionKey, - | **RealmProxyMediator** schemaMediator - | ) - - - - - - - - * - public `String `__ - - | :ref:`getAssetFilePath ` () - | - - - Returns the path to the Realm asset file. - - - - - * - public :ref:`CompactOnLaunchCallback ` - - | :ref:`getCompactOnLaunchCallback ` () - | - - - Returns a callback to determine if the Realm file should be compacted before being returned to the user. - - - - - * - public **OsRealmConfig.Durability** - - | :ref:`getDurability ` () - | - - - - - - - - * - public **byte** - - | :ref:`getEncryptionKey ` () - | - - - - - - - - * - public :ref:`FlowFactory ` - - | :ref:`getFlowFactory ` () - | - - - Returns the :ref:`FlowFactory ` that is used to create Kotlin Flows from Realm objects. - - - - - - - * - protected :ref:`Realm.Transaction ` - - | :ref:`getInitialDataTransaction ` () - | - - - Returns the transaction instance with initial data. - - - - - * - protected :ref:`Realm ` - - | :ref:`getInstance ` ( - | **OsSharedRealm.VersionID** version - | ) - - - - - - - - * - public **long** - - | :ref:`getMaxNumberOfActiveVersions ` () - | - - - - - - - - * - public :ref:`RealmMigration ` - - | :ref:`getMigration ` () - | - - - - - - - - * - public `String `__ - - | :ref:`getPath ` () - | - - - Returns the absolute path to where the Realm file will be saved. - - - - - * - public `File `__ - - | :ref:`getRealmDirectory ` () - | - - - - - - - - * - public `String `__ - - | :ref:`getRealmFileName ` () - | - - - - - - - - * - public `Set `__ - - | :ref:`getRealmObjectClasses ` () - | - - - Returns the unmodifiable `Set `__ of model classes that make up the schema for this Realm. - - - - - - - * - public :ref:`RxObservableFactory ` - - | :ref:`getRxFactory ` () - | - - - Returns the :ref:`RxObservableFactory ` that is used to create Rx Observables from Realm objects. - - - - - - - * - protected **RealmProxyMediator** - - | :ref:`getSchemaMediator ` () - | - - - Returns the mediator instance of schema which is defined by this configuration. - - - - - * - public **long** - - | :ref:`getSchemaVersion ` () - | - - - - - - - - * - public **boolean** - - | :ref:`hasAssetFile ` () - | - - - Indicates if an asset file has been configured for this configuration. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isAllowQueriesOnUiThread ` () - | - - - Returns whether a :ref:`RealmQuery ` is allowed to be launched from the UI thread. - - - - - - - * - public **boolean** - - | :ref:`isAllowWritesOnUiThread ` () - | - - - Returns whether calls to :ref:`Realm.executeTransaction ` can be done on the UI thread. - - - - - - - * - public **boolean** - - | :ref:`isReadOnly ` () - | - - - Returns whether this Realm is read-only or not. - - - - - * - public **boolean** - - | :ref:`isRecoveryConfiguration ` () - | - - - - - - - - * - protected **boolean** - - | :ref:`isSyncConfiguration ` () - | - - - - - - - - * - protected **boolean** - - | :ref:`realmExists ` () - | - - - Checks if the Realm file defined by this configuration already exists. - - - - - * - public **boolean** - - | :ref:`shouldDeleteRealmIfMigrationNeeded ` () - | - - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_RealmConfiguration_DEFAULT_REALM_NAME: - - - -``DEFAULT_REALM_NAME`` ------------------------ - - - - - - -Method Detail -============= - -.. _createSchemaMediator: - -.. _createSchemaMediator__: - -.. _RealmConfiguration_createSchemaMediator: - -.. _RealmConfiguration_createSchemaMediator__: - -.. _io_realm_RealmConfiguration_createSchemaMediator: - -.. _io_realm_RealmConfiguration_createSchemaMediator__: - - - -createSchemaMediator --------------------- - -.. _io_realm_RealmConfiguration_createSchemaMediator_java_util_Set_java_util_Set_boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_java_util_Set__java_util_Set__boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_java_util_Set_Set_boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_java_util_Set__Set__boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_java_util_Set_RealmModel___boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_java_util_Set__RealmModel____boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_Set_java_util_Set_boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_Set__java_util_Set__boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_Set_Set_boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_Set__Set__boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_Set_RealmModel___boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_Set__RealmModel____boolean_: - -.. _createSchemaMediator_java_util_Set_java_util_Set_boolean_: - -.. _createSchemaMediator_java_util_Set__java_util_Set__boolean_: - -.. _createSchemaMediator_java_util_Set_Set_boolean_: - -.. _createSchemaMediator_java_util_Set__Set__boolean_: - -.. _createSchemaMediator_java_util_Set_RealmModel___boolean_: - -.. _createSchemaMediator_java_util_Set__RealmModel____boolean_: - -.. _createSchemaMediator_Set_java_util_Set_boolean_: - -.. _createSchemaMediator_Set__java_util_Set__boolean_: - -.. _createSchemaMediator_Set_Set_boolean_: - -.. _createSchemaMediator_Set__Set__boolean_: - -.. _createSchemaMediator_Set_RealmModel___boolean_: - -.. _createSchemaMediator_Set__RealmModel____boolean_: - -.. _RealmConfiguration_createSchemaMediator_java_util_Set_java_util_Set_boolean_: - -.. _RealmConfiguration_createSchemaMediator_java_util_Set__java_util_Set__boolean_: - -.. _RealmConfiguration_createSchemaMediator_java_util_Set_Set_boolean_: - -.. _RealmConfiguration_createSchemaMediator_java_util_Set__Set__boolean_: - -.. _RealmConfiguration_createSchemaMediator_java_util_Set_RealmModel___boolean_: - -.. _RealmConfiguration_createSchemaMediator_java_util_Set__RealmModel____boolean_: - -.. _RealmConfiguration_createSchemaMediator_Set_java_util_Set_boolean_: - -.. _RealmConfiguration_createSchemaMediator_Set__java_util_Set__boolean_: - -.. _RealmConfiguration_createSchemaMediator_Set_Set_boolean_: - -.. _RealmConfiguration_createSchemaMediator_Set__Set__boolean_: - -.. _RealmConfiguration_createSchemaMediator_Set_RealmModel___boolean_: - -.. _RealmConfiguration_createSchemaMediator_Set__RealmModel____boolean_: - -.. _io_realm_RealmConfiguration_createSchemaMediator_Set_Object___Set_Class___extends_RealmModel____boolean_: - -.. list-table:: - :header-rows: 1 - - * - | protected static **RealmProxyMediator** :ref:`createSchemaMediator ` ( - | `java.util.Set\ `__ modules, - | `java.util.Set\> `__ debugSchema, - | **boolean** excludeDebugSchema - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _RealmConfiguration_equals: - -.. _RealmConfiguration_equals__: - -.. _io_realm_RealmConfiguration_equals: - -.. _io_realm_RealmConfiguration_equals__: - - - -equals ------- - -.. _io_realm_RealmConfiguration_equals_java_lang_Object_: - -.. _io_realm_RealmConfiguration_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _RealmConfiguration_equals_java_lang_Object_: - -.. _RealmConfiguration_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ obj - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _forRecovery: - -.. _forRecovery__: - -.. _RealmConfiguration_forRecovery: - -.. _RealmConfiguration_forRecovery__: - -.. _io_realm_RealmConfiguration_forRecovery: - -.. _io_realm_RealmConfiguration_forRecovery__: - - - -forRecovery ------------ - -.. _io_realm_RealmConfiguration_forRecovery_java_lang_String_byte_RealmProxyMediator_: - -.. _io_realm_RealmConfiguration_forRecovery_java_lang_String__byte__RealmProxyMediator_: - -.. _io_realm_RealmConfiguration_forRecovery_java_lang_String_byte____RealmProxyMediator_: - -.. _io_realm_RealmConfiguration_forRecovery_java_lang_String__byte_____RealmProxyMediator_: - -.. _io_realm_RealmConfiguration_forRecovery_String_byte_RealmProxyMediator_: - -.. _io_realm_RealmConfiguration_forRecovery_String__byte__RealmProxyMediator_: - -.. _io_realm_RealmConfiguration_forRecovery_String_byte____RealmProxyMediator_: - -.. _io_realm_RealmConfiguration_forRecovery_String__byte_____RealmProxyMediator_: - -.. _forRecovery_java_lang_String_byte_RealmProxyMediator_: - -.. _forRecovery_java_lang_String__byte__RealmProxyMediator_: - -.. _forRecovery_java_lang_String_byte____RealmProxyMediator_: - -.. _forRecovery_java_lang_String__byte_____RealmProxyMediator_: - -.. _forRecovery_String_byte_RealmProxyMediator_: - -.. _forRecovery_String__byte__RealmProxyMediator_: - -.. _forRecovery_String_byte____RealmProxyMediator_: - -.. _forRecovery_String__byte_____RealmProxyMediator_: - -.. _RealmConfiguration_forRecovery_java_lang_String_byte_RealmProxyMediator_: - -.. _RealmConfiguration_forRecovery_java_lang_String__byte__RealmProxyMediator_: - -.. _RealmConfiguration_forRecovery_java_lang_String_byte____RealmProxyMediator_: - -.. _RealmConfiguration_forRecovery_java_lang_String__byte_____RealmProxyMediator_: - -.. _RealmConfiguration_forRecovery_String_byte_RealmProxyMediator_: - -.. _RealmConfiguration_forRecovery_String__byte__RealmProxyMediator_: - -.. _RealmConfiguration_forRecovery_String_byte____RealmProxyMediator_: - -.. _RealmConfiguration_forRecovery_String__byte_____RealmProxyMediator_: - -.. _io_realm_RealmConfiguration_forRecovery_String__byte[]__RealmProxyMediator_: - -.. list-table:: - :header-rows: 1 - - * - | protected static :ref:`RealmConfiguration ` :ref:`forRecovery ` ( - | `String `__ canonicalPath, - | **byte[]** encryptionKey, - | **RealmProxyMediator** schemaMediator - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getAssetFilePath: - -.. _getAssetFilePath__: - -.. _RealmConfiguration_getAssetFilePath: - -.. _RealmConfiguration_getAssetFilePath__: - -.. _io_realm_RealmConfiguration_getAssetFilePath: - -.. _io_realm_RealmConfiguration_getAssetFilePath__: - - - -getAssetFilePath ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getAssetFilePath ` () - | - - - - - * - Returns the path to the Realm asset file. - - - - - - - **Returns** - - path to the asset file relative to the asset directory or ``null`` if not asset file was specified. - - - - - - - - - - - - - -.. _getCompactOnLaunchCallback: - -.. _getCompactOnLaunchCallback__: - -.. _RealmConfiguration_getCompactOnLaunchCallback: - -.. _RealmConfiguration_getCompactOnLaunchCallback__: - -.. _io_realm_RealmConfiguration_getCompactOnLaunchCallback: - -.. _io_realm_RealmConfiguration_getCompactOnLaunchCallback__: - - - -getCompactOnLaunchCallback --------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`CompactOnLaunchCallback ` :ref:`getCompactOnLaunchCallback ` () - | - - - - - * - Returns a callback to determine if the Realm file should be compacted before being returned to the user. - - - - - - - **Returns** - - a callback called when opening a Realm for the first time during the life of a process to determine if it should be compacted before being returned to the user. It is passed the total file size (data + free space) and the total bytes used by data in the file. - - - - - - - - - - - -.. _getDurability: - -.. _getDurability__: - -.. _RealmConfiguration_getDurability: - -.. _RealmConfiguration_getDurability__: - -.. _io_realm_RealmConfiguration_getDurability: - -.. _io_realm_RealmConfiguration_getDurability__: - - - -getDurability -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **OsRealmConfig.Durability** :ref:`getDurability ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getEncryptionKey: - -.. _getEncryptionKey__: - -.. _RealmConfiguration_getEncryptionKey: - -.. _RealmConfiguration_getEncryptionKey__: - -.. _io_realm_RealmConfiguration_getEncryptionKey: - -.. _io_realm_RealmConfiguration_getEncryptionKey__: - - - -getEncryptionKey ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **byte** :ref:`getEncryptionKey ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getFlowFactory: - -.. _getFlowFactory__: - -.. _RealmConfiguration_getFlowFactory: - -.. _RealmConfiguration_getFlowFactory__: - -.. _io_realm_RealmConfiguration_getFlowFactory: - -.. _io_realm_RealmConfiguration_getFlowFactory__: - - - -getFlowFactory --------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FlowFactory ` :ref:`getFlowFactory ` () - | - - - - - * - Returns the :ref:`FlowFactory ` that is used to create Kotlin Flows from Realm objects. - - - - - - - - - **Returns** - - the factory instance used to create Flows. - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required coroutines framework is not on the classpath. - - - - - - - - - - - - -.. _getInitialDataTransaction: - -.. _getInitialDataTransaction__: - -.. _RealmConfiguration_getInitialDataTransaction: - -.. _RealmConfiguration_getInitialDataTransaction__: - -.. _io_realm_RealmConfiguration_getInitialDataTransaction: - -.. _io_realm_RealmConfiguration_getInitialDataTransaction__: - - - -getInitialDataTransaction -------------------------- - -.. list-table:: - :header-rows: 1 - - * - | protected :ref:`Realm.Transaction ` :ref:`getInitialDataTransaction ` () - | - - - - - * - Returns the transaction instance with initial data. - - - - - - - **Returns** - - the initial data transaction. - - - - - - - - - - - -.. _getInstance: - -.. _getInstance__: - -.. _RealmConfiguration_getInstance: - -.. _RealmConfiguration_getInstance__: - -.. _io_realm_RealmConfiguration_getInstance: - -.. _io_realm_RealmConfiguration_getInstance__: - - - -getInstance ------------ - -.. _io_realm_RealmConfiguration_getInstance_OsSharedRealm_VersionID_: - -.. _getInstance_OsSharedRealm_VersionID_: - -.. _RealmConfiguration_getInstance_OsSharedRealm_VersionID_: - -.. list-table:: - :header-rows: 1 - - * - | protected :ref:`Realm ` :ref:`getInstance ` ( - | **OsSharedRealm.VersionID** version - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _getMaxNumberOfActiveVersions: - -.. _getMaxNumberOfActiveVersions__: - -.. _RealmConfiguration_getMaxNumberOfActiveVersions: - -.. _RealmConfiguration_getMaxNumberOfActiveVersions__: - -.. _io_realm_RealmConfiguration_getMaxNumberOfActiveVersions: - -.. _io_realm_RealmConfiguration_getMaxNumberOfActiveVersions__: - - - -getMaxNumberOfActiveVersions ----------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getMaxNumberOfActiveVersions ` () - | - - - - - * - - - - - - - - **Returns** - - the maximum number of active versions allowed before an exception is thrown. - - - - - - - - - - - -.. _getMigration: - -.. _getMigration__: - -.. _RealmConfiguration_getMigration: - -.. _RealmConfiguration_getMigration__: - -.. _io_realm_RealmConfiguration_getMigration: - -.. _io_realm_RealmConfiguration_getMigration__: - - - -getMigration ------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmMigration ` :ref:`getMigration ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getPath: - -.. _getPath__: - -.. _RealmConfiguration_getPath: - -.. _RealmConfiguration_getPath__: - -.. _io_realm_RealmConfiguration_getPath: - -.. _io_realm_RealmConfiguration_getPath__: - - - -getPath -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getPath ` () - | - - - - - * - Returns the absolute path to where the Realm file will be saved. - - - - - - - **Returns** - - the absolute path to the Realm file defined by this configuration. - - - - - - - - - - - -.. _getRealmDirectory: - -.. _getRealmDirectory__: - -.. _RealmConfiguration_getRealmDirectory: - -.. _RealmConfiguration_getRealmDirectory__: - -.. _io_realm_RealmConfiguration_getRealmDirectory: - -.. _io_realm_RealmConfiguration_getRealmDirectory__: - - - -getRealmDirectory ------------------ - -.. list-table:: - :header-rows: 1 - - * - | public `File `__ :ref:`getRealmDirectory ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getRealmFileName: - -.. _getRealmFileName__: - -.. _RealmConfiguration_getRealmFileName: - -.. _RealmConfiguration_getRealmFileName__: - -.. _io_realm_RealmConfiguration_getRealmFileName: - -.. _io_realm_RealmConfiguration_getRealmFileName__: - - - -getRealmFileName ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getRealmFileName ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getRealmObjectClasses: - -.. _getRealmObjectClasses__: - -.. _RealmConfiguration_getRealmObjectClasses: - -.. _RealmConfiguration_getRealmObjectClasses__: - -.. _io_realm_RealmConfiguration_getRealmObjectClasses: - -.. _io_realm_RealmConfiguration_getRealmObjectClasses__: - - - -getRealmObjectClasses ---------------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Set `__ :ref:`getRealmObjectClasses ` () - | - - - - - * - Returns the unmodifiable `Set `__ of model classes that make up the schema for this Realm. - - - - - - - - - **Returns** - - unmodifiable `Set `__ of model classes. - - - - - - - - - - - - - -.. _getRxFactory: - -.. _getRxFactory__: - -.. _RealmConfiguration_getRxFactory: - -.. _RealmConfiguration_getRxFactory__: - -.. _io_realm_RealmConfiguration_getRxFactory: - -.. _io_realm_RealmConfiguration_getRxFactory__: - - - -getRxFactory ------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RxObservableFactory ` :ref:`getRxFactory ` () - | - - - - - * - Returns the :ref:`RxObservableFactory ` that is used to create Rx Observables from Realm objects. - - - - - - - - - **Returns** - - the factory instance used to create Rx Observables. - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath. - - - - - - - - - - - - -.. _getSchemaMediator: - -.. _getSchemaMediator__: - -.. _RealmConfiguration_getSchemaMediator: - -.. _RealmConfiguration_getSchemaMediator__: - -.. _io_realm_RealmConfiguration_getSchemaMediator: - -.. _io_realm_RealmConfiguration_getSchemaMediator__: - - - -getSchemaMediator ------------------ - -.. list-table:: - :header-rows: 1 - - * - | protected **RealmProxyMediator** :ref:`getSchemaMediator ` () - | - - - - - * - Returns the mediator instance of schema which is defined by this configuration. - - - - - - - **Returns** - - the mediator of the schema. - - - - - - - - - - - -.. _getSchemaVersion: - -.. _getSchemaVersion__: - -.. _RealmConfiguration_getSchemaVersion: - -.. _RealmConfiguration_getSchemaVersion__: - -.. _io_realm_RealmConfiguration_getSchemaVersion: - -.. _io_realm_RealmConfiguration_getSchemaVersion__: - - - -getSchemaVersion ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getSchemaVersion ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _hasAssetFile: - -.. _hasAssetFile__: - -.. _RealmConfiguration_hasAssetFile: - -.. _RealmConfiguration_hasAssetFile__: - -.. _io_realm_RealmConfiguration_hasAssetFile: - -.. _io_realm_RealmConfiguration_hasAssetFile__: - - - -hasAssetFile ------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`hasAssetFile ` () - | - - - - - * - Indicates if an asset file has been configured for this configuration. - - - - - - - **Returns** - - ``true`` if there is asset file, ``false`` otherwise. - - - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _RealmConfiguration_hashCode: - -.. _RealmConfiguration_hashCode__: - -.. _io_realm_RealmConfiguration_hashCode: - -.. _io_realm_RealmConfiguration_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _isAllowQueriesOnUiThread: - -.. _isAllowQueriesOnUiThread__: - -.. _RealmConfiguration_isAllowQueriesOnUiThread: - -.. _RealmConfiguration_isAllowQueriesOnUiThread__: - -.. _io_realm_RealmConfiguration_isAllowQueriesOnUiThread: - -.. _io_realm_RealmConfiguration_isAllowQueriesOnUiThread__: - - - -isAllowQueriesOnUiThread ------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isAllowQueriesOnUiThread ` () - | - - - - - * - Returns whether a :ref:`RealmQuery ` is allowed to be launched from the UI thread. - - By default Realm allows queries on the main thread. To disallow this users have to explicitly opt in with :ref:`Builder.allowQueriesOnUiThread(boolean) ` or its Realm Sync builder counterpart. - - - - - - - - - - - **Returns** - - whether or not queries are allowed to be run from the UI thread. - - - - - - - - - - - -.. _isAllowWritesOnUiThread: - -.. _isAllowWritesOnUiThread__: - -.. _RealmConfiguration_isAllowWritesOnUiThread: - -.. _RealmConfiguration_isAllowWritesOnUiThread__: - -.. _io_realm_RealmConfiguration_isAllowWritesOnUiThread: - -.. _io_realm_RealmConfiguration_isAllowWritesOnUiThread__: - - - -isAllowWritesOnUiThread ------------------------ - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isAllowWritesOnUiThread ` () - | - - - - - * - Returns whether calls to :ref:`Realm.executeTransaction ` can be done on the UI thread. - - **Note: Realm does not allow blocking transactions to be run on the main thread unless users explicitly opt in with :ref:`Builder.allowWritesOnUiThread(boolean) ` or its Realm Sync builder counterpart. - - ** - - - - - - - - - **Returns** - - whether or not write operations are allowed to be run from the UI thread. - - - - - - - - - - - -.. _isReadOnly: - -.. _isReadOnly__: - -.. _RealmConfiguration_isReadOnly: - -.. _RealmConfiguration_isReadOnly__: - -.. _io_realm_RealmConfiguration_isReadOnly: - -.. _io_realm_RealmConfiguration_isReadOnly__: - - - -isReadOnly ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isReadOnly ` () - | - - - - - * - Returns whether this Realm is read-only or not. Read-only Realms cannot be modified and will throw an `IllegalStateException `__ if **Realm.beginTransaction()** is called on it. - - - - - - - - - **Returns** - - ``true`` if this Realm is read only, ``false`` if not. - - - - - - - - - - - - - -.. _isRecoveryConfiguration: - -.. _isRecoveryConfiguration__: - -.. _RealmConfiguration_isRecoveryConfiguration: - -.. _RealmConfiguration_isRecoveryConfiguration__: - -.. _io_realm_RealmConfiguration_isRecoveryConfiguration: - -.. _io_realm_RealmConfiguration_isRecoveryConfiguration__: - - - -isRecoveryConfiguration ------------------------ - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isRecoveryConfiguration ` () - | - - - - - * - - - - - - - - **Returns** - - ``true`` if this configuration is intended to open a backup Realm (as a result of a client reset). - - - - - - - - - - - .. seealso:: - - - - - **{\@link ClientResetRequiredError}** - - - - - - - - - - - - -.. _isSyncConfiguration: - -.. _isSyncConfiguration__: - -.. _RealmConfiguration_isSyncConfiguration: - -.. _RealmConfiguration_isSyncConfiguration__: - -.. _io_realm_RealmConfiguration_isSyncConfiguration: - -.. _io_realm_RealmConfiguration_isSyncConfiguration__: - - - -isSyncConfiguration -------------------- - -.. list-table:: - :header-rows: 1 - - * - | protected **boolean** :ref:`isSyncConfiguration ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _realmExists: - -.. _realmExists__: - -.. _RealmConfiguration_realmExists: - -.. _RealmConfiguration_realmExists__: - -.. _io_realm_RealmConfiguration_realmExists: - -.. _io_realm_RealmConfiguration_realmExists__: - - - -realmExists ------------ - -.. list-table:: - :header-rows: 1 - - * - | protected **boolean** :ref:`realmExists ` () - | - - - - - * - Checks if the Realm file defined by this configuration already exists.WARNING: This method is just a point-in-time check. Unless protected by external synchronization another thread or process might have created or deleted the Realm file right after this method has returned. - - - - - - - - - **Returns** - - ``true`` if the Realm file exists, ``false`` otherwise. - - - - - - - - - - - - - -.. _shouldDeleteRealmIfMigrationNeeded: - -.. _shouldDeleteRealmIfMigrationNeeded__: - -.. _RealmConfiguration_shouldDeleteRealmIfMigrationNeeded: - -.. _RealmConfiguration_shouldDeleteRealmIfMigrationNeeded__: - -.. _io_realm_RealmConfiguration_shouldDeleteRealmIfMigrationNeeded: - -.. _io_realm_RealmConfiguration_shouldDeleteRealmIfMigrationNeeded__: - - - -shouldDeleteRealmIfMigrationNeeded ----------------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`shouldDeleteRealmIfMigrationNeeded ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _RealmConfiguration_toString: - -.. _RealmConfiguration_toString__: - -.. _io_realm_RealmConfiguration_toString: - -.. _io_realm_RealmConfiguration_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmConfiguration/Builder.txt b/source/sdk/temp/java/api/io/realm/RealmConfiguration/Builder.txt deleted file mode 100644 index e7e73393f4..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmConfiguration/Builder.txt +++ /dev/null @@ -1,1718 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmConfiguration.Builder -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmConfiguration_Builder: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmConfiguration.Builder - - - - -**Enclosing class:** - -:ref:`RealmConfiguration ` - - - -RealmConfiguration.Builder used to construct instances of a RealmConfiguration in a fluent manner. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Builder ` () - | - - - Creates an instance of the Builder for the RealmConfiguration. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public final :ref:`RealmConfiguration.Builder ` - - | :ref:`addModule ` ( - | `Object `__ module - | ) - - - FIXME: Temporary visible DEBUG method. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`allowQueriesOnUiThread ` ( - | **boolean** allowQueriesOnUiThread - | ) - - - Sets whether or not a :ref:`RealmQuery ` can be launched from the UI thread. - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`allowWritesOnUiThread ` ( - | **boolean** allowWritesOnUiThread - | ) - - - Sets whether or not calls to :ref:`Realm.executeTransaction ` are allowed from the UI thread. - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`assetFile ` ( - | `String `__ assetFile - | ) - - - Copies the Realm file from the given asset file path. - - - - - * - public :ref:`RealmConfiguration ` - - | :ref:`build ` () - | - - - Creates the RealmConfiguration based on the builder parameters. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`compactOnLaunch ` ( - | :ref:`CompactOnLaunchCallback ` compactOnLaunch - | ) - - - Sets this to determine if the Realm file should be compacted before returned to the user. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`compactOnLaunch ` () - | - - - Setting this will cause Realm to compact the Realm file if the Realm file has grown too large and a significant amount of space can be recovered. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`deleteRealmIfMigrationNeeded ` () - | - - - Setting this will change the behavior of how migration exceptions are handled. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`directory ` ( - | `File `__ directory - | ) - - - Specifies the directory where the Realm file will be saved. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`encryptionKey ` ( - | **byte[]** key - | ) - - - Sets the 64 byte key used to encrypt and decrypt the Realm file. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`flowFactory ` ( - | :ref:`FlowFactory ` factory - | ) - - - Sets the :ref:`FlowFactory ` used to create coroutines Flows from Realm objects. - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`inMemory ` () - | - - - Setting this will create an in-memory Realm instead of saving it to disk. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`initialData ` ( - | :ref:`Realm.Transaction ` transaction - | ) - - - Sets the initial data in :ref:`io.realm.Realm ` . - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`maxNumberOfActiveVersions ` ( - | **long** number - | ) - - - Sets the maximum number of live versions in the Realm file before an `IllegalStateException `__ is thrown when attempting to write more data. - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`migration ` ( - | :ref:`RealmMigration ` migration - | ) - - - Sets the :ref:`io.realm.RealmMigration ` to be run if a migration is needed. - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`modules ` ( - | `Object `__ baseModule, - | `java.lang.Object[] `__ additionalModules - | ) - - - Replaces the existing module(s) with one or more :ref:`RealmModule ` s. - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`name ` ( - | `String `__ filename - | ) - - - Sets the filename for the Realm file. - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`readOnly ` () - | - - - Setting this will cause the Realm to become read only and all write transactions made against this Realm will fail with an `IllegalStateException `__ . - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`rxFactory ` ( - | :ref:`RxObservableFactory ` factory - | ) - - - Sets the :ref:`RxObservableFactory ` used to create Rx Observables from Realm objects. - - - - - - - * - public :ref:`RealmConfiguration.Builder ` - - | :ref:`schemaVersion ` ( - | **long** schemaVersion - | ) - - - Sets the schema version of the Realm. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _Builder: - -.. _Builder__: - -.. _io_realm_RealmConfiguration_Builder: - -.. _io_realm_RealmConfiguration_Builder__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Builder ` () - | - - - - - * - Creates an instance of the Builder for the RealmConfiguration.This will use the app's own internal directory for storing the Realm file. This does not require any additional permissions. The default location is ``/data/data//files`` , but can change depending on vendor implementations of Android. - - - - - - - - - - - - - - - - - -Method Detail -============= - -.. _addModule: - -.. _addModule__: - -.. _Builder_addModule: - -.. _Builder_addModule__: - -.. _RealmConfiguration_Builder_addModule: - -.. _RealmConfiguration_Builder_addModule__: - -.. _io_realm_RealmConfiguration_Builder_addModule: - -.. _io_realm_RealmConfiguration_Builder_addModule__: - - - -addModule ---------- - -.. _io_realm_RealmConfiguration_Builder_addModule_java_lang_Object_: - -.. _io_realm_RealmConfiguration_Builder_addModule_Object_: - -.. _addModule_java_lang_Object_: - -.. _addModule_Object_: - -.. _RealmConfiguration_Builder_addModule_java_lang_Object_: - -.. _RealmConfiguration_Builder_addModule_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public final :ref:`RealmConfiguration.Builder ` :ref:`addModule ` ( - | `Object `__ module - | ) - - - - - * - FIXME: Temporary visible DEBUG method. Will add a module unconditionally. Adds a module to already defined modules. - - - - - - - - - - - - - - - -.. _allowQueriesOnUiThread: - -.. _allowQueriesOnUiThread__: - -.. _Builder_allowQueriesOnUiThread: - -.. _Builder_allowQueriesOnUiThread__: - -.. _RealmConfiguration_Builder_allowQueriesOnUiThread: - -.. _RealmConfiguration_Builder_allowQueriesOnUiThread__: - -.. _io_realm_RealmConfiguration_Builder_allowQueriesOnUiThread: - -.. _io_realm_RealmConfiguration_Builder_allowQueriesOnUiThread__: - - - -allowQueriesOnUiThread ----------------------- - -.. _io_realm_RealmConfiguration_Builder_allowQueriesOnUiThread_boolean_: - -.. _allowQueriesOnUiThread_boolean_: - -.. _RealmConfiguration_Builder_allowQueriesOnUiThread_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`allowQueriesOnUiThread ` ( - | **boolean** allowQueriesOnUiThread - | ) - - - - - * - Sets whether or not a :ref:`RealmQuery ` can be launched from the UI thread. - - By default Realm allows queries on the main thread. However, by doing so your application may experience a drop of frames or even ANRs. We recommend diverting queries to non-UI threads or, alternatively, using :ref:`RealmQuery.findAllAsync() ` or :ref:`RealmQuery.findFirstAsync() ` . - - - - - - - - - - - - - - - - - - - -.. _allowWritesOnUiThread: - -.. _allowWritesOnUiThread__: - -.. _Builder_allowWritesOnUiThread: - -.. _Builder_allowWritesOnUiThread__: - -.. _RealmConfiguration_Builder_allowWritesOnUiThread: - -.. _RealmConfiguration_Builder_allowWritesOnUiThread__: - -.. _io_realm_RealmConfiguration_Builder_allowWritesOnUiThread: - -.. _io_realm_RealmConfiguration_Builder_allowWritesOnUiThread__: - - - -allowWritesOnUiThread ---------------------- - -.. _io_realm_RealmConfiguration_Builder_allowWritesOnUiThread_boolean_: - -.. _allowWritesOnUiThread_boolean_: - -.. _RealmConfiguration_Builder_allowWritesOnUiThread_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`allowWritesOnUiThread ` ( - | **boolean** allowWritesOnUiThread - | ) - - - - - * - Sets whether or not calls to :ref:`Realm.executeTransaction ` are allowed from the UI thread. - - **WARNING: Realm does not allow synchronous transactions to be run on the main thread unless users explicitly opt in with this method.** We recommend diverting calls to ``executeTransaction`` to non-UI threads or, alternatively, using :ref:`Realm.executeTransactionAsync ` . - - - - - - - - - - - - - - - - - - - -.. _assetFile: - -.. _assetFile__: - -.. _Builder_assetFile: - -.. _Builder_assetFile__: - -.. _RealmConfiguration_Builder_assetFile: - -.. _RealmConfiguration_Builder_assetFile__: - -.. _io_realm_RealmConfiguration_Builder_assetFile: - -.. _io_realm_RealmConfiguration_Builder_assetFile__: - - - -assetFile ---------- - -.. _io_realm_RealmConfiguration_Builder_assetFile_java_lang_String_: - -.. _io_realm_RealmConfiguration_Builder_assetFile_String_: - -.. _assetFile_java_lang_String_: - -.. _assetFile_String_: - -.. _RealmConfiguration_Builder_assetFile_java_lang_String_: - -.. _RealmConfiguration_Builder_assetFile_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`assetFile ` ( - | `String `__ assetFile - | ) - - - - - * - Copies the Realm file from the given asset file path.When opening the Realm for the first time, instead of creating an empty file, the Realm file will be copied from the provided asset file and used instead. - - This cannot be combined with :ref:`deleteRealmIfMigrationNeeded() ` as doing so would just result in the copied file being deleted. - - - - WARNING: This could potentially be a lengthy operation and should ideally be done on a background thread. - - - - - - - **Parameters** - - - ``assetFile`` - path to the asset database file. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if this is configured to clear its schema by calling :ref:`deleteRealmIfMigrationNeeded() ` . - - - - - - - - - - - - - - -.. _build: - -.. _build__: - -.. _Builder_build: - -.. _Builder_build__: - -.. _RealmConfiguration_Builder_build: - -.. _RealmConfiguration_Builder_build__: - -.. _io_realm_RealmConfiguration_Builder_build: - -.. _io_realm_RealmConfiguration_Builder_build__: - - - -build ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration ` :ref:`build ` () - | - - - - - * - Creates the RealmConfiguration based on the builder parameters. - - - - - - - **Returns** - - the created :ref:`RealmConfiguration ` . - - - - - - - - - - - - - -.. _compactOnLaunch: - -.. _compactOnLaunch__: - -.. _Builder_compactOnLaunch: - -.. _Builder_compactOnLaunch__: - -.. _RealmConfiguration_Builder_compactOnLaunch: - -.. _RealmConfiguration_Builder_compactOnLaunch__: - -.. _io_realm_RealmConfiguration_Builder_compactOnLaunch: - -.. _io_realm_RealmConfiguration_Builder_compactOnLaunch__: - - - -compactOnLaunch ---------------- - -.. _io_realm_RealmConfiguration_Builder_compactOnLaunch_io_realm_CompactOnLaunchCallback_: - -.. _io_realm_RealmConfiguration_Builder_compactOnLaunch_CompactOnLaunchCallback_: - -.. _compactOnLaunch_io_realm_CompactOnLaunchCallback_: - -.. _compactOnLaunch_CompactOnLaunchCallback_: - -.. _RealmConfiguration_Builder_compactOnLaunch_io_realm_CompactOnLaunchCallback_: - -.. _RealmConfiguration_Builder_compactOnLaunch_CompactOnLaunchCallback_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`compactOnLaunch ` ( - | :ref:`CompactOnLaunchCallback ` compactOnLaunch - | ) - - - - - * - Sets this to determine if the Realm file should be compacted before returned to the user. It is passed the total file size (data + free space) and the bytes used by data in the file. - - - - - **Parameters** - - - ``compactOnLaunch`` - a callback called when opening a Realm for the first time during the life of a process to determine if it should be compacted before being returned to the user. It is passed the total file size (data + free space) and the bytes used by data in the file. - - - - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`compactOnLaunch ` () - | - - - - - * - Setting this will cause Realm to compact the Realm file if the Realm file has grown too large and a significant amount of space can be recovered. See :ref:`DefaultCompactOnLaunchCallback ` for details. - - - - - - - - - - - - - - - - - -.. _deleteRealmIfMigrationNeeded: - -.. _deleteRealmIfMigrationNeeded__: - -.. _Builder_deleteRealmIfMigrationNeeded: - -.. _Builder_deleteRealmIfMigrationNeeded__: - -.. _RealmConfiguration_Builder_deleteRealmIfMigrationNeeded: - -.. _RealmConfiguration_Builder_deleteRealmIfMigrationNeeded__: - -.. _io_realm_RealmConfiguration_Builder_deleteRealmIfMigrationNeeded: - -.. _io_realm_RealmConfiguration_Builder_deleteRealmIfMigrationNeeded__: - - - -deleteRealmIfMigrationNeeded ----------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`deleteRealmIfMigrationNeeded ` () - | - - - - - * - Setting this will change the behavior of how migration exceptions are handled. Instead of throwing a :ref:`io.realm.exceptions.RealmMigrationNeededException ` the on-disc Realm will be cleared and recreated with the new Realm schema. - - This cannot be configured to have an asset file at the same time by calling :ref:`assetFile(String) ` as the provided asset file will be deleted in migrations. - - - - **WARNING!** This will result in loss of data. - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if configured to use an asset file by calling :ref:`assetFile(String) ` previously. - - - - - - - - - - - - - - -.. _directory: - -.. _directory__: - -.. _Builder_directory: - -.. _Builder_directory__: - -.. _RealmConfiguration_Builder_directory: - -.. _RealmConfiguration_Builder_directory__: - -.. _io_realm_RealmConfiguration_Builder_directory: - -.. _io_realm_RealmConfiguration_Builder_directory__: - - - -directory ---------- - -.. _io_realm_RealmConfiguration_Builder_directory_java_io_File_: - -.. _io_realm_RealmConfiguration_Builder_directory_File_: - -.. _directory_java_io_File_: - -.. _directory_File_: - -.. _RealmConfiguration_Builder_directory_java_io_File_: - -.. _RealmConfiguration_Builder_directory_File_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`directory ` ( - | `File `__ directory - | ) - - - - - * - Specifies the directory where the Realm file will be saved. The default value is ``context.getFilesDir()`` . If the directory does not exist, it will be created. - - - - - - - **Parameters** - - - ``directory`` - the directory to save the Realm file in. Directory must be writable. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if ``directory`` is null, not writable or a file. - - - - - - - - - - - - - - -.. _encryptionKey: - -.. _encryptionKey__: - -.. _Builder_encryptionKey: - -.. _Builder_encryptionKey__: - -.. _RealmConfiguration_Builder_encryptionKey: - -.. _RealmConfiguration_Builder_encryptionKey__: - -.. _io_realm_RealmConfiguration_Builder_encryptionKey: - -.. _io_realm_RealmConfiguration_Builder_encryptionKey__: - - - -encryptionKey -------------- - -.. _io_realm_RealmConfiguration_Builder_encryptionKey_byte_: - -.. _io_realm_RealmConfiguration_Builder_encryptionKey_byte____: - -.. _encryptionKey_byte_: - -.. _encryptionKey_byte____: - -.. _RealmConfiguration_Builder_encryptionKey_byte_: - -.. _RealmConfiguration_Builder_encryptionKey_byte____: - -.. _io_realm_RealmConfiguration_Builder_encryptionKey_byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`encryptionKey ` ( - | **byte[]** key - | ) - - - - - * - Sets the 64 byte key used to encrypt and decrypt the Realm file. Sets the io.realm.Realm#ENCRYPTION_KEY_LENGTH bytes key used to encrypt and decrypt the Realm file. - - - - - - - - - - - - - - - - - -.. _flowFactory: - -.. _flowFactory__: - -.. _Builder_flowFactory: - -.. _Builder_flowFactory__: - -.. _RealmConfiguration_Builder_flowFactory: - -.. _RealmConfiguration_Builder_flowFactory__: - -.. _io_realm_RealmConfiguration_Builder_flowFactory: - -.. _io_realm_RealmConfiguration_Builder_flowFactory__: - - - -flowFactory ------------ - -.. _io_realm_RealmConfiguration_Builder_flowFactory_io_realm_coroutines_FlowFactory_: - -.. _io_realm_RealmConfiguration_Builder_flowFactory_FlowFactory_: - -.. _flowFactory_io_realm_coroutines_FlowFactory_: - -.. _flowFactory_FlowFactory_: - -.. _RealmConfiguration_Builder_flowFactory_io_realm_coroutines_FlowFactory_: - -.. _RealmConfiguration_Builder_flowFactory_FlowFactory_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`flowFactory ` ( - | :ref:`FlowFactory ` factory - | ) - - - - - * - Sets the :ref:`FlowFactory ` used to create coroutines Flows from Realm objects. The default factory is :ref:`RealmFlowFactory ` . - - - - - - - **Parameters** - - - ``factory`` - factory to use. - - - - - - - - - - - - - - - - -.. _inMemory: - -.. _inMemory__: - -.. _Builder_inMemory: - -.. _Builder_inMemory__: - -.. _RealmConfiguration_Builder_inMemory: - -.. _RealmConfiguration_Builder_inMemory__: - -.. _io_realm_RealmConfiguration_Builder_inMemory: - -.. _io_realm_RealmConfiguration_Builder_inMemory__: - - - -inMemory --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`inMemory ` () - | - - - - - * - Setting this will create an in-memory Realm instead of saving it to disk. In-memory Realms might still use disk space if memory is running low, but all files created by an in-memory Realm will be deleted when the Realm is closed.Note that because in-memory Realms are not persisted, you must be sure to hold on to at least one non-closed reference to the in-memory Realm object with the specific name as long as you want the data to last. - - - - - - - - - - - - - - - - - -.. _initialData: - -.. _initialData__: - -.. _Builder_initialData: - -.. _Builder_initialData__: - -.. _RealmConfiguration_Builder_initialData: - -.. _RealmConfiguration_Builder_initialData__: - -.. _io_realm_RealmConfiguration_Builder_initialData: - -.. _io_realm_RealmConfiguration_Builder_initialData__: - - - -initialData ------------ - -.. _io_realm_RealmConfiguration_Builder_initialData_io_realm_Realm_Transaction_: - -.. _io_realm_RealmConfiguration_Builder_initialData_Transaction_: - -.. _io_realm_RealmConfiguration_Builder_initialData_Realm_Transaction_: - -.. _initialData_io_realm_Realm_Transaction_: - -.. _initialData_Transaction_: - -.. _initialData_Realm_Transaction_: - -.. _RealmConfiguration_Builder_initialData_io_realm_Realm_Transaction_: - -.. _RealmConfiguration_Builder_initialData_Transaction_: - -.. _RealmConfiguration_Builder_initialData_Realm_Transaction_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`initialData ` ( - | :ref:`Realm.Transaction ` transaction - | ) - - - - - * - Sets the initial data in :ref:`io.realm.Realm ` . This transaction will be executed only for the first time when database file is created or while migrating the data when :ref:`Builder.deleteRealmIfMigrationNeeded() ` is set. - - - - - - - **Parameters** - - - ``transaction`` - transaction to execute. - - - - - - - - - - - - - - - - -.. _maxNumberOfActiveVersions: - -.. _maxNumberOfActiveVersions__: - -.. _Builder_maxNumberOfActiveVersions: - -.. _Builder_maxNumberOfActiveVersions__: - -.. _RealmConfiguration_Builder_maxNumberOfActiveVersions: - -.. _RealmConfiguration_Builder_maxNumberOfActiveVersions__: - -.. _io_realm_RealmConfiguration_Builder_maxNumberOfActiveVersions: - -.. _io_realm_RealmConfiguration_Builder_maxNumberOfActiveVersions__: - - - -maxNumberOfActiveVersions -------------------------- - -.. _io_realm_RealmConfiguration_Builder_maxNumberOfActiveVersions_long_: - -.. _maxNumberOfActiveVersions_long_: - -.. _RealmConfiguration_Builder_maxNumberOfActiveVersions_long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`maxNumberOfActiveVersions ` ( - | **long** number - | ) - - - - - * - Sets the maximum number of live versions in the Realm file before an `IllegalStateException `__ is thrown when attempting to write more data. - - Realm is capable of concurrently handling many different versions of Realm objects. This can e.g. happen if you have a Realm open on many different threads or are freezing objects while data is being written to the file. - - Under normal circumstances this is not a problem, but if the number of active versions grow too large, it will have a negative effect on the filesize on disk. Setting this parameters can therefore be used to prevent uses of Realm that can result in very large Realms. - - - - - - - **Parameters** - - - ``number`` - the maximum number of active versions before an exception is thrown. - - - - - - - - - - - - - - .. seealso:: - - - - - `FAQ `__ - - - - - - - - - - - - - -.. _migration: - -.. _migration__: - -.. _Builder_migration: - -.. _Builder_migration__: - -.. _RealmConfiguration_Builder_migration: - -.. _RealmConfiguration_Builder_migration__: - -.. _io_realm_RealmConfiguration_Builder_migration: - -.. _io_realm_RealmConfiguration_Builder_migration__: - - - -migration ---------- - -.. _io_realm_RealmConfiguration_Builder_migration_io_realm_RealmMigration_: - -.. _io_realm_RealmConfiguration_Builder_migration_RealmMigration_: - -.. _migration_io_realm_RealmMigration_: - -.. _migration_RealmMigration_: - -.. _RealmConfiguration_Builder_migration_io_realm_RealmMigration_: - -.. _RealmConfiguration_Builder_migration_RealmMigration_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`migration ` ( - | :ref:`RealmMigration ` migration - | ) - - - - - * - Sets the :ref:`io.realm.RealmMigration ` to be run if a migration is needed. If this migration fails to upgrade the on-disc schema to the runtime schema, a :ref:`io.realm.exceptions.RealmMigrationNeededException ` will be thrown. - - - - - - - - - - - - - - - - - -.. _modules: - -.. _modules__: - -.. _Builder_modules: - -.. _Builder_modules__: - -.. _RealmConfiguration_Builder_modules: - -.. _RealmConfiguration_Builder_modules__: - -.. _io_realm_RealmConfiguration_Builder_modules: - -.. _io_realm_RealmConfiguration_Builder_modules__: - - - -modules -------- - -.. _io_realm_RealmConfiguration_Builder_modules_java_lang_Object_java_lang_Object_: - -.. _io_realm_RealmConfiguration_Builder_modules_java_lang_Object__java_lang_Object_: - -.. _io_realm_RealmConfiguration_Builder_modules_java_lang_Object_Object_: - -.. _io_realm_RealmConfiguration_Builder_modules_java_lang_Object__Object_: - -.. _io_realm_RealmConfiguration_Builder_modules_java_lang_Object_Object____: - -.. _io_realm_RealmConfiguration_Builder_modules_java_lang_Object__Object____: - -.. _io_realm_RealmConfiguration_Builder_modules_Object_java_lang_Object_: - -.. _io_realm_RealmConfiguration_Builder_modules_Object__java_lang_Object_: - -.. _io_realm_RealmConfiguration_Builder_modules_Object_Object_: - -.. _io_realm_RealmConfiguration_Builder_modules_Object__Object_: - -.. _io_realm_RealmConfiguration_Builder_modules_Object_Object____: - -.. _io_realm_RealmConfiguration_Builder_modules_Object__Object____: - -.. _modules_java_lang_Object_java_lang_Object_: - -.. _modules_java_lang_Object__java_lang_Object_: - -.. _modules_java_lang_Object_Object_: - -.. _modules_java_lang_Object__Object_: - -.. _modules_java_lang_Object_Object____: - -.. _modules_java_lang_Object__Object____: - -.. _modules_Object_java_lang_Object_: - -.. _modules_Object__java_lang_Object_: - -.. _modules_Object_Object_: - -.. _modules_Object__Object_: - -.. _modules_Object_Object____: - -.. _modules_Object__Object____: - -.. _RealmConfiguration_Builder_modules_java_lang_Object_java_lang_Object_: - -.. _RealmConfiguration_Builder_modules_java_lang_Object__java_lang_Object_: - -.. _RealmConfiguration_Builder_modules_java_lang_Object_Object_: - -.. _RealmConfiguration_Builder_modules_java_lang_Object__Object_: - -.. _RealmConfiguration_Builder_modules_java_lang_Object_Object____: - -.. _RealmConfiguration_Builder_modules_java_lang_Object__Object____: - -.. _RealmConfiguration_Builder_modules_Object_java_lang_Object_: - -.. _RealmConfiguration_Builder_modules_Object__java_lang_Object_: - -.. _RealmConfiguration_Builder_modules_Object_Object_: - -.. _RealmConfiguration_Builder_modules_Object__Object_: - -.. _RealmConfiguration_Builder_modules_Object_Object____: - -.. _RealmConfiguration_Builder_modules_Object__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`modules ` ( - | `Object `__ baseModule, - | `java.lang.Object[] `__ additionalModules - | ) - - - - - * - Replaces the existing module(s) with one or more :ref:`RealmModule ` s. Using this method will replace the current schema for this Realm with the schema defined by the provided modules. - - A reference to the default Realm module containing all Realm classes in the project (but not dependencies), can be found using :ref:`Realm.getDefaultModule() ` . Combining the schema from the app project and a library dependency is thus done using the following code: - - - - ``builder.modules(Realm.getDefaultMode(), new MyLibraryModule());`` - - - - - - - - - **Parameters** - - - ``baseModule`` - the first Realm module (required). - - - - - ``additionalModules`` - the additional Realm modules - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if any of the modules doesn't have the :ref:`RealmModule ` annotation. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Realm.getDefaultModule() ` - - - - - - - - - - - - -.. _name: - -.. _name__: - -.. _Builder_name: - -.. _Builder_name__: - -.. _RealmConfiguration_Builder_name: - -.. _RealmConfiguration_Builder_name__: - -.. _io_realm_RealmConfiguration_Builder_name: - -.. _io_realm_RealmConfiguration_Builder_name__: - - - -name ----- - -.. _io_realm_RealmConfiguration_Builder_name_java_lang_String_: - -.. _io_realm_RealmConfiguration_Builder_name_String_: - -.. _name_java_lang_String_: - -.. _name_String_: - -.. _RealmConfiguration_Builder_name_java_lang_String_: - -.. _RealmConfiguration_Builder_name_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`name ` ( - | `String `__ filename - | ) - - - - - * - Sets the filename for the Realm file. - - - - - - - - - - - - - - - -.. _readOnly: - -.. _readOnly__: - -.. _Builder_readOnly: - -.. _Builder_readOnly__: - -.. _RealmConfiguration_Builder_readOnly: - -.. _RealmConfiguration_Builder_readOnly__: - -.. _io_realm_RealmConfiguration_Builder_readOnly: - -.. _io_realm_RealmConfiguration_Builder_readOnly__: - - - -readOnly --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`readOnly ` () - | - - - - - * - Setting this will cause the Realm to become read only and all write transactions made against this Realm will fail with an `IllegalStateException `__ . - - This in particular mean that :ref:`initialData(Realm.Transaction) ` will not work in combination with a read only Realm and setting this will result in a `IllegalStateException `__ being thrown. - - - - Marking a Realm as read only only applies to the Realm in this process. Other processes can still write to the Realm. - - - - - - - - - - - - - - - -.. _rxFactory: - -.. _rxFactory__: - -.. _Builder_rxFactory: - -.. _Builder_rxFactory__: - -.. _RealmConfiguration_Builder_rxFactory: - -.. _RealmConfiguration_Builder_rxFactory__: - -.. _io_realm_RealmConfiguration_Builder_rxFactory: - -.. _io_realm_RealmConfiguration_Builder_rxFactory__: - - - -rxFactory ---------- - -.. _io_realm_RealmConfiguration_Builder_rxFactory_io_realm_rx_RxObservableFactory_: - -.. _io_realm_RealmConfiguration_Builder_rxFactory_RxObservableFactory_: - -.. _rxFactory_io_realm_rx_RxObservableFactory_: - -.. _rxFactory_RxObservableFactory_: - -.. _RealmConfiguration_Builder_rxFactory_io_realm_rx_RxObservableFactory_: - -.. _RealmConfiguration_Builder_rxFactory_RxObservableFactory_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`rxFactory ` ( - | :ref:`RxObservableFactory ` factory - | ) - - - - - * - Sets the :ref:`RxObservableFactory ` used to create Rx Observables from Realm objects. The default factory is :ref:`RealmObservableFactory ` . - - - - - - - **Parameters** - - - ``factory`` - factory to use. - - - - - - - - - - - - - - - - -.. _schemaVersion: - -.. _schemaVersion__: - -.. _Builder_schemaVersion: - -.. _Builder_schemaVersion__: - -.. _RealmConfiguration_Builder_schemaVersion: - -.. _RealmConfiguration_Builder_schemaVersion__: - -.. _io_realm_RealmConfiguration_Builder_schemaVersion: - -.. _io_realm_RealmConfiguration_Builder_schemaVersion__: - - - -schemaVersion -------------- - -.. _io_realm_RealmConfiguration_Builder_schemaVersion_long_: - -.. _schemaVersion_long_: - -.. _RealmConfiguration_Builder_schemaVersion_long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration.Builder ` :ref:`schemaVersion ` ( - | **long** schemaVersion - | ) - - - - - * - Sets the schema version of the Realm. This must be equal to or higher than the schema version of the existing Realm file, if any. If the schema version is higher than the already existing Realm, a migration is needed.If no migration code is provided, Realm will throw a :ref:`io.realm.exceptions.RealmMigrationNeededException ` . - - - - - - - - - - - - - - - - - .. seealso:: - - - - - :ref:`migration(RealmMigration) ` - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmDictionary.txt b/source/sdk/temp/java/api/io/realm/RealmDictionary.txt deleted file mode 100644 index 2a43693bad..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmDictionary.txt +++ /dev/null @@ -1,154 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmDictionary -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmDictionary: - - - -io.realm -======== - - - | `java.lang.Object `__ - | :ref:`io.realm.RealmMap ` - | io.realm.RealmDictionary - - -Specialization of :ref:`RealmMap ` s whose keys are strings. - -Similarly to :ref:`RealmList ` s, a RealmDictionary can operate in managed and unmanaged modes. In managed mode a RealmDictionary persists all its contents inside a Realm whereas in unmanaged mode it functions like a `HashMap `__ . - - - -Managed RealmDictionaries can only be created by Realm and will automatically update its content whenever the underlying Realm is updated. Managed RealmDictionaries can only be accessed using the getter that points to a RealmDictionary field of a :ref:`RealmObject ` . - - - -Unmanaged RealmDictionaries can be created by the user and can contain both managed and unmanaged RealmObjects. This is useful when dealing with JSON deserializers like GSON or other frameworks that inject values into a class. Unmanaged RealmDictionaries can be added to a Realm using the :ref:`Realm.copyToRealm(Iterable, ImportFlag...) ` method. - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmDictionary ` () - | - - - Instantiates a RealmDictionary in unmanaged mode. - - - - - * - | :ref:`RealmDictionary ` ( - | `java.util.Map\ `__ map - | ) - - - Instantiates a RealmDictionary in unmanaged mode with an initial dictionary. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class :ref:`io.realm.RealmMap ` : ``isManaged`` , ``isValid`` , ``isFrozen`` , ``size`` , ``isEmpty`` , ``containsKey`` , ``containsValue`` , ``get`` , ``put`` , ``remove`` , ``putAll`` , ``clear`` , ``keySet`` , ``values`` , ``entrySet`` , ``freeze`` , ``addChangeListener`` , ``addChangeListener`` , ``removeChangeListener`` , ``removeChangeListener`` , ``removeAllChangeListeners`` - - - - -Constructor Detail -================== - -.. _RealmDictionary: - -.. _RealmDictionary__: - -.. _io_realm_RealmDictionary: - -.. _io_realm_RealmDictionary__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmDictionary ` () - | - - - - - * - Instantiates a RealmDictionary in unmanaged mode. - - - - - - - - - - - -.. _RealmDictionary: - -.. _RealmDictionary__: - -.. _io_realm_RealmDictionary: - -.. _io_realm_RealmDictionary__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmDictionary ` ( - | `java.util.Map\ `__ map - | ) - - - - - * - Instantiates a RealmDictionary in unmanaged mode with an initial dictionary. - - - - - **Parameters** - - - ``map`` - initial dictionary - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmFieldType.txt b/source/sdk/temp/java/api/io/realm/RealmFieldType.txt deleted file mode 100644 index cbed096210..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmFieldType.txt +++ /dev/null @@ -1,1512 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum RealmFieldType -^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmFieldType: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.RealmFieldType - - -List of the types used by Realm's underlying storage engine.Normally there is no reason to interact with the underlying Realm types as Realm will automatically convert between normal Java types and the Realm types. However it is possible to access these types through a :ref:`DynamicRealmObject ` . - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`BINARY ` - - - - - - - * - :ref:`BINARY_LIST ` - - - - - - - * - :ref:`BINARY_SET ` - - - - - - - * - :ref:`BOOLEAN ` - - - - - - - * - :ref:`BOOLEAN_LIST ` - - - - - - - * - :ref:`BOOLEAN_SET ` - - - - - - - * - :ref:`DATE ` - - - - - - - * - :ref:`DATE_LIST ` - - - - - - - * - :ref:`DATE_SET ` - - - - - - - * - :ref:`DECIMAL128 ` - - - - - - - * - :ref:`DECIMAL128_LIST ` - - - - - - - * - :ref:`DECIMAL128_SET ` - - - - - - - * - :ref:`DOUBLE ` - - - - - - - * - :ref:`DOUBLE_LIST ` - - - - - - - * - :ref:`DOUBLE_SET ` - - - - - - - * - :ref:`FLOAT ` - - - - - - - * - :ref:`FLOAT_LIST ` - - - - - - - * - :ref:`FLOAT_SET ` - - - - - - - * - :ref:`INTEGER ` - - - - - - - * - :ref:`INTEGER_LIST ` - - - - - - - * - :ref:`INTEGER_SET ` - - - - - - - * - :ref:`LINKING_OBJECTS ` - - - - - - - * - :ref:`LINK_SET ` - - - - - - - * - :ref:`LIST ` - - - - - - - * - :ref:`MIXED ` - - - - - - - * - :ref:`MIXED_LIST ` - - - - - - - * - :ref:`MIXED_SET ` - - - - - - - * - :ref:`OBJECT ` - - - - - - - * - :ref:`OBJECT_ID ` - - - - - - - * - :ref:`OBJECT_ID_LIST ` - - - - - - - * - :ref:`OBJECT_ID_SET ` - - - - - - - * - :ref:`STRING ` - - - - - - - * - :ref:`STRING_LIST ` - - - - - - - * - :ref:`STRING_SET ` - - - - - - - * - :ref:`STRING_TO_BINARY_MAP ` - - - - - - - * - :ref:`STRING_TO_BOOLEAN_MAP ` - - - - - - - * - :ref:`STRING_TO_DATE_MAP ` - - - - - - - * - :ref:`STRING_TO_DECIMAL128_MAP ` - - - - - - - * - :ref:`STRING_TO_DOUBLE_MAP ` - - - - - - - * - :ref:`STRING_TO_FLOAT_MAP ` - - - - - - - * - :ref:`STRING_TO_INTEGER_MAP ` - - - - - - - * - :ref:`STRING_TO_LINK_MAP ` - - - - - - - * - :ref:`STRING_TO_MIXED_MAP ` - - - - - - - * - :ref:`STRING_TO_OBJECT_ID_MAP ` - - - - - - - * - :ref:`STRING_TO_STRING_MAP ` - - - - - - - * - :ref:`STRING_TO_UUID_MAP ` - - - - - - - * - :ref:`TYPED_LINK ` - - - - - - - * - :ref:`UUID ` - - - - - - - * - :ref:`UUID_LIST ` - - - - - - - * - :ref:`UUID_SET ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`RealmFieldType ` - - | :ref:`fromNativeValue ` ( - | **int** value - | ) - - - Converts the underlying value used by the storage engine to the proper Realm type. - - - - - * - public **int** - - | :ref:`getNativeValue ` () - | - - - Returns the native value representing this type. - - - - - * - public **boolean** - - | :ref:`isValid ` ( - | `Object `__ obj - | ) - - - Checks if the given Java object can be converted to the underlying Realm type. - - - - - * - public static :ref:`RealmFieldType ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`RealmFieldType ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_RealmFieldType_BINARY: - -.. _RealmFieldType_BINARY: - - - -``BINARY`` ------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_BINARY_LIST: - -.. _RealmFieldType_BINARY_LIST: - - - -``BINARY_LIST`` ----------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_BINARY_SET: - -.. _RealmFieldType_BINARY_SET: - - - -``BINARY_SET`` ---------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_BOOLEAN: - -.. _RealmFieldType_BOOLEAN: - - - -``BOOLEAN`` ------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_BOOLEAN_LIST: - -.. _RealmFieldType_BOOLEAN_LIST: - - - -``BOOLEAN_LIST`` ------------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_BOOLEAN_SET: - -.. _RealmFieldType_BOOLEAN_SET: - - - -``BOOLEAN_SET`` ----------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DATE: - -.. _RealmFieldType_DATE: - - - -``DATE`` ---------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DATE_LIST: - -.. _RealmFieldType_DATE_LIST: - - - -``DATE_LIST`` --------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DATE_SET: - -.. _RealmFieldType_DATE_SET: - - - -``DATE_SET`` -------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DECIMAL128: - -.. _RealmFieldType_DECIMAL128: - - - -``DECIMAL128`` ---------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DECIMAL128_LIST: - -.. _RealmFieldType_DECIMAL128_LIST: - - - -``DECIMAL128_LIST`` --------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DECIMAL128_SET: - -.. _RealmFieldType_DECIMAL128_SET: - - - -``DECIMAL128_SET`` -------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DOUBLE: - -.. _RealmFieldType_DOUBLE: - - - -``DOUBLE`` ------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DOUBLE_LIST: - -.. _RealmFieldType_DOUBLE_LIST: - - - -``DOUBLE_LIST`` ----------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_DOUBLE_SET: - -.. _RealmFieldType_DOUBLE_SET: - - - -``DOUBLE_SET`` ---------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_FLOAT: - -.. _RealmFieldType_FLOAT: - - - -``FLOAT`` ----------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_FLOAT_LIST: - -.. _RealmFieldType_FLOAT_LIST: - - - -``FLOAT_LIST`` ---------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_FLOAT_SET: - -.. _RealmFieldType_FLOAT_SET: - - - -``FLOAT_SET`` --------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_INTEGER: - -.. _RealmFieldType_INTEGER: - - - -``INTEGER`` ------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_INTEGER_LIST: - -.. _RealmFieldType_INTEGER_LIST: - - - -``INTEGER_LIST`` ------------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_INTEGER_SET: - -.. _RealmFieldType_INTEGER_SET: - - - -``INTEGER_SET`` ----------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_LINKING_OBJECTS: - -.. _RealmFieldType_LINKING_OBJECTS: - - - -``LINKING_OBJECTS`` --------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_LINK_SET: - -.. _RealmFieldType_LINK_SET: - - - -``LINK_SET`` -------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_LIST: - -.. _RealmFieldType_LIST: - - - -``LIST`` ---------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_MIXED: - -.. _RealmFieldType_MIXED: - - - -``MIXED`` ----------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_MIXED_LIST: - -.. _RealmFieldType_MIXED_LIST: - - - -``MIXED_LIST`` ---------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_MIXED_SET: - -.. _RealmFieldType_MIXED_SET: - - - -``MIXED_SET`` --------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_OBJECT: - -.. _RealmFieldType_OBJECT: - - - -``OBJECT`` ------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_OBJECT_ID: - -.. _RealmFieldType_OBJECT_ID: - - - -``OBJECT_ID`` --------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_OBJECT_ID_LIST: - -.. _RealmFieldType_OBJECT_ID_LIST: - - - -``OBJECT_ID_LIST`` -------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_OBJECT_ID_SET: - -.. _RealmFieldType_OBJECT_ID_SET: - - - -``OBJECT_ID_SET`` ------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING: - -.. _RealmFieldType_STRING: - - - -``STRING`` ------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_LIST: - -.. _RealmFieldType_STRING_LIST: - - - -``STRING_LIST`` ----------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_SET: - -.. _RealmFieldType_STRING_SET: - - - -``STRING_SET`` ---------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_BINARY_MAP: - -.. _RealmFieldType_STRING_TO_BINARY_MAP: - - - -``STRING_TO_BINARY_MAP`` -------------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_BOOLEAN_MAP: - -.. _RealmFieldType_STRING_TO_BOOLEAN_MAP: - - - -``STRING_TO_BOOLEAN_MAP`` --------------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_DATE_MAP: - -.. _RealmFieldType_STRING_TO_DATE_MAP: - - - -``STRING_TO_DATE_MAP`` ------------------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_DECIMAL128_MAP: - -.. _RealmFieldType_STRING_TO_DECIMAL128_MAP: - - - -``STRING_TO_DECIMAL128_MAP`` ------------------------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_DOUBLE_MAP: - -.. _RealmFieldType_STRING_TO_DOUBLE_MAP: - - - -``STRING_TO_DOUBLE_MAP`` -------------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_FLOAT_MAP: - -.. _RealmFieldType_STRING_TO_FLOAT_MAP: - - - -``STRING_TO_FLOAT_MAP`` ------------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_INTEGER_MAP: - -.. _RealmFieldType_STRING_TO_INTEGER_MAP: - - - -``STRING_TO_INTEGER_MAP`` --------------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_LINK_MAP: - -.. _RealmFieldType_STRING_TO_LINK_MAP: - - - -``STRING_TO_LINK_MAP`` ------------------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_MIXED_MAP: - -.. _RealmFieldType_STRING_TO_MIXED_MAP: - - - -``STRING_TO_MIXED_MAP`` ------------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_OBJECT_ID_MAP: - -.. _RealmFieldType_STRING_TO_OBJECT_ID_MAP: - - - -``STRING_TO_OBJECT_ID_MAP`` ----------------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_STRING_MAP: - -.. _RealmFieldType_STRING_TO_STRING_MAP: - - - -``STRING_TO_STRING_MAP`` -------------------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_STRING_TO_UUID_MAP: - -.. _RealmFieldType_STRING_TO_UUID_MAP: - - - -``STRING_TO_UUID_MAP`` ------------------------ - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_TYPED_LINK: - -.. _RealmFieldType_TYPED_LINK: - - - -``TYPED_LINK`` ---------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_UUID: - -.. _RealmFieldType_UUID: - - - -``UUID`` ---------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_UUID_LIST: - -.. _RealmFieldType_UUID_LIST: - - - -``UUID_LIST`` --------------- - -public static final :ref:`RealmFieldType ` - - - - - -.. _io_realm_RealmFieldType_UUID_SET: - -.. _RealmFieldType_UUID_SET: - - - -``UUID_SET`` -------------- - -public static final :ref:`RealmFieldType ` - - - - - - -Method Detail -============= - -.. _fromNativeValue: - -.. _fromNativeValue__: - -.. _RealmFieldType_fromNativeValue: - -.. _RealmFieldType_fromNativeValue__: - -.. _io_realm_RealmFieldType_fromNativeValue: - -.. _io_realm_RealmFieldType_fromNativeValue__: - - - -fromNativeValue ---------------- - -.. _io_realm_RealmFieldType_fromNativeValue_int_: - -.. _fromNativeValue_int_: - -.. _RealmFieldType_fromNativeValue_int_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmFieldType ` :ref:`fromNativeValue ` ( - | **int** value - | ) - - - - - * - Converts the underlying value used by the storage engine to the proper Realm type. - - - - - **Parameters** - - - ``value`` - the value to convert - - - - - - - - **Returns** - - the corresponding Realm type. - - - - - **Throws** - - - `IllegalArgumentException `__ - if value isn't valid. - - - - - - - - - - - - -.. _getNativeValue: - -.. _getNativeValue__: - -.. _RealmFieldType_getNativeValue: - -.. _RealmFieldType_getNativeValue__: - -.. _io_realm_RealmFieldType_getNativeValue: - -.. _io_realm_RealmFieldType_getNativeValue__: - - - -getNativeValue --------------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getNativeValue ` () - | - - - - - * - Returns the native value representing this type. - - - - - - - **Returns** - - the value used by the underlying storage engine to represent this type. - - - - - - - - - - - -.. _isValid: - -.. _isValid__: - -.. _RealmFieldType_isValid: - -.. _RealmFieldType_isValid__: - -.. _io_realm_RealmFieldType_isValid: - -.. _io_realm_RealmFieldType_isValid__: - - - -isValid -------- - -.. _io_realm_RealmFieldType_isValid_java_lang_Object_: - -.. _io_realm_RealmFieldType_isValid_Object_: - -.. _isValid_java_lang_Object_: - -.. _isValid_Object_: - -.. _RealmFieldType_isValid_java_lang_Object_: - -.. _RealmFieldType_isValid_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isValid ` ( - | `Object `__ obj - | ) - - - - - * - Checks if the given Java object can be converted to the underlying Realm type. - - - - - **Parameters** - - - ``obj`` - object to test compatibility on. - - - - - - - - **Returns** - - ``true`` if object can be converted to the Realm type, ``false`` otherwise. - - - - - - - - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _RealmFieldType_valueOf: - -.. _RealmFieldType_valueOf__: - -.. _io_realm_RealmFieldType_valueOf: - -.. _io_realm_RealmFieldType_valueOf__: - - - -valueOf -------- - -.. _io_realm_RealmFieldType_valueOf_java_lang_String_: - -.. _io_realm_RealmFieldType_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _RealmFieldType_valueOf_java_lang_String_: - -.. _RealmFieldType_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmFieldType ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _RealmFieldType_values: - -.. _RealmFieldType_values__: - -.. _io_realm_RealmFieldType_values: - -.. _io_realm_RealmFieldType_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmFieldType ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmList.txt b/source/sdk/temp/java/api/io/realm/RealmList.txt deleted file mode 100644 index 51db4a91c8..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmList.txt +++ /dev/null @@ -1,4242 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmList -^^^^^^^^^^^^^^^ - -.. _io_realm_RealmList: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.util.AbstractCollection `__ - | `java.util.AbstractList `__ - | io.realm.RealmList - - -**Implemented interfaces:** - - - -- :ref:`io.realm.OrderedRealmCollection ` -- `java.util.List `__ -- :ref:`io.realm.RealmCollection ` -- `java.util.Collection `__ -- `java.lang.Iterable `__ -- `java.util.Collection `__ -- `java.lang.Iterable `__ - - -RealmList is used to model one-to-many relationships in a :ref:`io.realm.RealmObject ` . RealmList has two modes: A managed and unmanaged mode. In managed mode all objects are persisted inside a Realm, in unmanaged mode it works as a normal ArrayList. - -Only Realm can create managed RealmLists. Managed RealmLists will automatically update the content whenever the underlying Realm is updated, and can only be accessed using the getter of a :ref:`io.realm.RealmObject ` . - - - -Unmanaged RealmLists can be created by the user and can contain both managed and unmanaged RealmObjects. This is useful when dealing with JSON deserializers like GSON or other frameworks that inject values into a class. Unmanaged elements in this list can be added to a Realm using the :ref:`Realm.copyToRealm(Iterable, ImportFlag...) ` method. - - - -:ref:`RealmList ` can contain more elements than ``Integer.MAX_VALUE`` . In that case, you can access only first ``Integer.MAX_VALUE`` elements in it. - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmList ` () - | - - - Creates a RealmList in unmanaged mode, where the elements are not controlled by a Realm. - - - - - * - | :ref:`RealmList ` ( - | **E[]** objects - | ) - - - Creates a RealmList in unmanaged mode with an initial list of elements. - - - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public final **BaseRealm** - - - - :ref:`baseRealm ` - - The **BaseRealm** instance in which this list resides. - - Warning: This field is only exposed for internal usage, and should not be used. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`add ` ( - | **E** object - | ) - - - Adds the specified object at the end of this List. - - - - - * - public **void** - - | :ref:`add ` ( - | **int** location, - | **E** element - | ) - - - Inserts the specified object into this List at the specified location. - - - - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - Adds a change listener to this :ref:`RealmList ` . - - - - - - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.OrderedRealmCollectionChangeListener\> ` listener - | ) - - - Adds a change listener to this :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`asChangesetObservable ` () - | - - - Returns an Rx Observable that monitors changes to this RealmList. - - - - - * - public **** - - | :ref:`asFlowable ` () - | - - - Returns an Rx Flowable that monitors changes to this RealmList. - - - - - * - public **double** - - | :ref:`average ` ( - | `String `__ fieldName - | ) - - - Returns the average of a given field. - - - - - * - public **void** - - | :ref:`clear ` () - | - - - Removes all elements from this list, leaving it empty. - - - - - * - public **boolean** - - | :ref:`contains ` ( - | `Object `__ object - | ) - - - Returns ``true`` if the list contains the specified element when attached to a Realm. - - - - - - - * - public :ref:`OrderedRealmCollectionSnapshot ` - - | :ref:`createSnapshot ` () - | - - - Creates a snapshot from this :ref:`OrderedRealmCollection ` . - - - - - - - * - public **boolean** - - | :ref:`deleteAllFromRealm ` () - | - - - This deletes all objects in the collection from the underlying Realm as well as from the collection. - - - - - * - public **boolean** - - | :ref:`deleteFirstFromRealm ` () - | - - - Deletes the first object from the Realm. - - - - - * - public **void** - - | :ref:`deleteFromRealm ` ( - | **int** location - | ) - - - Deletes the object at the given index from the Realm. - - - - - * - public **boolean** - - | :ref:`deleteLastFromRealm ` () - | - - - Deletes the last object from the Realm. - - - - - * - public **E** - - | :ref:`first ` ( - | **E** defaultValue - | ) - - - Gets the first object from the collection. - - - - - * - public **E** - - | :ref:`first ` () - | - - - Gets the first object from the collection. - - - - - * - public :ref:`RealmList ` - - | :ref:`freeze ` () - | - - - - - - - - - - * - public **E** - - | :ref:`get ` ( - | **int** location - | ) - - - Returns the element at the specified location in this list. - - - - - * - public :ref:`Realm ` - - | :ref:`getRealm ` () - | - - - Returns the :ref:`Realm ` instance to which this collection belongs. - - - - - - - * - public **boolean** - - | :ref:`isFrozen ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`isLoaded ` () - | - - - Checks if a collection has finished loading its data yet. - - - - - * - public **boolean** - - | :ref:`isManaged ` () - | - - - Checks if the collection is managed by Realm. - - - - - * - public **boolean** - - | :ref:`isValid ` () - | - - - Checks if the collection is still valid to use, i.e., the :ref:`io.realm.Realm ` instance hasn't been closed. - - - - - - - * - public `Iterator `__ - - | :ref:`iterator ` () - | - - - - - - - - - - * - public **E** - - | :ref:`last ` ( - | **E** defaultValue - | ) - - - Gets the last object from the collection. - - - - - * - public **E** - - | :ref:`last ` () - | - - - Gets the last object from the collection. - - - - - * - public `ListIterator `__ - - | :ref:`listIterator ` ( - | **int** location - | ) - - - - - - - - - - * - public `ListIterator `__ - - | :ref:`listIterator ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`load ` () - | - - - Blocks the collection until all data are available. - - - - - * - public `Number `__ - - | :ref:`max ` ( - | `String `__ fieldName - | ) - - - Finds the maximum value of a field. - - - - - * - public `Date `__ - - | :ref:`maxDate ` ( - | `String `__ fieldName - | ) - - - Finds the maximum date. - - - - - * - public `Number `__ - - | :ref:`min ` ( - | `String `__ fieldName - | ) - - - Finds the minimum value of a field. - - - - - * - public `Date `__ - - | :ref:`minDate ` ( - | `String `__ fieldName - | ) - - - Finds the minimum date. - - - - - * - public **void** - - | :ref:`move ` ( - | **int** oldPos, - | **int** newPos - | ) - - - Moves an object from one position to another, while maintaining a fixed sized list. - - - - - * - public **boolean** - - | :ref:`remove ` ( - | `Object `__ object - | ) - - - Removes one instance of the specified object from this ``Collection`` if one is contained. - - - - - - - * - public **E** - - | :ref:`remove ` ( - | **int** location - | ) - - - Removes the object at the specified location from this list. - - - - - * - public **boolean** - - | :ref:`removeAll ` ( - | `java.util.Collection\ `__ collection - | ) - - - Removes all occurrences in this ``Collection`` of each object in the specified ``Collection`` . - - - - - - - * - public **void** - - | :ref:`removeAllChangeListeners ` () - | - - - Removes all user-defined change listeners. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - Removes the specified change listener. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.OrderedRealmCollectionChangeListener\> ` listener - | ) - - - Removes the specified change listener. - - - - - * - public **E** - - | :ref:`set ` ( - | **int** location, - | **E** object - | ) - - - Replaces the element at the specified location in this list with the specified object. - - - - - * - public **int** - - | :ref:`size ` () - | - - - Returns the number of elements in this ``List`` . - - - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `java.lang.String[] `__ fieldNames, - | :ref:`io.realm.Sort[] ` sortOrders - | ) - - - Sorts a collection based on the provided fields and sort orders. - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - Sorts a collection based on the provided fields and sort orders. - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName, - | :ref:`Sort ` sortOrder - | ) - - - Sorts a collection based on the provided field and sort order. - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName - | ) - - - Sorts a collection based on the provided field in ascending order. - - - - - * - public `Number `__ - - | :ref:`sum ` ( - | `String `__ fieldName - | ) - - - Calculates the sum of a given field. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`where ` () - | - - - Returns a RealmQuery, which can be used to query for specific objects of this class. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.util.AbstractCollection `__ : ``iterator`` , ``size`` , ``isEmpty`` , ``contains`` , ``toArray`` , ``toArray`` , ``add`` , ``remove`` , ``containsAll`` , ``addAll`` , ``removeAll`` , ``retainAll`` , ``clear`` , ``toString`` -- Methods inherited from class `java.util.AbstractList `__ : ``add`` , ``get`` , ``set`` , ``add`` , ``remove`` , ``indexOf`` , ``lastIndexOf`` , ``clear`` , ``addAll`` , ``iterator`` , ``listIterator`` , ``listIterator`` , ``subList`` , ``equals`` , ``hashCode`` , ``removeRange`` - - - - -Field Detail -============ - -.. _io_realm_RealmList_baseRealm: - - - -``baseRealm`` --------------- - -The **BaseRealm** instance in which this list resides. - -Warning: This field is only exposed for internal usage, and should not be used. - - - - - - -Constructor Detail -================== - -.. _RealmList: - -.. _RealmList__: - -.. _io_realm_RealmList: - -.. _io_realm_RealmList__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmList ` () - | - - - - - * - Creates a RealmList in unmanaged mode, where the elements are not controlled by a Realm. This effectively makes the RealmList function as a `java.util.ArrayList `__ and it is not possible to query the objects in this state. - - Use :ref:`io.realm.Realm.copyToRealm(Iterable, ImportFlag...) ` to properly persist its elements in Realm. - - - - - - - - - - - - - - - -.. _RealmList: - -.. _RealmList__: - -.. _io_realm_RealmList: - -.. _io_realm_RealmList__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmList ` ( - | **E[]** objects - | ) - - - - - * - Creates a RealmList in unmanaged mode with an initial list of elements. A RealmList in unmanaged mode function as a `java.util.ArrayList `__ and it is not possible to query the objects in this state. - - Use :ref:`io.realm.Realm.copyToRealm(Iterable, ImportFlag...) ` to properly persist all unmanaged elements in Realm. - - - - - - - - - **Parameters** - - - ``objects`` - initial objects in the list. - - - - - - - - - - - - - - -Method Detail -============= - -.. _add: - -.. _add__: - -.. _RealmList_add: - -.. _RealmList_add__: - -.. _io_realm_RealmList_add: - -.. _io_realm_RealmList_add__: - - - -add ----- - -.. _io_realm_RealmList_add_E_: - -.. _add_E_: - -.. _RealmList_add_E_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`add ` ( - | **E** object - | ) - - - - - * - Adds the specified object at the end of this List. - - 1. **Unmanaged RealmLists**: It is possible to add both managed and unmanaged objects. If adding managed objects to an unmanaged RealmList they will not be copied to the Realm again if using :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` afterwards. - - - - - #. **Managed RealmLists**: It is possible to add unmanaged objects to a RealmList that is already managed. In that case the object will transparently be copied to Realm using :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` or :ref:`Realm.copyToRealmOrUpdate(RealmModel, ImportFlag...) ` if it has a primary key. - - - - - - - - - - - - **Parameters** - - - ``object`` - the object to add. - - - - - - - - **Returns** - - always ``true`` . - - - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - - - - **Overrides** - - ``add`` in class `AbstractList `__ - - - - -.. _io_realm_RealmList_add_int_E_: - -.. _io_realm_RealmList_add_int__E_: - -.. _add_int_E_: - -.. _add_int__E_: - -.. _RealmList_add_int_E_: - -.. _RealmList_add_int__E_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`add ` ( - | **int** location, - | **E** element - | ) - - - - - * - Inserts the specified object into this List at the specified location. The object is inserted before any previous element at the specified location. If the location is equal to the size of this List, the object is added at the end. - - 1. **Unmanaged RealmLists**: It is possible to add both managed and unmanaged objects. If adding managed objects to an unmanaged RealmList they will not be copied to the Realm again if using :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` afterwards. - - - - - #. **Managed RealmLists**: It is possible to add unmanaged objects to a RealmList that is already managed. In that case the object will transparently be copied to Realm using :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` or :ref:`Realm.copyToRealmOrUpdate(RealmModel, ImportFlag...) ` if it has a primary key. - - - - - - - - - - - - **Parameters** - - - ``location`` - the index at which to insert. - - - - - ``element`` - the element to add. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or container object has been removed. - - - - - `IndexOutOfBoundsException `__ - if ``location < 0 || location > size()`` . - - - - - - - - - - **Overrides** - - ``add`` in class `AbstractList `__ - - - - - - -.. _addChangeListener: - -.. _addChangeListener__: - -.. _RealmList_addChangeListener: - -.. _RealmList_addChangeListener__: - -.. _io_realm_RealmList_addChangeListener: - -.. _io_realm_RealmList_addChangeListener__: - - - -addChangeListener ------------------ - -.. _io_realm_RealmList_addChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmList_addChangeListener_RealmChangeListener_: - -.. _addChangeListener_io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmChangeListener_: - -.. _RealmList_addChangeListener_io_realm_RealmChangeListener_: - -.. _RealmList_addChangeListener_RealmChangeListener_: - -.. _io_realm_RealmList_addChangeListener_RealmChangeListener_RealmList_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - - - * - Adds a change listener to this :ref:`RealmList ` . - - Registering a change listener will not prevent the underlying RealmList from being garbage collected. If the RealmList is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private RealmList dogs; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - dogs = realm.where(Person.class).findFirst().getDogs(); - dogs.addChangeListener(new RealmChangeListener>() { - @Override - public void onChange(RealmList dogs) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - -.. _io_realm_RealmList_addChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _io_realm_RealmList_addChangeListener_OrderedRealmCollectionChangeListener_: - -.. _addChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _addChangeListener_OrderedRealmCollectionChangeListener_: - -.. _RealmList_addChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _RealmList_addChangeListener_OrderedRealmCollectionChangeListener_: - -.. _io_realm_RealmList_addChangeListener_OrderedRealmCollectionChangeListener_RealmList_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.OrderedRealmCollectionChangeListener\> ` listener - | ) - - - - - * - Adds a change listener to this :ref:`RealmList ` . - - Registering a change listener will not prevent the underlying RealmList from being garbage collected. If the RealmList is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private RealmList dogs; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - dogs = realm.where(Person.class).findFirst().getDogs(); - dogs.addChangeListener(new OrderedRealmCollectionChangeListener>() { - @Override - public void onChange(RealmList dogs, OrderedCollectionChangeSet changeSet) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - - - -.. _asChangesetObservable: - -.. _asChangesetObservable__: - -.. _RealmList_asChangesetObservable: - -.. _RealmList_asChangesetObservable__: - -.. _io_realm_RealmList_asChangesetObservable: - -.. _io_realm_RealmList_asChangesetObservable__: - - - -asChangesetObservable ---------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`asChangesetObservable ` () - | - - - - - * - Returns an Rx Observable that monitors changes to this RealmList. It will emit the current RealmList when subscribed. For each update to the RealmList a pair consisting of the RealmList and the :ref:`OrderedCollectionChangeSet ` will be sent. The changeset will be ``null`` the first time an RealmList is emitted. - - RealmList will continually be emitted as the RealmList is updated - ``onComplete`` will never be called. - - - - Items emitted from Realm Observables are frozen (See :ref:`freeze() ` . This means that they are immutable and can be read on any thread. - - - - Realm Observables always emit items from the thread holding the live Realm. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - list.asChangesetObservable() - .observeOn(Schedulers.computation()) - .map((rxList, changes) -> doExpensiveWork(rxList, changes)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath or the corresponding Realm instance doesn't support RxJava. - - - - - `IllegalStateException `__ - if the Realm wasn't opened on a Looper thread. - - - - - - - - - - .. seealso:: - - - - - `RxJava and Realm `__ - - - - - - - - - - - - - -.. _asFlowable: - -.. _asFlowable__: - -.. _RealmList_asFlowable: - -.. _RealmList_asFlowable__: - -.. _io_realm_RealmList_asFlowable: - -.. _io_realm_RealmList_asFlowable__: - - - -asFlowable ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`asFlowable ` () - | - - - - - * - Returns an Rx Flowable that monitors changes to this RealmList. It will emit the current RealmList when subscribed to. RealmList will continually be emitted as the RealmList is updated - ``onComplete`` will never be called. - - Items emitted from Realm Flowables are frozen (See :ref:`freeze() ` . This means that they are immutable and can be read on any thread. - - - - Realm Flowables always emit items from the thread holding the live RealmList. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - list.asFlowable() - .observeOn(Schedulers.computation()) - .map(rxResults -> doExpensiveWork(rxResults)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - If you would like the ``asFlowable()`` to stop emitting items you can instruct RxJava to only emit only the first item by using the ``first()`` operator: - - - - - - .. code-block:: java - - - list.asFlowable() - .first() - .subscribe( ... ) // You only get the results once - - - - - - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath or the corresponding Realm instance doesn't support RxJava. - - - - - - - - - - .. seealso:: - - - - - `RxJava and Realm `__ - - - - - - - - - - - - - -.. _average: - -.. _average__: - -.. _RealmList_average: - -.. _RealmList_average__: - -.. _io_realm_RealmList_average: - -.. _io_realm_RealmList_average__: - - - -average -------- - -.. _io_realm_RealmList_average_java_lang_String_: - -.. _io_realm_RealmList_average_String_: - -.. _average_java_lang_String_: - -.. _average_String_: - -.. _RealmList_average_java_lang_String_: - -.. _RealmList_average_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **double** :ref:`average ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the average of a given field. - - - - - - - **Returns** - - the average for the given field amongst objects in query results. This will be of type double for all types of number fields. If no objects exist or they all have ``null`` as the value for the given field, ``0`` will be returned. When computing the average, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _clear: - -.. _clear__: - -.. _RealmList_clear: - -.. _RealmList_clear__: - -.. _io_realm_RealmList_clear: - -.. _io_realm_RealmList_clear__: - - - -clear ------ - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`clear ` () - | - - - - - * - Removes all elements from this list, leaving it empty. This method doesn't remove the objects from the Realm. - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - - - - **Overrides** - - ``clear`` in class `AbstractList `__ - - - - .. seealso:: - - - - - `List.isEmpty `__ - - - - - `List.size `__ - - - - - :ref:`deleteAllFromRealm() ` - - - - - - - - - - - - -.. _contains: - -.. _contains__: - -.. _RealmList_contains: - -.. _RealmList_contains__: - -.. _io_realm_RealmList_contains: - -.. _io_realm_RealmList_contains__: - - - -contains --------- - -.. _io_realm_RealmList_contains_java_lang_Object_: - -.. _io_realm_RealmList_contains_Object_: - -.. _contains_java_lang_Object_: - -.. _contains_Object_: - -.. _RealmList_contains_java_lang_Object_: - -.. _RealmList_contains_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`contains ` ( - | `Object `__ object - | ) - - - - - * - Returns ``true`` if the list contains the specified element when attached to a Realm. This method will query the native Realm underlying storage engine to quickly find the specified element. - - If the list is not attached to a Realm, the default `List.contains(Object) `__ implementation will occur. - - - - - - - - - **Parameters** - - - ``object`` - the element whose presence in this list is to be tested. - - - - - - - - **Returns** - - ``true`` if this list contains the specified element otherwise ``false`` . - - - - - - - - - **Overrides** - - ``contains`` in class `AbstractCollection `__ - - - - - - -.. _createSnapshot: - -.. _createSnapshot__: - -.. _RealmList_createSnapshot: - -.. _RealmList_createSnapshot__: - -.. _io_realm_RealmList_createSnapshot: - -.. _io_realm_RealmList_createSnapshot__: - - - -createSnapshot --------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedRealmCollectionSnapshot ` :ref:`createSnapshot ` () - | - - - - - * - Creates a snapshot from this :ref:`OrderedRealmCollection ` . - - - - - - - - - **Returns** - - the snapshot of this collection. - - - - - - - - - - - -.. _deleteAllFromRealm: - -.. _deleteAllFromRealm__: - -.. _RealmList_deleteAllFromRealm: - -.. _RealmList_deleteAllFromRealm__: - -.. _io_realm_RealmList_deleteAllFromRealm: - -.. _io_realm_RealmList_deleteAllFromRealm__: - - - -deleteAllFromRealm ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteAllFromRealm ` () - | - - - - - * - This deletes all objects in the collection from the underlying Realm as well as from the collection. - - - - - - - **Returns** - - ``true`` if objects was deleted, ``false`` otherwise. - - - - - - - - - - - - - -.. _deleteFirstFromRealm: - -.. _deleteFirstFromRealm__: - -.. _RealmList_deleteFirstFromRealm: - -.. _RealmList_deleteFirstFromRealm__: - -.. _io_realm_RealmList_deleteFirstFromRealm: - -.. _io_realm_RealmList_deleteFirstFromRealm__: - - - -deleteFirstFromRealm --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteFirstFromRealm ` () - | - - - - - * - Deletes the first object from the Realm. This also removes it from this collection. - - - - - - - **Returns** - - ``true`` if an object was deleted, ``false`` otherwise. - - - - - - - - - - - - - -.. _deleteFromRealm: - -.. _deleteFromRealm__: - -.. _RealmList_deleteFromRealm: - -.. _RealmList_deleteFromRealm__: - -.. _io_realm_RealmList_deleteFromRealm: - -.. _io_realm_RealmList_deleteFromRealm__: - - - -deleteFromRealm ---------------- - -.. _io_realm_RealmList_deleteFromRealm_int_: - -.. _deleteFromRealm_int_: - -.. _RealmList_deleteFromRealm_int_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`deleteFromRealm ` ( - | **int** location - | ) - - - - - * - Deletes the object at the given index from the Realm. This also removes it from the collection. - - - - - - - - - - - - - - - -.. _deleteLastFromRealm: - -.. _deleteLastFromRealm__: - -.. _RealmList_deleteLastFromRealm: - -.. _RealmList_deleteLastFromRealm__: - -.. _io_realm_RealmList_deleteLastFromRealm: - -.. _io_realm_RealmList_deleteLastFromRealm__: - - - -deleteLastFromRealm -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteLastFromRealm ` () - | - - - - - * - Deletes the last object from the Realm. This also removes it from this collection. - - - - - - - **Returns** - - ``true`` if an object was deleted, ``false`` otherwise. - - - - - - - - - - - - - -.. _first: - -.. _first__: - -.. _RealmList_first: - -.. _RealmList_first__: - -.. _io_realm_RealmList_first: - -.. _io_realm_RealmList_first__: - - - -first ------ - -.. _io_realm_RealmList_first_E_: - -.. _first_E_: - -.. _RealmList_first_E_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`first ` ( - | **E** defaultValue - | ) - - - - - * - Gets the first object from the collection. If the collection is empty, the provided default will be used instead. - - - - - - - **Returns** - - the first object or the provided default. - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`first ` () - | - - - - - * - Gets the first object from the collection. - - - - - - - **Returns** - - the first object. - - - - - - - - - - - -.. _freeze: - -.. _freeze__: - -.. _RealmList_freeze: - -.. _RealmList_freeze__: - -.. _io_realm_RealmList_freeze: - -.. _io_realm_RealmList_freeze__: - - - -freeze ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmList ` :ref:`freeze ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _get: - -.. _get__: - -.. _RealmList_get: - -.. _RealmList_get__: - -.. _io_realm_RealmList_get: - -.. _io_realm_RealmList_get__: - - - -get ----- - -.. _io_realm_RealmList_get_int_: - -.. _get_int_: - -.. _RealmList_get_int_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`get ` ( - | **int** location - | ) - - - - - * - Returns the element at the specified location in this list. - - - - - **Parameters** - - - ``location`` - the index of the element to return. - - - - - - - - **Returns** - - the element at the specified index. - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - `IndexOutOfBoundsException `__ - if ``location < 0 || location >= size()`` . - - - - - - - - - - **Overrides** - - ``get`` in class `AbstractList `__ - - - - - - -.. _getRealm: - -.. _getRealm__: - -.. _RealmList_getRealm: - -.. _RealmList_getRealm__: - -.. _io_realm_RealmList_getRealm: - -.. _io_realm_RealmList_getRealm__: - - - -getRealm --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Realm ` :ref:`getRealm ` () - | - - - - - * - Returns the :ref:`Realm ` instance to which this collection belongs. - - Calling **Realm.close()** on the returned instance is discouraged as it is the same as calling it on the original Realm instance which may cause the Realm to fully close invalidating the list. - - - - - - - - - - - **Returns** - - :ref:`Realm ` instance this collection belongs to or ``null`` if the collection is unmanaged. - - - - - - - **Throws** - - - `IllegalStateException `__ - if the Realm is an instance of :ref:`DynamicRealm ` or the :ref:`Realm ` was already closed. - - - - - - - - - - - - - - -.. _isFrozen: - -.. _isFrozen__: - -.. _RealmList_isFrozen: - -.. _RealmList_isFrozen__: - -.. _io_realm_RealmList_isFrozen: - -.. _io_realm_RealmList_isFrozen__: - - - -isFrozen --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isFrozen ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _isLoaded: - -.. _isLoaded__: - -.. _RealmList_isLoaded: - -.. _RealmList_isLoaded__: - -.. _io_realm_RealmList_isLoaded: - -.. _io_realm_RealmList_isLoaded__: - - - -isLoaded --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isLoaded ` () - | - - - - - * - Checks if a collection has finished loading its data yet. - - - - - - - **Returns** - - ``true`` if data has been loaded and is available, ``false`` if data is still being loaded. - - - - - - - - - - - - - -.. _isManaged: - -.. _isManaged__: - -.. _RealmList_isManaged: - -.. _RealmList_isManaged__: - -.. _io_realm_RealmList_isManaged: - -.. _io_realm_RealmList_isManaged__: - - - -isManaged ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isManaged ` () - | - - - - - * - Checks if the collection is managed by Realm. A managed collection is just a wrapper around the data in the underlying Realm file. On Looper threads, a managed collection will be live-updated so it always points to the latest data. Managed collections are thread confined so that they cannot be accessed from other threads than the one that created them.If this method returns ``false`` , the collection is unmanaged. An unmanaged collection is just a normal java collection, so it will not be live updated. - - - - - - - - - - - **Returns** - - ``true`` if this is a managed :ref:`RealmCollection ` , ``false`` otherwise. - - - - - - - - - - - - - -.. _isValid: - -.. _isValid__: - -.. _RealmList_isValid: - -.. _RealmList_isValid__: - -.. _io_realm_RealmList_isValid: - -.. _io_realm_RealmList_isValid__: - - - -isValid -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isValid ` () - | - - - - - * - Checks if the collection is still valid to use, i.e., the :ref:`io.realm.Realm ` instance hasn't been closed. It will always return ``true`` for an unmanaged collection. - - - - - - - - - **Returns** - - ``true`` if it is still valid to use or an unmanaged collection, ``false`` otherwise. - - - - - - - - - - - - - -.. _iterator: - -.. _iterator__: - -.. _RealmList_iterator: - -.. _RealmList_iterator__: - -.. _io_realm_RealmList_iterator: - -.. _io_realm_RealmList_iterator__: - - - -iterator --------- - -.. list-table:: - :header-rows: 1 - - * - | public `Iterator `__ :ref:`iterator ` () - | - - - - - * - - - - - - - - - - - - - - **Overrides** - - ``iterator`` in class `AbstractList `__ - - - - - - -.. _last: - -.. _last__: - -.. _RealmList_last: - -.. _RealmList_last__: - -.. _io_realm_RealmList_last: - -.. _io_realm_RealmList_last__: - - - -last ----- - -.. _io_realm_RealmList_last_E_: - -.. _last_E_: - -.. _RealmList_last_E_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`last ` ( - | **E** defaultValue - | ) - - - - - * - Gets the last object from the collection. If the collection is empty, the provided default will be used instead. - - - - - - - **Returns** - - the last object or the provided default. - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`last ` () - | - - - - - * - Gets the last object from the collection. - - - - - - - **Returns** - - the last object. - - - - - - - - - - - -.. _listIterator: - -.. _listIterator__: - -.. _RealmList_listIterator: - -.. _RealmList_listIterator__: - -.. _io_realm_RealmList_listIterator: - -.. _io_realm_RealmList_listIterator__: - - - -listIterator ------------- - -.. _io_realm_RealmList_listIterator_int_: - -.. _listIterator_int_: - -.. _RealmList_listIterator_int_: - -.. list-table:: - :header-rows: 1 - - * - | public `ListIterator `__ :ref:`listIterator ` ( - | **int** location - | ) - - - - - * - - - - - - - - - - - - - - **Overrides** - - ``listIterator`` in class `AbstractList `__ - - - - -.. list-table:: - :header-rows: 1 - - * - | public `ListIterator `__ :ref:`listIterator ` () - | - - - - - * - - - - - - - - - - - - - - **Overrides** - - ``listIterator`` in class `AbstractList `__ - - - - - - -.. _load: - -.. _load__: - -.. _RealmList_load: - -.. _RealmList_load__: - -.. _io_realm_RealmList_load: - -.. _io_realm_RealmList_load__: - - - -load ----- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`load ` () - | - - - - - * - Blocks the collection until all data are available. - - - - - - - **Returns** - - ``true`` if the data could be successfully loaded, ``false`` otherwise. - - - - - - - - - - - - - -.. _max: - -.. _max__: - -.. _RealmList_max: - -.. _RealmList_max__: - -.. _io_realm_RealmList_max: - -.. _io_realm_RealmList_max__: - - - -max ----- - -.. _io_realm_RealmList_max_java_lang_String_: - -.. _io_realm_RealmList_max_String_: - -.. _max_java_lang_String_: - -.. _max_String_: - -.. _RealmList_max_java_lang_String_: - -.. _RealmList_max_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`max ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum value of a field. - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given field, ``null`` will be returned. Otherwise the maximum value is returned. When determining the maximum value, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _maxDate: - -.. _maxDate__: - -.. _RealmList_maxDate: - -.. _RealmList_maxDate__: - -.. _io_realm_RealmList_maxDate: - -.. _io_realm_RealmList_maxDate__: - - - -maxDate -------- - -.. _io_realm_RealmList_maxDate_java_lang_String_: - -.. _io_realm_RealmList_maxDate_String_: - -.. _maxDate_java_lang_String_: - -.. _maxDate_String_: - -.. _RealmList_maxDate_java_lang_String_: - -.. _RealmList_maxDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`maxDate ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum date. - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given date field, ``null`` will be returned. Otherwise the maximum date is returned. When determining the maximum date, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _min: - -.. _min__: - -.. _RealmList_min: - -.. _RealmList_min__: - -.. _io_realm_RealmList_min: - -.. _io_realm_RealmList_min__: - - - -min ----- - -.. _io_realm_RealmList_min_java_lang_String_: - -.. _io_realm_RealmList_min_String_: - -.. _min_java_lang_String_: - -.. _min_String_: - -.. _RealmList_min_java_lang_String_: - -.. _RealmList_min_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`min ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum value of a field. - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given field, ``null`` will be returned. Otherwise the minimum value is returned. When determining the minimum value, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _minDate: - -.. _minDate__: - -.. _RealmList_minDate: - -.. _RealmList_minDate__: - -.. _io_realm_RealmList_minDate: - -.. _io_realm_RealmList_minDate__: - - - -minDate -------- - -.. _io_realm_RealmList_minDate_java_lang_String_: - -.. _io_realm_RealmList_minDate_String_: - -.. _minDate_java_lang_String_: - -.. _minDate_String_: - -.. _RealmList_minDate_java_lang_String_: - -.. _RealmList_minDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`minDate ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum date. - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given date field, ``null`` will be returned. Otherwise the minimum date is returned. When determining the minimum date, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _move: - -.. _move__: - -.. _RealmList_move: - -.. _RealmList_move__: - -.. _io_realm_RealmList_move: - -.. _io_realm_RealmList_move__: - - - -move ----- - -.. _io_realm_RealmList_move_int_int_: - -.. _io_realm_RealmList_move_int__int_: - -.. _move_int_int_: - -.. _move_int__int_: - -.. _RealmList_move_int_int_: - -.. _RealmList_move_int__int_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`move ` ( - | **int** oldPos, - | **int** newPos - | ) - - - - - * - Moves an object from one position to another, while maintaining a fixed sized list. RealmObjects will be shifted so no ``null`` values are introduced. - - - - - - - **Parameters** - - - ``oldPos`` - index of RealmObject to move. - - - - - ``newPos`` - target position. If newPos < oldPos the object at the location will be shifted to the right. If oldPos < newPos, indexes > oldPos will be shifted once to the left. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - `java.lang.IndexOutOfBoundsException `__ - if any position is outside [0, size()]. - - - - - - - - - - - - -.. _remove: - -.. _remove__: - -.. _RealmList_remove: - -.. _RealmList_remove__: - -.. _io_realm_RealmList_remove: - -.. _io_realm_RealmList_remove__: - - - -remove ------- - -.. _io_realm_RealmList_remove_java_lang_Object_: - -.. _io_realm_RealmList_remove_Object_: - -.. _remove_java_lang_Object_: - -.. _remove_Object_: - -.. _RealmList_remove_java_lang_Object_: - -.. _RealmList_remove_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`remove ` ( - | `Object `__ object - | ) - - - - - * - Removes one instance of the specified object from this ``Collection`` if one is contained. This implementation iterates over this ``Collection`` and tests each element ``e`` returned by the iterator, whether ``e`` is equal to the given object. If ``object != null`` then this test is performed using ``object.equals(e)`` , otherwise using ``object == null`` . If an element equal to the given object is found, then the ``remove`` method is called on the iterator and ``true`` is returned, ``false`` otherwise. If the iterator does not support removing elements, an ``UnsupportedOperationException`` is thrown. - - - - - - - **Parameters** - - - ``object`` - the object to remove. - - - - - - - - **Returns** - - ``true`` if this ``Collection`` is modified, ``false`` otherwise. - - - - - - - **Throws** - - - `ClassCastException `__ - if the object passed is not of the correct type. - - - - - `NullPointerException `__ - if ``object`` is ``null`` . - - - - - - - - - - **Overrides** - - ``remove`` in class `AbstractCollection `__ - - - - -.. _io_realm_RealmList_remove_int_: - -.. _remove_int_: - -.. _RealmList_remove_int_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`remove ` ( - | **int** location - | ) - - - - - * - Removes the object at the specified location from this list. - - - - - **Parameters** - - - ``location`` - the index of the object to remove. - - - - - - - - **Returns** - - the removed object. - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - `IndexOutOfBoundsException `__ - if ``location < 0 || location >= size()`` . - - - - - - - - - - **Overrides** - - ``remove`` in class `AbstractList `__ - - - - - - -.. _removeAll: - -.. _removeAll__: - -.. _RealmList_removeAll: - -.. _RealmList_removeAll__: - -.. _io_realm_RealmList_removeAll: - -.. _io_realm_RealmList_removeAll__: - - - -removeAll ---------- - -.. _io_realm_RealmList_removeAll_java_util_Collection_: - -.. _io_realm_RealmList_removeAll_Collection_: - -.. _removeAll_java_util_Collection_: - -.. _removeAll_Collection_: - -.. _RealmList_removeAll_java_util_Collection_: - -.. _RealmList_removeAll_Collection_: - -.. _io_realm_RealmList_removeAll_Collection____: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`removeAll ` ( - | `java.util.Collection\ `__ collection - | ) - - - - - * - Removes all occurrences in this ``Collection`` of each object in the specified ``Collection`` . After this method returns none of the elements in the passed ``Collection`` can be found in this ``Collection`` anymore. - - This implementation iterates over the ``Collection`` and tests each element ``e`` returned by the iterator, whether it is contained in the specified ``Collection`` . If this test is positive, then the ``remove`` method is called on the iterator. - - - - - - - - - **Parameters** - - - ``collection`` - the collection of objects to remove. - - - - - - - - **Returns** - - ``true`` if this ``Collection`` is modified, ``false`` otherwise. - - - - - - - **Throws** - - - `ClassCastException `__ - if one or more elements of ``collection`` isn't of the correct type. - - - - - - - `NullPointerException `__ - if ``collection`` is ``null`` . - - - - - - - - - - **Overrides** - - ``removeAll`` in class `AbstractCollection `__ - - - - - - -.. _removeAllChangeListeners: - -.. _removeAllChangeListeners__: - -.. _RealmList_removeAllChangeListeners: - -.. _RealmList_removeAllChangeListeners__: - -.. _io_realm_RealmList_removeAllChangeListeners: - -.. _io_realm_RealmList_removeAllChangeListeners__: - - - -removeAllChangeListeners ------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeAllChangeListeners ` () - | - - - - - * - Removes all user-defined change listeners. - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if you try to remove listeners from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _removeChangeListener: - -.. _removeChangeListener__: - -.. _RealmList_removeChangeListener: - -.. _RealmList_removeChangeListener__: - -.. _io_realm_RealmList_removeChangeListener: - -.. _io_realm_RealmList_removeChangeListener__: - - - -removeChangeListener --------------------- - -.. _io_realm_RealmList_removeChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmList_removeChangeListener_RealmChangeListener_: - -.. _removeChangeListener_io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmChangeListener_: - -.. _RealmList_removeChangeListener_io_realm_RealmChangeListener_: - -.. _RealmList_removeChangeListener_RealmChangeListener_: - -.. _io_realm_RealmList_removeChangeListener_RealmChangeListener_RealmList_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - -.. _io_realm_RealmList_removeChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _io_realm_RealmList_removeChangeListener_OrderedRealmCollectionChangeListener_: - -.. _removeChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _removeChangeListener_OrderedRealmCollectionChangeListener_: - -.. _RealmList_removeChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _RealmList_removeChangeListener_OrderedRealmCollectionChangeListener_: - -.. _io_realm_RealmList_removeChangeListener_OrderedRealmCollectionChangeListener_RealmList_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.OrderedRealmCollectionChangeListener\> ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _set: - -.. _set__: - -.. _RealmList_set: - -.. _RealmList_set__: - -.. _io_realm_RealmList_set: - -.. _io_realm_RealmList_set__: - - - -set ----- - -.. _io_realm_RealmList_set_int_E_: - -.. _io_realm_RealmList_set_int__E_: - -.. _set_int_E_: - -.. _set_int__E_: - -.. _RealmList_set_int_E_: - -.. _RealmList_set_int__E_: - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`set ` ( - | **int** location, - | **E** object - | ) - - - - - * - Replaces the element at the specified location in this list with the specified object. - - 1. **Unmanaged RealmLists**: It is possible to add both managed and unmanaged objects. If adding managed objects to an unmanaged RealmList they will not be copied to the Realm again if using :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` afterwards. - - - - - #. **Managed RealmLists**: It is possible to add unmanaged objects to a RealmList that is already managed. In that case the object will transparently be copied to Realm using :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` or :ref:`Realm.copyToRealmOrUpdate(RealmModel, ImportFlag...) ` if it has a primary key. - - - - - - - - - - - - **Parameters** - - - ``location`` - the index at which to put the specified object. - - - - - ``object`` - the object to add. - - - - - - - - **Returns** - - the previous element at the index. - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - `IndexOutOfBoundsException `__ - if ``location < 0 || location >= size()`` . - - - - - - - - - - **Overrides** - - ``set`` in class `AbstractList `__ - - - - - - -.. _size: - -.. _size__: - -.. _RealmList_size: - -.. _RealmList_size__: - -.. _io_realm_RealmList_size: - -.. _io_realm_RealmList_size__: - - - -size ----- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`size ` () - | - - - - - * - Returns the number of elements in this ``List`` . - - - - - - - - - **Returns** - - the number of elements in this ``List`` . - - - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - - - - **Overrides** - - ``size`` in class `AbstractCollection `__ - - - - - - -.. _sort: - -.. _sort__: - -.. _RealmList_sort: - -.. _RealmList_sort__: - -.. _io_realm_RealmList_sort: - -.. _io_realm_RealmList_sort__: - - - -sort ----- - -.. _io_realm_RealmList_sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_Sort____: - -.. _io_realm_RealmList_sort_java_lang_String__Sort____: - -.. _io_realm_RealmList_sort_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_String_Sort_: - -.. _io_realm_RealmList_sort_String__Sort_: - -.. _io_realm_RealmList_sort_String_Sort____: - -.. _io_realm_RealmList_sort_String__Sort____: - -.. _io_realm_RealmList_sort_String____io_realm_Sort_: - -.. _io_realm_RealmList_sort_String_____io_realm_Sort_: - -.. _io_realm_RealmList_sort_String____Sort_: - -.. _io_realm_RealmList_sort_String_____Sort_: - -.. _io_realm_RealmList_sort_String____Sort____: - -.. _io_realm_RealmList_sort_String_____Sort____: - -.. _sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort____: - -.. _sort_java_lang_String__Sort____: - -.. _sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort_: - -.. _sort_String_Sort_: - -.. _sort_String__Sort_: - -.. _sort_String_Sort____: - -.. _sort_String__Sort____: - -.. _sort_String____io_realm_Sort_: - -.. _sort_String_____io_realm_Sort_: - -.. _sort_String____Sort_: - -.. _sort_String_____Sort_: - -.. _sort_String____Sort____: - -.. _sort_String_____Sort____: - -.. _RealmList_sort_java_lang_String_io_realm_Sort_: - -.. _RealmList_sort_java_lang_String__io_realm_Sort_: - -.. _RealmList_sort_java_lang_String_Sort_: - -.. _RealmList_sort_java_lang_String__Sort_: - -.. _RealmList_sort_java_lang_String_Sort____: - -.. _RealmList_sort_java_lang_String__Sort____: - -.. _RealmList_sort_String_io_realm_Sort_: - -.. _RealmList_sort_String__io_realm_Sort_: - -.. _RealmList_sort_String_Sort_: - -.. _RealmList_sort_String__Sort_: - -.. _RealmList_sort_String_Sort____: - -.. _RealmList_sort_String__Sort____: - -.. _RealmList_sort_String____io_realm_Sort_: - -.. _RealmList_sort_String_____io_realm_Sort_: - -.. _RealmList_sort_String____Sort_: - -.. _RealmList_sort_String_____Sort_: - -.. _RealmList_sort_String____Sort____: - -.. _RealmList_sort_String_____Sort____: - -.. _io_realm_RealmList_sort_String[]__Sort[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `java.lang.String[] `__ fieldNames, - | :ref:`io.realm.Sort[] ` sortOrders - | ) - - - - - * - Sorts a collection based on the provided fields and sort orders. - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - - - - - -.. _io_realm_RealmList_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_Sort_String_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__Sort__String__Sort_: - -.. _io_realm_RealmList_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmList_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_RealmList_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_String_io_realm_Sort_String_Sort_: - -.. _io_realm_RealmList_sort_String__io_realm_Sort__String__Sort_: - -.. _io_realm_RealmList_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_String_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmList_sort_String__Sort__java_lang_String__Sort_: - -.. _io_realm_RealmList_sort_String_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_String__Sort__String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_String_Sort_String_Sort_: - -.. _io_realm_RealmList_sort_String__Sort__String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_String_Sort_: - -.. _sort_java_lang_String__Sort__String__Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_String_Sort_: - -.. _sort_String__io_realm_Sort__String__Sort_: - -.. _sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_Sort_java_lang_String_Sort_: - -.. _sort_String__Sort__java_lang_String__Sort_: - -.. _sort_String_Sort_String_io_realm_Sort_: - -.. _sort_String__Sort__String__io_realm_Sort_: - -.. _sort_String_Sort_String_Sort_: - -.. _sort_String__Sort__String__Sort_: - -.. _RealmList_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmList_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _RealmList_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _RealmList_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _RealmList_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _RealmList_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _RealmList_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _RealmList_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _RealmList_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmList_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _RealmList_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _RealmList_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _RealmList_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _RealmList_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _RealmList_sort_java_lang_String_Sort_String_Sort_: - -.. _RealmList_sort_java_lang_String__Sort__String__Sort_: - -.. _RealmList_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmList_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _RealmList_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _RealmList_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _RealmList_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _RealmList_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _RealmList_sort_String_io_realm_Sort_String_Sort_: - -.. _RealmList_sort_String__io_realm_Sort__String__Sort_: - -.. _RealmList_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmList_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _RealmList_sort_String_Sort_java_lang_String_Sort_: - -.. _RealmList_sort_String__Sort__java_lang_String__Sort_: - -.. _RealmList_sort_String_Sort_String_io_realm_Sort_: - -.. _RealmList_sort_String__Sort__String__io_realm_Sort_: - -.. _RealmList_sort_String_Sort_String_Sort_: - -.. _RealmList_sort_String__Sort__String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - - - * - Sorts a collection based on the provided fields and sort orders. - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - - - - - -.. _io_realm_RealmList_sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String_Sort_: - -.. _io_realm_RealmList_sort_java_lang_String__Sort_: - -.. _io_realm_RealmList_sort_String_io_realm_Sort_: - -.. _io_realm_RealmList_sort_String__io_realm_Sort_: - -.. _io_realm_RealmList_sort_String_Sort_: - -.. _io_realm_RealmList_sort_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort_: - -.. _sort_String_Sort_: - -.. _sort_String__Sort_: - -.. _RealmList_sort_java_lang_String_io_realm_Sort_: - -.. _RealmList_sort_java_lang_String__io_realm_Sort_: - -.. _RealmList_sort_java_lang_String_Sort_: - -.. _RealmList_sort_java_lang_String__Sort_: - -.. _RealmList_sort_String_io_realm_Sort_: - -.. _RealmList_sort_String__io_realm_Sort_: - -.. _RealmList_sort_String_Sort_: - -.. _RealmList_sort_String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName, - | :ref:`Sort ` sortOrder - | ) - - - - - * - Sorts a collection based on the provided field and sort order. - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - - - - - -.. _io_realm_RealmList_sort_java_lang_String_: - -.. _io_realm_RealmList_sort_String_: - -.. _sort_java_lang_String_: - -.. _sort_String_: - -.. _RealmList_sort_java_lang_String_: - -.. _RealmList_sort_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName - | ) - - - - - * - Sorts a collection based on the provided field in ascending order. - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - - - - - - - -.. _sum: - -.. _sum__: - -.. _RealmList_sum: - -.. _RealmList_sum__: - -.. _io_realm_RealmList_sum: - -.. _io_realm_RealmList_sum__: - - - -sum ----- - -.. _io_realm_RealmList_sum_java_lang_String_: - -.. _io_realm_RealmList_sum_String_: - -.. _sum_java_lang_String_: - -.. _sum_String_: - -.. _RealmList_sum_java_lang_String_: - -.. _RealmList_sum_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`sum ` ( - | `String `__ fieldName - | ) - - - - - * - Calculates the sum of a given field. - - - - - - - **Returns** - - the sum. If no objects exist or they all have ``null`` as the value for the given field, ``0`` will be returned. When computing the sum, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _RealmList_toString: - -.. _RealmList_toString__: - -.. _io_realm_RealmList_toString: - -.. _io_realm_RealmList_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `AbstractCollection `__ - - - - - - -.. _where: - -.. _where__: - -.. _RealmList_where: - -.. _RealmList_where__: - -.. _io_realm_RealmList_where: - -.. _io_realm_RealmList_where__: - - - -where ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`where ` () - | - - - - - * - Returns a RealmQuery, which can be used to query for specific objects of this class. - - - - - - - **Returns** - - a RealmQuery object. - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmQuery ` - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmMap.txt b/source/sdk/temp/java/api/io/realm/RealmMap.txt deleted file mode 100644 index 6bf49f6b03..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmMap.txt +++ /dev/null @@ -1,1502 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmMap -^^^^^^^^^^^^^^ - -.. _io_realm_RealmMap: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmMap - - -**Implemented interfaces:** - - - -- `java.util.Map `__ - - -RealmMap is used to map keys to values. A RealmMap cannot contain duplicate keys and each key can map to at most one value. A RealmMap cannot have ``null`` keys but can have ``null`` values. - -Similarly to :ref:`RealmList ` s, a RealmDictionary can operate in managed and unmanaged modes. In managed mode a RealmDictionary persists all its contents inside a Realm whereas in unmanaged mode it functions like a `HashMap `__ . - - - -Managed RealmDictionaries can only be created by Realm and will automatically update its content whenever the underlying Realm is updated. Managed RealmDictionaries can only be accessed using the getter that points to a RealmDictionary field of a :ref:`RealmObject ` . - - - -Unmanaged RealmDictionaries can be created by the user and can contain both managed and unmanaged RealmObjects. This is useful when dealing with JSON deserializers like GSON or other frameworks that inject values into a class. Unmanaged RealmMaps can be added to a Realm using the :ref:`Realm.copyToRealm(Iterable, ImportFlag...) ` method. - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - Adds a change listener to this :ref:`RealmMap ` . - - - - - - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.MapChangeListener\ ` listener - | ) - - - Adds a change listener to this :ref:`RealmMap ` . - - - - - - - * - public **void** - - | :ref:`clear ` () - | - - - - - - - - * - public **boolean** - - | :ref:`containsKey ` ( - | `Object `__ key - | ) - - - - - - - - * - public **boolean** - - | :ref:`containsValue ` ( - | `Object `__ value - | ) - - - - - - - - * - public `Set `__ - - | :ref:`entrySet ` () - | - - - - - - - - * - public :ref:`RealmMap ` - - | :ref:`freeze ` () - | - - - - - - - - * - public **V** - - | :ref:`get ` ( - | `Object `__ key - | ) - - - - - - - - * - public **boolean** - - | :ref:`isEmpty ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isFrozen ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`isManaged ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`isValid ` () - | - - - - - - - - - - * - public `Set `__ - - | :ref:`keySet ` () - | - - - - - - - - * - public **V** - - | :ref:`put ` ( - | **K** key, - | **V** value - | ) - - - - - - - - * - public **void** - - | :ref:`putAll ` ( - | `java.util.Map\ `__ m - | ) - - - - - - - - * - public **V** - - | :ref:`remove ` ( - | `Object `__ key - | ) - - - - - - - - * - public **void** - - | :ref:`removeAllChangeListeners ` () - | - - - Removes all user-defined change listeners. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - Removes the specified change listener. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.MapChangeListener\ ` listener - | ) - - - Removes the specified change listener. - - - - - * - public **int** - - | :ref:`size ` () - | - - - - - - - - * - public `Collection `__ - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _addChangeListener: - -.. _addChangeListener__: - -.. _RealmMap_addChangeListener: - -.. _RealmMap_addChangeListener__: - -.. _io_realm_RealmMap_addChangeListener: - -.. _io_realm_RealmMap_addChangeListener__: - - - -addChangeListener ------------------ - -.. _io_realm_RealmMap_addChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmMap_addChangeListener_RealmChangeListener_: - -.. _addChangeListener_io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmChangeListener_: - -.. _RealmMap_addChangeListener_io_realm_RealmChangeListener_: - -.. _RealmMap_addChangeListener_RealmChangeListener_: - -.. _io_realm_RealmMap_addChangeListener_RealmChangeListener_RealmMap_K__V___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - - - * - Adds a change listener to this :ref:`RealmMap ` . - - Registering a change listener will not prevent the underlying RealmMap from being garbage collected. If the RealmMap is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private RealmMap dogs; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - dogs = realm.where(Person.class).findFirst().getDogs(); - dogs.addChangeListener(new RealmChangeListener>() { - @Override - public void onChange(RealmMap map) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - -.. _io_realm_RealmMap_addChangeListener_io_realm_MapChangeListener_: - -.. _io_realm_RealmMap_addChangeListener_MapChangeListener_: - -.. _addChangeListener_io_realm_MapChangeListener_: - -.. _addChangeListener_MapChangeListener_: - -.. _RealmMap_addChangeListener_io_realm_MapChangeListener_: - -.. _RealmMap_addChangeListener_MapChangeListener_: - -.. _io_realm_RealmMap_addChangeListener_MapChangeListener_K__V__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.MapChangeListener\ ` listener - | ) - - - - - * - Adds a change listener to this :ref:`RealmMap ` . - - Registering a change listener will not prevent the underlying RealmMap from being garbage collected. If the RealmMap is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private RealmMap dogs; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - dogs = realm.where(Person.class).findFirst().getDogs(); - dogs.addChangeListener(new MapChangeListener() { - @Override - public void onChange(RealmMap map, MapChangeSet changeSet) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - - - -.. _clear: - -.. _clear__: - -.. _RealmMap_clear: - -.. _RealmMap_clear__: - -.. _io_realm_RealmMap_clear: - -.. _io_realm_RealmMap_clear__: - - - -clear ------ - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`clear ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _containsKey: - -.. _containsKey__: - -.. _RealmMap_containsKey: - -.. _RealmMap_containsKey__: - -.. _io_realm_RealmMap_containsKey: - -.. _io_realm_RealmMap_containsKey__: - - - -containsKey ------------ - -.. _io_realm_RealmMap_containsKey_java_lang_Object_: - -.. _io_realm_RealmMap_containsKey_Object_: - -.. _containsKey_java_lang_Object_: - -.. _containsKey_Object_: - -.. _RealmMap_containsKey_java_lang_Object_: - -.. _RealmMap_containsKey_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`containsKey ` ( - | `Object `__ key - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _containsValue: - -.. _containsValue__: - -.. _RealmMap_containsValue: - -.. _RealmMap_containsValue__: - -.. _io_realm_RealmMap_containsValue: - -.. _io_realm_RealmMap_containsValue__: - - - -containsValue -------------- - -.. _io_realm_RealmMap_containsValue_java_lang_Object_: - -.. _io_realm_RealmMap_containsValue_Object_: - -.. _containsValue_java_lang_Object_: - -.. _containsValue_Object_: - -.. _RealmMap_containsValue_java_lang_Object_: - -.. _RealmMap_containsValue_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`containsValue ` ( - | `Object `__ value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _entrySet: - -.. _entrySet__: - -.. _RealmMap_entrySet: - -.. _RealmMap_entrySet__: - -.. _io_realm_RealmMap_entrySet: - -.. _io_realm_RealmMap_entrySet__: - - - -entrySet --------- - -.. list-table:: - :header-rows: 1 - - * - | public `Set `__ :ref:`entrySet ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _freeze: - -.. _freeze__: - -.. _RealmMap_freeze: - -.. _RealmMap_freeze__: - -.. _io_realm_RealmMap_freeze: - -.. _io_realm_RealmMap_freeze__: - - - -freeze ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmMap ` :ref:`freeze ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _get: - -.. _get__: - -.. _RealmMap_get: - -.. _RealmMap_get__: - -.. _io_realm_RealmMap_get: - -.. _io_realm_RealmMap_get__: - - - -get ----- - -.. _io_realm_RealmMap_get_java_lang_Object_: - -.. _io_realm_RealmMap_get_Object_: - -.. _get_java_lang_Object_: - -.. _get_Object_: - -.. _RealmMap_get_java_lang_Object_: - -.. _RealmMap_get_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **V** :ref:`get ` ( - | `Object `__ key - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _isEmpty: - -.. _isEmpty__: - -.. _RealmMap_isEmpty: - -.. _RealmMap_isEmpty__: - -.. _io_realm_RealmMap_isEmpty: - -.. _io_realm_RealmMap_isEmpty__: - - - -isEmpty -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEmpty ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _isFrozen: - -.. _isFrozen__: - -.. _RealmMap_isFrozen: - -.. _RealmMap_isFrozen__: - -.. _io_realm_RealmMap_isFrozen: - -.. _io_realm_RealmMap_isFrozen__: - - - -isFrozen --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isFrozen ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _isManaged: - -.. _isManaged__: - -.. _RealmMap_isManaged: - -.. _RealmMap_isManaged__: - -.. _io_realm_RealmMap_isManaged: - -.. _io_realm_RealmMap_isManaged__: - - - -isManaged ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isManaged ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _isValid: - -.. _isValid__: - -.. _RealmMap_isValid: - -.. _RealmMap_isValid__: - -.. _io_realm_RealmMap_isValid: - -.. _io_realm_RealmMap_isValid__: - - - -isValid -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isValid ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _keySet: - -.. _keySet__: - -.. _RealmMap_keySet: - -.. _RealmMap_keySet__: - -.. _io_realm_RealmMap_keySet: - -.. _io_realm_RealmMap_keySet__: - - - -keySet ------- - -.. list-table:: - :header-rows: 1 - - * - | public `Set `__ :ref:`keySet ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _put: - -.. _put__: - -.. _RealmMap_put: - -.. _RealmMap_put__: - -.. _io_realm_RealmMap_put: - -.. _io_realm_RealmMap_put__: - - - -put ----- - -.. _io_realm_RealmMap_put_K_V_: - -.. _io_realm_RealmMap_put_K__V_: - -.. _put_K_V_: - -.. _put_K__V_: - -.. _RealmMap_put_K_V_: - -.. _RealmMap_put_K__V_: - -.. list-table:: - :header-rows: 1 - - * - | public **V** :ref:`put ` ( - | **K** key, - | **V** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _putAll: - -.. _putAll__: - -.. _RealmMap_putAll: - -.. _RealmMap_putAll__: - -.. _io_realm_RealmMap_putAll: - -.. _io_realm_RealmMap_putAll__: - - - -putAll ------- - -.. _io_realm_RealmMap_putAll_java_util_Map_: - -.. _io_realm_RealmMap_putAll_Map_: - -.. _io_realm_RealmMap_putAll_Map___extends_K____extends_V__: - -.. _putAll_java_util_Map_: - -.. _putAll_Map_: - -.. _putAll_Map___extends_K____extends_V__: - -.. _RealmMap_putAll_java_util_Map_: - -.. _RealmMap_putAll_Map_: - -.. _RealmMap_putAll_Map___extends_K____extends_V__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`putAll ` ( - | `java.util.Map\ `__ m - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _remove: - -.. _remove__: - -.. _RealmMap_remove: - -.. _RealmMap_remove__: - -.. _io_realm_RealmMap_remove: - -.. _io_realm_RealmMap_remove__: - - - -remove ------- - -.. _io_realm_RealmMap_remove_java_lang_Object_: - -.. _io_realm_RealmMap_remove_Object_: - -.. _remove_java_lang_Object_: - -.. _remove_Object_: - -.. _RealmMap_remove_java_lang_Object_: - -.. _RealmMap_remove_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **V** :ref:`remove ` ( - | `Object `__ key - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _removeAllChangeListeners: - -.. _removeAllChangeListeners__: - -.. _RealmMap_removeAllChangeListeners: - -.. _RealmMap_removeAllChangeListeners__: - -.. _io_realm_RealmMap_removeAllChangeListeners: - -.. _io_realm_RealmMap_removeAllChangeListeners__: - - - -removeAllChangeListeners ------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeAllChangeListeners ` () - | - - - - - * - Removes all user-defined change listeners. - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if you try to remove listeners from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _removeChangeListener: - -.. _removeChangeListener__: - -.. _RealmMap_removeChangeListener: - -.. _RealmMap_removeChangeListener__: - -.. _io_realm_RealmMap_removeChangeListener: - -.. _io_realm_RealmMap_removeChangeListener__: - - - -removeChangeListener --------------------- - -.. _io_realm_RealmMap_removeChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmMap_removeChangeListener_RealmChangeListener_: - -.. _removeChangeListener_io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmChangeListener_: - -.. _RealmMap_removeChangeListener_io_realm_RealmChangeListener_: - -.. _RealmMap_removeChangeListener_RealmChangeListener_: - -.. _io_realm_RealmMap_removeChangeListener_RealmChangeListener_RealmMap_K__V___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - -.. _io_realm_RealmMap_removeChangeListener_io_realm_MapChangeListener_: - -.. _io_realm_RealmMap_removeChangeListener_MapChangeListener_: - -.. _removeChangeListener_io_realm_MapChangeListener_: - -.. _removeChangeListener_MapChangeListener_: - -.. _RealmMap_removeChangeListener_io_realm_MapChangeListener_: - -.. _RealmMap_removeChangeListener_MapChangeListener_: - -.. _io_realm_RealmMap_removeChangeListener_MapChangeListener_K__V__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.MapChangeListener\ ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - - - -.. _size: - -.. _size__: - -.. _RealmMap_size: - -.. _RealmMap_size__: - -.. _io_realm_RealmMap_size: - -.. _io_realm_RealmMap_size__: - - - -size ----- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`size ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _RealmMap_values: - -.. _RealmMap_values__: - -.. _io_realm_RealmMap_values: - -.. _io_realm_RealmMap_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public `Collection `__ :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmMigration.txt b/source/sdk/temp/java/api/io/realm/RealmMigration.txt deleted file mode 100644 index ef12a615d4..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmMigration.txt +++ /dev/null @@ -1,196 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmMigration -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmMigration: - - - -io.realm -======== - -The RealmMigration class is used to perform the migration of one Realm schema to another. The schema for a Realm is defined by all classes in a project that extend :ref:`io.realm.RealmObject ` or implement :ref:`io.realm.RealmModel ` , so any changes to these classes will require a migration. - -To support migrations from any previous schemaVersion to the newest, the following pattern is recommended when writing a migration: - - - -.. code-block:: java - - - public class CustomMigration implements RealmMigration { - @Override - public long migrate(DynamicRealm realm, long oldVersion, long newVersion) { - RealmSchema schema = realm.getSchema(); - - if (oldVersion == 0) { - // Migrate from v0 to v1 - oldVersion++; - } - - if (oldVersion == 1) { - // Migrate from v1 to v2 - oldVersion++; - } - - if (oldVersion < newVersion) { - throw new IllegalStateException(String.format(Locale.US, "Migration missing from v%d to v%d", oldVersion, newVersion)); - } - } - } - - - - - -During development when RealmObject classes can change frequently, it is possible to use :ref:`io.realm.Realm.deleteRealm(RealmConfiguration) ` . This will delete the database file and eliminate the need for any migrations. - - - - - - -.. seealso:: - - - - - :ref:`io.realm.RealmConfiguration.Builder.schemaVersion(long) ` - - - - - :ref:`io.realm.RealmConfiguration.Builder.migration(RealmMigration) ` - - - - - :ref:`io.realm.RealmConfiguration.Builder.deleteRealmIfMigrationNeeded() ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`migrate ` ( - | :ref:`DynamicRealm ` realm, - | **long** oldVersion, - | **long** newVersion - | ) - - - This method will be called if a migration is needed. - - - - - - - -Method Detail -============= - -.. _migrate: - -.. _migrate__: - -.. _RealmMigration_migrate: - -.. _RealmMigration_migrate__: - -.. _io_realm_RealmMigration_migrate: - -.. _io_realm_RealmMigration_migrate__: - - - -migrate -------- - -.. _io_realm_RealmMigration_migrate_io_realm_DynamicRealm_long_long_: - -.. _io_realm_RealmMigration_migrate_io_realm_DynamicRealm__long__long_: - -.. _io_realm_RealmMigration_migrate_DynamicRealm_long_long_: - -.. _io_realm_RealmMigration_migrate_DynamicRealm__long__long_: - -.. _migrate_io_realm_DynamicRealm_long_long_: - -.. _migrate_io_realm_DynamicRealm__long__long_: - -.. _migrate_DynamicRealm_long_long_: - -.. _migrate_DynamicRealm__long__long_: - -.. _RealmMigration_migrate_io_realm_DynamicRealm_long_long_: - -.. _RealmMigration_migrate_io_realm_DynamicRealm__long__long_: - -.. _RealmMigration_migrate_DynamicRealm_long_long_: - -.. _RealmMigration_migrate_DynamicRealm__long__long_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`migrate ` ( - | :ref:`DynamicRealm ` realm, - | **long** oldVersion, - | **long** newVersion - | ) - - - - - * - This method will be called if a migration is needed. The entire method is wrapped in a write transaction so it is possible to create, update or delete any existing objects without wrapping it in your own transaction. - - - - - **Parameters** - - - ``realm`` - the Realm schema on which to perform the migration. - - - - - ``oldVersion`` - the schema version of the Realm at the start of the migration. - - - - - ``newVersion`` - the schema version of the Realm after executing the migration. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmModel.txt b/source/sdk/temp/java/api/io/realm/RealmModel.txt deleted file mode 100644 index f5b201f1cc..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmModel.txt +++ /dev/null @@ -1,60 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmModel -^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmModel: - - - -io.realm -======== - -Interface for marking classes as RealmObjects, it can be used instead of extending :ref:`RealmObject ` . - -All helper methods available to classes that extend RealmObject are instead available as static methods: - - - -.. code-block:: java - - - Person p = realm.createObject(Person.class); - - // With the RealmModel interface - RealmObject.isValid(p); - - // With the RealmObject base class - p.isValid(); - - - - - -Note: Object implementing this interface needs also to be annotated with :ref:`RealmClass ` , so the annotation processor can generate the underlining proxy class. - - - - - - -.. seealso:: - - - - - :ref:`RealmObject ` - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmObject.txt b/source/sdk/temp/java/api/io/realm/RealmObject.txt deleted file mode 100644 index c688f0f520..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmObject.txt +++ /dev/null @@ -1,2978 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmObject -^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmObject: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmObject - - -**Implemented interfaces:** - - - -- :ref:`io.realm.RealmModel ` - - -In Realm you define your RealmObject classes by sub-classing RealmObject and adding fields to be persisted. You then create your objects within a Realm, and use your custom subclasses instead of using the RealmObject class directly.An annotation processor will create a proxy class for your RealmObject subclass. - -The following field data types are supported: - - - -- boolean/Boolean - - -- short/Short - - -- int/Integer - - -- long/Long - - -- float/Float - - -- double/Double - - -- byte[] - - -- String - - -- Date - - -- UUID - - -- org.bson.types.Decimal128 - - -- org.bson.types.ObjectId - - -- Any RealmObject subclass - - -- RealmList - - -- RealmDictionary - - - - -The types ``short`` , ``int`` , and ``long`` are mapped to ``long`` when storing within a Realm. - -The only restriction a RealmObject has is that fields are not allowed to be final or volatile. Any method as well as public fields are allowed. When providing custom constructors, a public constructor with no arguments must be declared. - -Fields annotated with :ref:`io.realm.annotations.Ignore ` don't have these restrictions and don't require either a getter or setter. - - - -Realm will create indexes for fields annotated with :ref:`io.realm.annotations.Index ` . This will speedup queries but will have a negative impact on inserts and updates. - - - -A RealmObject cannot be passed between different threads. - - - - -.. seealso:: - - - - - :ref:`Realm.createObject(Class) ` - - - - - :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` - - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmObject ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static **void** - - | :ref:`addChangeListener ` <**E** >( - | **E** object, - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - Adds a change listener to a RealmObject that will be triggered if any value field or referenced RealmObject field is changed, or the RealmList field itself is changed. - - - - - * - public static **void** - - | :ref:`addChangeListener ` <**E** >( - | **E** object, - | :ref:`io.realm.RealmObjectChangeListener\ ` listener - | ) - - - Adds a change listener to a RealmObject to get detailed information about the changes. - - - - - * - public final **void** - - | :ref:`addChangeListener ` <**E** >( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - Adds a change listener to this RealmObject that will be triggered if any value field or referenced RealmObject field is changed, or the RealmList field itself is changed. - - - - - * - public final **void** - - | :ref:`addChangeListener ` <**E** >( - | :ref:`io.realm.RealmObjectChangeListener\ ` listener - | ) - - - Adds a change listener to this RealmObject to get detailed information about changes. - - - - - * - public static **** - - | :ref:`asChangesetObservable ` <**E** >( - | **E** object - | ) - - - Returns an Rx Observable that monitors changes to this RealmObject. - - - - - * - public final **** - - | :ref:`asChangesetObservable ` <**E** >() - | - - - Returns an Rx Observable that monitors changes to this RealmObject. - - - - - * - public static **** - - | :ref:`asFlowable ` <**E** >( - | **E** object - | ) - - - Returns an RxJava Flowable that monitors changes to this RealmObject. - - - - - * - public final **** - - | :ref:`asFlowable ` <**E** >() - | - - - Returns an RxJava Flowable that monitors changes to this RealmObject. - - - - - * - public static **void** - - | :ref:`deleteFromRealm ` <**E** >( - | **E** object - | ) - - - Deletes the object from the Realm it is currently associated with. - - - - - * - public final **void** - - | :ref:`deleteFromRealm ` () - | - - - Deletes the object from the Realm it is currently associated to. - - - - - * - public static **E** - - | :ref:`freeze ` <**E** >( - | **E** object - | ) - - - Returns a frozen snapshot of this object. - - - - - * - public final **E** - - | :ref:`freeze ` <**E** >() - | - - - Returns a frozen snapshot of this object. - - - - - * - public static :ref:`Realm ` - - | :ref:`getRealm ` ( - | :ref:`RealmModel ` model - | ) - - - returns :ref:`Realm ` instance where the ``model`` belongs. - - - - - - - * - public :ref:`Realm ` - - | :ref:`getRealm ` () - | - - - Returns :ref:`Realm ` instance where this :ref:`RealmObject ` belongs. - - - - - - - * - public static **boolean** - - | :ref:`isFrozen ` <**E** >( - | **E** object - | ) - - - Returns whether or not this RealmObject is frozen. - - - - - * - public final **boolean** - - | :ref:`isFrozen ` () - | - - - Returns whether or not this RealmObject is frozen. - - - - - * - public static **boolean** - - | :ref:`isLoaded ` <**E** >( - | **E** object - | ) - - - Checks if the query used to find this RealmObject has completed. - - - - - * - public final **boolean** - - | :ref:`isLoaded ` () - | - - - Checks if the query used to find this RealmObject has completed. - - - - - * - public static **boolean** - - | :ref:`isManaged ` <**E** >( - | **E** object - | ) - - - Checks if this object is managed by Realm. - - - - - * - public **boolean** - - | :ref:`isManaged ` () - | - - - Checks if this object is managed by Realm. - - - - - * - public static **boolean** - - | :ref:`isValid ` <**E** >( - | **E** object - | ) - - - Checks if the RealmObject is still valid to use i.e., the RealmObject hasn't been deleted nor has the :ref:`io.realm.Realm ` been closed. - - - - - - - * - public final **boolean** - - | :ref:`isValid ` () - | - - - Checks if the RealmObject is still valid to use i.e., the RealmObject hasn't been deleted nor has the :ref:`io.realm.Realm ` been closed. - - - - - - - * - public static **boolean** - - | :ref:`load ` <**E** >( - | **E** object - | ) - - - Makes an asynchronous query blocking. - - - - - * - public final **boolean** - - | :ref:`load ` () - | - - - Makes an asynchronous query blocking. - - - - - * - public static **void** - - | :ref:`removeAllChangeListeners ` <**E** >( - | **E** object - | ) - - - Removes all registered listeners from the given RealmObject. - - - - - * - public final **void** - - | :ref:`removeAllChangeListeners ` () - | - - - Removes all registered listeners. - - - - - * - public static **void** - - | :ref:`removeChangeListener ` <**E** >( - | **E** object, - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - Removes a previously registered listener on the given RealmObject. - - - - - * - public static **void** - - | :ref:`removeChangeListener ` <**E** >( - | **E** object, - | :ref:`io.realm.RealmObjectChangeListener ` listener - | ) - - - Removes a previously registered listener on the given RealmObject. - - - - - * - public final **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener ` listener - | ) - - - Removes a previously registered listener. - - - - - * - public final **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmObjectChangeListener ` listener - | ) - - - Removes a previously registered listener. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _RealmObject: - -.. _RealmObject__: - -.. _io_realm_RealmObject: - -.. _io_realm_RealmObject__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmObject ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _addChangeListener: - -.. _addChangeListener__: - -.. _RealmObject_addChangeListener: - -.. _RealmObject_addChangeListener__: - -.. _io_realm_RealmObject_addChangeListener: - -.. _io_realm_RealmObject_addChangeListener__: - - - -addChangeListener ------------------ - -.. _io_realm_RealmObject_addChangeListener_E_io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_E__io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_E_RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_E__RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmModel_io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmModel__io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmModel_RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmModel__RealmChangeListener_: - -.. _addChangeListener_E_io_realm_RealmChangeListener_: - -.. _addChangeListener_E__io_realm_RealmChangeListener_: - -.. _addChangeListener_E_RealmChangeListener_: - -.. _addChangeListener_E__RealmChangeListener_: - -.. _addChangeListener_RealmModel_io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmModel__io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmModel_RealmChangeListener_: - -.. _addChangeListener_RealmModel__RealmChangeListener_: - -.. _RealmObject_addChangeListener_E_io_realm_RealmChangeListener_: - -.. _RealmObject_addChangeListener_E__io_realm_RealmChangeListener_: - -.. _RealmObject_addChangeListener_E_RealmChangeListener_: - -.. _RealmObject_addChangeListener_E__RealmChangeListener_: - -.. _RealmObject_addChangeListener_RealmModel_io_realm_RealmChangeListener_: - -.. _RealmObject_addChangeListener_RealmModel__io_realm_RealmChangeListener_: - -.. _RealmObject_addChangeListener_RealmModel_RealmChangeListener_: - -.. _RealmObject_addChangeListener_RealmModel__RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_E__RealmChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`addChangeListener ` <**E** >( - | **E** object, - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - - - * - Adds a change listener to a RealmObject that will be triggered if any value field or referenced RealmObject field is changed, or the RealmList field itself is changed.Registering a change listener will not prevent the underlying RealmObject from being garbage collected. If the RealmObject is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private Person person; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - person = realm.where(Person.class).findFirst(); - person.addChangeListener(new RealmChangeListener() { - @Override - public void onChange(Person person) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``object`` - RealmObject to add listener to. - - - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``object`` is ``null`` or an unmanaged object, or the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or **IntentService** thread. - - - - - - - `IllegalStateException `__ - if you try to add a listener inside a transaction. - - - - - - - - - - -.. _io_realm_RealmObject_addChangeListener_E_io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_E__io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_E_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_E__RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmModel_io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmModel__io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmModel_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmModel__RealmObjectChangeListener_: - -.. _addChangeListener_E_io_realm_RealmObjectChangeListener_: - -.. _addChangeListener_E__io_realm_RealmObjectChangeListener_: - -.. _addChangeListener_E_RealmObjectChangeListener_: - -.. _addChangeListener_E__RealmObjectChangeListener_: - -.. _addChangeListener_RealmModel_io_realm_RealmObjectChangeListener_: - -.. _addChangeListener_RealmModel__io_realm_RealmObjectChangeListener_: - -.. _addChangeListener_RealmModel_RealmObjectChangeListener_: - -.. _addChangeListener_RealmModel__RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_E_io_realm_RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_E__io_realm_RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_E_RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_E__RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_RealmModel_io_realm_RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_RealmModel__io_realm_RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_RealmModel_RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_RealmModel__RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_E__RealmObjectChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`addChangeListener ` <**E** >( - | **E** object, - | :ref:`io.realm.RealmObjectChangeListener\ ` listener - | ) - - - - - * - Adds a change listener to a RealmObject to get detailed information about the changes. The listener will be triggered if any value field or referenced RealmObject field is changed, or the RealmList field itself is changed.Registering a change listener will not prevent the underlying RealmObject from being garbage collected. If the RealmObject is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private Person person; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - person = realm.where(Person.class).findFirst(); - person.addChangeListener(new RealmObjectChangeListener() { - @Override - public void onChange(Person person, ObjectChangeSet changeSet) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``object`` - RealmObject to add listener to. - - - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``object`` is ``null`` or an unmanaged object, or the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or **IntentService** thread. - - - - - - - `IllegalStateException `__ - if you try to add a listener inside a transaction. - - - - - - - - - - -.. _io_realm_RealmObject_addChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmChangeListener_: - -.. _addChangeListener_io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmChangeListener_: - -.. _RealmObject_addChangeListener_io_realm_RealmChangeListener_: - -.. _RealmObject_addChangeListener_RealmChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public final **void** :ref:`addChangeListener ` <**E** >( - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - - - * - Adds a change listener to this RealmObject that will be triggered if any value field or referenced RealmObject field is changed, or the RealmList field itself is changed.Registering a change listener will not prevent the underlying RealmObject from being garbage collected. If the RealmObject is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private Person person; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - person = realm.where(Person.class).findFirst(); - person.addChangeListener(new RealmChangeListener() { - @Override - public void onChange(Person person) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` or the object is an unmanaged object. - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or **IntentService** thread. - - - - - - - `IllegalStateException `__ - if you try to add a listener inside a transaction. - - - - - - - - - - -.. _io_realm_RealmObject_addChangeListener_io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmObjectChangeListener_: - -.. _addChangeListener_io_realm_RealmObjectChangeListener_: - -.. _addChangeListener_RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_io_realm_RealmObjectChangeListener_: - -.. _RealmObject_addChangeListener_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_addChangeListener_RealmObjectChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public final **void** :ref:`addChangeListener ` <**E** >( - | :ref:`io.realm.RealmObjectChangeListener\ ` listener - | ) - - - - - * - Adds a change listener to this RealmObject to get detailed information about changes. The listener will be triggered if any value field or referenced RealmObject field is changed, or the RealmList field itself is changed.Registering a change listener will not prevent the underlying RealmObject from being garbage collected. If the RealmObject is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private Person person; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - person = realm.where(Person.class).findFirst(); - person.addChangeListener(new RealmObjectChangeListener() { - @Override - public void onChange(Person person, ObjectChangeSet changeSet) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` or the object is an unmanaged object. - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or **IntentService** thread. - - - - - - - `IllegalStateException `__ - if you try to add a listener inside a transaction. - - - - - - - - - - - - -.. _asChangesetObservable: - -.. _asChangesetObservable__: - -.. _RealmObject_asChangesetObservable: - -.. _RealmObject_asChangesetObservable__: - -.. _io_realm_RealmObject_asChangesetObservable: - -.. _io_realm_RealmObject_asChangesetObservable__: - - - -asChangesetObservable ---------------------- - -.. _io_realm_RealmObject_asChangesetObservable_E_: - -.. _io_realm_RealmObject_asChangesetObservable_RealmModel_: - -.. _asChangesetObservable_E_: - -.. _asChangesetObservable_RealmModel_: - -.. _RealmObject_asChangesetObservable_E_: - -.. _RealmObject_asChangesetObservable_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **** :ref:`asChangesetObservable ` <**E** >( - | **E** object - | ) - - - - - * - Returns an Rx Observable that monitors changes to this RealmObject. It will emit the current RealmObject when subscribed to. For each update to the RealmObject a pair consisting of the RealmObject and the :ref:`ObjectChangeSet ` will be sent. The changeset will be ``null`` the first time the RealmObject is emitted. - - The RealmObject will continually be emitted as it is updated - ``onComplete`` will never be called. - - - - Items emitted from Realm Observables are frozen (See :ref:`freeze() ` . This means that they are immutable and can be read on any thread. - - - - Realm Observables always emit items from the thread holding the live Realm. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - obj.asChangesetObservable() - .observeOn(Schedulers.computation()) - .map((rxObj, changes) -> doExpensiveWork(rxObj, changeså)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - - - - - - **Parameters** - - - ``object`` - RealmObject class that is being observed. Must be this class or its super types. - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath or the corresponding Realm instance doesn't support RxJava. - - - - - `IllegalStateException `__ - if the Realm wasn't opened on a Looper thread. - - - - - - - - - - .. seealso:: - - - - - `RxJava and Realm `__ - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **** :ref:`asChangesetObservable ` <**E** >() - | - - - - - * - Returns an Rx Observable that monitors changes to this RealmObject. It will emit the current RealmObject when subscribed to. For each update to the RealmObject a pair consisting of the RealmObject and the :ref:`ObjectChangeSet ` will be sent. The changeset will be ``null`` the first time the RealmObject is emitted. - - The RealmObject will continually be emitted as it is updated - ``onComplete`` will never be called. - - - - Items emitted from Realm Observables are frozen (See :ref:`freeze() ` . This means that they are immutable and can be read on any thread. - - - - Realm Observables always emit items from the thread holding the live Realm. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - obj.asChangesetObservable() - .observeOn(Schedulers.computation()) - .map((rxObj, changes) -> doExpensiveWork(rxObj, changeså)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath or the corresponding Realm instance doesn't support RxJava. - - - - - `IllegalStateException `__ - if the Realm wasn't opened on a Looper thread. - - - - - - - - - - .. seealso:: - - - - - `RxJava and Realm `__ - - - - - - - - - - - - - -.. _asFlowable: - -.. _asFlowable__: - -.. _RealmObject_asFlowable: - -.. _RealmObject_asFlowable__: - -.. _io_realm_RealmObject_asFlowable: - -.. _io_realm_RealmObject_asFlowable__: - - - -asFlowable ----------- - -.. _io_realm_RealmObject_asFlowable_E_: - -.. _io_realm_RealmObject_asFlowable_RealmModel_: - -.. _asFlowable_E_: - -.. _asFlowable_RealmModel_: - -.. _RealmObject_asFlowable_E_: - -.. _RealmObject_asFlowable_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **** :ref:`asFlowable ` <**E** >( - | **E** object - | ) - - - - - * - Returns an RxJava Flowable that monitors changes to this RealmObject. It will emit the current object when subscribed to. Object updates will continuously be emitted as the RealmObject is updated - ``onComplete`` will never be called. - - When chaining a RealmObject observable use ``obj.asFlowable()`` to pass on type information, otherwise the type of the following observables will be ``RealmObject`` . - - - - Items emitted from Realm Flowables are frozen (See :ref:`freeze() ` . This means that they are immutable and can be read on any thread. - - - - Realm Flowables always emit items from the thread holding the live Realm. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - obj.asFlowable() - .observeOn(Schedulers.computation()) - .map((rxObj) -> doExpensiveWork(rxObj)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - If you would like the ``asFlowable()`` to stop emitting items you can instruct RxJava to emit only the first item by using the ``first()`` operator: - - - - - - .. code-block:: java - - - obj.asFlowable() - .filter(obj -> obj.isLoaded()) - .first() - .subscribe( ... ) // You only get the object once - - - - - - - - - - - **Parameters** - - - ``object`` - RealmObject class that is being observed. Must be this class or its super types. - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath. - - - - - `IllegalStateException `__ - if the Realm wasn't opened on a Looper thread. - - - - - - - - - - .. seealso:: - - - - - `RxJava and Realm `__ - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **** :ref:`asFlowable ` <**E** >() - | - - - - - * - Returns an RxJava Flowable that monitors changes to this RealmObject. It will emit the current object when subscribed to. Object updates will continually be emitted as the RealmObject is updated - ``onComplete`` will never be called. - - When chaining a RealmObject flowable use ``obj.asFlowable()`` to pass on type information, otherwise the type of the following observables will be ``RealmObject`` . - - - - Items emitted from Realm Flowables are frozen (See :ref:`freeze() ` . This means that they are immutable and can be read on any thread. - - - - Realm Flowables always emit items from the thread holding the live Realm. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - obj.asFlowable() - .observeOn(Schedulers.computation()) - .map((rxObj) -> doExpensiveWork(rxObj)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - If you would like the ``asFlowable()`` to stop emitting items you can instruct RxJava to only emit only the first item by using the ``first()`` operator: - - - - - - .. code-block:: java - - - obj.asFlowable() - .filter(obj -> obj.isLoaded()) - .first() - .subscribe( ... ) // You only get the object once - - - - - - - - - **Type Parameters** - - - ``E`` - RealmObject class that is being observed. Must be this class or its super types. - - - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath or the corresponding Realm instance doesn't support RxJava. - - - - - `IllegalStateException `__ - if the Realm wasn't opened on a Looper thread. - - - - - - - - - - .. seealso:: - - - - - `RxJava and Realm `__ - - - - - - - - - - - - - -.. _deleteFromRealm: - -.. _deleteFromRealm__: - -.. _RealmObject_deleteFromRealm: - -.. _RealmObject_deleteFromRealm__: - -.. _io_realm_RealmObject_deleteFromRealm: - -.. _io_realm_RealmObject_deleteFromRealm__: - - - -deleteFromRealm ---------------- - -.. _io_realm_RealmObject_deleteFromRealm_E_: - -.. _io_realm_RealmObject_deleteFromRealm_RealmModel_: - -.. _deleteFromRealm_E_: - -.. _deleteFromRealm_RealmModel_: - -.. _RealmObject_deleteFromRealm_E_: - -.. _RealmObject_deleteFromRealm_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`deleteFromRealm ` <**E** >( - | **E** object - | ) - - - - - * - Deletes the object from the Realm it is currently associated with.After this method is called the object will be invalid and any operation (read or write) performed on it will fail with an IllegalStateException. - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the corresponding Realm is closed or in an incorrect thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`isValid() ` - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **void** :ref:`deleteFromRealm ` () - | - - - - - * - Deletes the object from the Realm it is currently associated to.After this method is called the object will be invalid and any operation (read or write) performed on it will fail with an IllegalStateException. - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the corresponding Realm is closed or in an incorrect thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`isValid() ` - - - - - - - - - - - - -.. _freeze: - -.. _freeze__: - -.. _RealmObject_freeze: - -.. _RealmObject_freeze__: - -.. _io_realm_RealmObject_freeze: - -.. _io_realm_RealmObject_freeze__: - - - -freeze ------- - -.. _io_realm_RealmObject_freeze_E_: - -.. _io_realm_RealmObject_freeze_RealmModel_: - -.. _freeze_E_: - -.. _freeze_RealmModel_: - -.. _RealmObject_freeze_E_: - -.. _RealmObject_freeze_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **E** :ref:`freeze ` <**E** >( - | **E** object - | ) - - - - - * - Returns a frozen snapshot of this object. The frozen copy can be read and queried from any thread without throwing an `IllegalStateException `__ . - - Freezing a RealmObject also creates a frozen Realm which has its own lifecycle, but if the live Realm that spawned the original collection is fully closed (i.e. all instances across all threads are closed), the frozen Realm and object will be closed as well. - - Frozen objects can be queried as normal, but trying to mutate it in any way or attempting to register a listener will throw an `IllegalStateException `__ . - - - - Note: Keeping a large number of frozen objects with different versions alive can have a negative impact on the filesize of the Realm. In order to avoid such a situation it is possible to set :ref:`RealmConfiguration.Builder.maxNumberOfActiveVersions(long) ` . - - - - - - - - - - - **Returns** - - a frozen copy of this object. - - - - - **Throws** - - - `IllegalStateException `__ - if this method is called from inside a write transaction. - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **E** :ref:`freeze ` <**E** >() - | - - - - - * - Returns a frozen snapshot of this object. The frozen copy can be read and queried from any thread without throwing an `IllegalStateException `__ . - - Freezing a RealmObject also creates a frozen Realm which has its own lifecycle, but if the live Realm that spawned the original collection is fully closed (i.e. all instances across all threads are closed), the frozen Realm and object will be closed as well. - - Frozen objects can be queried as normal, but trying to mutate it in any way or attempting to register a listener will throw an `IllegalStateException `__ . - - - - Note: Keeping a large number of frozen objects with different versions alive can have a negative impact on the filesize of the Realm. In order to avoid such a situation it is possible to set :ref:`RealmConfiguration.Builder.maxNumberOfActiveVersions(long) ` . - - - - - - - - - - - **Returns** - - a frozen copy of this object. - - - - - **Throws** - - - `IllegalStateException `__ - if this method is called from inside a write transaction. - - - - - - - - - - - - -.. _getRealm: - -.. _getRealm__: - -.. _RealmObject_getRealm: - -.. _RealmObject_getRealm__: - -.. _io_realm_RealmObject_getRealm: - -.. _io_realm_RealmObject_getRealm__: - - - -getRealm --------- - -.. _io_realm_RealmObject_getRealm_io_realm_RealmModel_: - -.. _io_realm_RealmObject_getRealm_RealmModel_: - -.. _getRealm_io_realm_RealmModel_: - -.. _getRealm_RealmModel_: - -.. _RealmObject_getRealm_io_realm_RealmModel_: - -.. _RealmObject_getRealm_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Realm ` :ref:`getRealm ` ( - | :ref:`RealmModel ` model - | ) - - - - - * - returns :ref:`Realm ` instance where the ``model`` belongs. - - You **must not** call **Realm.close()** against returned instance. - - - - - - - - - **Parameters** - - - ``model`` - an :ref:`RealmModel ` instance other than :ref:`DynamicRealmObject ` . - - - - - - - - - - **Returns** - - :ref:`Realm ` instance where the ``model`` belongs or ``null`` if the ``model`` is unmanaged. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``model`` is ``null`` . - - - - - - - `IllegalStateException `__ - if the ``model`` is an instance of :ref:`DynamicRealmObject ` or this object was already deleted or the corresponding :ref:`Realm ` was already closed. - - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Realm ` :ref:`getRealm ` () - | - - - - - * - Returns :ref:`Realm ` instance where this :ref:`RealmObject ` belongs. - - You **must not** call **Realm.close()** against returned instance. - - - - - - - - - - - **Returns** - - :ref:`Realm ` instance where this object belongs to or ``null`` if this object is unmanaged. - - - - - - - **Throws** - - - `IllegalStateException `__ - if this object is an instance of :ref:`DynamicRealmObject ` or this object was already deleted or the corresponding :ref:`Realm ` was already closed. - - - - - - - - - - - - - - -.. _isFrozen: - -.. _isFrozen__: - -.. _RealmObject_isFrozen: - -.. _RealmObject_isFrozen__: - -.. _io_realm_RealmObject_isFrozen: - -.. _io_realm_RealmObject_isFrozen__: - - - -isFrozen --------- - -.. _io_realm_RealmObject_isFrozen_E_: - -.. _io_realm_RealmObject_isFrozen_RealmModel_: - -.. _isFrozen_E_: - -.. _isFrozen_RealmModel_: - -.. _RealmObject_isFrozen_E_: - -.. _RealmObject_isFrozen_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **boolean** :ref:`isFrozen ` <**E** >( - | **E** object - | ) - - - - - * - Returns whether or not this RealmObject is frozen. - - - - - - - **Returns** - - ``true`` if the RealmObject is frozen, ``false`` if it is not. - - - - - - - - - - - .. seealso:: - - - - - :ref:`freeze() ` - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **boolean** :ref:`isFrozen ` () - | - - - - - * - Returns whether or not this RealmObject is frozen. - - - - - - - **Returns** - - ``true`` if the RealmObject is frozen, ``false`` if it is not. - - - - - - - - - - - .. seealso:: - - - - - :ref:`freeze() ` - - - - - - - - - - - - -.. _isLoaded: - -.. _isLoaded__: - -.. _RealmObject_isLoaded: - -.. _RealmObject_isLoaded__: - -.. _io_realm_RealmObject_isLoaded: - -.. _io_realm_RealmObject_isLoaded__: - - - -isLoaded --------- - -.. _io_realm_RealmObject_isLoaded_E_: - -.. _io_realm_RealmObject_isLoaded_RealmModel_: - -.. _isLoaded_E_: - -.. _isLoaded_RealmModel_: - -.. _RealmObject_isLoaded_E_: - -.. _RealmObject_isLoaded_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **boolean** :ref:`isLoaded ` <**E** >( - | **E** object - | ) - - - - - * - Checks if the query used to find this RealmObject has completed.Async methods like :ref:`RealmQuery.findFirstAsync() ` return an :ref:`RealmObject ` that represents the future result of the :ref:`RealmQuery ` . It can be considered similar to a `java.util.concurrent.Future `__ in this regard. - - - - Once ``isLoaded()`` returns ``true`` , the object represents the query result even if the query didn't find any object matching the query parameters. In this case the :ref:`RealmObject ` will become a "null" object. - - - - "Null" objects represents ``null`` . An exception is throw if any accessor is called, so it is important to also check :ref:`isValid() ` before calling any methods. A common pattern is: - - - - - - .. code-block:: java - - - Person person = realm.where(Person.class).findFirstAsync(); - RealmObject.isLoaded(person); // == false - RealmObject.addChangeListener(person, new RealmChangeListener() { - @Override - public void onChange(Person person) { - RealmObject.isLoaded(person); // always true here - if (RealmObject.isValid(person)) { - // It is safe to access the person. - } - } - }); - - - - - - Synchronous RealmObjects are by definition blocking hence this method will always return ``true`` for them. This method will return ``true`` if called on an unmanaged object (created outside of Realm). - - - - - - - - - **Parameters** - - - ``object`` - RealmObject to check. - - - - - - - - **Returns** - - ``true`` if the query has completed, ``false`` if the query is in progress. - - - - - - - - - - - .. seealso:: - - - - - :ref:`isValid(RealmModel) ` - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **boolean** :ref:`isLoaded ` () - | - - - - - * - Checks if the query used to find this RealmObject has completed.Async methods like :ref:`RealmQuery.findFirstAsync() ` return a :ref:`RealmObject ` that represents the future result of the :ref:`RealmQuery ` . It can be considered similar to a `java.util.concurrent.Future `__ in this regard. - - - - Once ``isLoaded()`` returns ``true`` , the object represents the query result even if the query didn't find any object matching the query parameters. In this case the :ref:`RealmObject ` will become a "null" object. - - - - "Null" objects represents ``null`` . An exception is throw if any accessor is called, so it is important to also check :ref:`isValid() ` before calling any methods. A common pattern is: - - - - - - .. code-block:: java - - - Person person = realm.where(Person.class).findFirstAsync(); - person.isLoaded(); // == false - person.addChangeListener(new RealmChangeListener() { - @Override - public void onChange(Person person) { - person.isLoaded(); // Always true here - if (person.isValid()) { - // It is safe to access the person. - } - } - }); - - - - - - Synchronous RealmObjects are by definition blocking hence this method will always return ``true`` for them. This method will return ``true`` if called on an unmanaged object (created outside of Realm). - - - - - - - - - - - **Returns** - - ``true`` if the query has completed, ``false`` if the query is in progress. - - - - - - - - - - - .. seealso:: - - - - - :ref:`isValid() ` - - - - - - - - - - - - -.. _isManaged: - -.. _isManaged__: - -.. _RealmObject_isManaged: - -.. _RealmObject_isManaged__: - -.. _io_realm_RealmObject_isManaged: - -.. _io_realm_RealmObject_isManaged__: - - - -isManaged ---------- - -.. _io_realm_RealmObject_isManaged_E_: - -.. _io_realm_RealmObject_isManaged_RealmModel_: - -.. _isManaged_E_: - -.. _isManaged_RealmModel_: - -.. _RealmObject_isManaged_E_: - -.. _RealmObject_isManaged_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **boolean** :ref:`isManaged ` <**E** >( - | **E** object - | ) - - - - - * - Checks if this object is managed by Realm. A managed object is just a wrapper around the data in the underlying Realm file. On Looper threads, a managed object will be live-updated so it always points to the latest data. It is possible to register a change listener using :ref:`addChangeListener(RealmModel, RealmChangeListener) ` to be notified when changes happen. Managed objects are thread confined so that they cannot be accessed from other threads than the one that created them. - - If this method returns ``false`` , the object is unmanaged. An unmanaged object is just a normal Java object, so it can be parsed freely across threads, but the data in the object is not connected to the underlying Realm, so it will not be live updated. - - - - It is possible to create a managed object from an unmanaged object by using :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` . An unmanaged object can be created from a managed object by using :ref:`Realm.copyFromRealm(RealmModel) ` . - - - - - - - - - - - **Returns** - - ``true`` if the object is managed, ``false`` if it is unmanaged. - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isManaged ` () - | - - - - - * - Checks if this object is managed by Realm. A managed object is just a wrapper around the data in the underlying Realm file. On Looper threads, a managed object will be live-updated so it always points to the latest data. It is possible to register a change listener using :ref:`addChangeListener(RealmChangeListener) ` to be notified when changes happen. Managed objects are thread confined so that they cannot be accessed from other threads than the one that created them. - - If this method returns ``false`` , the object is unmanaged. An unmanaged object is just a normal Java object, so it can be parsed freely across threads, but the data in the object is not connected to the underlying Realm, so it will not be live updated. - - - - It is possible to create a managed object from an unmanaged object by using :ref:`Realm.copyToRealm(RealmModel, ImportFlag...) ` . An unmanaged object can be created from a managed object by using :ref:`Realm.copyFromRealm(RealmModel) ` . - - - - - - - - - - - **Returns** - - ``true`` if the object is managed, ``false`` if it is unmanaged. - - - - - - - - - - - - - -.. _isValid: - -.. _isValid__: - -.. _RealmObject_isValid: - -.. _RealmObject_isValid__: - -.. _io_realm_RealmObject_isValid: - -.. _io_realm_RealmObject_isValid__: - - - -isValid -------- - -.. _io_realm_RealmObject_isValid_E_: - -.. _io_realm_RealmObject_isValid_RealmModel_: - -.. _isValid_E_: - -.. _isValid_RealmModel_: - -.. _RealmObject_isValid_E_: - -.. _RealmObject_isValid_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **boolean** :ref:`isValid ` <**E** >( - | **E** object - | ) - - - - - * - Checks if the RealmObject is still valid to use i.e., the RealmObject hasn't been deleted nor has the :ref:`io.realm.Realm ` been closed. It will always return ``true`` for unmanaged objects. - - - - - - - **Parameters** - - - ``object`` - RealmObject to check validity for. - - - - - - - - **Returns** - - ``true`` if the object is still accessible or an unmanaged object, ``false`` otherwise. - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **boolean** :ref:`isValid ` () - | - - - - - * - Checks if the RealmObject is still valid to use i.e., the RealmObject hasn't been deleted nor has the :ref:`io.realm.Realm ` been closed. It will always return ``true`` for unmanaged objects. - - Note that this can be used to check the validity of certain conditions such as being ``null`` when observed. - - - - - - .. code-block:: java - - - realm.where(BannerRealm.class).equalTo("type", type).findFirstAsync().asFlowable() - .filter(result.isLoaded() && result.isValid()) - .first() - - - - - - - - - - - - - **Returns** - - ``true`` if the object is still accessible or an unmanaged object, ``false`` otherwise. - - - - - - - - - - - .. seealso:: - - - - - `Examples using Realm with RxJava `__ - - - - - - - - - - - - - -.. _load: - -.. _load__: - -.. _RealmObject_load: - -.. _RealmObject_load__: - -.. _io_realm_RealmObject_load: - -.. _io_realm_RealmObject_load__: - - - -load ----- - -.. _io_realm_RealmObject_load_E_: - -.. _io_realm_RealmObject_load_RealmModel_: - -.. _load_E_: - -.. _load_RealmModel_: - -.. _RealmObject_load_E_: - -.. _RealmObject_load_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **boolean** :ref:`load ` <**E** >( - | **E** object - | ) - - - - - * - Makes an asynchronous query blocking. This will also trigger any registered listeners.Note: This will return ``true`` if called for an unmanaged object (created outside of Realm). - - - - - - - - - **Parameters** - - - ``object`` - RealmObject to force load. - - - - - - - - **Returns** - - ``true`` if it successfully completed the query, ``false`` otherwise. - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **boolean** :ref:`load ` () - | - - - - - * - Makes an asynchronous query blocking. This will also trigger any registered listeners.Note: This will return ``true`` if called for an unmanaged object (created outside of Realm). - - - - - - - - - - - **Returns** - - ``true`` if it successfully completed the query, ``false`` otherwise. - - - - - - - - - - - - - -.. _removeAllChangeListeners: - -.. _removeAllChangeListeners__: - -.. _RealmObject_removeAllChangeListeners: - -.. _RealmObject_removeAllChangeListeners__: - -.. _io_realm_RealmObject_removeAllChangeListeners: - -.. _io_realm_RealmObject_removeAllChangeListeners__: - - - -removeAllChangeListeners ------------------------- - -.. _io_realm_RealmObject_removeAllChangeListeners_E_: - -.. _io_realm_RealmObject_removeAllChangeListeners_RealmModel_: - -.. _removeAllChangeListeners_E_: - -.. _removeAllChangeListeners_RealmModel_: - -.. _RealmObject_removeAllChangeListeners_E_: - -.. _RealmObject_removeAllChangeListeners_RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`removeAllChangeListeners ` <**E** >( - | **E** object - | ) - - - - - * - Removes all registered listeners from the given RealmObject. - - - - - **Parameters** - - - ``object`` - RealmObject to remove all listeners from. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if object is ``null`` or isn't managed by Realm. - - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public final **void** :ref:`removeAllChangeListeners ` () - | - - - - - * - Removes all registered listeners. - - - - - - - - - - - - - - - -.. _removeChangeListener: - -.. _removeChangeListener__: - -.. _RealmObject_removeChangeListener: - -.. _RealmObject_removeChangeListener__: - -.. _io_realm_RealmObject_removeChangeListener: - -.. _io_realm_RealmObject_removeChangeListener__: - - - -removeChangeListener --------------------- - -.. _io_realm_RealmObject_removeChangeListener_E_io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_E__io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_E_RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_E__RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmModel_io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmModel__io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmModel_RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmModel__RealmChangeListener_: - -.. _removeChangeListener_E_io_realm_RealmChangeListener_: - -.. _removeChangeListener_E__io_realm_RealmChangeListener_: - -.. _removeChangeListener_E_RealmChangeListener_: - -.. _removeChangeListener_E__RealmChangeListener_: - -.. _removeChangeListener_RealmModel_io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmModel__io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmModel_RealmChangeListener_: - -.. _removeChangeListener_RealmModel__RealmChangeListener_: - -.. _RealmObject_removeChangeListener_E_io_realm_RealmChangeListener_: - -.. _RealmObject_removeChangeListener_E__io_realm_RealmChangeListener_: - -.. _RealmObject_removeChangeListener_E_RealmChangeListener_: - -.. _RealmObject_removeChangeListener_E__RealmChangeListener_: - -.. _RealmObject_removeChangeListener_RealmModel_io_realm_RealmChangeListener_: - -.. _RealmObject_removeChangeListener_RealmModel__io_realm_RealmChangeListener_: - -.. _RealmObject_removeChangeListener_RealmModel_RealmChangeListener_: - -.. _RealmObject_removeChangeListener_RealmModel__RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_E__RealmChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`removeChangeListener ` <**E** >( - | **E** object, - | :ref:`io.realm.RealmChangeListener\ ` listener - | ) - - - - - * - Removes a previously registered listener on the given RealmObject. - - - - - **Parameters** - - - ``object`` - RealmObject to remove listener from. - - - - - ``listener`` - the instance to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``object`` or the change listener is ``null`` . - - - - - - - `IllegalArgumentException `__ - if object is an unmanaged RealmObject. - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - -.. _io_realm_RealmObject_removeChangeListener_E_io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_E__io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_E_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_E__RealmObjectChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmModel_io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmModel__io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmModel_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmModel__RealmObjectChangeListener_: - -.. _removeChangeListener_E_io_realm_RealmObjectChangeListener_: - -.. _removeChangeListener_E__io_realm_RealmObjectChangeListener_: - -.. _removeChangeListener_E_RealmObjectChangeListener_: - -.. _removeChangeListener_E__RealmObjectChangeListener_: - -.. _removeChangeListener_RealmModel_io_realm_RealmObjectChangeListener_: - -.. _removeChangeListener_RealmModel__io_realm_RealmObjectChangeListener_: - -.. _removeChangeListener_RealmModel_RealmObjectChangeListener_: - -.. _removeChangeListener_RealmModel__RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_E_io_realm_RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_E__io_realm_RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_E_RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_E__RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_RealmModel_io_realm_RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_RealmModel__io_realm_RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_RealmModel_RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_RealmModel__RealmObjectChangeListener_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`removeChangeListener ` <**E** >( - | **E** object, - | :ref:`io.realm.RealmObjectChangeListener ` listener - | ) - - - - - * - Removes a previously registered listener on the given RealmObject. - - - - - **Parameters** - - - ``object`` - RealmObject to remove listener from. - - - - - ``listener`` - the instance to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the ``object`` or the change listener is ``null`` . - - - - - - - `IllegalArgumentException `__ - if object is an unmanaged RealmObject. - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - -.. _io_realm_RealmObject_removeChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmChangeListener_: - -.. _removeChangeListener_io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmChangeListener_: - -.. _RealmObject_removeChangeListener_io_realm_RealmChangeListener_: - -.. _RealmObject_removeChangeListener_RealmChangeListener_: - -.. list-table:: - :header-rows: 1 - - * - | public final **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener ` listener - | ) - - - - - * - Removes a previously registered listener. - - - - - **Parameters** - - - ``listener`` - the instance to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` or the object is an unmanaged object. - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - -.. _io_realm_RealmObject_removeChangeListener_io_realm_RealmObjectChangeListener_: - -.. _io_realm_RealmObject_removeChangeListener_RealmObjectChangeListener_: - -.. _removeChangeListener_io_realm_RealmObjectChangeListener_: - -.. _removeChangeListener_RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_io_realm_RealmObjectChangeListener_: - -.. _RealmObject_removeChangeListener_RealmObjectChangeListener_: - -.. list-table:: - :header-rows: 1 - - * - | public final **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmObjectChangeListener ` listener - | ) - - - - - * - Removes a previously registered listener. - - - - - **Parameters** - - - ``listener`` - the instance to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` or the object is an unmanaged object. - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmObjectChangeListener.txt b/source/sdk/temp/java/api/io/realm/RealmObjectChangeListener.txt deleted file mode 100644 index 3d659b6ecc..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmObjectChangeListener.txt +++ /dev/null @@ -1,206 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmObjectChangeListener -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmObjectChangeListener: - - - -io.realm -======== - -``RealmObjectChangeListener`` can be registered on a :ref:`RealmModel ` or :ref:`RealmObject ` to receive detailed notifications when an object changes. - -Realm instances on a thread without an `android.os.Looper `__ cannot register a ``RealmObjectChangeListener`` . - - - -Listener cannot be registered inside a transaction. - - - - -.. seealso:: - - - - - :ref:`Realm.addChangeListener(RealmChangeListener) ` - - - - - :ref:`Realm.removeAllChangeListeners() ` - - - - - :ref:`Realm.removeChangeListener(RealmChangeListener) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onChange ` ( - | **T** t, - | :ref:`ObjectChangeSet ` changeSet - | ) - - - When this gets called to return the results of an asynchronous query made by :ref:`RealmQuery.findFirstAsync() ` , ``changeSet`` will be ``null`` . - - - - - - - - - -Method Detail -============= - -.. _onChange: - -.. _onChange__: - -.. _RealmObjectChangeListener_onChange: - -.. _RealmObjectChangeListener_onChange__: - -.. _io_realm_RealmObjectChangeListener_onChange: - -.. _io_realm_RealmObjectChangeListener_onChange__: - - - -onChange --------- - -.. _io_realm_RealmObjectChangeListener_onChange_T_io_realm_ObjectChangeSet_: - -.. _io_realm_RealmObjectChangeListener_onChange_T__io_realm_ObjectChangeSet_: - -.. _io_realm_RealmObjectChangeListener_onChange_T_ObjectChangeSet_: - -.. _io_realm_RealmObjectChangeListener_onChange_T__ObjectChangeSet_: - -.. _io_realm_RealmObjectChangeListener_onChange_RealmModel_io_realm_ObjectChangeSet_: - -.. _io_realm_RealmObjectChangeListener_onChange_RealmModel__io_realm_ObjectChangeSet_: - -.. _io_realm_RealmObjectChangeListener_onChange_RealmModel_ObjectChangeSet_: - -.. _io_realm_RealmObjectChangeListener_onChange_RealmModel__ObjectChangeSet_: - -.. _onChange_T_io_realm_ObjectChangeSet_: - -.. _onChange_T__io_realm_ObjectChangeSet_: - -.. _onChange_T_ObjectChangeSet_: - -.. _onChange_T__ObjectChangeSet_: - -.. _onChange_RealmModel_io_realm_ObjectChangeSet_: - -.. _onChange_RealmModel__io_realm_ObjectChangeSet_: - -.. _onChange_RealmModel_ObjectChangeSet_: - -.. _onChange_RealmModel__ObjectChangeSet_: - -.. _RealmObjectChangeListener_onChange_T_io_realm_ObjectChangeSet_: - -.. _RealmObjectChangeListener_onChange_T__io_realm_ObjectChangeSet_: - -.. _RealmObjectChangeListener_onChange_T_ObjectChangeSet_: - -.. _RealmObjectChangeListener_onChange_T__ObjectChangeSet_: - -.. _RealmObjectChangeListener_onChange_RealmModel_io_realm_ObjectChangeSet_: - -.. _RealmObjectChangeListener_onChange_RealmModel__io_realm_ObjectChangeSet_: - -.. _RealmObjectChangeListener_onChange_RealmModel_ObjectChangeSet_: - -.. _RealmObjectChangeListener_onChange_RealmModel__ObjectChangeSet_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onChange ` ( - | **T** t, - | :ref:`ObjectChangeSet ` changeSet - | ) - - - - - * - When this gets called to return the results of an asynchronous query made by :ref:`RealmQuery.findFirstAsync() ` , ``changeSet`` will be ``null`` . - - When this gets called because the object was deleted, ``changeSet.isDeleted()`` will return ``true`` and ``changeSet.getFieldChanges()`` will return ``null`` . - - - - When this gets called because the object was modified, ``changeSet.isDeleted()`` will return ``false`` and ``changeSet.getFieldChanges()`` will return the detailed information about the fields' changes. - - - - If a field points to another RealmObject this listener will only be triggered if the field is set to a new object or null. Updating the referenced RealmObject will not trigger this listener. - - If a field points to a RealmList, this listener will only be triggered if one or multiple objects are inserted, removed or moved within the List. Updating the objects in the RealmList will not trigger this listener. - - Changes to :ref:`LinkingObjects ` annotated :ref:`RealmResults ` fields will not be monitored, nor reported through this change listener. - - - - - - - - - **Parameters** - - - ``t`` - the ``RealmObject`` this listener is registered to. - - - - - - - ``changeSet`` - the detailed information about the changes. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmObjectSchema.txt b/source/sdk/temp/java/api/io/realm/RealmObjectSchema.txt deleted file mode 100644 index 717d39df93..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmObjectSchema.txt +++ /dev/null @@ -1,3394 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmObjectSchema -^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmObjectSchema: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmObjectSchema - - -Class for interacting with the schema for a given RealmObject class. This makes it possible to inspect, add, delete or change the fields for given class.If this :ref:`RealmObjectSchema ` is retrieved from an immutable :ref:`RealmSchema ` , this :ref:`RealmObjectSchema ` will be immutable as well. - - - - - - -.. seealso:: - - - - - :ref:`io.realm.RealmMigration ` - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static interface`` - - :ref:`RealmObjectSchema.Function ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addField ` ( - | `String `__ fieldName, - | `java.lang.Class\ `__ fieldType, - | :ref:`io.realm.FieldAttribute[] ` attributes - | ) - - - Adds a new simple field to the RealmObject class. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addIndex ` ( - | `String `__ fieldName - | ) - - - Adds an index to a given field. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addPrimaryKey ` ( - | `String `__ fieldName - | ) - - - Adds a primary key to a given field. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addRealmDictionaryField ` ( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - Adds a new field that references a :ref:`RealmDictionary ` with primitive values. - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addRealmDictionaryField ` ( - | `String `__ fieldName, - | :ref:`RealmObjectSchema ` objectSchema - | ) - - - Adds a new field that contains a :ref:`RealmDictionary ` with references to other Realm model classes. - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addRealmListField ` ( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - Adds a new field that references a :ref:`RealmList ` with primitive values. - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addRealmListField ` ( - | `String `__ fieldName, - | :ref:`RealmObjectSchema ` objectSchema - | ) - - - Adds a new field that contains a :ref:`RealmList ` with references to other Realm model classes. - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addRealmObjectField ` ( - | `String `__ fieldName, - | :ref:`RealmObjectSchema ` objectSchema - | ) - - - Adds a new field that references another :ref:`RealmObject ` . - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addRealmSetField ` ( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - Adds a new field that references a :ref:`RealmSet ` with primitive values. - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`addRealmSetField ` ( - | `String `__ fieldName, - | :ref:`RealmObjectSchema ` objectSchema - | ) - - - Adds a new field that contains a :ref:`RealmSet ` with references to other Realm model classes. - - - - - - - * - public `String `__ - - | :ref:`getClassName ` () - | - - - Returns the name of the RealmObject class being represented by this schema. - - - - - * - public `Set `__ - - | :ref:`getFieldNames ` () - | - - - Returns all fields in this class. - - - - - * - public :ref:`RealmFieldType ` - - | :ref:`getFieldType ` ( - | `String `__ fieldName - | ) - - - Returns the type used by the underlying storage engine to represent this field. - - - - - * - public `String `__ - - | :ref:`getPrimaryKey ` () - | - - - Returns the name of the primary key field. - - - - - * - public **boolean** - - | :ref:`hasField ` ( - | `String `__ fieldName - | ) - - - Tests if the class has field defined with the given name. - - - - - * - public **boolean** - - | :ref:`hasIndex ` ( - | `String `__ fieldName - | ) - - - Checks if a given field has an index defined. - - - - - * - public **boolean** - - | :ref:`hasPrimaryKey ` () - | - - - Checks if the class has a primary key defined. - - - - - * - public **boolean** - - | :ref:`isEmbedded ` () - | - - - Returns ``true`` if objects of this type are considered "embedded". - - - - - - - * - public **boolean** - - | :ref:`isNullable ` ( - | `String `__ fieldName - | ) - - - Checks if a given field is nullable i.e., it is allowed to contain ``null`` values. - - - - - - - * - public **boolean** - - | :ref:`isPrimaryKey ` ( - | `String `__ fieldName - | ) - - - Checks if a given field is the primary key field. - - - - - * - public **boolean** - - | :ref:`isRequired ` ( - | `String `__ fieldName - | ) - - - Checks if a given field is required i.e., it is not allowed to contain ``null`` values. - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`removeField ` ( - | `String `__ fieldName - | ) - - - Removes a field from the class. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`removeIndex ` ( - | `String `__ fieldName - | ) - - - Removes an index from a given field. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`removePrimaryKey ` () - | - - - Removes the primary key from this class. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`renameField ` ( - | `String `__ currentFieldName, - | `String `__ newFieldName - | ) - - - Renames a field from one name to another. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`setClassName ` ( - | `String `__ className - | ) - - - Sets a new name for this RealmObject class. - - - - - * - public **void** - - | :ref:`setEmbedded ` ( - | **boolean** embedded - | ) - - - Converts the class to be embedded or not. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`setNullable ` ( - | `String `__ fieldName, - | **boolean** nullable - | ) - - - Sets a field to be nullable i.e., it should be able to hold ``null`` values. - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`setRequired ` ( - | `String `__ fieldName, - | **boolean** required - | ) - - - Sets a field to be required i.e., it is not allowed to hold ``null`` values. - - - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`transform ` ( - | :ref:`RealmObjectSchema.Function ` function - | ) - - - Runs a transformation function on each RealmObject instance of the current class. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _addField: - -.. _addField__: - -.. _RealmObjectSchema_addField: - -.. _RealmObjectSchema_addField__: - -.. _io_realm_RealmObjectSchema_addField: - -.. _io_realm_RealmObjectSchema_addField__: - - - -addField --------- - -.. _io_realm_RealmObjectSchema_addField_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String__java_lang_Class__FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String__java_lang_Class__FieldAttribute____: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String__Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String_Class_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String__Class__FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String_Class_FieldAttribute____: - -.. _io_realm_RealmObjectSchema_addField_java_lang_String__Class__FieldAttribute____: - -.. _io_realm_RealmObjectSchema_addField_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_String_java_lang_Class_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_String__java_lang_Class__FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_String_java_lang_Class_FieldAttribute____: - -.. _io_realm_RealmObjectSchema_addField_String__java_lang_Class__FieldAttribute____: - -.. _io_realm_RealmObjectSchema_addField_String_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_String__Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_String_Class_FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_String__Class__FieldAttribute_: - -.. _io_realm_RealmObjectSchema_addField_String_Class_FieldAttribute____: - -.. _io_realm_RealmObjectSchema_addField_String__Class__FieldAttribute____: - -.. _addField_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _addField_java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _addField_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _addField_java_lang_String__java_lang_Class__FieldAttribute_: - -.. _addField_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _addField_java_lang_String__java_lang_Class__FieldAttribute____: - -.. _addField_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _addField_java_lang_String__Class__io_realm_FieldAttribute_: - -.. _addField_java_lang_String_Class_FieldAttribute_: - -.. _addField_java_lang_String__Class__FieldAttribute_: - -.. _addField_java_lang_String_Class_FieldAttribute____: - -.. _addField_java_lang_String__Class__FieldAttribute____: - -.. _addField_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _addField_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _addField_String_java_lang_Class_FieldAttribute_: - -.. _addField_String__java_lang_Class__FieldAttribute_: - -.. _addField_String_java_lang_Class_FieldAttribute____: - -.. _addField_String__java_lang_Class__FieldAttribute____: - -.. _addField_String_Class_io_realm_FieldAttribute_: - -.. _addField_String__Class__io_realm_FieldAttribute_: - -.. _addField_String_Class_FieldAttribute_: - -.. _addField_String__Class__FieldAttribute_: - -.. _addField_String_Class_FieldAttribute____: - -.. _addField_String__Class__FieldAttribute____: - -.. _RealmObjectSchema_addField_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _RealmObjectSchema_addField_java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _RealmObjectSchema_addField_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _RealmObjectSchema_addField_java_lang_String__java_lang_Class__FieldAttribute_: - -.. _RealmObjectSchema_addField_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _RealmObjectSchema_addField_java_lang_String__java_lang_Class__FieldAttribute____: - -.. _RealmObjectSchema_addField_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _RealmObjectSchema_addField_java_lang_String__Class__io_realm_FieldAttribute_: - -.. _RealmObjectSchema_addField_java_lang_String_Class_FieldAttribute_: - -.. _RealmObjectSchema_addField_java_lang_String__Class__FieldAttribute_: - -.. _RealmObjectSchema_addField_java_lang_String_Class_FieldAttribute____: - -.. _RealmObjectSchema_addField_java_lang_String__Class__FieldAttribute____: - -.. _RealmObjectSchema_addField_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _RealmObjectSchema_addField_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _RealmObjectSchema_addField_String_java_lang_Class_FieldAttribute_: - -.. _RealmObjectSchema_addField_String__java_lang_Class__FieldAttribute_: - -.. _RealmObjectSchema_addField_String_java_lang_Class_FieldAttribute____: - -.. _RealmObjectSchema_addField_String__java_lang_Class__FieldAttribute____: - -.. _RealmObjectSchema_addField_String_Class_io_realm_FieldAttribute_: - -.. _RealmObjectSchema_addField_String__Class__io_realm_FieldAttribute_: - -.. _RealmObjectSchema_addField_String_Class_FieldAttribute_: - -.. _RealmObjectSchema_addField_String__Class__FieldAttribute_: - -.. _RealmObjectSchema_addField_String_Class_FieldAttribute____: - -.. _RealmObjectSchema_addField_String__Class__FieldAttribute____: - -.. _io_realm_RealmObjectSchema_addField_String__Class_____FieldAttribute____: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addField ` ( - | `String `__ fieldName, - | `java.lang.Class\ `__ fieldType, - | :ref:`io.realm.FieldAttribute[] ` attributes - | ) - - - - - * - Adds a new simple field to the RealmObject class. The type must be one supported by Realm. See :ref:`RealmObject ` for the list of supported types. If the field should allow ``null`` values use the boxed type instead e.g., ``Integer.class`` instead of ``int.class`` . - - To add fields that reference other RealmObjects or RealmLists use :ref:`addRealmObjectField(String, RealmObjectSchema) ` or :ref:`addRealmListField(String, RealmObjectSchema) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to add. - - - - - ``fieldType`` - type of field to add. See :ref:`RealmObject ` for the full list. - - - - - - - ``attributes`` - set of attributes for this field. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the type isn't supported, field name is illegal or a field with that name already exists. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable or if adding a a field with :ref:`FieldAttribute.PRIMARY_KEY ` attribute to a schema of a synced Realm. - - - - - - - - - - - - - - -.. _addIndex: - -.. _addIndex__: - -.. _RealmObjectSchema_addIndex: - -.. _RealmObjectSchema_addIndex__: - -.. _io_realm_RealmObjectSchema_addIndex: - -.. _io_realm_RealmObjectSchema_addIndex__: - - - -addIndex --------- - -.. _io_realm_RealmObjectSchema_addIndex_java_lang_String_: - -.. _io_realm_RealmObjectSchema_addIndex_String_: - -.. _addIndex_java_lang_String_: - -.. _addIndex_String_: - -.. _RealmObjectSchema_addIndex_java_lang_String_: - -.. _RealmObjectSchema_addIndex_String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addIndex ` ( - | `String `__ fieldName - | ) - - - - - * - Adds an index to a given field. This is the equivalent of adding the :ref:`io.realm.annotations.Index ` annotation on the field. - - - - - - - **Parameters** - - - ``fieldName`` - field to add index to. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, the field cannot be indexed or it already has a index defined. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - - - -.. _addPrimaryKey: - -.. _addPrimaryKey__: - -.. _RealmObjectSchema_addPrimaryKey: - -.. _RealmObjectSchema_addPrimaryKey__: - -.. _io_realm_RealmObjectSchema_addPrimaryKey: - -.. _io_realm_RealmObjectSchema_addPrimaryKey__: - - - -addPrimaryKey -------------- - -.. _io_realm_RealmObjectSchema_addPrimaryKey_java_lang_String_: - -.. _io_realm_RealmObjectSchema_addPrimaryKey_String_: - -.. _addPrimaryKey_java_lang_String_: - -.. _addPrimaryKey_String_: - -.. _RealmObjectSchema_addPrimaryKey_java_lang_String_: - -.. _RealmObjectSchema_addPrimaryKey_String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addPrimaryKey ` ( - | `String `__ fieldName - | ) - - - - - * - Adds a primary key to a given field. This is the same as adding the :ref:`io.realm.annotations.PrimaryKey ` annotation on the field. Further, this implicitly adds :ref:`io.realm.annotations.Index ` annotation to the field as well. - - - - - - - **Parameters** - - - ``fieldName`` - field to set as primary key. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, the field cannot be a primary key or it already has a primary key defined. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable or of a synced Realm. - - - - - - - - - - - - - - -.. _addRealmDictionaryField: - -.. _addRealmDictionaryField__: - -.. _RealmObjectSchema_addRealmDictionaryField: - -.. _RealmObjectSchema_addRealmDictionaryField__: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField__: - - - -addRealmDictionaryField ------------------------ - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_java_lang_String_java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_java_lang_String__java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_java_lang_String_Class_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_java_lang_String__Class_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String_java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String__java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String_Class_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String__Class_: - -.. _addRealmDictionaryField_java_lang_String_java_lang_Class_: - -.. _addRealmDictionaryField_java_lang_String__java_lang_Class_: - -.. _addRealmDictionaryField_java_lang_String_Class_: - -.. _addRealmDictionaryField_java_lang_String__Class_: - -.. _addRealmDictionaryField_String_java_lang_Class_: - -.. _addRealmDictionaryField_String__java_lang_Class_: - -.. _addRealmDictionaryField_String_Class_: - -.. _addRealmDictionaryField_String__Class_: - -.. _RealmObjectSchema_addRealmDictionaryField_java_lang_String_java_lang_Class_: - -.. _RealmObjectSchema_addRealmDictionaryField_java_lang_String__java_lang_Class_: - -.. _RealmObjectSchema_addRealmDictionaryField_java_lang_String_Class_: - -.. _RealmObjectSchema_addRealmDictionaryField_java_lang_String__Class_: - -.. _RealmObjectSchema_addRealmDictionaryField_String_java_lang_Class_: - -.. _RealmObjectSchema_addRealmDictionaryField_String__java_lang_Class_: - -.. _RealmObjectSchema_addRealmDictionaryField_String_Class_: - -.. _RealmObjectSchema_addRealmDictionaryField_String__Class_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String__Class____: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addRealmDictionaryField ` ( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - - - * - Adds a new field that references a :ref:`RealmDictionary ` with primitive values. See :ref:`RealmObject ` for the list of supported types. - - Nullability of elements are defined by using the correct class e.g., ``Integer.class`` instead of ``int.class`` . Alternatively :ref:`setRequired(String, boolean) ` can be used. - - - - Example: - - - - .. code-block:: java - - - // Defines the dictionary of Strings as being non null. - RealmObjectSchema schema = schema.create("Person") - .addRealmDictionaryField("parentAndChild", String.class) - .setRequired("parentAndChild", true) - - - - - - If the list contains references to other Realm classes, use :ref:`addRealmDictionaryField(String, RealmObjectSchema) ` instead. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to add. - - - - - ``primitiveType`` - simple type of elements in the array. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name is illegal, a field with that name already exists or the element type isn't supported. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_java_lang_String_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_java_lang_String__RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String_io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String__io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmDictionaryField_String__RealmObjectSchema_: - -.. _addRealmDictionaryField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _addRealmDictionaryField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _addRealmDictionaryField_java_lang_String_RealmObjectSchema_: - -.. _addRealmDictionaryField_java_lang_String__RealmObjectSchema_: - -.. _addRealmDictionaryField_String_io_realm_RealmObjectSchema_: - -.. _addRealmDictionaryField_String__io_realm_RealmObjectSchema_: - -.. _addRealmDictionaryField_String_RealmObjectSchema_: - -.. _addRealmDictionaryField_String__RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmDictionaryField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmDictionaryField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmDictionaryField_java_lang_String_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmDictionaryField_java_lang_String__RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmDictionaryField_String_io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmDictionaryField_String__io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmDictionaryField_String_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmDictionaryField_String__RealmObjectSchema_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addRealmDictionaryField ` ( - | `String `__ fieldName, - | :ref:`RealmObjectSchema ` objectSchema - | ) - - - - - * - Adds a new field that contains a :ref:`RealmDictionary ` with references to other Realm model classes. - - If the dictionary contains primitive types, use :ref:`addRealmDictionaryField(String, Class) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to add. - - - - - ``objectSchema`` - schema for the Realm type being referenced. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name is illegal or a field with that name already exists. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - - - -.. _addRealmListField: - -.. _addRealmListField__: - -.. _RealmObjectSchema_addRealmListField: - -.. _RealmObjectSchema_addRealmListField__: - -.. _io_realm_RealmObjectSchema_addRealmListField: - -.. _io_realm_RealmObjectSchema_addRealmListField__: - - - -addRealmListField ------------------ - -.. _io_realm_RealmObjectSchema_addRealmListField_java_lang_String_java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmListField_java_lang_String__java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmListField_java_lang_String_Class_: - -.. _io_realm_RealmObjectSchema_addRealmListField_java_lang_String__Class_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String_java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String__java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String_Class_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String__Class_: - -.. _addRealmListField_java_lang_String_java_lang_Class_: - -.. _addRealmListField_java_lang_String__java_lang_Class_: - -.. _addRealmListField_java_lang_String_Class_: - -.. _addRealmListField_java_lang_String__Class_: - -.. _addRealmListField_String_java_lang_Class_: - -.. _addRealmListField_String__java_lang_Class_: - -.. _addRealmListField_String_Class_: - -.. _addRealmListField_String__Class_: - -.. _RealmObjectSchema_addRealmListField_java_lang_String_java_lang_Class_: - -.. _RealmObjectSchema_addRealmListField_java_lang_String__java_lang_Class_: - -.. _RealmObjectSchema_addRealmListField_java_lang_String_Class_: - -.. _RealmObjectSchema_addRealmListField_java_lang_String__Class_: - -.. _RealmObjectSchema_addRealmListField_String_java_lang_Class_: - -.. _RealmObjectSchema_addRealmListField_String__java_lang_Class_: - -.. _RealmObjectSchema_addRealmListField_String_Class_: - -.. _RealmObjectSchema_addRealmListField_String__Class_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String__Class____: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addRealmListField ` ( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - - - * - Adds a new field that references a :ref:`RealmList ` with primitive values. See :ref:`RealmObject ` for the list of supported types. - - Nullability of elements are defined by using the correct class e.g., ``Integer.class`` instead of ``int.class`` . Alternatively :ref:`setRequired(String, boolean) ` can be used. - - - - Example: - - - - .. code-block:: java - - - // Defines the list of Strings as being non null. - RealmObjectSchema schema = schema.create("Person") - .addRealmListField("children", String.class) - .setRequired("children", true) - - - - - - If the list contains references to other Realm classes, use :ref:`addRealmListField(String, RealmObjectSchema) ` instead. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to add. - - - - - ``primitiveType`` - simple type of elements in the array. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name is illegal, a field with that name already exists or the element type isn't supported. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - -.. _io_realm_RealmObjectSchema_addRealmListField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmListField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmListField_java_lang_String_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmListField_java_lang_String__RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String_io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String__io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmListField_String__RealmObjectSchema_: - -.. _addRealmListField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _addRealmListField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _addRealmListField_java_lang_String_RealmObjectSchema_: - -.. _addRealmListField_java_lang_String__RealmObjectSchema_: - -.. _addRealmListField_String_io_realm_RealmObjectSchema_: - -.. _addRealmListField_String__io_realm_RealmObjectSchema_: - -.. _addRealmListField_String_RealmObjectSchema_: - -.. _addRealmListField_String__RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmListField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmListField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmListField_java_lang_String_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmListField_java_lang_String__RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmListField_String_io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmListField_String__io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmListField_String_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmListField_String__RealmObjectSchema_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addRealmListField ` ( - | `String `__ fieldName, - | :ref:`RealmObjectSchema ` objectSchema - | ) - - - - - * - Adds a new field that contains a :ref:`RealmList ` with references to other Realm model classes. - - If the list contains primitive types, use :ref:`addRealmListField(String, Class) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to add. - - - - - ``objectSchema`` - schema for the Realm type being referenced. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name is illegal or a field with that name already exists. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - - - -.. _addRealmObjectField: - -.. _addRealmObjectField__: - -.. _RealmObjectSchema_addRealmObjectField: - -.. _RealmObjectSchema_addRealmObjectField__: - -.. _io_realm_RealmObjectSchema_addRealmObjectField: - -.. _io_realm_RealmObjectSchema_addRealmObjectField__: - - - -addRealmObjectField -------------------- - -.. _io_realm_RealmObjectSchema_addRealmObjectField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmObjectField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmObjectField_java_lang_String_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmObjectField_java_lang_String__RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmObjectField_String_io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmObjectField_String__io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmObjectField_String_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmObjectField_String__RealmObjectSchema_: - -.. _addRealmObjectField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _addRealmObjectField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _addRealmObjectField_java_lang_String_RealmObjectSchema_: - -.. _addRealmObjectField_java_lang_String__RealmObjectSchema_: - -.. _addRealmObjectField_String_io_realm_RealmObjectSchema_: - -.. _addRealmObjectField_String__io_realm_RealmObjectSchema_: - -.. _addRealmObjectField_String_RealmObjectSchema_: - -.. _addRealmObjectField_String__RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmObjectField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmObjectField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmObjectField_java_lang_String_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmObjectField_java_lang_String__RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmObjectField_String_io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmObjectField_String__io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmObjectField_String_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmObjectField_String__RealmObjectSchema_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addRealmObjectField ` ( - | `String `__ fieldName, - | :ref:`RealmObjectSchema ` objectSchema - | ) - - - - - * - Adds a new field that references another :ref:`RealmObject ` . - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to add. - - - - - ``objectSchema`` - schema for the Realm type being referenced. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name is illegal or a field with that name already exists. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - - - -.. _addRealmSetField: - -.. _addRealmSetField__: - -.. _RealmObjectSchema_addRealmSetField: - -.. _RealmObjectSchema_addRealmSetField__: - -.. _io_realm_RealmObjectSchema_addRealmSetField: - -.. _io_realm_RealmObjectSchema_addRealmSetField__: - - - -addRealmSetField ----------------- - -.. _io_realm_RealmObjectSchema_addRealmSetField_java_lang_String_java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_java_lang_String__java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_java_lang_String_Class_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_java_lang_String__Class_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String_java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String__java_lang_Class_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String_Class_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String__Class_: - -.. _addRealmSetField_java_lang_String_java_lang_Class_: - -.. _addRealmSetField_java_lang_String__java_lang_Class_: - -.. _addRealmSetField_java_lang_String_Class_: - -.. _addRealmSetField_java_lang_String__Class_: - -.. _addRealmSetField_String_java_lang_Class_: - -.. _addRealmSetField_String__java_lang_Class_: - -.. _addRealmSetField_String_Class_: - -.. _addRealmSetField_String__Class_: - -.. _RealmObjectSchema_addRealmSetField_java_lang_String_java_lang_Class_: - -.. _RealmObjectSchema_addRealmSetField_java_lang_String__java_lang_Class_: - -.. _RealmObjectSchema_addRealmSetField_java_lang_String_Class_: - -.. _RealmObjectSchema_addRealmSetField_java_lang_String__Class_: - -.. _RealmObjectSchema_addRealmSetField_String_java_lang_Class_: - -.. _RealmObjectSchema_addRealmSetField_String__java_lang_Class_: - -.. _RealmObjectSchema_addRealmSetField_String_Class_: - -.. _RealmObjectSchema_addRealmSetField_String__Class_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String__Class____: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addRealmSetField ` ( - | `String `__ fieldName, - | `java.lang.Class\ `__ primitiveType - | ) - - - - - * - Adds a new field that references a :ref:`RealmSet ` with primitive values. See :ref:`RealmObject ` for the list of supported types. - - Nullability of elements are defined by using the correct class e.g., ``Integer.class`` instead of ``int.class`` . Alternatively :ref:`setRequired(String, boolean) ` can be used. - - - - Example: - - - - .. code-block:: java - - - // Defines the set of Strings as being non null. - RealmObjectSchema schema = schema.create("Person") - .addRealmSetField("children", String.class) - .setRequired("children", true) - - - - - - If the list contains references to other Realm classes, use :ref:`addRealmSetField(String, RealmObjectSchema) ` instead. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to add. - - - - - ``primitiveType`` - simple type of elements in the array. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name is illegal, a field with that name already exists or the element type isn't supported. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - -.. _io_realm_RealmObjectSchema_addRealmSetField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_java_lang_String_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_java_lang_String__RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String_io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String__io_realm_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String_RealmObjectSchema_: - -.. _io_realm_RealmObjectSchema_addRealmSetField_String__RealmObjectSchema_: - -.. _addRealmSetField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _addRealmSetField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _addRealmSetField_java_lang_String_RealmObjectSchema_: - -.. _addRealmSetField_java_lang_String__RealmObjectSchema_: - -.. _addRealmSetField_String_io_realm_RealmObjectSchema_: - -.. _addRealmSetField_String__io_realm_RealmObjectSchema_: - -.. _addRealmSetField_String_RealmObjectSchema_: - -.. _addRealmSetField_String__RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmSetField_java_lang_String_io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmSetField_java_lang_String__io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmSetField_java_lang_String_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmSetField_java_lang_String__RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmSetField_String_io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmSetField_String__io_realm_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmSetField_String_RealmObjectSchema_: - -.. _RealmObjectSchema_addRealmSetField_String__RealmObjectSchema_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`addRealmSetField ` ( - | `String `__ fieldName, - | :ref:`RealmObjectSchema ` objectSchema - | ) - - - - - * - Adds a new field that contains a :ref:`RealmSet ` with references to other Realm model classes. - - If the set contains primitive types, use :ref:`addRealmSetField(String, Class) ` instead. - - - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to add. - - - - - ``objectSchema`` - schema for the Realm type being referenced. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name is illegal or a field with that name already exists. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - - - -.. _getClassName: - -.. _getClassName__: - -.. _RealmObjectSchema_getClassName: - -.. _RealmObjectSchema_getClassName__: - -.. _io_realm_RealmObjectSchema_getClassName: - -.. _io_realm_RealmObjectSchema_getClassName__: - - - -getClassName ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getClassName ` () - | - - - - - * - Returns the name of the RealmObject class being represented by this schema. - - - When using a normal :ref:`Realm ` this name is the same as the :ref:`RealmObject ` class. - - - - - - When using a :ref:`DynamicRealm ` this is the name used in all API methods requiring a class name. - - - - - - - - - - - - - - **Returns** - - the name of the RealmObject class represented by this schema. - - - - - **Throws** - - - `IllegalStateException `__ - if this schema defintion is no longer part of the Realm. - - - - - - - - - - - - -.. _getFieldNames: - -.. _getFieldNames__: - -.. _RealmObjectSchema_getFieldNames: - -.. _RealmObjectSchema_getFieldNames__: - -.. _io_realm_RealmObjectSchema_getFieldNames: - -.. _io_realm_RealmObjectSchema_getFieldNames__: - - - -getFieldNames -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Set `__ :ref:`getFieldNames ` () - | - - - - - * - Returns all fields in this class. - - - - - - - **Returns** - - a list of all the fields in this class. - - - - - - - - - - - -.. _getFieldType: - -.. _getFieldType__: - -.. _RealmObjectSchema_getFieldType: - -.. _RealmObjectSchema_getFieldType__: - -.. _io_realm_RealmObjectSchema_getFieldType: - -.. _io_realm_RealmObjectSchema_getFieldType__: - - - -getFieldType ------------- - -.. _io_realm_RealmObjectSchema_getFieldType_java_lang_String_: - -.. _io_realm_RealmObjectSchema_getFieldType_String_: - -.. _getFieldType_java_lang_String_: - -.. _getFieldType_String_: - -.. _RealmObjectSchema_getFieldType_java_lang_String_: - -.. _RealmObjectSchema_getFieldType_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFieldType ` :ref:`getFieldType ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the type used by the underlying storage engine to represent this field. - - - - - **Parameters** - - - ``fieldName`` - name of the target field. - - - - - - - - **Returns** - - the underlying type used by Realm to represent this field. - - - - - - - - - - - -.. _getPrimaryKey: - -.. _getPrimaryKey__: - -.. _RealmObjectSchema_getPrimaryKey: - -.. _RealmObjectSchema_getPrimaryKey__: - -.. _io_realm_RealmObjectSchema_getPrimaryKey: - -.. _io_realm_RealmObjectSchema_getPrimaryKey__: - - - -getPrimaryKey -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getPrimaryKey ` () - | - - - - - * - Returns the name of the primary key field. - - - - - - - **Returns** - - the name of the primary key field. - - - - - **Throws** - - - `IllegalStateException `__ - if the class doesn't have a primary key defined. - - - - - - - - - - - - -.. _hasField: - -.. _hasField__: - -.. _RealmObjectSchema_hasField: - -.. _RealmObjectSchema_hasField__: - -.. _io_realm_RealmObjectSchema_hasField: - -.. _io_realm_RealmObjectSchema_hasField__: - - - -hasField --------- - -.. _io_realm_RealmObjectSchema_hasField_java_lang_String_: - -.. _io_realm_RealmObjectSchema_hasField_String_: - -.. _hasField_java_lang_String_: - -.. _hasField_String_: - -.. _RealmObjectSchema_hasField_java_lang_String_: - -.. _RealmObjectSchema_hasField_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`hasField ` ( - | `String `__ fieldName - | ) - - - - - * - Tests if the class has field defined with the given name. - - - - - **Parameters** - - - ``fieldName`` - field name to test. - - - - - - - - **Returns** - - ``true`` if the field exists, ``false`` otherwise. - - - - - - - - - - - - - -.. _hasIndex: - -.. _hasIndex__: - -.. _RealmObjectSchema_hasIndex: - -.. _RealmObjectSchema_hasIndex__: - -.. _io_realm_RealmObjectSchema_hasIndex: - -.. _io_realm_RealmObjectSchema_hasIndex__: - - - -hasIndex --------- - -.. _io_realm_RealmObjectSchema_hasIndex_java_lang_String_: - -.. _io_realm_RealmObjectSchema_hasIndex_String_: - -.. _hasIndex_java_lang_String_: - -.. _hasIndex_String_: - -.. _RealmObjectSchema_hasIndex_java_lang_String_: - -.. _RealmObjectSchema_hasIndex_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`hasIndex ` ( - | `String `__ fieldName - | ) - - - - - * - Checks if a given field has an index defined. - - - - - **Parameters** - - - ``fieldName`` - existing field name to check. - - - - - - - - **Returns** - - ``true`` if field is indexed, ``false`` otherwise. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.Index ` - - - - - - - - - - - - -.. _hasPrimaryKey: - -.. _hasPrimaryKey__: - -.. _RealmObjectSchema_hasPrimaryKey: - -.. _RealmObjectSchema_hasPrimaryKey__: - -.. _io_realm_RealmObjectSchema_hasPrimaryKey: - -.. _io_realm_RealmObjectSchema_hasPrimaryKey__: - - - -hasPrimaryKey -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`hasPrimaryKey ` () - | - - - - - * - Checks if the class has a primary key defined. - - - - - - - **Returns** - - ``true`` if a primary key is defined, ``false`` otherwise. - - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.PrimaryKey ` - - - - - - - - - - - - -.. _isEmbedded: - -.. _isEmbedded__: - -.. _RealmObjectSchema_isEmbedded: - -.. _RealmObjectSchema_isEmbedded__: - -.. _io_realm_RealmObjectSchema_isEmbedded: - -.. _io_realm_RealmObjectSchema_isEmbedded__: - - - -isEmbedded ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEmbedded ` () - | - - - - - * - Returns ``true`` if objects of this type are considered "embedded". See :ref:`RealmClass.embedded() ` for further details. - - - - - - - - - **Returns** - - ``true`` if objects of this type are embedded. ``false`` if not. - - - - - - - - - - - - - -.. _isNullable: - -.. _isNullable__: - -.. _RealmObjectSchema_isNullable: - -.. _RealmObjectSchema_isNullable__: - -.. _io_realm_RealmObjectSchema_isNullable: - -.. _io_realm_RealmObjectSchema_isNullable__: - - - -isNullable ----------- - -.. _io_realm_RealmObjectSchema_isNullable_java_lang_String_: - -.. _io_realm_RealmObjectSchema_isNullable_String_: - -.. _isNullable_java_lang_String_: - -.. _isNullable_String_: - -.. _RealmObjectSchema_isNullable_java_lang_String_: - -.. _RealmObjectSchema_isNullable_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isNullable ` ( - | `String `__ fieldName - | ) - - - - - * - Checks if a given field is nullable i.e., it is allowed to contain ``null`` values. - - - - - - - **Parameters** - - - ``fieldName`` - field to check. - - - - - - - - **Returns** - - ``true`` if it is required, ``false`` otherwise. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist. - - - - - - - - - - .. seealso:: - - - - - :ref:`setNullable(String, boolean) ` - - - - - - - - - - - - -.. _isPrimaryKey: - -.. _isPrimaryKey__: - -.. _RealmObjectSchema_isPrimaryKey: - -.. _RealmObjectSchema_isPrimaryKey__: - -.. _io_realm_RealmObjectSchema_isPrimaryKey: - -.. _io_realm_RealmObjectSchema_isPrimaryKey__: - - - -isPrimaryKey ------------- - -.. _io_realm_RealmObjectSchema_isPrimaryKey_java_lang_String_: - -.. _io_realm_RealmObjectSchema_isPrimaryKey_String_: - -.. _isPrimaryKey_java_lang_String_: - -.. _isPrimaryKey_String_: - -.. _RealmObjectSchema_isPrimaryKey_java_lang_String_: - -.. _RealmObjectSchema_isPrimaryKey_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isPrimaryKey ` ( - | `String `__ fieldName - | ) - - - - - * - Checks if a given field is the primary key field. - - - - - **Parameters** - - - ``fieldName`` - field to check. - - - - - - - - **Returns** - - ``true`` if it is the primary key field, ``false`` otherwise. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist. - - - - - - - - - - .. seealso:: - - - - - :ref:`addPrimaryKey(String) ` - - - - - - - - - - - - -.. _isRequired: - -.. _isRequired__: - -.. _RealmObjectSchema_isRequired: - -.. _RealmObjectSchema_isRequired__: - -.. _io_realm_RealmObjectSchema_isRequired: - -.. _io_realm_RealmObjectSchema_isRequired__: - - - -isRequired ----------- - -.. _io_realm_RealmObjectSchema_isRequired_java_lang_String_: - -.. _io_realm_RealmObjectSchema_isRequired_String_: - -.. _isRequired_java_lang_String_: - -.. _isRequired_String_: - -.. _RealmObjectSchema_isRequired_java_lang_String_: - -.. _RealmObjectSchema_isRequired_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isRequired ` ( - | `String `__ fieldName - | ) - - - - - * - Checks if a given field is required i.e., it is not allowed to contain ``null`` values. - - - - - - - **Parameters** - - - ``fieldName`` - field to check. - - - - - - - - **Returns** - - ``true`` if it is required, ``false`` otherwise. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist. - - - - - - - - - - .. seealso:: - - - - - :ref:`setRequired(String, boolean) ` - - - - - - - - - - - - -.. _removeField: - -.. _removeField__: - -.. _RealmObjectSchema_removeField: - -.. _RealmObjectSchema_removeField__: - -.. _io_realm_RealmObjectSchema_removeField: - -.. _io_realm_RealmObjectSchema_removeField__: - - - -removeField ------------ - -.. _io_realm_RealmObjectSchema_removeField_java_lang_String_: - -.. _io_realm_RealmObjectSchema_removeField_String_: - -.. _removeField_java_lang_String_: - -.. _removeField_String_: - -.. _RealmObjectSchema_removeField_java_lang_String_: - -.. _RealmObjectSchema_removeField_String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`removeField ` ( - | `String `__ fieldName - | ) - - - - - * - Removes a field from the class. - - - - - **Parameters** - - - ``fieldName`` - field name to remove. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable or for a synced Realm. - - - - - - - - - - - - - - -.. _removeIndex: - -.. _removeIndex__: - -.. _RealmObjectSchema_removeIndex: - -.. _RealmObjectSchema_removeIndex__: - -.. _io_realm_RealmObjectSchema_removeIndex: - -.. _io_realm_RealmObjectSchema_removeIndex__: - - - -removeIndex ------------ - -.. _io_realm_RealmObjectSchema_removeIndex_java_lang_String_: - -.. _io_realm_RealmObjectSchema_removeIndex_String_: - -.. _removeIndex_java_lang_String_: - -.. _removeIndex_String_: - -.. _RealmObjectSchema_removeIndex_java_lang_String_: - -.. _RealmObjectSchema_removeIndex_String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`removeIndex ` ( - | `String `__ fieldName - | ) - - - - - * - Removes an index from a given field. This is the same as removing the ``@Index`` annotation on the field. - - - - - - - **Parameters** - - - ``fieldName`` - field to remove index from. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or the field doesn't have an index. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable or of a synced Realm. - - - - - - - - - - - - - - -.. _removePrimaryKey: - -.. _removePrimaryKey__: - -.. _RealmObjectSchema_removePrimaryKey: - -.. _RealmObjectSchema_removePrimaryKey__: - -.. _io_realm_RealmObjectSchema_removePrimaryKey: - -.. _io_realm_RealmObjectSchema_removePrimaryKey__: - - - -removePrimaryKey ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`removePrimaryKey ` () - | - - - - - * - Removes the primary key from this class. This is the same as removing the :ref:`io.realm.annotations.PrimaryKey ` annotation from the class. Further, this implicitly removes :ref:`io.realm.annotations.Index ` annotation from the field as well. - - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the class doesn't have a primary key defined. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable or of a synced Realm. - - - - - - - - - - - - - - -.. _renameField: - -.. _renameField__: - -.. _RealmObjectSchema_renameField: - -.. _RealmObjectSchema_renameField__: - -.. _io_realm_RealmObjectSchema_renameField: - -.. _io_realm_RealmObjectSchema_renameField__: - - - -renameField ------------ - -.. _io_realm_RealmObjectSchema_renameField_java_lang_String_java_lang_String_: - -.. _io_realm_RealmObjectSchema_renameField_java_lang_String__java_lang_String_: - -.. _io_realm_RealmObjectSchema_renameField_java_lang_String_String_: - -.. _io_realm_RealmObjectSchema_renameField_java_lang_String__String_: - -.. _io_realm_RealmObjectSchema_renameField_String_java_lang_String_: - -.. _io_realm_RealmObjectSchema_renameField_String__java_lang_String_: - -.. _io_realm_RealmObjectSchema_renameField_String_String_: - -.. _io_realm_RealmObjectSchema_renameField_String__String_: - -.. _renameField_java_lang_String_java_lang_String_: - -.. _renameField_java_lang_String__java_lang_String_: - -.. _renameField_java_lang_String_String_: - -.. _renameField_java_lang_String__String_: - -.. _renameField_String_java_lang_String_: - -.. _renameField_String__java_lang_String_: - -.. _renameField_String_String_: - -.. _renameField_String__String_: - -.. _RealmObjectSchema_renameField_java_lang_String_java_lang_String_: - -.. _RealmObjectSchema_renameField_java_lang_String__java_lang_String_: - -.. _RealmObjectSchema_renameField_java_lang_String_String_: - -.. _RealmObjectSchema_renameField_java_lang_String__String_: - -.. _RealmObjectSchema_renameField_String_java_lang_String_: - -.. _RealmObjectSchema_renameField_String__java_lang_String_: - -.. _RealmObjectSchema_renameField_String_String_: - -.. _RealmObjectSchema_renameField_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`renameField ` ( - | `String `__ currentFieldName, - | `String `__ newFieldName - | ) - - - - - * - Renames a field from one name to another. - - - - - **Parameters** - - - ``currentFieldName`` - field name to rename. - - - - - ``newFieldName`` - the new field name. - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or if the new field name already exists. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable or for a synced Realm. - - - - - - - - - - - - - - -.. _setClassName: - -.. _setClassName__: - -.. _RealmObjectSchema_setClassName: - -.. _RealmObjectSchema_setClassName__: - -.. _io_realm_RealmObjectSchema_setClassName: - -.. _io_realm_RealmObjectSchema_setClassName__: - - - -setClassName ------------- - -.. _io_realm_RealmObjectSchema_setClassName_java_lang_String_: - -.. _io_realm_RealmObjectSchema_setClassName_String_: - -.. _setClassName_java_lang_String_: - -.. _setClassName_String_: - -.. _RealmObjectSchema_setClassName_java_lang_String_: - -.. _RealmObjectSchema_setClassName_String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`setClassName ` ( - | `String `__ className - | ) - - - - - * - Sets a new name for this RealmObject class. This is equivalent to renaming it. - - - - - **Parameters** - - - ``className`` - the new name for this class. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if className is ``null`` or an empty string, or its length exceeds 56 characters. - - - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable or from a synced Realm. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`RealmSchema.rename(String, String) ` - - - - - - - - - - - - -.. _setEmbedded: - -.. _setEmbedded__: - -.. _RealmObjectSchema_setEmbedded: - -.. _RealmObjectSchema_setEmbedded__: - -.. _io_realm_RealmObjectSchema_setEmbedded: - -.. _io_realm_RealmObjectSchema_setEmbedded__: - - - -setEmbedded ------------ - -.. _io_realm_RealmObjectSchema_setEmbedded_boolean_: - -.. _setEmbedded_boolean_: - -.. _RealmObjectSchema_setEmbedded_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setEmbedded ` ( - | **boolean** embedded - | ) - - - - - * - Converts the class to be embedded or not.A class can only be marked as embedded if the following invariants are satisfied: - - - - - The class is not allowed to have a primary key defined. - - - - All existing objects of this type, must have one and exactly one parent object already pointing to it. If 0 or more than 1 object has a reference to an object about to be marked embedded an `IllegalStateException `__ will be thrown. - - - - - - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the class could not be converted because it broke some of the Embedded Objects invariants. - - - - - - - - - - .. seealso:: - - - - - :ref:`RealmClass.embedded() ` - - - - - - - - - - - - -.. _setNullable: - -.. _setNullable__: - -.. _RealmObjectSchema_setNullable: - -.. _RealmObjectSchema_setNullable__: - -.. _io_realm_RealmObjectSchema_setNullable: - -.. _io_realm_RealmObjectSchema_setNullable__: - - - -setNullable ------------ - -.. _io_realm_RealmObjectSchema_setNullable_java_lang_String_boolean_: - -.. _io_realm_RealmObjectSchema_setNullable_java_lang_String__boolean_: - -.. _io_realm_RealmObjectSchema_setNullable_String_boolean_: - -.. _io_realm_RealmObjectSchema_setNullable_String__boolean_: - -.. _setNullable_java_lang_String_boolean_: - -.. _setNullable_java_lang_String__boolean_: - -.. _setNullable_String_boolean_: - -.. _setNullable_String__boolean_: - -.. _RealmObjectSchema_setNullable_java_lang_String_boolean_: - -.. _RealmObjectSchema_setNullable_java_lang_String__boolean_: - -.. _RealmObjectSchema_setNullable_String_boolean_: - -.. _RealmObjectSchema_setNullable_String__boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`setNullable ` ( - | `String `__ fieldName, - | **boolean** nullable - | ) - - - - - * - Sets a field to be nullable i.e., it should be able to hold ``null`` values. This is equivalent to switching between primitive types and their boxed variant e.g., ``int`` to ``Integer`` . - - If the type of designated field is a list of values (not :ref:`RealmObject ` s , specified nullability only affects its elements, not the field itself. Value list itself is always non-nullable. - - - - - - - - - **Parameters** - - - ``fieldName`` - name of field in the class. - - - - - ``nullable`` - ``true`` if field should be nullable, ``false`` otherwise. - - - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name doesn't exist, or cannot be set as nullable. - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - - - -.. _setRequired: - -.. _setRequired__: - -.. _RealmObjectSchema_setRequired: - -.. _RealmObjectSchema_setRequired__: - -.. _io_realm_RealmObjectSchema_setRequired: - -.. _io_realm_RealmObjectSchema_setRequired__: - - - -setRequired ------------ - -.. _io_realm_RealmObjectSchema_setRequired_java_lang_String_boolean_: - -.. _io_realm_RealmObjectSchema_setRequired_java_lang_String__boolean_: - -.. _io_realm_RealmObjectSchema_setRequired_String_boolean_: - -.. _io_realm_RealmObjectSchema_setRequired_String__boolean_: - -.. _setRequired_java_lang_String_boolean_: - -.. _setRequired_java_lang_String__boolean_: - -.. _setRequired_String_boolean_: - -.. _setRequired_String__boolean_: - -.. _RealmObjectSchema_setRequired_java_lang_String_boolean_: - -.. _RealmObjectSchema_setRequired_java_lang_String__boolean_: - -.. _RealmObjectSchema_setRequired_String_boolean_: - -.. _RealmObjectSchema_setRequired_String__boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`setRequired ` ( - | `String `__ fieldName, - | **boolean** required - | ) - - - - - * - Sets a field to be required i.e., it is not allowed to hold ``null`` values. This is equivalent to switching between boxed types and their primitive variant e.g., ``Integer`` to ``int`` . - - If the type of designated field is a list of values (not :ref:`RealmObject ` s , specified nullability only affects its elements, not the field itself. Value list itself is always non-nullable. - - - - - - - - - **Parameters** - - - ``fieldName`` - name of field in the class. - - - - - ``required`` - ``true`` if field should be required, ``false`` otherwise. - - - - - - - - - - **Returns** - - the updated schema. - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name doesn't exist, cannot have the :ref:`Required ` annotation or the field already have been set as required. - - - - - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Required ` - - - - - - - - - - - - -.. _transform: - -.. _transform__: - -.. _RealmObjectSchema_transform: - -.. _RealmObjectSchema_transform__: - -.. _io_realm_RealmObjectSchema_transform: - -.. _io_realm_RealmObjectSchema_transform__: - - - -transform ---------- - -.. _io_realm_RealmObjectSchema_transform_io_realm_RealmObjectSchema_Function_: - -.. _io_realm_RealmObjectSchema_transform_Function_: - -.. _io_realm_RealmObjectSchema_transform_RealmObjectSchema_Function_: - -.. _transform_io_realm_RealmObjectSchema_Function_: - -.. _transform_Function_: - -.. _transform_RealmObjectSchema_Function_: - -.. _RealmObjectSchema_transform_io_realm_RealmObjectSchema_Function_: - -.. _RealmObjectSchema_transform_Function_: - -.. _RealmObjectSchema_transform_RealmObjectSchema_Function_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`transform ` ( - | :ref:`RealmObjectSchema.Function ` function - | ) - - - - - * - Runs a transformation function on each RealmObject instance of the current class. The object will be represented as a :ref:`DynamicRealmObject ` . - - There is no guarantees in which order the objects are returned. - - - - - - - **Parameters** - - - ``function`` - transformation function. - - - - - - - - **Returns** - - this schema. - - - - - **Throws** - - - `UnsupportedOperationException `__ - if this :ref:`RealmObjectSchema ` is immutable. - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmObjectSchema/Function.txt b/source/sdk/temp/java/api/io/realm/RealmObjectSchema/Function.txt deleted file mode 100644 index 8a868d0eea..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmObjectSchema/Function.txt +++ /dev/null @@ -1,130 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmObjectSchema.Function -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmObjectSchema_Function: - - - -io.realm -======== - - - -**Enclosing class:** - -:ref:`RealmObjectSchema ` - - - -Function interface, used when traversing all objects of the current class and apply a function on each. - - -.. seealso:: - - - - - **transform(Function)** - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`apply ` ( - | :ref:`DynamicRealmObject ` obj - | ) - - - - - - - - - - -Method Detail -============= - -.. _apply: - -.. _apply__: - -.. _Function_apply: - -.. _Function_apply__: - -.. _RealmObjectSchema_Function_apply: - -.. _RealmObjectSchema_Function_apply__: - -.. _io_realm_RealmObjectSchema_Function_apply: - -.. _io_realm_RealmObjectSchema_Function_apply__: - - - -apply ------ - -.. _io_realm_RealmObjectSchema_Function_apply_io_realm_DynamicRealmObject_: - -.. _io_realm_RealmObjectSchema_Function_apply_DynamicRealmObject_: - -.. _apply_io_realm_DynamicRealmObject_: - -.. _apply_DynamicRealmObject_: - -.. _RealmObjectSchema_Function_apply_io_realm_DynamicRealmObject_: - -.. _RealmObjectSchema_Function_apply_DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`apply ` ( - | :ref:`DynamicRealmObject ` obj - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmQuery.txt b/source/sdk/temp/java/api/io/realm/RealmQuery.txt deleted file mode 100644 index 48d8b80218..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmQuery.txt +++ /dev/null @@ -1,13375 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmQuery -^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmQuery: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmQuery - - -A RealmQuery encapsulates a query on a :ref:`io.realm.Realm ` or a :ref:`io.realm.RealmResults ` using the Builder pattern. The query is executed using either :ref:`findAll() ` or :ref:`findFirst() ` . - -The input to many of the query functions take a field name as String. Note that this is not type safe. If a RealmObject class is refactored care has to be taken to not break any queries. - -A :ref:`io.realm.Realm ` is unordered, which means that there is no guarantee that querying a Realm will return the objects in the order they where inserted. Use :ref:`sort(String) ` (String)} and similar methods if a specific order is required. - - - -A RealmQuery cannot be passed between different threads. - -Results are obtained quickly most of the times. However, launching heavy queries from the UI thread may result in a drop of frames or even ANRs. If you want to prevent these behaviors, you can instantiate a Realm using a :ref:`RealmConfiguration ` that explicitly sets :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` to ``false`` . This way queries will be forced to be launched from a non-UI thread. Alternatively, you can also use :ref:`findAllAsync() ` or :ref:`findFirstAsync() ` . - - - - - - -.. seealso:: - - - - - `Builder pattern `__ - - - - - - :ref:`Realm.where(Class) ` - - - - - :ref:`RealmResults.where() ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`RealmQuery ` - - | :ref:`alwaysFalse ` () - | - - - This predicate will never match, resulting in the query always returning 0 results. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`alwaysTrue ` () - | - - - This predicate will always match. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`and ` () - | - - - Logical-and two conditions Realm automatically applies logical-and between all query statements, so this is intended only as a mean to increase readability. - - - - - * - public **double** - - | :ref:`average ` ( - | `String `__ fieldName - | ) - - - Returns the average of a given field. - - - - - * - public **Decimal128** - - | :ref:`averageDecimal128 ` ( - | `String `__ fieldName - | ) - - - Returns the average of a given field. - - - - - * - public **Decimal128** - - | :ref:`averageRealmAny ` ( - | `String `__ fieldName - | ) - - - Returns the average of a given field. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`beginGroup ` () - | - - - Begin grouping of conditions ("left parenthesis"). - - - - - * - public :ref:`RealmQuery ` - - | :ref:`beginsWith ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - Condition that the value of field begins with the specified substring. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`beginsWith ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - Condition that the value of field begins with the specified substring. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`beginsWith ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - Condition that the value of field begins with the specified string. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`beginsWith ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Condition that the value of field begins with the specified string. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`between ` ( - | `String `__ fieldName, - | **Decimal128** from, - | **Decimal128** to - | ) - - - Between condition. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`between ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` from, - | :ref:`RealmAny ` to - | ) - - - Between condition. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`between ` ( - | `String `__ fieldName, - | `Date `__ from, - | `Date `__ to - | ) - - - Between condition. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`between ` ( - | `String `__ fieldName, - | **float** from, - | **float** to - | ) - - - Between condition. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`between ` ( - | `String `__ fieldName, - | **double** from, - | **double** to - | ) - - - Between condition. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`between ` ( - | `String `__ fieldName, - | **long** from, - | **long** to - | ) - - - Between condition. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`between ` ( - | `String `__ fieldName, - | **int** from, - | **int** to - | ) - - - Between condition. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`contains ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - Condition that value of field contains the specified substring. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`contains ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - Condition that value of field contains the specified substring. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`contains ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - Condition that value of field contains the specified substring. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`contains ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Condition that value of field contains the specified substring. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsEntry ` ( - | `String `__ fieldName, - | `java.util.Map.Entry\ `__ entry - | ) - - - Condition that value, if a dictionary field, contains the specified entry. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsKey ` ( - | `String `__ fieldName, - | `String `__ key - | ) - - - Condition that value, if a dictionary field, contains the specified key. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | **byte[]** value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `Float `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `Double `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `Long `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `Integer `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `Short `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `Byte `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`containsValue ` ( - | `String `__ fieldName, - | `Boolean `__ value - | ) - - - Condition that value, if a dictionary field, contains the specified value. - - - - - * - public **long** - - | :ref:`count ` () - | - - - Counts the number of objects that fulfill the query conditions. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`distinct ` ( - | `String `__ firstFieldName, - | `java.lang.String[] `__ remainingFieldNames - | ) - - - Selects a distinct set of objects of a specific class. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`endGroup ` () - | - - - End grouping of conditions ("right parenthesis") which was opened by a call to ``beginGroup()`` . - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`endsWith ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - Condition that the value of field ends with the specified substring. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`endsWith ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - Condition that the value of field ends with the specified substring. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`endsWith ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - Condition that the value of field ends with the specified string. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`endsWith ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Condition that the value of field ends with the specified string. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`equalTo ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`equalTo ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`equalTo ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - Equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`equalTo ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - Equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`equalTo ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Equal-to comparison. - - - - - * - public :ref:`RealmResults ` - - | :ref:`findAll ` () - | - - - Finds all objects that fulfill the query conditions. - - - - - * - public :ref:`RealmResults ` - - | :ref:`findAllAsync ` () - | - - - Finds all objects that fulfill the query conditions. - - - - - * - public **E** - - | :ref:`findFirst ` () - | - - - Finds the first object that fulfills the query conditions. - - - - - * - public **E** - - | :ref:`findFirstAsync ` () - | - - - Similar to :ref:`findFirst() ` but runs asynchronously on a worker thread. - - - - - - - * - public `String `__ - - | :ref:`getDescription ` () - | - - - Returns a textual description of this query. - - - - - * - public **long** - - | :ref:`getQueryPointer ` () - | - - - Returns the pointer to the underlying C++ query. - - - - - * - public :ref:`Realm ` - - | :ref:`getRealm ` () - | - - - Returns the :ref:`Realm ` instance to which this query belongs. - - - - - - - * - public `String `__ - - | :ref:`getTypeQueried ` () - | - - - Returns the internal Realm name of the type being queried. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThan ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Greater-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThan ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Greater-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThan ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - Greater-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThan ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - Greater-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThan ` ( - | `String `__ fieldName, - | **float** value - | ) - - - Greater-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThan ` ( - | `String `__ fieldName, - | **double** value - | ) - - - Greater-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThan ` ( - | `String `__ fieldName, - | **long** value - | ) - - - Greater-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThan ` ( - | `String `__ fieldName, - | **int** value - | ) - - - Greater-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Greater-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Greater-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - Greater-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **float** value - | ) - - - Greater-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **double** value - | ) - - - Greater-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **long** value - | ) - - - Greater-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **int** value - | ) - - - Greater-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | :ref:`io.realm.RealmAny[] ` values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.util.Date[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Boolean[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Float[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Double[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Long[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Integer[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Short[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Byte[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.String[] `__ values, - | :ref:`Case ` casing - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.String[] `__ values - | ) - - - In comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`isEmpty ` ( - | `String `__ fieldName - | ) - - - Condition that finds values that are considered "empty" i.e., an empty list, the 0-length string or byte array. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`isNotEmpty ` ( - | `String `__ fieldName - | ) - - - Condition that finds values that are considered "Not-empty" i.e., a list, a string or a byte array with not-empty values. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`isNotNull ` ( - | `String `__ fieldName - | ) - - - Tests if a field is not ``null`` . - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`isNull ` ( - | `String `__ fieldName - | ) - - - Tests if a field is ``null`` . - - - - - - - * - public **boolean** - - | :ref:`isValid ` () - | - - - Checks if :ref:`io.realm.RealmQuery ` is still valid to use i.e., the :ref:`io.realm.Realm ` instance hasn't been closed and any parent :ref:`io.realm.RealmResults ` is still valid. - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`lessThan ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Less-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`lessThan ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Less-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`lessThan ` ( - | `String `__ fieldName, - | **long** value - | ) - - - Less-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`lessThan ` ( - | `String `__ fieldName, - | **int** value - | ) - - - Less-than comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`lessThanOrEqualTo ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Less-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`lessThanOrEqualTo ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Less-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`lessThanOrEqualTo ` ( - | `String `__ fieldName, - | **long** value - | ) - - - Less-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`lessThanOrEqualTo ` ( - | `String `__ fieldName, - | **int** value - | ) - - - Less-than-or-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`like ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - Condition that the value of field matches with the specified substring, with wildcards: - - - '\*' matches [0, n] unicode chars - - - - '?' matches a single unicode char. - - - - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`like ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - Condition that the value of field matches with the specified substring, with wildcards: - - - '\*' matches [0, n] unicode chars - - - - '?' matches a single unicode char. - - - - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`like ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - Condition that the value of field matches with the specified substring, with wildcards: - - - '\*' matches [0, n] unicode chars - - - - '?' matches a single unicode char. - - - - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`like ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Condition that the value of field matches with the specified substring, with wildcards: - - - '\*' matches [0, n] unicode chars - - - - '?' matches a single unicode char. - - - - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`limit ` ( - | **long** limit - | ) - - - Limits the number of objects returned in case the query matched more objects. - - - - - * - public `Number `__ - - | :ref:`max ` ( - | `String `__ fieldName - | ) - - - Finds the maximum value of a field. - - - - - * - public :ref:`RealmAny ` - - | :ref:`maxRealmAny ` ( - | `String `__ fieldName - | ) - - - Finds the maximum value of a :ref:`RealmAny ` field. - - - - - - - * - public `Date `__ - - | :ref:`maximumDate ` ( - | `String `__ fieldName - | ) - - - Finds the maximum value of a field. - - - - - * - public `Number `__ - - | :ref:`min ` ( - | `String `__ fieldName - | ) - - - Finds the minimum value of a field. - - - - - * - public :ref:`RealmAny ` - - | :ref:`minRealmAny ` ( - | `String `__ fieldName - | ) - - - Finds the minimum value of a :ref:`RealmAny ` field. - - - - - - - * - public `Date `__ - - | :ref:`minimumDate ` ( - | `String `__ fieldName - | ) - - - Finds the minimum value of a field. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`not ` () - | - - - Negate condition. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`notEqualTo ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Not-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`notEqualTo ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Not-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`notEqualTo ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - Not-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`notEqualTo ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - Not-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`notEqualTo ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Not-equal-to comparison. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`or ` () - | - - - Logical-or two conditions. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`rawPredicate ` ( - | `String `__ predicate, - | `java.lang.Object[] `__ arguments - | ) - - - Create a text-based predicate using the Realm Query Language. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`sort ` ( - | `java.lang.String[] `__ fieldNames, - | :ref:`io.realm.Sort[] ` sortOrders - | ) - - - Sorts the query result by the specific field names in the provided orders. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - Sorts the query result by the specific field names in the provided orders. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`sort ` ( - | `String `__ fieldName, - | :ref:`Sort ` sortOrder - | ) - - - Sorts the query result by the specified field name and order. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`sort ` ( - | `String `__ fieldName - | ) - - - Sorts the query result by the specific field name in ascending order. - - - - - * - public `Number `__ - - | :ref:`sum ` ( - | `String `__ fieldName - | ) - - - Calculates the sum of a given field. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _alwaysFalse: - -.. _alwaysFalse__: - -.. _RealmQuery_alwaysFalse: - -.. _RealmQuery_alwaysFalse__: - -.. _io_realm_RealmQuery_alwaysFalse: - -.. _io_realm_RealmQuery_alwaysFalse__: - - - -alwaysFalse ------------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`alwaysFalse ` () - | - - - - - * - This predicate will never match, resulting in the query always returning 0 results. - - - - - - - - - - - - - - - -.. _alwaysTrue: - -.. _alwaysTrue__: - -.. _RealmQuery_alwaysTrue: - -.. _RealmQuery_alwaysTrue__: - -.. _io_realm_RealmQuery_alwaysTrue: - -.. _io_realm_RealmQuery_alwaysTrue__: - - - -alwaysTrue ----------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`alwaysTrue ` () - | - - - - - * - This predicate will always match. - - - - - - - - - - - - - - - -.. _and: - -.. _and__: - -.. _RealmQuery_and: - -.. _RealmQuery_and__: - -.. _io_realm_RealmQuery_and: - -.. _io_realm_RealmQuery_and__: - - - -and ----- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`and ` () - | - - - - - * - Logical-and two conditions Realm automatically applies logical-and between all query statements, so this is intended only as a mean to increase readability. - - - - - - - **Returns** - - the query object - - - - - - - - - - - -.. _average: - -.. _average__: - -.. _RealmQuery_average: - -.. _RealmQuery_average__: - -.. _io_realm_RealmQuery_average: - -.. _io_realm_RealmQuery_average__: - - - -average -------- - -.. _io_realm_RealmQuery_average_java_lang_String_: - -.. _io_realm_RealmQuery_average_String_: - -.. _average_java_lang_String_: - -.. _average_String_: - -.. _RealmQuery_average_java_lang_String_: - -.. _RealmQuery_average_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **double** :ref:`average ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the average of a given field. Does not support dotted field notation. - - - - - **Parameters** - - - ``fieldName`` - the field to calculate average on. Only number fields are supported. - - - - - - - - **Returns** - - the average for the given field amongst objects in query results. This will be of type double for all types of number fields. If no objects exist or they all have ``null`` as the value for the given field, ``0`` will be returned. When computing the average, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a number type. - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _averageDecimal128: - -.. _averageDecimal128__: - -.. _RealmQuery_averageDecimal128: - -.. _RealmQuery_averageDecimal128__: - -.. _io_realm_RealmQuery_averageDecimal128: - -.. _io_realm_RealmQuery_averageDecimal128__: - - - -averageDecimal128 ------------------ - -.. _io_realm_RealmQuery_averageDecimal128_java_lang_String_: - -.. _io_realm_RealmQuery_averageDecimal128_String_: - -.. _averageDecimal128_java_lang_String_: - -.. _averageDecimal128_String_: - -.. _RealmQuery_averageDecimal128_java_lang_String_: - -.. _RealmQuery_averageDecimal128_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **Decimal128** :ref:`averageDecimal128 ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the average of a given field. Does not support dotted field notation. - - - - - **Parameters** - - - ``fieldName`` - the field to calculate average on. Only Decimal128 fields is supported. For other number types consider using :ref:`average(String) ` . - - - - - - - - - - **Returns** - - the average for the given field amongst objects in query results. This will be of type Decimal128. If no objects exist or they all have ``null`` as the value for the given field ``0`` will be returned. When computing the average, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a Decimal128 type. - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _averageRealmAny: - -.. _averageRealmAny__: - -.. _RealmQuery_averageRealmAny: - -.. _RealmQuery_averageRealmAny__: - -.. _io_realm_RealmQuery_averageRealmAny: - -.. _io_realm_RealmQuery_averageRealmAny__: - - - -averageRealmAny ---------------- - -.. _io_realm_RealmQuery_averageRealmAny_java_lang_String_: - -.. _io_realm_RealmQuery_averageRealmAny_String_: - -.. _averageRealmAny_java_lang_String_: - -.. _averageRealmAny_String_: - -.. _RealmQuery_averageRealmAny_java_lang_String_: - -.. _RealmQuery_averageRealmAny_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **Decimal128** :ref:`averageRealmAny ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the average of a given field. Does not support dotted field notation. - - - - - **Parameters** - - - ``fieldName`` - the field to calculate average on. Only RealmAny fields are supported. For other types consider using :ref:`average(String) ` . - - - - - - - - - - **Returns** - - the average for the given field amongst objects in query results. This will be of type Decimal128. If no objects exist or they all have ``null`` as the value for the given field ``0`` will be returned. When computing the average, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a RealmAny type. - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _beginGroup: - -.. _beginGroup__: - -.. _RealmQuery_beginGroup: - -.. _RealmQuery_beginGroup__: - -.. _io_realm_RealmQuery_beginGroup: - -.. _io_realm_RealmQuery_beginGroup__: - - - -beginGroup ----------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`beginGroup ` () - | - - - - - * - Begin grouping of conditions ("left parenthesis"). A group must be closed with a call to ``endGroup()`` . - - - - - - - - - **Returns** - - the query object. - - - - - - - - - .. seealso:: - - - - - :ref:`endGroup() ` - - - - - - - - - - - - -.. _beginsWith: - -.. _beginsWith__: - -.. _RealmQuery_beginsWith: - -.. _RealmQuery_beginsWith__: - -.. _io_realm_RealmQuery_beginsWith: - -.. _io_realm_RealmQuery_beginsWith__: - - - -beginsWith ----------- - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__RealmAny__Case_: - -.. _io_realm_RealmQuery_beginsWith_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_beginsWith_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_beginsWith_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_beginsWith_String__RealmAny__Case_: - -.. _beginsWith_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _beginsWith_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _beginsWith_java_lang_String_io_realm_RealmAny_Case_: - -.. _beginsWith_java_lang_String__io_realm_RealmAny__Case_: - -.. _beginsWith_java_lang_String_RealmAny_io_realm_Case_: - -.. _beginsWith_java_lang_String__RealmAny__io_realm_Case_: - -.. _beginsWith_java_lang_String_RealmAny_Case_: - -.. _beginsWith_java_lang_String__RealmAny__Case_: - -.. _beginsWith_String_io_realm_RealmAny_io_realm_Case_: - -.. _beginsWith_String__io_realm_RealmAny__io_realm_Case_: - -.. _beginsWith_String_io_realm_RealmAny_Case_: - -.. _beginsWith_String__io_realm_RealmAny__Case_: - -.. _beginsWith_String_RealmAny_io_realm_Case_: - -.. _beginsWith_String__RealmAny__io_realm_Case_: - -.. _beginsWith_String_RealmAny_Case_: - -.. _beginsWith_String__RealmAny__Case_: - -.. _RealmQuery_beginsWith_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_beginsWith_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_beginsWith_java_lang_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_beginsWith_java_lang_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_beginsWith_java_lang_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_beginsWith_java_lang_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_beginsWith_java_lang_String_RealmAny_Case_: - -.. _RealmQuery_beginsWith_java_lang_String__RealmAny__Case_: - -.. _RealmQuery_beginsWith_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_beginsWith_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_beginsWith_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_beginsWith_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_beginsWith_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_beginsWith_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_beginsWith_String_RealmAny_Case_: - -.. _RealmQuery_beginsWith_String__RealmAny__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`beginsWith ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - - - * - Condition that the value of field begins with the specified substring. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the substring. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - the query object - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_String_Case_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__String__Case_: - -.. _io_realm_RealmQuery_beginsWith_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_beginsWith_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_beginsWith_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_beginsWith_String_String_Case_: - -.. _io_realm_RealmQuery_beginsWith_String__String__Case_: - -.. _beginsWith_java_lang_String_java_lang_String_io_realm_Case_: - -.. _beginsWith_java_lang_String__java_lang_String__io_realm_Case_: - -.. _beginsWith_java_lang_String_java_lang_String_Case_: - -.. _beginsWith_java_lang_String__java_lang_String__Case_: - -.. _beginsWith_java_lang_String_String_io_realm_Case_: - -.. _beginsWith_java_lang_String__String__io_realm_Case_: - -.. _beginsWith_java_lang_String_String_Case_: - -.. _beginsWith_java_lang_String__String__Case_: - -.. _beginsWith_String_java_lang_String_io_realm_Case_: - -.. _beginsWith_String__java_lang_String__io_realm_Case_: - -.. _beginsWith_String_java_lang_String_Case_: - -.. _beginsWith_String__java_lang_String__Case_: - -.. _beginsWith_String_String_io_realm_Case_: - -.. _beginsWith_String__String__io_realm_Case_: - -.. _beginsWith_String_String_Case_: - -.. _beginsWith_String__String__Case_: - -.. _RealmQuery_beginsWith_java_lang_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_beginsWith_java_lang_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_beginsWith_java_lang_String_java_lang_String_Case_: - -.. _RealmQuery_beginsWith_java_lang_String__java_lang_String__Case_: - -.. _RealmQuery_beginsWith_java_lang_String_String_io_realm_Case_: - -.. _RealmQuery_beginsWith_java_lang_String__String__io_realm_Case_: - -.. _RealmQuery_beginsWith_java_lang_String_String_Case_: - -.. _RealmQuery_beginsWith_java_lang_String__String__Case_: - -.. _RealmQuery_beginsWith_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_beginsWith_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_beginsWith_String_java_lang_String_Case_: - -.. _RealmQuery_beginsWith_String__java_lang_String__Case_: - -.. _RealmQuery_beginsWith_String_String_io_realm_Case_: - -.. _RealmQuery_beginsWith_String__String__io_realm_Case_: - -.. _RealmQuery_beginsWith_String_String_Case_: - -.. _RealmQuery_beginsWith_String__String__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`beginsWith ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - - - * - Condition that the value of field begins with the specified substring. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the substring. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - the query object - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_RealmAny_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__RealmAny_: - -.. _io_realm_RealmQuery_beginsWith_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_beginsWith_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_beginsWith_String_RealmAny_: - -.. _io_realm_RealmQuery_beginsWith_String__RealmAny_: - -.. _beginsWith_java_lang_String_io_realm_RealmAny_: - -.. _beginsWith_java_lang_String__io_realm_RealmAny_: - -.. _beginsWith_java_lang_String_RealmAny_: - -.. _beginsWith_java_lang_String__RealmAny_: - -.. _beginsWith_String_io_realm_RealmAny_: - -.. _beginsWith_String__io_realm_RealmAny_: - -.. _beginsWith_String_RealmAny_: - -.. _beginsWith_String__RealmAny_: - -.. _RealmQuery_beginsWith_java_lang_String_io_realm_RealmAny_: - -.. _RealmQuery_beginsWith_java_lang_String__io_realm_RealmAny_: - -.. _RealmQuery_beginsWith_java_lang_String_RealmAny_: - -.. _RealmQuery_beginsWith_java_lang_String__RealmAny_: - -.. _RealmQuery_beginsWith_String_io_realm_RealmAny_: - -.. _RealmQuery_beginsWith_String__io_realm_RealmAny_: - -.. _RealmQuery_beginsWith_String_RealmAny_: - -.. _RealmQuery_beginsWith_String__RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`beginsWith ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - - - * - Condition that the value of field begins with the specified string. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the string. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String_String_: - -.. _io_realm_RealmQuery_beginsWith_java_lang_String__String_: - -.. _io_realm_RealmQuery_beginsWith_String_java_lang_String_: - -.. _io_realm_RealmQuery_beginsWith_String__java_lang_String_: - -.. _io_realm_RealmQuery_beginsWith_String_String_: - -.. _io_realm_RealmQuery_beginsWith_String__String_: - -.. _beginsWith_java_lang_String_java_lang_String_: - -.. _beginsWith_java_lang_String__java_lang_String_: - -.. _beginsWith_java_lang_String_String_: - -.. _beginsWith_java_lang_String__String_: - -.. _beginsWith_String_java_lang_String_: - -.. _beginsWith_String__java_lang_String_: - -.. _beginsWith_String_String_: - -.. _beginsWith_String__String_: - -.. _RealmQuery_beginsWith_java_lang_String_java_lang_String_: - -.. _RealmQuery_beginsWith_java_lang_String__java_lang_String_: - -.. _RealmQuery_beginsWith_java_lang_String_String_: - -.. _RealmQuery_beginsWith_java_lang_String__String_: - -.. _RealmQuery_beginsWith_String_java_lang_String_: - -.. _RealmQuery_beginsWith_String__java_lang_String_: - -.. _RealmQuery_beginsWith_String_String_: - -.. _RealmQuery_beginsWith_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`beginsWith ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Condition that the value of field begins with the specified string. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the string. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _between: - -.. _between__: - -.. _RealmQuery_between: - -.. _RealmQuery_between__: - -.. _io_realm_RealmQuery_between: - -.. _io_realm_RealmQuery_between__: - - - -between -------- - -.. _io_realm_RealmQuery_between_java_lang_String_Decimal128_Decimal128_: - -.. _io_realm_RealmQuery_between_java_lang_String__Decimal128__Decimal128_: - -.. _io_realm_RealmQuery_between_String_Decimal128_Decimal128_: - -.. _io_realm_RealmQuery_between_String__Decimal128__Decimal128_: - -.. _between_java_lang_String_Decimal128_Decimal128_: - -.. _between_java_lang_String__Decimal128__Decimal128_: - -.. _between_String_Decimal128_Decimal128_: - -.. _between_String__Decimal128__Decimal128_: - -.. _RealmQuery_between_java_lang_String_Decimal128_Decimal128_: - -.. _RealmQuery_between_java_lang_String__Decimal128__Decimal128_: - -.. _RealmQuery_between_String_Decimal128_Decimal128_: - -.. _RealmQuery_between_String__Decimal128__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`between ` ( - | `String `__ fieldName, - | **Decimal128** from, - | **Decimal128** to - | ) - - - - - * - Between condition. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``from`` - lowest value (inclusive). - - - - - ``to`` - highest value (inclusive). - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_between_java_lang_String_io_realm_RealmAny_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_between_java_lang_String__io_realm_RealmAny__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_between_java_lang_String_io_realm_RealmAny_RealmAny_: - -.. _io_realm_RealmQuery_between_java_lang_String__io_realm_RealmAny__RealmAny_: - -.. _io_realm_RealmQuery_between_java_lang_String_RealmAny_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_between_java_lang_String__RealmAny__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_between_java_lang_String_RealmAny_RealmAny_: - -.. _io_realm_RealmQuery_between_java_lang_String__RealmAny__RealmAny_: - -.. _io_realm_RealmQuery_between_String_io_realm_RealmAny_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_between_String__io_realm_RealmAny__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_between_String_io_realm_RealmAny_RealmAny_: - -.. _io_realm_RealmQuery_between_String__io_realm_RealmAny__RealmAny_: - -.. _io_realm_RealmQuery_between_String_RealmAny_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_between_String__RealmAny__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_between_String_RealmAny_RealmAny_: - -.. _io_realm_RealmQuery_between_String__RealmAny__RealmAny_: - -.. _between_java_lang_String_io_realm_RealmAny_io_realm_RealmAny_: - -.. _between_java_lang_String__io_realm_RealmAny__io_realm_RealmAny_: - -.. _between_java_lang_String_io_realm_RealmAny_RealmAny_: - -.. _between_java_lang_String__io_realm_RealmAny__RealmAny_: - -.. _between_java_lang_String_RealmAny_io_realm_RealmAny_: - -.. _between_java_lang_String__RealmAny__io_realm_RealmAny_: - -.. _between_java_lang_String_RealmAny_RealmAny_: - -.. _between_java_lang_String__RealmAny__RealmAny_: - -.. _between_String_io_realm_RealmAny_io_realm_RealmAny_: - -.. _between_String__io_realm_RealmAny__io_realm_RealmAny_: - -.. _between_String_io_realm_RealmAny_RealmAny_: - -.. _between_String__io_realm_RealmAny__RealmAny_: - -.. _between_String_RealmAny_io_realm_RealmAny_: - -.. _between_String__RealmAny__io_realm_RealmAny_: - -.. _between_String_RealmAny_RealmAny_: - -.. _between_String__RealmAny__RealmAny_: - -.. _RealmQuery_between_java_lang_String_io_realm_RealmAny_io_realm_RealmAny_: - -.. _RealmQuery_between_java_lang_String__io_realm_RealmAny__io_realm_RealmAny_: - -.. _RealmQuery_between_java_lang_String_io_realm_RealmAny_RealmAny_: - -.. _RealmQuery_between_java_lang_String__io_realm_RealmAny__RealmAny_: - -.. _RealmQuery_between_java_lang_String_RealmAny_io_realm_RealmAny_: - -.. _RealmQuery_between_java_lang_String__RealmAny__io_realm_RealmAny_: - -.. _RealmQuery_between_java_lang_String_RealmAny_RealmAny_: - -.. _RealmQuery_between_java_lang_String__RealmAny__RealmAny_: - -.. _RealmQuery_between_String_io_realm_RealmAny_io_realm_RealmAny_: - -.. _RealmQuery_between_String__io_realm_RealmAny__io_realm_RealmAny_: - -.. _RealmQuery_between_String_io_realm_RealmAny_RealmAny_: - -.. _RealmQuery_between_String__io_realm_RealmAny__RealmAny_: - -.. _RealmQuery_between_String_RealmAny_io_realm_RealmAny_: - -.. _RealmQuery_between_String__RealmAny__io_realm_RealmAny_: - -.. _RealmQuery_between_String_RealmAny_RealmAny_: - -.. _RealmQuery_between_String__RealmAny__RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`between ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` from, - | :ref:`RealmAny ` to - | ) - - - - - * - Between condition. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``from`` - lowest value (inclusive). - - - - - ``to`` - highest value (inclusive). - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_between_java_lang_String_java_util_Date_java_util_Date_: - -.. _io_realm_RealmQuery_between_java_lang_String__java_util_Date__java_util_Date_: - -.. _io_realm_RealmQuery_between_java_lang_String_java_util_Date_Date_: - -.. _io_realm_RealmQuery_between_java_lang_String__java_util_Date__Date_: - -.. _io_realm_RealmQuery_between_java_lang_String_Date_java_util_Date_: - -.. _io_realm_RealmQuery_between_java_lang_String__Date__java_util_Date_: - -.. _io_realm_RealmQuery_between_java_lang_String_Date_Date_: - -.. _io_realm_RealmQuery_between_java_lang_String__Date__Date_: - -.. _io_realm_RealmQuery_between_String_java_util_Date_java_util_Date_: - -.. _io_realm_RealmQuery_between_String__java_util_Date__java_util_Date_: - -.. _io_realm_RealmQuery_between_String_java_util_Date_Date_: - -.. _io_realm_RealmQuery_between_String__java_util_Date__Date_: - -.. _io_realm_RealmQuery_between_String_Date_java_util_Date_: - -.. _io_realm_RealmQuery_between_String__Date__java_util_Date_: - -.. _io_realm_RealmQuery_between_String_Date_Date_: - -.. _io_realm_RealmQuery_between_String__Date__Date_: - -.. _between_java_lang_String_java_util_Date_java_util_Date_: - -.. _between_java_lang_String__java_util_Date__java_util_Date_: - -.. _between_java_lang_String_java_util_Date_Date_: - -.. _between_java_lang_String__java_util_Date__Date_: - -.. _between_java_lang_String_Date_java_util_Date_: - -.. _between_java_lang_String__Date__java_util_Date_: - -.. _between_java_lang_String_Date_Date_: - -.. _between_java_lang_String__Date__Date_: - -.. _between_String_java_util_Date_java_util_Date_: - -.. _between_String__java_util_Date__java_util_Date_: - -.. _between_String_java_util_Date_Date_: - -.. _between_String__java_util_Date__Date_: - -.. _between_String_Date_java_util_Date_: - -.. _between_String__Date__java_util_Date_: - -.. _between_String_Date_Date_: - -.. _between_String__Date__Date_: - -.. _RealmQuery_between_java_lang_String_java_util_Date_java_util_Date_: - -.. _RealmQuery_between_java_lang_String__java_util_Date__java_util_Date_: - -.. _RealmQuery_between_java_lang_String_java_util_Date_Date_: - -.. _RealmQuery_between_java_lang_String__java_util_Date__Date_: - -.. _RealmQuery_between_java_lang_String_Date_java_util_Date_: - -.. _RealmQuery_between_java_lang_String__Date__java_util_Date_: - -.. _RealmQuery_between_java_lang_String_Date_Date_: - -.. _RealmQuery_between_java_lang_String__Date__Date_: - -.. _RealmQuery_between_String_java_util_Date_java_util_Date_: - -.. _RealmQuery_between_String__java_util_Date__java_util_Date_: - -.. _RealmQuery_between_String_java_util_Date_Date_: - -.. _RealmQuery_between_String__java_util_Date__Date_: - -.. _RealmQuery_between_String_Date_java_util_Date_: - -.. _RealmQuery_between_String__Date__java_util_Date_: - -.. _RealmQuery_between_String_Date_Date_: - -.. _RealmQuery_between_String__Date__Date_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`between ` ( - | `String `__ fieldName, - | `Date `__ from, - | `Date `__ to - | ) - - - - - * - Between condition. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``from`` - lowest value (inclusive). - - - - - ``to`` - highest value (inclusive). - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_between_java_lang_String_float_float_: - -.. _io_realm_RealmQuery_between_java_lang_String__float__float_: - -.. _io_realm_RealmQuery_between_String_float_float_: - -.. _io_realm_RealmQuery_between_String__float__float_: - -.. _between_java_lang_String_float_float_: - -.. _between_java_lang_String__float__float_: - -.. _between_String_float_float_: - -.. _between_String__float__float_: - -.. _RealmQuery_between_java_lang_String_float_float_: - -.. _RealmQuery_between_java_lang_String__float__float_: - -.. _RealmQuery_between_String_float_float_: - -.. _RealmQuery_between_String__float__float_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`between ` ( - | `String `__ fieldName, - | **float** from, - | **float** to - | ) - - - - - * - Between condition. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``from`` - lowest value (inclusive). - - - - - ``to`` - highest value (inclusive). - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_between_java_lang_String_double_double_: - -.. _io_realm_RealmQuery_between_java_lang_String__double__double_: - -.. _io_realm_RealmQuery_between_String_double_double_: - -.. _io_realm_RealmQuery_between_String__double__double_: - -.. _between_java_lang_String_double_double_: - -.. _between_java_lang_String__double__double_: - -.. _between_String_double_double_: - -.. _between_String__double__double_: - -.. _RealmQuery_between_java_lang_String_double_double_: - -.. _RealmQuery_between_java_lang_String__double__double_: - -.. _RealmQuery_between_String_double_double_: - -.. _RealmQuery_between_String__double__double_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`between ` ( - | `String `__ fieldName, - | **double** from, - | **double** to - | ) - - - - - * - Between condition. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``from`` - lowest value (inclusive). - - - - - ``to`` - highest value (inclusive). - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_between_java_lang_String_long_long_: - -.. _io_realm_RealmQuery_between_java_lang_String__long__long_: - -.. _io_realm_RealmQuery_between_String_long_long_: - -.. _io_realm_RealmQuery_between_String__long__long_: - -.. _between_java_lang_String_long_long_: - -.. _between_java_lang_String__long__long_: - -.. _between_String_long_long_: - -.. _between_String__long__long_: - -.. _RealmQuery_between_java_lang_String_long_long_: - -.. _RealmQuery_between_java_lang_String__long__long_: - -.. _RealmQuery_between_String_long_long_: - -.. _RealmQuery_between_String__long__long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`between ` ( - | `String `__ fieldName, - | **long** from, - | **long** to - | ) - - - - - * - Between condition. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``from`` - lowest value (inclusive). - - - - - ``to`` - highest value (inclusive). - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_between_java_lang_String_int_int_: - -.. _io_realm_RealmQuery_between_java_lang_String__int__int_: - -.. _io_realm_RealmQuery_between_String_int_int_: - -.. _io_realm_RealmQuery_between_String__int__int_: - -.. _between_java_lang_String_int_int_: - -.. _between_java_lang_String__int__int_: - -.. _between_String_int_int_: - -.. _between_String__int__int_: - -.. _RealmQuery_between_java_lang_String_int_int_: - -.. _RealmQuery_between_java_lang_String__int__int_: - -.. _RealmQuery_between_String_int_int_: - -.. _RealmQuery_between_String__int__int_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`between ` ( - | `String `__ fieldName, - | **int** from, - | **int** to - | ) - - - - - * - Between condition. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``from`` - lowest value (inclusive). - - - - - ``to`` - highest value (inclusive). - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _contains: - -.. _contains__: - -.. _RealmQuery_contains: - -.. _RealmQuery_contains__: - -.. _io_realm_RealmQuery_contains: - -.. _io_realm_RealmQuery_contains__: - - - -contains --------- - -.. _io_realm_RealmQuery_contains_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String__RealmAny__Case_: - -.. _io_realm_RealmQuery_contains_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_contains_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_contains_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_contains_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_contains_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_contains_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_contains_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_contains_String__RealmAny__Case_: - -.. _contains_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _contains_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _contains_java_lang_String_io_realm_RealmAny_Case_: - -.. _contains_java_lang_String__io_realm_RealmAny__Case_: - -.. _contains_java_lang_String_RealmAny_io_realm_Case_: - -.. _contains_java_lang_String__RealmAny__io_realm_Case_: - -.. _contains_java_lang_String_RealmAny_Case_: - -.. _contains_java_lang_String__RealmAny__Case_: - -.. _contains_String_io_realm_RealmAny_io_realm_Case_: - -.. _contains_String__io_realm_RealmAny__io_realm_Case_: - -.. _contains_String_io_realm_RealmAny_Case_: - -.. _contains_String__io_realm_RealmAny__Case_: - -.. _contains_String_RealmAny_io_realm_Case_: - -.. _contains_String__RealmAny__io_realm_Case_: - -.. _contains_String_RealmAny_Case_: - -.. _contains_String__RealmAny__Case_: - -.. _RealmQuery_contains_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_contains_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_contains_java_lang_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_contains_java_lang_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_contains_java_lang_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_contains_java_lang_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_contains_java_lang_String_RealmAny_Case_: - -.. _RealmQuery_contains_java_lang_String__RealmAny__Case_: - -.. _RealmQuery_contains_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_contains_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_contains_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_contains_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_contains_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_contains_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_contains_String_RealmAny_Case_: - -.. _RealmQuery_contains_String__RealmAny__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`contains ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - - - * - Condition that value of field contains the specified substring. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the substring. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - The query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_contains_java_lang_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String_String_Case_: - -.. _io_realm_RealmQuery_contains_java_lang_String__String__Case_: - -.. _io_realm_RealmQuery_contains_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_contains_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_contains_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_contains_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_contains_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_contains_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_contains_String_String_Case_: - -.. _io_realm_RealmQuery_contains_String__String__Case_: - -.. _contains_java_lang_String_java_lang_String_io_realm_Case_: - -.. _contains_java_lang_String__java_lang_String__io_realm_Case_: - -.. _contains_java_lang_String_java_lang_String_Case_: - -.. _contains_java_lang_String__java_lang_String__Case_: - -.. _contains_java_lang_String_String_io_realm_Case_: - -.. _contains_java_lang_String__String__io_realm_Case_: - -.. _contains_java_lang_String_String_Case_: - -.. _contains_java_lang_String__String__Case_: - -.. _contains_String_java_lang_String_io_realm_Case_: - -.. _contains_String__java_lang_String__io_realm_Case_: - -.. _contains_String_java_lang_String_Case_: - -.. _contains_String__java_lang_String__Case_: - -.. _contains_String_String_io_realm_Case_: - -.. _contains_String__String__io_realm_Case_: - -.. _contains_String_String_Case_: - -.. _contains_String__String__Case_: - -.. _RealmQuery_contains_java_lang_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_contains_java_lang_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_contains_java_lang_String_java_lang_String_Case_: - -.. _RealmQuery_contains_java_lang_String__java_lang_String__Case_: - -.. _RealmQuery_contains_java_lang_String_String_io_realm_Case_: - -.. _RealmQuery_contains_java_lang_String__String__io_realm_Case_: - -.. _RealmQuery_contains_java_lang_String_String_Case_: - -.. _RealmQuery_contains_java_lang_String__String__Case_: - -.. _RealmQuery_contains_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_contains_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_contains_String_java_lang_String_Case_: - -.. _RealmQuery_contains_String__java_lang_String__Case_: - -.. _RealmQuery_contains_String_String_io_realm_Case_: - -.. _RealmQuery_contains_String__String__io_realm_Case_: - -.. _RealmQuery_contains_String_String_Case_: - -.. _RealmQuery_contains_String__String__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`contains ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - - - * - Condition that value of field contains the specified substring. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the substring. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - The query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_contains_java_lang_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_contains_java_lang_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_contains_java_lang_String_RealmAny_: - -.. _io_realm_RealmQuery_contains_java_lang_String__RealmAny_: - -.. _io_realm_RealmQuery_contains_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_contains_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_contains_String_RealmAny_: - -.. _io_realm_RealmQuery_contains_String__RealmAny_: - -.. _contains_java_lang_String_io_realm_RealmAny_: - -.. _contains_java_lang_String__io_realm_RealmAny_: - -.. _contains_java_lang_String_RealmAny_: - -.. _contains_java_lang_String__RealmAny_: - -.. _contains_String_io_realm_RealmAny_: - -.. _contains_String__io_realm_RealmAny_: - -.. _contains_String_RealmAny_: - -.. _contains_String__RealmAny_: - -.. _RealmQuery_contains_java_lang_String_io_realm_RealmAny_: - -.. _RealmQuery_contains_java_lang_String__io_realm_RealmAny_: - -.. _RealmQuery_contains_java_lang_String_RealmAny_: - -.. _RealmQuery_contains_java_lang_String__RealmAny_: - -.. _RealmQuery_contains_String_io_realm_RealmAny_: - -.. _RealmQuery_contains_String__io_realm_RealmAny_: - -.. _RealmQuery_contains_String_RealmAny_: - -.. _RealmQuery_contains_String__RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`contains ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - - - * - Condition that value of field contains the specified substring. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the substring. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_contains_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_contains_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_contains_java_lang_String_String_: - -.. _io_realm_RealmQuery_contains_java_lang_String__String_: - -.. _io_realm_RealmQuery_contains_String_java_lang_String_: - -.. _io_realm_RealmQuery_contains_String__java_lang_String_: - -.. _io_realm_RealmQuery_contains_String_String_: - -.. _io_realm_RealmQuery_contains_String__String_: - -.. _contains_java_lang_String_java_lang_String_: - -.. _contains_java_lang_String__java_lang_String_: - -.. _contains_java_lang_String_String_: - -.. _contains_java_lang_String__String_: - -.. _contains_String_java_lang_String_: - -.. _contains_String__java_lang_String_: - -.. _contains_String_String_: - -.. _contains_String__String_: - -.. _RealmQuery_contains_java_lang_String_java_lang_String_: - -.. _RealmQuery_contains_java_lang_String__java_lang_String_: - -.. _RealmQuery_contains_java_lang_String_String_: - -.. _RealmQuery_contains_java_lang_String__String_: - -.. _RealmQuery_contains_String_java_lang_String_: - -.. _RealmQuery_contains_String__java_lang_String_: - -.. _RealmQuery_contains_String_String_: - -.. _RealmQuery_contains_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`contains ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Condition that value of field contains the specified substring. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the substring. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _containsEntry: - -.. _containsEntry__: - -.. _RealmQuery_containsEntry: - -.. _RealmQuery_containsEntry__: - -.. _io_realm_RealmQuery_containsEntry: - -.. _io_realm_RealmQuery_containsEntry__: - - - -containsEntry -------------- - -.. _io_realm_RealmQuery_containsEntry_java_lang_String_java_util_Map_Entry_: - -.. _io_realm_RealmQuery_containsEntry_java_lang_String__java_util_Map_Entry_: - -.. _io_realm_RealmQuery_containsEntry_java_lang_String_Entry_: - -.. _io_realm_RealmQuery_containsEntry_java_lang_String__Entry_: - -.. _io_realm_RealmQuery_containsEntry_java_lang_String_Map_Entry_: - -.. _io_realm_RealmQuery_containsEntry_java_lang_String__Map_Entry_: - -.. _io_realm_RealmQuery_containsEntry_String_java_util_Map_Entry_: - -.. _io_realm_RealmQuery_containsEntry_String__java_util_Map_Entry_: - -.. _io_realm_RealmQuery_containsEntry_String_Entry_: - -.. _io_realm_RealmQuery_containsEntry_String__Entry_: - -.. _io_realm_RealmQuery_containsEntry_String_Map_Entry_: - -.. _io_realm_RealmQuery_containsEntry_String__Map_Entry_: - -.. _containsEntry_java_lang_String_java_util_Map_Entry_: - -.. _containsEntry_java_lang_String__java_util_Map_Entry_: - -.. _containsEntry_java_lang_String_Entry_: - -.. _containsEntry_java_lang_String__Entry_: - -.. _containsEntry_java_lang_String_Map_Entry_: - -.. _containsEntry_java_lang_String__Map_Entry_: - -.. _containsEntry_String_java_util_Map_Entry_: - -.. _containsEntry_String__java_util_Map_Entry_: - -.. _containsEntry_String_Entry_: - -.. _containsEntry_String__Entry_: - -.. _containsEntry_String_Map_Entry_: - -.. _containsEntry_String__Map_Entry_: - -.. _RealmQuery_containsEntry_java_lang_String_java_util_Map_Entry_: - -.. _RealmQuery_containsEntry_java_lang_String__java_util_Map_Entry_: - -.. _RealmQuery_containsEntry_java_lang_String_Entry_: - -.. _RealmQuery_containsEntry_java_lang_String__Entry_: - -.. _RealmQuery_containsEntry_java_lang_String_Map_Entry_: - -.. _RealmQuery_containsEntry_java_lang_String__Map_Entry_: - -.. _RealmQuery_containsEntry_String_java_util_Map_Entry_: - -.. _RealmQuery_containsEntry_String__java_util_Map_Entry_: - -.. _RealmQuery_containsEntry_String_Entry_: - -.. _RealmQuery_containsEntry_String__Entry_: - -.. _RealmQuery_containsEntry_String_Map_Entry_: - -.. _RealmQuery_containsEntry_String__Map_Entry_: - -.. _io_realm_RealmQuery_containsEntry_String__Map_Entry_String_____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsEntry ` ( - | `String `__ fieldName, - | `java.util.Map.Entry\ `__ entry - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified entry. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``entry`` - the entry to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - - - -.. _containsKey: - -.. _containsKey__: - -.. _RealmQuery_containsKey: - -.. _RealmQuery_containsKey__: - -.. _io_realm_RealmQuery_containsKey: - -.. _io_realm_RealmQuery_containsKey__: - - - -containsKey ------------ - -.. _io_realm_RealmQuery_containsKey_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_containsKey_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_containsKey_java_lang_String_String_: - -.. _io_realm_RealmQuery_containsKey_java_lang_String__String_: - -.. _io_realm_RealmQuery_containsKey_String_java_lang_String_: - -.. _io_realm_RealmQuery_containsKey_String__java_lang_String_: - -.. _io_realm_RealmQuery_containsKey_String_String_: - -.. _io_realm_RealmQuery_containsKey_String__String_: - -.. _containsKey_java_lang_String_java_lang_String_: - -.. _containsKey_java_lang_String__java_lang_String_: - -.. _containsKey_java_lang_String_String_: - -.. _containsKey_java_lang_String__String_: - -.. _containsKey_String_java_lang_String_: - -.. _containsKey_String__java_lang_String_: - -.. _containsKey_String_String_: - -.. _containsKey_String__String_: - -.. _RealmQuery_containsKey_java_lang_String_java_lang_String_: - -.. _RealmQuery_containsKey_java_lang_String__java_lang_String_: - -.. _RealmQuery_containsKey_java_lang_String_String_: - -.. _RealmQuery_containsKey_java_lang_String__String_: - -.. _RealmQuery_containsKey_String_java_lang_String_: - -.. _RealmQuery_containsKey_String__java_lang_String_: - -.. _RealmQuery_containsKey_String_String_: - -.. _RealmQuery_containsKey_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsKey ` ( - | `String `__ fieldName, - | `String `__ key - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified key. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``key`` - the key to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - - - -.. _containsValue: - -.. _containsValue__: - -.. _RealmQuery_containsValue: - -.. _RealmQuery_containsValue__: - -.. _io_realm_RealmQuery_containsValue: - -.. _io_realm_RealmQuery_containsValue__: - - - -containsValue -------------- - -.. _io_realm_RealmQuery_containsValue_java_lang_String_ObjectId_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__ObjectId_: - -.. _io_realm_RealmQuery_containsValue_String_ObjectId_: - -.. _io_realm_RealmQuery_containsValue_String__ObjectId_: - -.. _containsValue_java_lang_String_ObjectId_: - -.. _containsValue_java_lang_String__ObjectId_: - -.. _containsValue_String_ObjectId_: - -.. _containsValue_String__ObjectId_: - -.. _RealmQuery_containsValue_java_lang_String_ObjectId_: - -.. _RealmQuery_containsValue_java_lang_String__ObjectId_: - -.. _RealmQuery_containsValue_String_ObjectId_: - -.. _RealmQuery_containsValue_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Decimal128_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Decimal128_: - -.. _io_realm_RealmQuery_containsValue_String_Decimal128_: - -.. _io_realm_RealmQuery_containsValue_String__Decimal128_: - -.. _containsValue_java_lang_String_Decimal128_: - -.. _containsValue_java_lang_String__Decimal128_: - -.. _containsValue_String_Decimal128_: - -.. _containsValue_String__Decimal128_: - -.. _RealmQuery_containsValue_java_lang_String_Decimal128_: - -.. _RealmQuery_containsValue_java_lang_String__Decimal128_: - -.. _RealmQuery_containsValue_String_Decimal128_: - -.. _RealmQuery_containsValue_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_util_Date_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_util_Date_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Date_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Date_: - -.. _io_realm_RealmQuery_containsValue_String_java_util_Date_: - -.. _io_realm_RealmQuery_containsValue_String__java_util_Date_: - -.. _io_realm_RealmQuery_containsValue_String_Date_: - -.. _io_realm_RealmQuery_containsValue_String__Date_: - -.. _containsValue_java_lang_String_java_util_Date_: - -.. _containsValue_java_lang_String__java_util_Date_: - -.. _containsValue_java_lang_String_Date_: - -.. _containsValue_java_lang_String__Date_: - -.. _containsValue_String_java_util_Date_: - -.. _containsValue_String__java_util_Date_: - -.. _containsValue_String_Date_: - -.. _containsValue_String__Date_: - -.. _RealmQuery_containsValue_java_lang_String_java_util_Date_: - -.. _RealmQuery_containsValue_java_lang_String__java_util_Date_: - -.. _RealmQuery_containsValue_java_lang_String_Date_: - -.. _RealmQuery_containsValue_java_lang_String__Date_: - -.. _RealmQuery_containsValue_String_java_util_Date_: - -.. _RealmQuery_containsValue_String__java_util_Date_: - -.. _RealmQuery_containsValue_String_Date_: - -.. _RealmQuery_containsValue_String__Date_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_byte_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__byte_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_byte____: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__byte____: - -.. _io_realm_RealmQuery_containsValue_String_byte_: - -.. _io_realm_RealmQuery_containsValue_String__byte_: - -.. _io_realm_RealmQuery_containsValue_String_byte____: - -.. _io_realm_RealmQuery_containsValue_String__byte____: - -.. _containsValue_java_lang_String_byte_: - -.. _containsValue_java_lang_String__byte_: - -.. _containsValue_java_lang_String_byte____: - -.. _containsValue_java_lang_String__byte____: - -.. _containsValue_String_byte_: - -.. _containsValue_String__byte_: - -.. _containsValue_String_byte____: - -.. _containsValue_String__byte____: - -.. _RealmQuery_containsValue_java_lang_String_byte_: - -.. _RealmQuery_containsValue_java_lang_String__byte_: - -.. _RealmQuery_containsValue_java_lang_String_byte____: - -.. _RealmQuery_containsValue_java_lang_String__byte____: - -.. _RealmQuery_containsValue_String_byte_: - -.. _RealmQuery_containsValue_String__byte_: - -.. _RealmQuery_containsValue_String_byte____: - -.. _RealmQuery_containsValue_String__byte____: - -.. _io_realm_RealmQuery_containsValue_String__byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | **byte[]** value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_String_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__String_: - -.. _io_realm_RealmQuery_containsValue_String_java_lang_String_: - -.. _io_realm_RealmQuery_containsValue_String__java_lang_String_: - -.. _io_realm_RealmQuery_containsValue_String_String_: - -.. _io_realm_RealmQuery_containsValue_String__String_: - -.. _containsValue_java_lang_String_java_lang_String_: - -.. _containsValue_java_lang_String__java_lang_String_: - -.. _containsValue_java_lang_String_String_: - -.. _containsValue_java_lang_String__String_: - -.. _containsValue_String_java_lang_String_: - -.. _containsValue_String__java_lang_String_: - -.. _containsValue_String_String_: - -.. _containsValue_String__String_: - -.. _RealmQuery_containsValue_java_lang_String_java_lang_String_: - -.. _RealmQuery_containsValue_java_lang_String__java_lang_String_: - -.. _RealmQuery_containsValue_java_lang_String_String_: - -.. _RealmQuery_containsValue_java_lang_String__String_: - -.. _RealmQuery_containsValue_String_java_lang_String_: - -.. _RealmQuery_containsValue_String__java_lang_String_: - -.. _RealmQuery_containsValue_String_String_: - -.. _RealmQuery_containsValue_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_lang_Float_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_lang_Float_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Float_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Float_: - -.. _io_realm_RealmQuery_containsValue_String_java_lang_Float_: - -.. _io_realm_RealmQuery_containsValue_String__java_lang_Float_: - -.. _io_realm_RealmQuery_containsValue_String_Float_: - -.. _io_realm_RealmQuery_containsValue_String__Float_: - -.. _containsValue_java_lang_String_java_lang_Float_: - -.. _containsValue_java_lang_String__java_lang_Float_: - -.. _containsValue_java_lang_String_Float_: - -.. _containsValue_java_lang_String__Float_: - -.. _containsValue_String_java_lang_Float_: - -.. _containsValue_String__java_lang_Float_: - -.. _containsValue_String_Float_: - -.. _containsValue_String__Float_: - -.. _RealmQuery_containsValue_java_lang_String_java_lang_Float_: - -.. _RealmQuery_containsValue_java_lang_String__java_lang_Float_: - -.. _RealmQuery_containsValue_java_lang_String_Float_: - -.. _RealmQuery_containsValue_java_lang_String__Float_: - -.. _RealmQuery_containsValue_String_java_lang_Float_: - -.. _RealmQuery_containsValue_String__java_lang_Float_: - -.. _RealmQuery_containsValue_String_Float_: - -.. _RealmQuery_containsValue_String__Float_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `Float `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_lang_Double_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_lang_Double_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Double_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Double_: - -.. _io_realm_RealmQuery_containsValue_String_java_lang_Double_: - -.. _io_realm_RealmQuery_containsValue_String__java_lang_Double_: - -.. _io_realm_RealmQuery_containsValue_String_Double_: - -.. _io_realm_RealmQuery_containsValue_String__Double_: - -.. _containsValue_java_lang_String_java_lang_Double_: - -.. _containsValue_java_lang_String__java_lang_Double_: - -.. _containsValue_java_lang_String_Double_: - -.. _containsValue_java_lang_String__Double_: - -.. _containsValue_String_java_lang_Double_: - -.. _containsValue_String__java_lang_Double_: - -.. _containsValue_String_Double_: - -.. _containsValue_String__Double_: - -.. _RealmQuery_containsValue_java_lang_String_java_lang_Double_: - -.. _RealmQuery_containsValue_java_lang_String__java_lang_Double_: - -.. _RealmQuery_containsValue_java_lang_String_Double_: - -.. _RealmQuery_containsValue_java_lang_String__Double_: - -.. _RealmQuery_containsValue_String_java_lang_Double_: - -.. _RealmQuery_containsValue_String__java_lang_Double_: - -.. _RealmQuery_containsValue_String_Double_: - -.. _RealmQuery_containsValue_String__Double_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `Double `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_lang_Long_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_lang_Long_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Long_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Long_: - -.. _io_realm_RealmQuery_containsValue_String_java_lang_Long_: - -.. _io_realm_RealmQuery_containsValue_String__java_lang_Long_: - -.. _io_realm_RealmQuery_containsValue_String_Long_: - -.. _io_realm_RealmQuery_containsValue_String__Long_: - -.. _containsValue_java_lang_String_java_lang_Long_: - -.. _containsValue_java_lang_String__java_lang_Long_: - -.. _containsValue_java_lang_String_Long_: - -.. _containsValue_java_lang_String__Long_: - -.. _containsValue_String_java_lang_Long_: - -.. _containsValue_String__java_lang_Long_: - -.. _containsValue_String_Long_: - -.. _containsValue_String__Long_: - -.. _RealmQuery_containsValue_java_lang_String_java_lang_Long_: - -.. _RealmQuery_containsValue_java_lang_String__java_lang_Long_: - -.. _RealmQuery_containsValue_java_lang_String_Long_: - -.. _RealmQuery_containsValue_java_lang_String__Long_: - -.. _RealmQuery_containsValue_String_java_lang_Long_: - -.. _RealmQuery_containsValue_String__java_lang_Long_: - -.. _RealmQuery_containsValue_String_Long_: - -.. _RealmQuery_containsValue_String__Long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `Long `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_lang_Integer_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_lang_Integer_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Integer_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Integer_: - -.. _io_realm_RealmQuery_containsValue_String_java_lang_Integer_: - -.. _io_realm_RealmQuery_containsValue_String__java_lang_Integer_: - -.. _io_realm_RealmQuery_containsValue_String_Integer_: - -.. _io_realm_RealmQuery_containsValue_String__Integer_: - -.. _containsValue_java_lang_String_java_lang_Integer_: - -.. _containsValue_java_lang_String__java_lang_Integer_: - -.. _containsValue_java_lang_String_Integer_: - -.. _containsValue_java_lang_String__Integer_: - -.. _containsValue_String_java_lang_Integer_: - -.. _containsValue_String__java_lang_Integer_: - -.. _containsValue_String_Integer_: - -.. _containsValue_String__Integer_: - -.. _RealmQuery_containsValue_java_lang_String_java_lang_Integer_: - -.. _RealmQuery_containsValue_java_lang_String__java_lang_Integer_: - -.. _RealmQuery_containsValue_java_lang_String_Integer_: - -.. _RealmQuery_containsValue_java_lang_String__Integer_: - -.. _RealmQuery_containsValue_String_java_lang_Integer_: - -.. _RealmQuery_containsValue_String__java_lang_Integer_: - -.. _RealmQuery_containsValue_String_Integer_: - -.. _RealmQuery_containsValue_String__Integer_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `Integer `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_lang_Short_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_lang_Short_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Short_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Short_: - -.. _io_realm_RealmQuery_containsValue_String_java_lang_Short_: - -.. _io_realm_RealmQuery_containsValue_String__java_lang_Short_: - -.. _io_realm_RealmQuery_containsValue_String_Short_: - -.. _io_realm_RealmQuery_containsValue_String__Short_: - -.. _containsValue_java_lang_String_java_lang_Short_: - -.. _containsValue_java_lang_String__java_lang_Short_: - -.. _containsValue_java_lang_String_Short_: - -.. _containsValue_java_lang_String__Short_: - -.. _containsValue_String_java_lang_Short_: - -.. _containsValue_String__java_lang_Short_: - -.. _containsValue_String_Short_: - -.. _containsValue_String__Short_: - -.. _RealmQuery_containsValue_java_lang_String_java_lang_Short_: - -.. _RealmQuery_containsValue_java_lang_String__java_lang_Short_: - -.. _RealmQuery_containsValue_java_lang_String_Short_: - -.. _RealmQuery_containsValue_java_lang_String__Short_: - -.. _RealmQuery_containsValue_String_java_lang_Short_: - -.. _RealmQuery_containsValue_String__java_lang_Short_: - -.. _RealmQuery_containsValue_String_Short_: - -.. _RealmQuery_containsValue_String__Short_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `Short `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_lang_Byte_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_lang_Byte_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Byte_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Byte_: - -.. _io_realm_RealmQuery_containsValue_String_java_lang_Byte_: - -.. _io_realm_RealmQuery_containsValue_String__java_lang_Byte_: - -.. _io_realm_RealmQuery_containsValue_String_Byte_: - -.. _io_realm_RealmQuery_containsValue_String__Byte_: - -.. _containsValue_java_lang_String_java_lang_Byte_: - -.. _containsValue_java_lang_String__java_lang_Byte_: - -.. _containsValue_java_lang_String_Byte_: - -.. _containsValue_java_lang_String__Byte_: - -.. _containsValue_String_java_lang_Byte_: - -.. _containsValue_String__java_lang_Byte_: - -.. _containsValue_String_Byte_: - -.. _containsValue_String__Byte_: - -.. _RealmQuery_containsValue_java_lang_String_java_lang_Byte_: - -.. _RealmQuery_containsValue_java_lang_String__java_lang_Byte_: - -.. _RealmQuery_containsValue_java_lang_String_Byte_: - -.. _RealmQuery_containsValue_java_lang_String__Byte_: - -.. _RealmQuery_containsValue_String_java_lang_Byte_: - -.. _RealmQuery_containsValue_String__java_lang_Byte_: - -.. _RealmQuery_containsValue_String_Byte_: - -.. _RealmQuery_containsValue_String__Byte_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `Byte `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - -.. _io_realm_RealmQuery_containsValue_java_lang_String_java_lang_Boolean_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__java_lang_Boolean_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String_Boolean_: - -.. _io_realm_RealmQuery_containsValue_java_lang_String__Boolean_: - -.. _io_realm_RealmQuery_containsValue_String_java_lang_Boolean_: - -.. _io_realm_RealmQuery_containsValue_String__java_lang_Boolean_: - -.. _io_realm_RealmQuery_containsValue_String_Boolean_: - -.. _io_realm_RealmQuery_containsValue_String__Boolean_: - -.. _containsValue_java_lang_String_java_lang_Boolean_: - -.. _containsValue_java_lang_String__java_lang_Boolean_: - -.. _containsValue_java_lang_String_Boolean_: - -.. _containsValue_java_lang_String__Boolean_: - -.. _containsValue_String_java_lang_Boolean_: - -.. _containsValue_String__java_lang_Boolean_: - -.. _containsValue_String_Boolean_: - -.. _containsValue_String__Boolean_: - -.. _RealmQuery_containsValue_java_lang_String_java_lang_Boolean_: - -.. _RealmQuery_containsValue_java_lang_String__java_lang_Boolean_: - -.. _RealmQuery_containsValue_java_lang_String_Boolean_: - -.. _RealmQuery_containsValue_java_lang_String__Boolean_: - -.. _RealmQuery_containsValue_String_java_lang_Boolean_: - -.. _RealmQuery_containsValue_String__java_lang_Boolean_: - -.. _RealmQuery_containsValue_String_Boolean_: - -.. _RealmQuery_containsValue_String__Boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`containsValue ` ( - | `String `__ fieldName, - | `Boolean `__ value - | ) - - - - - * - Condition that value, if a dictionary field, contains the specified value. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to search for. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid. - - - - - - - - - - - - -.. _count: - -.. _count__: - -.. _RealmQuery_count: - -.. _RealmQuery_count__: - -.. _io_realm_RealmQuery_count: - -.. _io_realm_RealmQuery_count__: - - - -count ------ - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`count ` () - | - - - - - * - Counts the number of objects that fulfill the query conditions. - - - - - - - **Returns** - - the number of matching objects. - - - - - **Throws** - - - `java.lang.UnsupportedOperationException `__ - if the query is not valid ("syntax error"). - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _distinct: - -.. _distinct__: - -.. _RealmQuery_distinct: - -.. _RealmQuery_distinct__: - -.. _io_realm_RealmQuery_distinct: - -.. _io_realm_RealmQuery_distinct__: - - - -distinct --------- - -.. _io_realm_RealmQuery_distinct_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_distinct_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_distinct_java_lang_String_String_: - -.. _io_realm_RealmQuery_distinct_java_lang_String__String_: - -.. _io_realm_RealmQuery_distinct_java_lang_String_String____: - -.. _io_realm_RealmQuery_distinct_java_lang_String__String____: - -.. _io_realm_RealmQuery_distinct_String_java_lang_String_: - -.. _io_realm_RealmQuery_distinct_String__java_lang_String_: - -.. _io_realm_RealmQuery_distinct_String_String_: - -.. _io_realm_RealmQuery_distinct_String__String_: - -.. _io_realm_RealmQuery_distinct_String_String____: - -.. _io_realm_RealmQuery_distinct_String__String____: - -.. _distinct_java_lang_String_java_lang_String_: - -.. _distinct_java_lang_String__java_lang_String_: - -.. _distinct_java_lang_String_String_: - -.. _distinct_java_lang_String__String_: - -.. _distinct_java_lang_String_String____: - -.. _distinct_java_lang_String__String____: - -.. _distinct_String_java_lang_String_: - -.. _distinct_String__java_lang_String_: - -.. _distinct_String_String_: - -.. _distinct_String__String_: - -.. _distinct_String_String____: - -.. _distinct_String__String____: - -.. _RealmQuery_distinct_java_lang_String_java_lang_String_: - -.. _RealmQuery_distinct_java_lang_String__java_lang_String_: - -.. _RealmQuery_distinct_java_lang_String_String_: - -.. _RealmQuery_distinct_java_lang_String__String_: - -.. _RealmQuery_distinct_java_lang_String_String____: - -.. _RealmQuery_distinct_java_lang_String__String____: - -.. _RealmQuery_distinct_String_java_lang_String_: - -.. _RealmQuery_distinct_String__java_lang_String_: - -.. _RealmQuery_distinct_String_String_: - -.. _RealmQuery_distinct_String__String_: - -.. _RealmQuery_distinct_String_String____: - -.. _RealmQuery_distinct_String__String____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`distinct ` ( - | `String `__ firstFieldName, - | `java.lang.String[] `__ remainingFieldNames - | ) - - - - - * - Selects a distinct set of objects of a specific class. When multiple distinct fields are given, all unique combinations of values in the fields will be returned. In case of multiple matches, it is undefined which object is returned. Unless the result is sorted, then the first object will be returned. - - - - - **Parameters** - - - ``firstFieldName`` - first field name to use when finding distinct objects. - - - - - ``remainingFieldNames`` - remaining field names when determining all unique combinations of field values. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field names is empty or ``null`` , does not exist, is an unsupported type, or points to a linked field. - - - - - - - `IllegalStateException `__ - if distinct field names were already defined. - - - - - - - - - - - - -.. _endGroup: - -.. _endGroup__: - -.. _RealmQuery_endGroup: - -.. _RealmQuery_endGroup__: - -.. _io_realm_RealmQuery_endGroup: - -.. _io_realm_RealmQuery_endGroup__: - - - -endGroup --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`endGroup ` () - | - - - - - * - End grouping of conditions ("right parenthesis") which was opened by a call to ``beginGroup()`` . - - - - - - - - - **Returns** - - the query object. - - - - - - - - - .. seealso:: - - - - - :ref:`beginGroup() ` - - - - - - - - - - - - -.. _endsWith: - -.. _endsWith__: - -.. _RealmQuery_endsWith: - -.. _RealmQuery_endsWith__: - -.. _io_realm_RealmQuery_endsWith: - -.. _io_realm_RealmQuery_endsWith__: - - - -endsWith --------- - -.. _io_realm_RealmQuery_endsWith_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__RealmAny__Case_: - -.. _io_realm_RealmQuery_endsWith_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_endsWith_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_endsWith_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_endsWith_String__RealmAny__Case_: - -.. _endsWith_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _endsWith_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _endsWith_java_lang_String_io_realm_RealmAny_Case_: - -.. _endsWith_java_lang_String__io_realm_RealmAny__Case_: - -.. _endsWith_java_lang_String_RealmAny_io_realm_Case_: - -.. _endsWith_java_lang_String__RealmAny__io_realm_Case_: - -.. _endsWith_java_lang_String_RealmAny_Case_: - -.. _endsWith_java_lang_String__RealmAny__Case_: - -.. _endsWith_String_io_realm_RealmAny_io_realm_Case_: - -.. _endsWith_String__io_realm_RealmAny__io_realm_Case_: - -.. _endsWith_String_io_realm_RealmAny_Case_: - -.. _endsWith_String__io_realm_RealmAny__Case_: - -.. _endsWith_String_RealmAny_io_realm_Case_: - -.. _endsWith_String__RealmAny__io_realm_Case_: - -.. _endsWith_String_RealmAny_Case_: - -.. _endsWith_String__RealmAny__Case_: - -.. _RealmQuery_endsWith_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_endsWith_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_endsWith_java_lang_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_endsWith_java_lang_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_endsWith_java_lang_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_endsWith_java_lang_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_endsWith_java_lang_String_RealmAny_Case_: - -.. _RealmQuery_endsWith_java_lang_String__RealmAny__Case_: - -.. _RealmQuery_endsWith_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_endsWith_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_endsWith_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_endsWith_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_endsWith_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_endsWith_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_endsWith_String_RealmAny_Case_: - -.. _RealmQuery_endsWith_String__RealmAny__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`endsWith ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - - - * - Condition that the value of field ends with the specified substring. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the substring. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_endsWith_java_lang_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String_String_Case_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__String__Case_: - -.. _io_realm_RealmQuery_endsWith_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_endsWith_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_endsWith_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_endsWith_String_String_Case_: - -.. _io_realm_RealmQuery_endsWith_String__String__Case_: - -.. _endsWith_java_lang_String_java_lang_String_io_realm_Case_: - -.. _endsWith_java_lang_String__java_lang_String__io_realm_Case_: - -.. _endsWith_java_lang_String_java_lang_String_Case_: - -.. _endsWith_java_lang_String__java_lang_String__Case_: - -.. _endsWith_java_lang_String_String_io_realm_Case_: - -.. _endsWith_java_lang_String__String__io_realm_Case_: - -.. _endsWith_java_lang_String_String_Case_: - -.. _endsWith_java_lang_String__String__Case_: - -.. _endsWith_String_java_lang_String_io_realm_Case_: - -.. _endsWith_String__java_lang_String__io_realm_Case_: - -.. _endsWith_String_java_lang_String_Case_: - -.. _endsWith_String__java_lang_String__Case_: - -.. _endsWith_String_String_io_realm_Case_: - -.. _endsWith_String__String__io_realm_Case_: - -.. _endsWith_String_String_Case_: - -.. _endsWith_String__String__Case_: - -.. _RealmQuery_endsWith_java_lang_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_endsWith_java_lang_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_endsWith_java_lang_String_java_lang_String_Case_: - -.. _RealmQuery_endsWith_java_lang_String__java_lang_String__Case_: - -.. _RealmQuery_endsWith_java_lang_String_String_io_realm_Case_: - -.. _RealmQuery_endsWith_java_lang_String__String__io_realm_Case_: - -.. _RealmQuery_endsWith_java_lang_String_String_Case_: - -.. _RealmQuery_endsWith_java_lang_String__String__Case_: - -.. _RealmQuery_endsWith_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_endsWith_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_endsWith_String_java_lang_String_Case_: - -.. _RealmQuery_endsWith_String__java_lang_String__Case_: - -.. _RealmQuery_endsWith_String_String_io_realm_Case_: - -.. _RealmQuery_endsWith_String__String__io_realm_Case_: - -.. _RealmQuery_endsWith_String_String_Case_: - -.. _RealmQuery_endsWith_String__String__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`endsWith ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - - - * - Condition that the value of field ends with the specified substring. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the substring. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_endsWith_java_lang_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String_RealmAny_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__RealmAny_: - -.. _io_realm_RealmQuery_endsWith_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_endsWith_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_endsWith_String_RealmAny_: - -.. _io_realm_RealmQuery_endsWith_String__RealmAny_: - -.. _endsWith_java_lang_String_io_realm_RealmAny_: - -.. _endsWith_java_lang_String__io_realm_RealmAny_: - -.. _endsWith_java_lang_String_RealmAny_: - -.. _endsWith_java_lang_String__RealmAny_: - -.. _endsWith_String_io_realm_RealmAny_: - -.. _endsWith_String__io_realm_RealmAny_: - -.. _endsWith_String_RealmAny_: - -.. _endsWith_String__RealmAny_: - -.. _RealmQuery_endsWith_java_lang_String_io_realm_RealmAny_: - -.. _RealmQuery_endsWith_java_lang_String__io_realm_RealmAny_: - -.. _RealmQuery_endsWith_java_lang_String_RealmAny_: - -.. _RealmQuery_endsWith_java_lang_String__RealmAny_: - -.. _RealmQuery_endsWith_String_io_realm_RealmAny_: - -.. _RealmQuery_endsWith_String__io_realm_RealmAny_: - -.. _RealmQuery_endsWith_String_RealmAny_: - -.. _RealmQuery_endsWith_String__RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`endsWith ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - - - * - Condition that the value of field ends with the specified string. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the string. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_endsWith_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String_String_: - -.. _io_realm_RealmQuery_endsWith_java_lang_String__String_: - -.. _io_realm_RealmQuery_endsWith_String_java_lang_String_: - -.. _io_realm_RealmQuery_endsWith_String__java_lang_String_: - -.. _io_realm_RealmQuery_endsWith_String_String_: - -.. _io_realm_RealmQuery_endsWith_String__String_: - -.. _endsWith_java_lang_String_java_lang_String_: - -.. _endsWith_java_lang_String__java_lang_String_: - -.. _endsWith_java_lang_String_String_: - -.. _endsWith_java_lang_String__String_: - -.. _endsWith_String_java_lang_String_: - -.. _endsWith_String__java_lang_String_: - -.. _endsWith_String_String_: - -.. _endsWith_String__String_: - -.. _RealmQuery_endsWith_java_lang_String_java_lang_String_: - -.. _RealmQuery_endsWith_java_lang_String__java_lang_String_: - -.. _RealmQuery_endsWith_java_lang_String_String_: - -.. _RealmQuery_endsWith_java_lang_String__String_: - -.. _RealmQuery_endsWith_String_java_lang_String_: - -.. _RealmQuery_endsWith_String__java_lang_String_: - -.. _RealmQuery_endsWith_String_String_: - -.. _RealmQuery_endsWith_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`endsWith ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Condition that the value of field ends with the specified string. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the string. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _equalTo: - -.. _equalTo__: - -.. _RealmQuery_equalTo: - -.. _RealmQuery_equalTo__: - -.. _io_realm_RealmQuery_equalTo: - -.. _io_realm_RealmQuery_equalTo__: - - - -equalTo -------- - -.. _io_realm_RealmQuery_equalTo_java_lang_String_ObjectId_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__ObjectId_: - -.. _io_realm_RealmQuery_equalTo_String_ObjectId_: - -.. _io_realm_RealmQuery_equalTo_String__ObjectId_: - -.. _equalTo_java_lang_String_ObjectId_: - -.. _equalTo_java_lang_String__ObjectId_: - -.. _equalTo_String_ObjectId_: - -.. _equalTo_String__ObjectId_: - -.. _RealmQuery_equalTo_java_lang_String_ObjectId_: - -.. _RealmQuery_equalTo_java_lang_String__ObjectId_: - -.. _RealmQuery_equalTo_String_ObjectId_: - -.. _RealmQuery_equalTo_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`equalTo ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_equalTo_java_lang_String_Decimal128_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__Decimal128_: - -.. _io_realm_RealmQuery_equalTo_String_Decimal128_: - -.. _io_realm_RealmQuery_equalTo_String__Decimal128_: - -.. _equalTo_java_lang_String_Decimal128_: - -.. _equalTo_java_lang_String__Decimal128_: - -.. _equalTo_String_Decimal128_: - -.. _equalTo_String__Decimal128_: - -.. _RealmQuery_equalTo_java_lang_String_Decimal128_: - -.. _RealmQuery_equalTo_java_lang_String__Decimal128_: - -.. _RealmQuery_equalTo_String_Decimal128_: - -.. _RealmQuery_equalTo_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`equalTo ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_equalTo_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__RealmAny__Case_: - -.. _io_realm_RealmQuery_equalTo_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_equalTo_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_equalTo_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_equalTo_String__RealmAny__Case_: - -.. _equalTo_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _equalTo_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _equalTo_java_lang_String_io_realm_RealmAny_Case_: - -.. _equalTo_java_lang_String__io_realm_RealmAny__Case_: - -.. _equalTo_java_lang_String_RealmAny_io_realm_Case_: - -.. _equalTo_java_lang_String__RealmAny__io_realm_Case_: - -.. _equalTo_java_lang_String_RealmAny_Case_: - -.. _equalTo_java_lang_String__RealmAny__Case_: - -.. _equalTo_String_io_realm_RealmAny_io_realm_Case_: - -.. _equalTo_String__io_realm_RealmAny__io_realm_Case_: - -.. _equalTo_String_io_realm_RealmAny_Case_: - -.. _equalTo_String__io_realm_RealmAny__Case_: - -.. _equalTo_String_RealmAny_io_realm_Case_: - -.. _equalTo_String__RealmAny__io_realm_Case_: - -.. _equalTo_String_RealmAny_Case_: - -.. _equalTo_String__RealmAny__Case_: - -.. _RealmQuery_equalTo_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_equalTo_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_equalTo_java_lang_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_equalTo_java_lang_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_equalTo_java_lang_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_equalTo_java_lang_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_equalTo_java_lang_String_RealmAny_Case_: - -.. _RealmQuery_equalTo_java_lang_String__RealmAny__Case_: - -.. _RealmQuery_equalTo_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_equalTo_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_equalTo_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_equalTo_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_equalTo_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_equalTo_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_equalTo_String_RealmAny_Case_: - -.. _RealmQuery_equalTo_String__RealmAny__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`equalTo ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - - - * - Equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_equalTo_java_lang_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String_String_Case_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__String__Case_: - -.. _io_realm_RealmQuery_equalTo_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_equalTo_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_equalTo_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_equalTo_String_String_Case_: - -.. _io_realm_RealmQuery_equalTo_String__String__Case_: - -.. _equalTo_java_lang_String_java_lang_String_io_realm_Case_: - -.. _equalTo_java_lang_String__java_lang_String__io_realm_Case_: - -.. _equalTo_java_lang_String_java_lang_String_Case_: - -.. _equalTo_java_lang_String__java_lang_String__Case_: - -.. _equalTo_java_lang_String_String_io_realm_Case_: - -.. _equalTo_java_lang_String__String__io_realm_Case_: - -.. _equalTo_java_lang_String_String_Case_: - -.. _equalTo_java_lang_String__String__Case_: - -.. _equalTo_String_java_lang_String_io_realm_Case_: - -.. _equalTo_String__java_lang_String__io_realm_Case_: - -.. _equalTo_String_java_lang_String_Case_: - -.. _equalTo_String__java_lang_String__Case_: - -.. _equalTo_String_String_io_realm_Case_: - -.. _equalTo_String__String__io_realm_Case_: - -.. _equalTo_String_String_Case_: - -.. _equalTo_String__String__Case_: - -.. _RealmQuery_equalTo_java_lang_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_equalTo_java_lang_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_equalTo_java_lang_String_java_lang_String_Case_: - -.. _RealmQuery_equalTo_java_lang_String__java_lang_String__Case_: - -.. _RealmQuery_equalTo_java_lang_String_String_io_realm_Case_: - -.. _RealmQuery_equalTo_java_lang_String__String__io_realm_Case_: - -.. _RealmQuery_equalTo_java_lang_String_String_Case_: - -.. _RealmQuery_equalTo_java_lang_String__String__Case_: - -.. _RealmQuery_equalTo_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_equalTo_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_equalTo_String_java_lang_String_Case_: - -.. _RealmQuery_equalTo_String__java_lang_String__Case_: - -.. _RealmQuery_equalTo_String_String_io_realm_Case_: - -.. _RealmQuery_equalTo_String__String__io_realm_Case_: - -.. _RealmQuery_equalTo_String_String_Case_: - -.. _RealmQuery_equalTo_String__String__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`equalTo ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - - - * - Equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_equalTo_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String_String_: - -.. _io_realm_RealmQuery_equalTo_java_lang_String__String_: - -.. _io_realm_RealmQuery_equalTo_String_java_lang_String_: - -.. _io_realm_RealmQuery_equalTo_String__java_lang_String_: - -.. _io_realm_RealmQuery_equalTo_String_String_: - -.. _io_realm_RealmQuery_equalTo_String__String_: - -.. _equalTo_java_lang_String_java_lang_String_: - -.. _equalTo_java_lang_String__java_lang_String_: - -.. _equalTo_java_lang_String_String_: - -.. _equalTo_java_lang_String__String_: - -.. _equalTo_String_java_lang_String_: - -.. _equalTo_String__java_lang_String_: - -.. _equalTo_String_String_: - -.. _equalTo_String__String_: - -.. _RealmQuery_equalTo_java_lang_String_java_lang_String_: - -.. _RealmQuery_equalTo_java_lang_String__java_lang_String_: - -.. _RealmQuery_equalTo_java_lang_String_String_: - -.. _RealmQuery_equalTo_java_lang_String__String_: - -.. _RealmQuery_equalTo_String_java_lang_String_: - -.. _RealmQuery_equalTo_String__java_lang_String_: - -.. _RealmQuery_equalTo_String_String_: - -.. _RealmQuery_equalTo_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`equalTo ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _findAll: - -.. _findAll__: - -.. _RealmQuery_findAll: - -.. _RealmQuery_findAll__: - -.. _io_realm_RealmQuery_findAll: - -.. _io_realm_RealmQuery_findAll__: - - - -findAll -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`findAll ` () - | - - - - - * - Finds all objects that fulfill the query conditions.Launching heavy queries from the UI thread may result in a drop of frames or even ANRs. **We do not recommend doing so and therefore it is not allowed by default.** If you want to prevent these behaviors you can obtain a Realm using a :ref:`RealmConfiguration ` that explicitly sets :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` to ``false`` . This way you will be forced to launch your queries from a non-UI thread, otherwise calls to this method will throw a :ref:`RealmException ` . Alternatively, you can use :ref:`findAllAsync() ` . - - - - - - - - - - - **Returns** - - a :ref:`io.realm.RealmResults ` containing objects. If no objects match the condition, a list with zero objects is returned. - - - - - - - **Throws** - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmResults ` - - - - - - - - - - - - -.. _findAllAsync: - -.. _findAllAsync__: - -.. _RealmQuery_findAllAsync: - -.. _RealmQuery_findAllAsync__: - -.. _io_realm_RealmQuery_findAllAsync: - -.. _io_realm_RealmQuery_findAllAsync__: - - - -findAllAsync ------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`findAllAsync ` () - | - - - - - * - Finds all objects that fulfill the query conditions. This method is only available from a Looper thread. - - - - - - - **Returns** - - immediately an empty :ref:`RealmResults ` . Users need to register a listener :ref:`io.realm.RealmResults.addChangeListener(RealmChangeListener) ` to be notified when the query completes. - - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmResults ` - - - - - - - - - - - - -.. _findFirst: - -.. _findFirst__: - -.. _RealmQuery_findFirst: - -.. _RealmQuery_findFirst__: - -.. _io_realm_RealmQuery_findFirst: - -.. _io_realm_RealmQuery_findFirst__: - - - -findFirst ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`findFirst ` () - | - - - - - * - Finds the first object that fulfills the query conditions.Launching heavy queries from the UI thread may result in a drop of frames or even ANRs. **We do not recommend doing so, but it is allowed by default.** If you want to prevent these behaviors you can obtain a Realm using a :ref:`RealmConfiguration ` that explicitly sets :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` to ``false`` . This way you will be forced to launch your queries from a non-UI thread, otherwise calls to this method will throw a :ref:`RealmException ` . Alternatively, you can use :ref:`findFirstAsync() ` . - - - - - - - - - - - **Returns** - - the object found or ``null`` if no object matches the query conditions. - - - - - - - **Throws** - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmObject ` - - - - - - - - - - - - -.. _findFirstAsync: - -.. _findFirstAsync__: - -.. _RealmQuery_findFirstAsync: - -.. _RealmQuery_findFirstAsync__: - -.. _io_realm_RealmQuery_findFirstAsync: - -.. _io_realm_RealmQuery_findFirstAsync__: - - - -findFirstAsync --------------- - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`findFirstAsync ` () - | - - - - - * - Similar to :ref:`findFirst() ` but runs asynchronously on a worker thread. A listener should be registered to the returned :ref:`RealmObject ` to get the notification when query completes. The registered listener will also be triggered if there are changes made to the queried :ref:`RealmObject ` . If the :ref:`RealmObject ` is deleted, the listener will be called one last time and then stop. The query will not be re-run. - - - - - - - - - **Returns** - - immediately an empty :ref:`RealmObject ` with ``isLoaded() == false`` . Trying to access any field on the returned object before it is loaded will throw an ``IllegalStateException`` . - - - - - - - **Throws** - - - `IllegalStateException `__ - if this is called on a non-looper thread. - - - - - - - - - - - - -.. _getDescription: - -.. _getDescription__: - -.. _RealmQuery_getDescription: - -.. _RealmQuery_getDescription__: - -.. _io_realm_RealmQuery_getDescription: - -.. _io_realm_RealmQuery_getDescription__: - - - -getDescription --------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getDescription ` () - | - - - - - * - Returns a textual description of this query. - - - - - - - **Returns** - - the textual description of the query. - - - - - - - - - - - -.. _getQueryPointer: - -.. _getQueryPointer__: - -.. _RealmQuery_getQueryPointer: - -.. _RealmQuery_getQueryPointer__: - -.. _io_realm_RealmQuery_getQueryPointer: - -.. _io_realm_RealmQuery_getQueryPointer__: - - - -getQueryPointer ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getQueryPointer ` () - | - - - - - * - Returns the pointer to the underlying C++ query. This method is only public due to architectural design choices that are hard to work around and should be considered internal and can change without warning. - - - - - - - **Returns** - - the pointer to the underlying C++ query. - - - - - - - - - - - -.. _getRealm: - -.. _getRealm__: - -.. _RealmQuery_getRealm: - -.. _RealmQuery_getRealm__: - -.. _io_realm_RealmQuery_getRealm: - -.. _io_realm_RealmQuery_getRealm__: - - - -getRealm --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Realm ` :ref:`getRealm ` () - | - - - - - * - Returns the :ref:`Realm ` instance to which this query belongs. - - Calling **Realm.close()** on the returned instance is discouraged as it is the same as calling it on the original Realm instance which may cause the Realm to fully close invalidating the query. - - - - - - - - - - - **Returns** - - :ref:`Realm ` instance this query belongs to. - - - - - - - **Throws** - - - `IllegalStateException `__ - if the Realm is an instance of :ref:`DynamicRealm ` or the :ref:`Realm ` was already closed. - - - - - - - - - - - - - - -.. _getTypeQueried: - -.. _getTypeQueried__: - -.. _RealmQuery_getTypeQueried: - -.. _RealmQuery_getTypeQueried__: - -.. _io_realm_RealmQuery_getTypeQueried: - -.. _io_realm_RealmQuery_getTypeQueried__: - - - -getTypeQueried --------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getTypeQueried ` () - | - - - - - * - Returns the internal Realm name of the type being queried. - - - - - - - **Returns** - - the internal name of the Realm model class being queried. - - - - - - - - - - - -.. _greaterThan: - -.. _greaterThan__: - -.. _RealmQuery_greaterThan: - -.. _RealmQuery_greaterThan__: - -.. _io_realm_RealmQuery_greaterThan: - -.. _io_realm_RealmQuery_greaterThan__: - - - -greaterThan ------------ - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_ObjectId_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__ObjectId_: - -.. _io_realm_RealmQuery_greaterThan_String_ObjectId_: - -.. _io_realm_RealmQuery_greaterThan_String__ObjectId_: - -.. _greaterThan_java_lang_String_ObjectId_: - -.. _greaterThan_java_lang_String__ObjectId_: - -.. _greaterThan_String_ObjectId_: - -.. _greaterThan_String__ObjectId_: - -.. _RealmQuery_greaterThan_java_lang_String_ObjectId_: - -.. _RealmQuery_greaterThan_java_lang_String__ObjectId_: - -.. _RealmQuery_greaterThan_String_ObjectId_: - -.. _RealmQuery_greaterThan_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThan ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Greater-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_Decimal128_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__Decimal128_: - -.. _io_realm_RealmQuery_greaterThan_String_Decimal128_: - -.. _io_realm_RealmQuery_greaterThan_String__Decimal128_: - -.. _greaterThan_java_lang_String_Decimal128_: - -.. _greaterThan_java_lang_String__Decimal128_: - -.. _greaterThan_String_Decimal128_: - -.. _greaterThan_String__Decimal128_: - -.. _RealmQuery_greaterThan_java_lang_String_Decimal128_: - -.. _RealmQuery_greaterThan_java_lang_String__Decimal128_: - -.. _RealmQuery_greaterThan_String_Decimal128_: - -.. _RealmQuery_greaterThan_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThan ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Greater-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_RealmAny_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__RealmAny_: - -.. _io_realm_RealmQuery_greaterThan_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_greaterThan_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_greaterThan_String_RealmAny_: - -.. _io_realm_RealmQuery_greaterThan_String__RealmAny_: - -.. _greaterThan_java_lang_String_io_realm_RealmAny_: - -.. _greaterThan_java_lang_String__io_realm_RealmAny_: - -.. _greaterThan_java_lang_String_RealmAny_: - -.. _greaterThan_java_lang_String__RealmAny_: - -.. _greaterThan_String_io_realm_RealmAny_: - -.. _greaterThan_String__io_realm_RealmAny_: - -.. _greaterThan_String_RealmAny_: - -.. _greaterThan_String__RealmAny_: - -.. _RealmQuery_greaterThan_java_lang_String_io_realm_RealmAny_: - -.. _RealmQuery_greaterThan_java_lang_String__io_realm_RealmAny_: - -.. _RealmQuery_greaterThan_java_lang_String_RealmAny_: - -.. _RealmQuery_greaterThan_java_lang_String__RealmAny_: - -.. _RealmQuery_greaterThan_String_io_realm_RealmAny_: - -.. _RealmQuery_greaterThan_String__io_realm_RealmAny_: - -.. _RealmQuery_greaterThan_String_RealmAny_: - -.. _RealmQuery_greaterThan_String__RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThan ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - - - * - Greater-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_java_util_Date_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__java_util_Date_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_Date_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__Date_: - -.. _io_realm_RealmQuery_greaterThan_String_java_util_Date_: - -.. _io_realm_RealmQuery_greaterThan_String__java_util_Date_: - -.. _io_realm_RealmQuery_greaterThan_String_Date_: - -.. _io_realm_RealmQuery_greaterThan_String__Date_: - -.. _greaterThan_java_lang_String_java_util_Date_: - -.. _greaterThan_java_lang_String__java_util_Date_: - -.. _greaterThan_java_lang_String_Date_: - -.. _greaterThan_java_lang_String__Date_: - -.. _greaterThan_String_java_util_Date_: - -.. _greaterThan_String__java_util_Date_: - -.. _greaterThan_String_Date_: - -.. _greaterThan_String__Date_: - -.. _RealmQuery_greaterThan_java_lang_String_java_util_Date_: - -.. _RealmQuery_greaterThan_java_lang_String__java_util_Date_: - -.. _RealmQuery_greaterThan_java_lang_String_Date_: - -.. _RealmQuery_greaterThan_java_lang_String__Date_: - -.. _RealmQuery_greaterThan_String_java_util_Date_: - -.. _RealmQuery_greaterThan_String__java_util_Date_: - -.. _RealmQuery_greaterThan_String_Date_: - -.. _RealmQuery_greaterThan_String__Date_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThan ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - - - * - Greater-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_float_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__float_: - -.. _io_realm_RealmQuery_greaterThan_String_float_: - -.. _io_realm_RealmQuery_greaterThan_String__float_: - -.. _greaterThan_java_lang_String_float_: - -.. _greaterThan_java_lang_String__float_: - -.. _greaterThan_String_float_: - -.. _greaterThan_String__float_: - -.. _RealmQuery_greaterThan_java_lang_String_float_: - -.. _RealmQuery_greaterThan_java_lang_String__float_: - -.. _RealmQuery_greaterThan_String_float_: - -.. _RealmQuery_greaterThan_String__float_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThan ` ( - | `String `__ fieldName, - | **float** value - | ) - - - - - * - Greater-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_double_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__double_: - -.. _io_realm_RealmQuery_greaterThan_String_double_: - -.. _io_realm_RealmQuery_greaterThan_String__double_: - -.. _greaterThan_java_lang_String_double_: - -.. _greaterThan_java_lang_String__double_: - -.. _greaterThan_String_double_: - -.. _greaterThan_String__double_: - -.. _RealmQuery_greaterThan_java_lang_String_double_: - -.. _RealmQuery_greaterThan_java_lang_String__double_: - -.. _RealmQuery_greaterThan_String_double_: - -.. _RealmQuery_greaterThan_String__double_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThan ` ( - | `String `__ fieldName, - | **double** value - | ) - - - - - * - Greater-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_long_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__long_: - -.. _io_realm_RealmQuery_greaterThan_String_long_: - -.. _io_realm_RealmQuery_greaterThan_String__long_: - -.. _greaterThan_java_lang_String_long_: - -.. _greaterThan_java_lang_String__long_: - -.. _greaterThan_String_long_: - -.. _greaterThan_String__long_: - -.. _RealmQuery_greaterThan_java_lang_String_long_: - -.. _RealmQuery_greaterThan_java_lang_String__long_: - -.. _RealmQuery_greaterThan_String_long_: - -.. _RealmQuery_greaterThan_String__long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThan ` ( - | `String `__ fieldName, - | **long** value - | ) - - - - - * - Greater-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThan_java_lang_String_int_: - -.. _io_realm_RealmQuery_greaterThan_java_lang_String__int_: - -.. _io_realm_RealmQuery_greaterThan_String_int_: - -.. _io_realm_RealmQuery_greaterThan_String__int_: - -.. _greaterThan_java_lang_String_int_: - -.. _greaterThan_java_lang_String__int_: - -.. _greaterThan_String_int_: - -.. _greaterThan_String__int_: - -.. _RealmQuery_greaterThan_java_lang_String_int_: - -.. _RealmQuery_greaterThan_java_lang_String__int_: - -.. _RealmQuery_greaterThan_String_int_: - -.. _RealmQuery_greaterThan_String__int_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThan ` ( - | `String `__ fieldName, - | **int** value - | ) - - - - - * - Greater-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _greaterThanOrEqualTo: - -.. _greaterThanOrEqualTo__: - -.. _RealmQuery_greaterThanOrEqualTo: - -.. _RealmQuery_greaterThanOrEqualTo__: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo__: - - - -greaterThanOrEqualTo --------------------- - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String_ObjectId_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String__ObjectId_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String_ObjectId_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String__ObjectId_: - -.. _greaterThanOrEqualTo_java_lang_String_ObjectId_: - -.. _greaterThanOrEqualTo_java_lang_String__ObjectId_: - -.. _greaterThanOrEqualTo_String_ObjectId_: - -.. _greaterThanOrEqualTo_String__ObjectId_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String_ObjectId_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String__ObjectId_: - -.. _RealmQuery_greaterThanOrEqualTo_String_ObjectId_: - -.. _RealmQuery_greaterThanOrEqualTo_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Greater-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String_Decimal128_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String__Decimal128_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String_Decimal128_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String__Decimal128_: - -.. _greaterThanOrEqualTo_java_lang_String_Decimal128_: - -.. _greaterThanOrEqualTo_java_lang_String__Decimal128_: - -.. _greaterThanOrEqualTo_String_Decimal128_: - -.. _greaterThanOrEqualTo_String__Decimal128_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String_Decimal128_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String__Decimal128_: - -.. _RealmQuery_greaterThanOrEqualTo_String_Decimal128_: - -.. _RealmQuery_greaterThanOrEqualTo_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Greater-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String_java_util_Date_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String__java_util_Date_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String_Date_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String__Date_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String_java_util_Date_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String__java_util_Date_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String_Date_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String__Date_: - -.. _greaterThanOrEqualTo_java_lang_String_java_util_Date_: - -.. _greaterThanOrEqualTo_java_lang_String__java_util_Date_: - -.. _greaterThanOrEqualTo_java_lang_String_Date_: - -.. _greaterThanOrEqualTo_java_lang_String__Date_: - -.. _greaterThanOrEqualTo_String_java_util_Date_: - -.. _greaterThanOrEqualTo_String__java_util_Date_: - -.. _greaterThanOrEqualTo_String_Date_: - -.. _greaterThanOrEqualTo_String__Date_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String_java_util_Date_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String__java_util_Date_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String_Date_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String__Date_: - -.. _RealmQuery_greaterThanOrEqualTo_String_java_util_Date_: - -.. _RealmQuery_greaterThanOrEqualTo_String__java_util_Date_: - -.. _RealmQuery_greaterThanOrEqualTo_String_Date_: - -.. _RealmQuery_greaterThanOrEqualTo_String__Date_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - - - * - Greater-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String_float_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String__float_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String_float_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String__float_: - -.. _greaterThanOrEqualTo_java_lang_String_float_: - -.. _greaterThanOrEqualTo_java_lang_String__float_: - -.. _greaterThanOrEqualTo_String_float_: - -.. _greaterThanOrEqualTo_String__float_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String_float_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String__float_: - -.. _RealmQuery_greaterThanOrEqualTo_String_float_: - -.. _RealmQuery_greaterThanOrEqualTo_String__float_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **float** value - | ) - - - - - * - Greater-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String_double_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String__double_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String_double_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String__double_: - -.. _greaterThanOrEqualTo_java_lang_String_double_: - -.. _greaterThanOrEqualTo_java_lang_String__double_: - -.. _greaterThanOrEqualTo_String_double_: - -.. _greaterThanOrEqualTo_String__double_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String_double_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String__double_: - -.. _RealmQuery_greaterThanOrEqualTo_String_double_: - -.. _RealmQuery_greaterThanOrEqualTo_String__double_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **double** value - | ) - - - - - * - Greater-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String_long_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String__long_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String_long_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String__long_: - -.. _greaterThanOrEqualTo_java_lang_String_long_: - -.. _greaterThanOrEqualTo_java_lang_String__long_: - -.. _greaterThanOrEqualTo_String_long_: - -.. _greaterThanOrEqualTo_String__long_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String_long_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String__long_: - -.. _RealmQuery_greaterThanOrEqualTo_String_long_: - -.. _RealmQuery_greaterThanOrEqualTo_String__long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **long** value - | ) - - - - - * - Greater-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String_int_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_java_lang_String__int_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String_int_: - -.. _io_realm_RealmQuery_greaterThanOrEqualTo_String__int_: - -.. _greaterThanOrEqualTo_java_lang_String_int_: - -.. _greaterThanOrEqualTo_java_lang_String__int_: - -.. _greaterThanOrEqualTo_String_int_: - -.. _greaterThanOrEqualTo_String__int_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String_int_: - -.. _RealmQuery_greaterThanOrEqualTo_java_lang_String__int_: - -.. _RealmQuery_greaterThanOrEqualTo_String_int_: - -.. _RealmQuery_greaterThanOrEqualTo_String__int_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`greaterThanOrEqualTo ` ( - | `String `__ fieldName, - | **int** value - | ) - - - - - * - Greater-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _in: - -.. _in__: - -.. _RealmQuery_in: - -.. _RealmQuery_in__: - -.. _io_realm_RealmQuery_in: - -.. _io_realm_RealmQuery_in__: - - - -in ----- - -.. _io_realm_RealmQuery_in_java_lang_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_in_java_lang_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_in_java_lang_String_RealmAny_: - -.. _io_realm_RealmQuery_in_java_lang_String__RealmAny_: - -.. _io_realm_RealmQuery_in_java_lang_String_RealmAny____: - -.. _io_realm_RealmQuery_in_java_lang_String__RealmAny____: - -.. _io_realm_RealmQuery_in_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_in_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_in_String_RealmAny_: - -.. _io_realm_RealmQuery_in_String__RealmAny_: - -.. _io_realm_RealmQuery_in_String_RealmAny____: - -.. _io_realm_RealmQuery_in_String__RealmAny____: - -.. _in_java_lang_String_io_realm_RealmAny_: - -.. _in_java_lang_String__io_realm_RealmAny_: - -.. _in_java_lang_String_RealmAny_: - -.. _in_java_lang_String__RealmAny_: - -.. _in_java_lang_String_RealmAny____: - -.. _in_java_lang_String__RealmAny____: - -.. _in_String_io_realm_RealmAny_: - -.. _in_String__io_realm_RealmAny_: - -.. _in_String_RealmAny_: - -.. _in_String__RealmAny_: - -.. _in_String_RealmAny____: - -.. _in_String__RealmAny____: - -.. _RealmQuery_in_java_lang_String_io_realm_RealmAny_: - -.. _RealmQuery_in_java_lang_String__io_realm_RealmAny_: - -.. _RealmQuery_in_java_lang_String_RealmAny_: - -.. _RealmQuery_in_java_lang_String__RealmAny_: - -.. _RealmQuery_in_java_lang_String_RealmAny____: - -.. _RealmQuery_in_java_lang_String__RealmAny____: - -.. _RealmQuery_in_String_io_realm_RealmAny_: - -.. _RealmQuery_in_String__io_realm_RealmAny_: - -.. _RealmQuery_in_String_RealmAny_: - -.. _RealmQuery_in_String__RealmAny_: - -.. _RealmQuery_in_String_RealmAny____: - -.. _RealmQuery_in_String__RealmAny____: - -.. _io_realm_RealmQuery_in_String__RealmAny[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | :ref:`io.realm.RealmAny[] ` values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Date field. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_util_Date_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_util_Date_: - -.. _io_realm_RealmQuery_in_java_lang_String_Date_: - -.. _io_realm_RealmQuery_in_java_lang_String__Date_: - -.. _io_realm_RealmQuery_in_java_lang_String_Date____: - -.. _io_realm_RealmQuery_in_java_lang_String__Date____: - -.. _io_realm_RealmQuery_in_String_java_util_Date_: - -.. _io_realm_RealmQuery_in_String__java_util_Date_: - -.. _io_realm_RealmQuery_in_String_Date_: - -.. _io_realm_RealmQuery_in_String__Date_: - -.. _io_realm_RealmQuery_in_String_Date____: - -.. _io_realm_RealmQuery_in_String__Date____: - -.. _in_java_lang_String_java_util_Date_: - -.. _in_java_lang_String__java_util_Date_: - -.. _in_java_lang_String_Date_: - -.. _in_java_lang_String__Date_: - -.. _in_java_lang_String_Date____: - -.. _in_java_lang_String__Date____: - -.. _in_String_java_util_Date_: - -.. _in_String__java_util_Date_: - -.. _in_String_Date_: - -.. _in_String__Date_: - -.. _in_String_Date____: - -.. _in_String__Date____: - -.. _RealmQuery_in_java_lang_String_java_util_Date_: - -.. _RealmQuery_in_java_lang_String__java_util_Date_: - -.. _RealmQuery_in_java_lang_String_Date_: - -.. _RealmQuery_in_java_lang_String__Date_: - -.. _RealmQuery_in_java_lang_String_Date____: - -.. _RealmQuery_in_java_lang_String__Date____: - -.. _RealmQuery_in_String_java_util_Date_: - -.. _RealmQuery_in_String__java_util_Date_: - -.. _RealmQuery_in_String_Date_: - -.. _RealmQuery_in_String__Date_: - -.. _RealmQuery_in_String_Date____: - -.. _RealmQuery_in_String__Date____: - -.. _io_realm_RealmQuery_in_String__Date[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.util.Date[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Date field. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_Boolean_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_Boolean_: - -.. _io_realm_RealmQuery_in_java_lang_String_Boolean_: - -.. _io_realm_RealmQuery_in_java_lang_String__Boolean_: - -.. _io_realm_RealmQuery_in_java_lang_String_Boolean____: - -.. _io_realm_RealmQuery_in_java_lang_String__Boolean____: - -.. _io_realm_RealmQuery_in_String_java_lang_Boolean_: - -.. _io_realm_RealmQuery_in_String__java_lang_Boolean_: - -.. _io_realm_RealmQuery_in_String_Boolean_: - -.. _io_realm_RealmQuery_in_String__Boolean_: - -.. _io_realm_RealmQuery_in_String_Boolean____: - -.. _io_realm_RealmQuery_in_String__Boolean____: - -.. _in_java_lang_String_java_lang_Boolean_: - -.. _in_java_lang_String__java_lang_Boolean_: - -.. _in_java_lang_String_Boolean_: - -.. _in_java_lang_String__Boolean_: - -.. _in_java_lang_String_Boolean____: - -.. _in_java_lang_String__Boolean____: - -.. _in_String_java_lang_Boolean_: - -.. _in_String__java_lang_Boolean_: - -.. _in_String_Boolean_: - -.. _in_String__Boolean_: - -.. _in_String_Boolean____: - -.. _in_String__Boolean____: - -.. _RealmQuery_in_java_lang_String_java_lang_Boolean_: - -.. _RealmQuery_in_java_lang_String__java_lang_Boolean_: - -.. _RealmQuery_in_java_lang_String_Boolean_: - -.. _RealmQuery_in_java_lang_String__Boolean_: - -.. _RealmQuery_in_java_lang_String_Boolean____: - -.. _RealmQuery_in_java_lang_String__Boolean____: - -.. _RealmQuery_in_String_java_lang_Boolean_: - -.. _RealmQuery_in_String__java_lang_Boolean_: - -.. _RealmQuery_in_String_Boolean_: - -.. _RealmQuery_in_String__Boolean_: - -.. _RealmQuery_in_String_Boolean____: - -.. _RealmQuery_in_String__Boolean____: - -.. _io_realm_RealmQuery_in_String__Boolean[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Boolean[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Boolean. or empty. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_Float_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_Float_: - -.. _io_realm_RealmQuery_in_java_lang_String_Float_: - -.. _io_realm_RealmQuery_in_java_lang_String__Float_: - -.. _io_realm_RealmQuery_in_java_lang_String_Float____: - -.. _io_realm_RealmQuery_in_java_lang_String__Float____: - -.. _io_realm_RealmQuery_in_String_java_lang_Float_: - -.. _io_realm_RealmQuery_in_String__java_lang_Float_: - -.. _io_realm_RealmQuery_in_String_Float_: - -.. _io_realm_RealmQuery_in_String__Float_: - -.. _io_realm_RealmQuery_in_String_Float____: - -.. _io_realm_RealmQuery_in_String__Float____: - -.. _in_java_lang_String_java_lang_Float_: - -.. _in_java_lang_String__java_lang_Float_: - -.. _in_java_lang_String_Float_: - -.. _in_java_lang_String__Float_: - -.. _in_java_lang_String_Float____: - -.. _in_java_lang_String__Float____: - -.. _in_String_java_lang_Float_: - -.. _in_String__java_lang_Float_: - -.. _in_String_Float_: - -.. _in_String__Float_: - -.. _in_String_Float____: - -.. _in_String__Float____: - -.. _RealmQuery_in_java_lang_String_java_lang_Float_: - -.. _RealmQuery_in_java_lang_String__java_lang_Float_: - -.. _RealmQuery_in_java_lang_String_Float_: - -.. _RealmQuery_in_java_lang_String__Float_: - -.. _RealmQuery_in_java_lang_String_Float____: - -.. _RealmQuery_in_java_lang_String__Float____: - -.. _RealmQuery_in_String_java_lang_Float_: - -.. _RealmQuery_in_String__java_lang_Float_: - -.. _RealmQuery_in_String_Float_: - -.. _RealmQuery_in_String__Float_: - -.. _RealmQuery_in_String_Float____: - -.. _RealmQuery_in_String__Float____: - -.. _io_realm_RealmQuery_in_String__Float[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Float[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Float field. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_Double_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_Double_: - -.. _io_realm_RealmQuery_in_java_lang_String_Double_: - -.. _io_realm_RealmQuery_in_java_lang_String__Double_: - -.. _io_realm_RealmQuery_in_java_lang_String_Double____: - -.. _io_realm_RealmQuery_in_java_lang_String__Double____: - -.. _io_realm_RealmQuery_in_String_java_lang_Double_: - -.. _io_realm_RealmQuery_in_String__java_lang_Double_: - -.. _io_realm_RealmQuery_in_String_Double_: - -.. _io_realm_RealmQuery_in_String__Double_: - -.. _io_realm_RealmQuery_in_String_Double____: - -.. _io_realm_RealmQuery_in_String__Double____: - -.. _in_java_lang_String_java_lang_Double_: - -.. _in_java_lang_String__java_lang_Double_: - -.. _in_java_lang_String_Double_: - -.. _in_java_lang_String__Double_: - -.. _in_java_lang_String_Double____: - -.. _in_java_lang_String__Double____: - -.. _in_String_java_lang_Double_: - -.. _in_String__java_lang_Double_: - -.. _in_String_Double_: - -.. _in_String__Double_: - -.. _in_String_Double____: - -.. _in_String__Double____: - -.. _RealmQuery_in_java_lang_String_java_lang_Double_: - -.. _RealmQuery_in_java_lang_String__java_lang_Double_: - -.. _RealmQuery_in_java_lang_String_Double_: - -.. _RealmQuery_in_java_lang_String__Double_: - -.. _RealmQuery_in_java_lang_String_Double____: - -.. _RealmQuery_in_java_lang_String__Double____: - -.. _RealmQuery_in_String_java_lang_Double_: - -.. _RealmQuery_in_String__java_lang_Double_: - -.. _RealmQuery_in_String_Double_: - -.. _RealmQuery_in_String__Double_: - -.. _RealmQuery_in_String_Double____: - -.. _RealmQuery_in_String__Double____: - -.. _io_realm_RealmQuery_in_String__Double[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Double[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Double field. empty. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_Long_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_Long_: - -.. _io_realm_RealmQuery_in_java_lang_String_Long_: - -.. _io_realm_RealmQuery_in_java_lang_String__Long_: - -.. _io_realm_RealmQuery_in_java_lang_String_Long____: - -.. _io_realm_RealmQuery_in_java_lang_String__Long____: - -.. _io_realm_RealmQuery_in_String_java_lang_Long_: - -.. _io_realm_RealmQuery_in_String__java_lang_Long_: - -.. _io_realm_RealmQuery_in_String_Long_: - -.. _io_realm_RealmQuery_in_String__Long_: - -.. _io_realm_RealmQuery_in_String_Long____: - -.. _io_realm_RealmQuery_in_String__Long____: - -.. _in_java_lang_String_java_lang_Long_: - -.. _in_java_lang_String__java_lang_Long_: - -.. _in_java_lang_String_Long_: - -.. _in_java_lang_String__Long_: - -.. _in_java_lang_String_Long____: - -.. _in_java_lang_String__Long____: - -.. _in_String_java_lang_Long_: - -.. _in_String__java_lang_Long_: - -.. _in_String_Long_: - -.. _in_String__Long_: - -.. _in_String_Long____: - -.. _in_String__Long____: - -.. _RealmQuery_in_java_lang_String_java_lang_Long_: - -.. _RealmQuery_in_java_lang_String__java_lang_Long_: - -.. _RealmQuery_in_java_lang_String_Long_: - -.. _RealmQuery_in_java_lang_String__Long_: - -.. _RealmQuery_in_java_lang_String_Long____: - -.. _RealmQuery_in_java_lang_String__Long____: - -.. _RealmQuery_in_String_java_lang_Long_: - -.. _RealmQuery_in_String__java_lang_Long_: - -.. _RealmQuery_in_String_Long_: - -.. _RealmQuery_in_String__Long_: - -.. _RealmQuery_in_String_Long____: - -.. _RealmQuery_in_String__Long____: - -.. _io_realm_RealmQuery_in_String__Long[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Long[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Long field. empty. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_Integer_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_Integer_: - -.. _io_realm_RealmQuery_in_java_lang_String_Integer_: - -.. _io_realm_RealmQuery_in_java_lang_String__Integer_: - -.. _io_realm_RealmQuery_in_java_lang_String_Integer____: - -.. _io_realm_RealmQuery_in_java_lang_String__Integer____: - -.. _io_realm_RealmQuery_in_String_java_lang_Integer_: - -.. _io_realm_RealmQuery_in_String__java_lang_Integer_: - -.. _io_realm_RealmQuery_in_String_Integer_: - -.. _io_realm_RealmQuery_in_String__Integer_: - -.. _io_realm_RealmQuery_in_String_Integer____: - -.. _io_realm_RealmQuery_in_String__Integer____: - -.. _in_java_lang_String_java_lang_Integer_: - -.. _in_java_lang_String__java_lang_Integer_: - -.. _in_java_lang_String_Integer_: - -.. _in_java_lang_String__Integer_: - -.. _in_java_lang_String_Integer____: - -.. _in_java_lang_String__Integer____: - -.. _in_String_java_lang_Integer_: - -.. _in_String__java_lang_Integer_: - -.. _in_String_Integer_: - -.. _in_String__Integer_: - -.. _in_String_Integer____: - -.. _in_String__Integer____: - -.. _RealmQuery_in_java_lang_String_java_lang_Integer_: - -.. _RealmQuery_in_java_lang_String__java_lang_Integer_: - -.. _RealmQuery_in_java_lang_String_Integer_: - -.. _RealmQuery_in_java_lang_String__Integer_: - -.. _RealmQuery_in_java_lang_String_Integer____: - -.. _RealmQuery_in_java_lang_String__Integer____: - -.. _RealmQuery_in_String_java_lang_Integer_: - -.. _RealmQuery_in_String__java_lang_Integer_: - -.. _RealmQuery_in_String_Integer_: - -.. _RealmQuery_in_String__Integer_: - -.. _RealmQuery_in_String_Integer____: - -.. _RealmQuery_in_String__Integer____: - -.. _io_realm_RealmQuery_in_String__Integer[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Integer[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Integer field. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_Short_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_Short_: - -.. _io_realm_RealmQuery_in_java_lang_String_Short_: - -.. _io_realm_RealmQuery_in_java_lang_String__Short_: - -.. _io_realm_RealmQuery_in_java_lang_String_Short____: - -.. _io_realm_RealmQuery_in_java_lang_String__Short____: - -.. _io_realm_RealmQuery_in_String_java_lang_Short_: - -.. _io_realm_RealmQuery_in_String__java_lang_Short_: - -.. _io_realm_RealmQuery_in_String_Short_: - -.. _io_realm_RealmQuery_in_String__Short_: - -.. _io_realm_RealmQuery_in_String_Short____: - -.. _io_realm_RealmQuery_in_String__Short____: - -.. _in_java_lang_String_java_lang_Short_: - -.. _in_java_lang_String__java_lang_Short_: - -.. _in_java_lang_String_Short_: - -.. _in_java_lang_String__Short_: - -.. _in_java_lang_String_Short____: - -.. _in_java_lang_String__Short____: - -.. _in_String_java_lang_Short_: - -.. _in_String__java_lang_Short_: - -.. _in_String_Short_: - -.. _in_String__Short_: - -.. _in_String_Short____: - -.. _in_String__Short____: - -.. _RealmQuery_in_java_lang_String_java_lang_Short_: - -.. _RealmQuery_in_java_lang_String__java_lang_Short_: - -.. _RealmQuery_in_java_lang_String_Short_: - -.. _RealmQuery_in_java_lang_String__Short_: - -.. _RealmQuery_in_java_lang_String_Short____: - -.. _RealmQuery_in_java_lang_String__Short____: - -.. _RealmQuery_in_String_java_lang_Short_: - -.. _RealmQuery_in_String__java_lang_Short_: - -.. _RealmQuery_in_String_Short_: - -.. _RealmQuery_in_String__Short_: - -.. _RealmQuery_in_String_Short____: - -.. _RealmQuery_in_String__Short____: - -.. _io_realm_RealmQuery_in_String__Short[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Short[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Short field. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_Byte_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_Byte_: - -.. _io_realm_RealmQuery_in_java_lang_String_Byte_: - -.. _io_realm_RealmQuery_in_java_lang_String__Byte_: - -.. _io_realm_RealmQuery_in_java_lang_String_Byte____: - -.. _io_realm_RealmQuery_in_java_lang_String__Byte____: - -.. _io_realm_RealmQuery_in_String_java_lang_Byte_: - -.. _io_realm_RealmQuery_in_String__java_lang_Byte_: - -.. _io_realm_RealmQuery_in_String_Byte_: - -.. _io_realm_RealmQuery_in_String__Byte_: - -.. _io_realm_RealmQuery_in_String_Byte____: - -.. _io_realm_RealmQuery_in_String__Byte____: - -.. _in_java_lang_String_java_lang_Byte_: - -.. _in_java_lang_String__java_lang_Byte_: - -.. _in_java_lang_String_Byte_: - -.. _in_java_lang_String__Byte_: - -.. _in_java_lang_String_Byte____: - -.. _in_java_lang_String__Byte____: - -.. _in_String_java_lang_Byte_: - -.. _in_String__java_lang_Byte_: - -.. _in_String_Byte_: - -.. _in_String__Byte_: - -.. _in_String_Byte____: - -.. _in_String__Byte____: - -.. _RealmQuery_in_java_lang_String_java_lang_Byte_: - -.. _RealmQuery_in_java_lang_String__java_lang_Byte_: - -.. _RealmQuery_in_java_lang_String_Byte_: - -.. _RealmQuery_in_java_lang_String__Byte_: - -.. _RealmQuery_in_java_lang_String_Byte____: - -.. _RealmQuery_in_java_lang_String__Byte____: - -.. _RealmQuery_in_String_java_lang_Byte_: - -.. _RealmQuery_in_String__java_lang_Byte_: - -.. _RealmQuery_in_String_Byte_: - -.. _RealmQuery_in_String__Byte_: - -.. _RealmQuery_in_String_Byte____: - -.. _RealmQuery_in_String__Byte____: - -.. _io_realm_RealmQuery_in_String__Byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.Byte[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a Byte field. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_in_java_lang_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_in_java_lang_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_in_java_lang_String_String_Case_: - -.. _io_realm_RealmQuery_in_java_lang_String__String__Case_: - -.. _io_realm_RealmQuery_in_java_lang_String_String____io_realm_Case_: - -.. _io_realm_RealmQuery_in_java_lang_String__String_____io_realm_Case_: - -.. _io_realm_RealmQuery_in_java_lang_String_String____Case_: - -.. _io_realm_RealmQuery_in_java_lang_String__String_____Case_: - -.. _io_realm_RealmQuery_in_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_in_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_in_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_in_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_in_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_in_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_in_String_String_Case_: - -.. _io_realm_RealmQuery_in_String__String__Case_: - -.. _io_realm_RealmQuery_in_String_String____io_realm_Case_: - -.. _io_realm_RealmQuery_in_String__String_____io_realm_Case_: - -.. _io_realm_RealmQuery_in_String_String____Case_: - -.. _io_realm_RealmQuery_in_String__String_____Case_: - -.. _in_java_lang_String_java_lang_String_io_realm_Case_: - -.. _in_java_lang_String__java_lang_String__io_realm_Case_: - -.. _in_java_lang_String_java_lang_String_Case_: - -.. _in_java_lang_String__java_lang_String__Case_: - -.. _in_java_lang_String_String_io_realm_Case_: - -.. _in_java_lang_String__String__io_realm_Case_: - -.. _in_java_lang_String_String_Case_: - -.. _in_java_lang_String__String__Case_: - -.. _in_java_lang_String_String____io_realm_Case_: - -.. _in_java_lang_String__String_____io_realm_Case_: - -.. _in_java_lang_String_String____Case_: - -.. _in_java_lang_String__String_____Case_: - -.. _in_String_java_lang_String_io_realm_Case_: - -.. _in_String__java_lang_String__io_realm_Case_: - -.. _in_String_java_lang_String_Case_: - -.. _in_String__java_lang_String__Case_: - -.. _in_String_String_io_realm_Case_: - -.. _in_String__String__io_realm_Case_: - -.. _in_String_String_Case_: - -.. _in_String__String__Case_: - -.. _in_String_String____io_realm_Case_: - -.. _in_String__String_____io_realm_Case_: - -.. _in_String_String____Case_: - -.. _in_String__String_____Case_: - -.. _RealmQuery_in_java_lang_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_in_java_lang_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_in_java_lang_String_java_lang_String_Case_: - -.. _RealmQuery_in_java_lang_String__java_lang_String__Case_: - -.. _RealmQuery_in_java_lang_String_String_io_realm_Case_: - -.. _RealmQuery_in_java_lang_String__String__io_realm_Case_: - -.. _RealmQuery_in_java_lang_String_String_Case_: - -.. _RealmQuery_in_java_lang_String__String__Case_: - -.. _RealmQuery_in_java_lang_String_String____io_realm_Case_: - -.. _RealmQuery_in_java_lang_String__String_____io_realm_Case_: - -.. _RealmQuery_in_java_lang_String_String____Case_: - -.. _RealmQuery_in_java_lang_String__String_____Case_: - -.. _RealmQuery_in_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_in_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_in_String_java_lang_String_Case_: - -.. _RealmQuery_in_String__java_lang_String__Case_: - -.. _RealmQuery_in_String_String_io_realm_Case_: - -.. _RealmQuery_in_String__String__io_realm_Case_: - -.. _RealmQuery_in_String_String_Case_: - -.. _RealmQuery_in_String__String__Case_: - -.. _RealmQuery_in_String_String____io_realm_Case_: - -.. _RealmQuery_in_String__String_____io_realm_Case_: - -.. _RealmQuery_in_String_String____Case_: - -.. _RealmQuery_in_String__String_____Case_: - -.. _io_realm_RealmQuery_in_String__String[]__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.String[] `__ values, - | :ref:`Case ` casing - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - ``casing`` - how casing is handled. :ref:`Case.INSENSITIVE ` works only for the Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a String field. - - - - - - - - - - -.. _io_realm_RealmQuery_in_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_in_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_in_java_lang_String_String_: - -.. _io_realm_RealmQuery_in_java_lang_String__String_: - -.. _io_realm_RealmQuery_in_java_lang_String_String____: - -.. _io_realm_RealmQuery_in_java_lang_String__String____: - -.. _io_realm_RealmQuery_in_String_java_lang_String_: - -.. _io_realm_RealmQuery_in_String__java_lang_String_: - -.. _io_realm_RealmQuery_in_String_String_: - -.. _io_realm_RealmQuery_in_String__String_: - -.. _io_realm_RealmQuery_in_String_String____: - -.. _io_realm_RealmQuery_in_String__String____: - -.. _in_java_lang_String_java_lang_String_: - -.. _in_java_lang_String__java_lang_String_: - -.. _in_java_lang_String_String_: - -.. _in_java_lang_String__String_: - -.. _in_java_lang_String_String____: - -.. _in_java_lang_String__String____: - -.. _in_String_java_lang_String_: - -.. _in_String__java_lang_String_: - -.. _in_String_String_: - -.. _in_String__String_: - -.. _in_String_String____: - -.. _in_String__String____: - -.. _RealmQuery_in_java_lang_String_java_lang_String_: - -.. _RealmQuery_in_java_lang_String__java_lang_String_: - -.. _RealmQuery_in_java_lang_String_String_: - -.. _RealmQuery_in_java_lang_String__String_: - -.. _RealmQuery_in_java_lang_String_String____: - -.. _RealmQuery_in_java_lang_String__String____: - -.. _RealmQuery_in_String_java_lang_String_: - -.. _RealmQuery_in_String__java_lang_String_: - -.. _RealmQuery_in_String_String_: - -.. _RealmQuery_in_String__String_: - -.. _RealmQuery_in_String_String____: - -.. _RealmQuery_in_String__String____: - -.. _io_realm_RealmQuery_in_String__String[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`in ` ( - | `String `__ fieldName, - | `java.lang.String[] `__ values - | ) - - - - - * - In comparison. This allows you to test if objects match any value in an array of values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``values`` - array of values to compare with. If ``null`` or the empty array is provided the query will never match any results. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field isn't a String field. - - - - - - - - - - - - -.. _isEmpty: - -.. _isEmpty__: - -.. _RealmQuery_isEmpty: - -.. _RealmQuery_isEmpty__: - -.. _io_realm_RealmQuery_isEmpty: - -.. _io_realm_RealmQuery_isEmpty__: - - - -isEmpty -------- - -.. _io_realm_RealmQuery_isEmpty_java_lang_String_: - -.. _io_realm_RealmQuery_isEmpty_String_: - -.. _isEmpty_java_lang_String_: - -.. _isEmpty_String_: - -.. _RealmQuery_isEmpty_java_lang_String_: - -.. _RealmQuery_isEmpty_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`isEmpty ` ( - | `String `__ fieldName - | ) - - - - - * - Condition that finds values that are considered "empty" i.e., an empty list, the 0-length string or byte array. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid or its type isn't either a RealmList, String or byte array. - - - - - - - - - - - - -.. _isNotEmpty: - -.. _isNotEmpty__: - -.. _RealmQuery_isNotEmpty: - -.. _RealmQuery_isNotEmpty__: - -.. _io_realm_RealmQuery_isNotEmpty: - -.. _io_realm_RealmQuery_isNotEmpty__: - - - -isNotEmpty ----------- - -.. _io_realm_RealmQuery_isNotEmpty_java_lang_String_: - -.. _io_realm_RealmQuery_isNotEmpty_String_: - -.. _isNotEmpty_java_lang_String_: - -.. _isNotEmpty_String_: - -.. _RealmQuery_isNotEmpty_java_lang_String_: - -.. _RealmQuery_isNotEmpty_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`isNotEmpty ` ( - | `String `__ fieldName - | ) - - - - - * - Condition that finds values that are considered "Not-empty" i.e., a list, a string or a byte array with not-empty values. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field name isn't valid or its type isn't either a RealmList, String or byte array. - - - - - - - - - - - - -.. _isNotNull: - -.. _isNotNull__: - -.. _RealmQuery_isNotNull: - -.. _RealmQuery_isNotNull__: - -.. _io_realm_RealmQuery_isNotNull: - -.. _io_realm_RealmQuery_isNotNull__: - - - -isNotNull ---------- - -.. _io_realm_RealmQuery_isNotNull_java_lang_String_: - -.. _io_realm_RealmQuery_isNotNull_String_: - -.. _isNotNull_java_lang_String_: - -.. _isNotNull_String_: - -.. _RealmQuery_isNotNull_java_lang_String_: - -.. _RealmQuery_isNotNull_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`isNotNull ` ( - | `String `__ fieldName - | ) - - - - - * - Tests if a field is not ``null`` . Only works for nullable fields. - - - - - - - **Parameters** - - - ``fieldName`` - the field name. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not nullable. - - - - - - - - - - .. seealso:: - - - - - :ref:`Required for further infomation. ` - - - - - - - - - - - - -.. _isNull: - -.. _isNull__: - -.. _RealmQuery_isNull: - -.. _RealmQuery_isNull__: - -.. _io_realm_RealmQuery_isNull: - -.. _io_realm_RealmQuery_isNull__: - - - -isNull ------- - -.. _io_realm_RealmQuery_isNull_java_lang_String_: - -.. _io_realm_RealmQuery_isNull_String_: - -.. _isNull_java_lang_String_: - -.. _isNull_String_: - -.. _RealmQuery_isNull_java_lang_String_: - -.. _RealmQuery_isNull_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`isNull ` ( - | `String `__ fieldName - | ) - - - - - * - Tests if a field is ``null`` . Only works for nullable fields. - - For link queries, if any part of the link path is ``null`` the whole path is considered to be ``null`` e.g., ``isNull("linkField.stringField")`` will be considered to be ``null`` if either ``linkField`` or ``linkField.stringField`` is ``null`` . - - - - - - - - - **Parameters** - - - ``fieldName`` - the field name. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not nullable. - - - - - - - - - - .. seealso:: - - - - - :ref:`Required for further infomation. ` - - - - - - - - - - - - -.. _isValid: - -.. _isValid__: - -.. _RealmQuery_isValid: - -.. _RealmQuery_isValid__: - -.. _io_realm_RealmQuery_isValid: - -.. _io_realm_RealmQuery_isValid__: - - - -isValid -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isValid ` () - | - - - - - * - Checks if :ref:`io.realm.RealmQuery ` is still valid to use i.e., the :ref:`io.realm.Realm ` instance hasn't been closed and any parent :ref:`io.realm.RealmResults ` is still valid. - - - - - - - - - **Returns** - - ``true`` if still valid to use, ``false`` otherwise. - - - - - - - - - - - - - -.. _lessThan: - -.. _lessThan__: - -.. _RealmQuery_lessThan: - -.. _RealmQuery_lessThan__: - -.. _io_realm_RealmQuery_lessThan: - -.. _io_realm_RealmQuery_lessThan__: - - - -lessThan --------- - -.. _io_realm_RealmQuery_lessThan_java_lang_String_ObjectId_: - -.. _io_realm_RealmQuery_lessThan_java_lang_String__ObjectId_: - -.. _io_realm_RealmQuery_lessThan_String_ObjectId_: - -.. _io_realm_RealmQuery_lessThan_String__ObjectId_: - -.. _lessThan_java_lang_String_ObjectId_: - -.. _lessThan_java_lang_String__ObjectId_: - -.. _lessThan_String_ObjectId_: - -.. _lessThan_String__ObjectId_: - -.. _RealmQuery_lessThan_java_lang_String_ObjectId_: - -.. _RealmQuery_lessThan_java_lang_String__ObjectId_: - -.. _RealmQuery_lessThan_String_ObjectId_: - -.. _RealmQuery_lessThan_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`lessThan ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Less-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_lessThan_java_lang_String_Decimal128_: - -.. _io_realm_RealmQuery_lessThan_java_lang_String__Decimal128_: - -.. _io_realm_RealmQuery_lessThan_String_Decimal128_: - -.. _io_realm_RealmQuery_lessThan_String__Decimal128_: - -.. _lessThan_java_lang_String_Decimal128_: - -.. _lessThan_java_lang_String__Decimal128_: - -.. _lessThan_String_Decimal128_: - -.. _lessThan_String__Decimal128_: - -.. _RealmQuery_lessThan_java_lang_String_Decimal128_: - -.. _RealmQuery_lessThan_java_lang_String__Decimal128_: - -.. _RealmQuery_lessThan_String_Decimal128_: - -.. _RealmQuery_lessThan_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`lessThan ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Less-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_lessThan_java_lang_String_long_: - -.. _io_realm_RealmQuery_lessThan_java_lang_String__long_: - -.. _io_realm_RealmQuery_lessThan_String_long_: - -.. _io_realm_RealmQuery_lessThan_String__long_: - -.. _lessThan_java_lang_String_long_: - -.. _lessThan_java_lang_String__long_: - -.. _lessThan_String_long_: - -.. _lessThan_String__long_: - -.. _RealmQuery_lessThan_java_lang_String_long_: - -.. _RealmQuery_lessThan_java_lang_String__long_: - -.. _RealmQuery_lessThan_String_long_: - -.. _RealmQuery_lessThan_String__long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`lessThan ` ( - | `String `__ fieldName, - | **long** value - | ) - - - - - * - Less-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_lessThan_java_lang_String_int_: - -.. _io_realm_RealmQuery_lessThan_java_lang_String__int_: - -.. _io_realm_RealmQuery_lessThan_String_int_: - -.. _io_realm_RealmQuery_lessThan_String__int_: - -.. _lessThan_java_lang_String_int_: - -.. _lessThan_java_lang_String__int_: - -.. _lessThan_String_int_: - -.. _lessThan_String__int_: - -.. _RealmQuery_lessThan_java_lang_String_int_: - -.. _RealmQuery_lessThan_java_lang_String__int_: - -.. _RealmQuery_lessThan_String_int_: - -.. _RealmQuery_lessThan_String__int_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`lessThan ` ( - | `String `__ fieldName, - | **int** value - | ) - - - - - * - Less-than comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _lessThanOrEqualTo: - -.. _lessThanOrEqualTo__: - -.. _RealmQuery_lessThanOrEqualTo: - -.. _RealmQuery_lessThanOrEqualTo__: - -.. _io_realm_RealmQuery_lessThanOrEqualTo: - -.. _io_realm_RealmQuery_lessThanOrEqualTo__: - - - -lessThanOrEqualTo ------------------ - -.. _io_realm_RealmQuery_lessThanOrEqualTo_java_lang_String_ObjectId_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_java_lang_String__ObjectId_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_String_ObjectId_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_String__ObjectId_: - -.. _lessThanOrEqualTo_java_lang_String_ObjectId_: - -.. _lessThanOrEqualTo_java_lang_String__ObjectId_: - -.. _lessThanOrEqualTo_String_ObjectId_: - -.. _lessThanOrEqualTo_String__ObjectId_: - -.. _RealmQuery_lessThanOrEqualTo_java_lang_String_ObjectId_: - -.. _RealmQuery_lessThanOrEqualTo_java_lang_String__ObjectId_: - -.. _RealmQuery_lessThanOrEqualTo_String_ObjectId_: - -.. _RealmQuery_lessThanOrEqualTo_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`lessThanOrEqualTo ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Less-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_lessThanOrEqualTo_java_lang_String_Decimal128_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_java_lang_String__Decimal128_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_String_Decimal128_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_String__Decimal128_: - -.. _lessThanOrEqualTo_java_lang_String_Decimal128_: - -.. _lessThanOrEqualTo_java_lang_String__Decimal128_: - -.. _lessThanOrEqualTo_String_Decimal128_: - -.. _lessThanOrEqualTo_String__Decimal128_: - -.. _RealmQuery_lessThanOrEqualTo_java_lang_String_Decimal128_: - -.. _RealmQuery_lessThanOrEqualTo_java_lang_String__Decimal128_: - -.. _RealmQuery_lessThanOrEqualTo_String_Decimal128_: - -.. _RealmQuery_lessThanOrEqualTo_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`lessThanOrEqualTo ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Less-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_lessThanOrEqualTo_java_lang_String_long_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_java_lang_String__long_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_String_long_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_String__long_: - -.. _lessThanOrEqualTo_java_lang_String_long_: - -.. _lessThanOrEqualTo_java_lang_String__long_: - -.. _lessThanOrEqualTo_String_long_: - -.. _lessThanOrEqualTo_String__long_: - -.. _RealmQuery_lessThanOrEqualTo_java_lang_String_long_: - -.. _RealmQuery_lessThanOrEqualTo_java_lang_String__long_: - -.. _RealmQuery_lessThanOrEqualTo_String_long_: - -.. _RealmQuery_lessThanOrEqualTo_String__long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`lessThanOrEqualTo ` ( - | `String `__ fieldName, - | **long** value - | ) - - - - - * - Less-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_lessThanOrEqualTo_java_lang_String_int_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_java_lang_String__int_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_String_int_: - -.. _io_realm_RealmQuery_lessThanOrEqualTo_String__int_: - -.. _lessThanOrEqualTo_java_lang_String_int_: - -.. _lessThanOrEqualTo_java_lang_String__int_: - -.. _lessThanOrEqualTo_String_int_: - -.. _lessThanOrEqualTo_String__int_: - -.. _RealmQuery_lessThanOrEqualTo_java_lang_String_int_: - -.. _RealmQuery_lessThanOrEqualTo_java_lang_String__int_: - -.. _RealmQuery_lessThanOrEqualTo_String_int_: - -.. _RealmQuery_lessThanOrEqualTo_String__int_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`lessThanOrEqualTo ` ( - | `String `__ fieldName, - | **int** value - | ) - - - - - * - Less-than-or-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _like: - -.. _like__: - -.. _RealmQuery_like: - -.. _RealmQuery_like__: - -.. _io_realm_RealmQuery_like: - -.. _io_realm_RealmQuery_like__: - - - -like ----- - -.. _io_realm_RealmQuery_like_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_like_java_lang_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String__RealmAny__Case_: - -.. _io_realm_RealmQuery_like_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_like_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_like_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_like_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_like_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_like_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_like_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_like_String__RealmAny__Case_: - -.. _like_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _like_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _like_java_lang_String_io_realm_RealmAny_Case_: - -.. _like_java_lang_String__io_realm_RealmAny__Case_: - -.. _like_java_lang_String_RealmAny_io_realm_Case_: - -.. _like_java_lang_String__RealmAny__io_realm_Case_: - -.. _like_java_lang_String_RealmAny_Case_: - -.. _like_java_lang_String__RealmAny__Case_: - -.. _like_String_io_realm_RealmAny_io_realm_Case_: - -.. _like_String__io_realm_RealmAny__io_realm_Case_: - -.. _like_String_io_realm_RealmAny_Case_: - -.. _like_String__io_realm_RealmAny__Case_: - -.. _like_String_RealmAny_io_realm_Case_: - -.. _like_String__RealmAny__io_realm_Case_: - -.. _like_String_RealmAny_Case_: - -.. _like_String__RealmAny__Case_: - -.. _RealmQuery_like_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_like_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_like_java_lang_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_like_java_lang_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_like_java_lang_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_like_java_lang_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_like_java_lang_String_RealmAny_Case_: - -.. _RealmQuery_like_java_lang_String__RealmAny__Case_: - -.. _RealmQuery_like_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_like_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_like_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_like_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_like_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_like_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_like_String_RealmAny_Case_: - -.. _RealmQuery_like_String__RealmAny__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`like ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - - - * - Condition that the value of field matches with the specified substring, with wildcards: - - - '\*' matches [0, n] unicode chars - - - - '?' matches a single unicode char. - - - - - - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the wildcard string. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_like_java_lang_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_like_java_lang_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String_String_Case_: - -.. _io_realm_RealmQuery_like_java_lang_String__String__Case_: - -.. _io_realm_RealmQuery_like_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_like_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_like_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_like_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_like_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_like_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_like_String_String_Case_: - -.. _io_realm_RealmQuery_like_String__String__Case_: - -.. _like_java_lang_String_java_lang_String_io_realm_Case_: - -.. _like_java_lang_String__java_lang_String__io_realm_Case_: - -.. _like_java_lang_String_java_lang_String_Case_: - -.. _like_java_lang_String__java_lang_String__Case_: - -.. _like_java_lang_String_String_io_realm_Case_: - -.. _like_java_lang_String__String__io_realm_Case_: - -.. _like_java_lang_String_String_Case_: - -.. _like_java_lang_String__String__Case_: - -.. _like_String_java_lang_String_io_realm_Case_: - -.. _like_String__java_lang_String__io_realm_Case_: - -.. _like_String_java_lang_String_Case_: - -.. _like_String__java_lang_String__Case_: - -.. _like_String_String_io_realm_Case_: - -.. _like_String__String__io_realm_Case_: - -.. _like_String_String_Case_: - -.. _like_String__String__Case_: - -.. _RealmQuery_like_java_lang_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_like_java_lang_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_like_java_lang_String_java_lang_String_Case_: - -.. _RealmQuery_like_java_lang_String__java_lang_String__Case_: - -.. _RealmQuery_like_java_lang_String_String_io_realm_Case_: - -.. _RealmQuery_like_java_lang_String__String__io_realm_Case_: - -.. _RealmQuery_like_java_lang_String_String_Case_: - -.. _RealmQuery_like_java_lang_String__String__Case_: - -.. _RealmQuery_like_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_like_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_like_String_java_lang_String_Case_: - -.. _RealmQuery_like_String__java_lang_String__Case_: - -.. _RealmQuery_like_String_String_io_realm_Case_: - -.. _RealmQuery_like_String__String__io_realm_Case_: - -.. _RealmQuery_like_String_String_Case_: - -.. _RealmQuery_like_String__String__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`like ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - - - * - Condition that the value of field matches with the specified substring, with wildcards: - - - '\*' matches [0, n] unicode chars - - - - '?' matches a single unicode char. - - - - - - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the wildcard string. - - - - - ``casing`` - how to handle casing. Setting this to :ref:`Case.INSENSITIVE ` only works for Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_like_java_lang_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_like_java_lang_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_like_java_lang_String_RealmAny_: - -.. _io_realm_RealmQuery_like_java_lang_String__RealmAny_: - -.. _io_realm_RealmQuery_like_String_io_realm_RealmAny_: - -.. _io_realm_RealmQuery_like_String__io_realm_RealmAny_: - -.. _io_realm_RealmQuery_like_String_RealmAny_: - -.. _io_realm_RealmQuery_like_String__RealmAny_: - -.. _like_java_lang_String_io_realm_RealmAny_: - -.. _like_java_lang_String__io_realm_RealmAny_: - -.. _like_java_lang_String_RealmAny_: - -.. _like_java_lang_String__RealmAny_: - -.. _like_String_io_realm_RealmAny_: - -.. _like_String__io_realm_RealmAny_: - -.. _like_String_RealmAny_: - -.. _like_String__RealmAny_: - -.. _RealmQuery_like_java_lang_String_io_realm_RealmAny_: - -.. _RealmQuery_like_java_lang_String__io_realm_RealmAny_: - -.. _RealmQuery_like_java_lang_String_RealmAny_: - -.. _RealmQuery_like_java_lang_String__RealmAny_: - -.. _RealmQuery_like_String_io_realm_RealmAny_: - -.. _RealmQuery_like_String__io_realm_RealmAny_: - -.. _RealmQuery_like_String_RealmAny_: - -.. _RealmQuery_like_String__RealmAny_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`like ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value - | ) - - - - - * - Condition that the value of field matches with the specified substring, with wildcards: - - - '\*' matches [0, n] unicode chars - - - - '?' matches a single unicode char. - - - - - - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the wildcard string. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_like_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_like_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_like_java_lang_String_String_: - -.. _io_realm_RealmQuery_like_java_lang_String__String_: - -.. _io_realm_RealmQuery_like_String_java_lang_String_: - -.. _io_realm_RealmQuery_like_String__java_lang_String_: - -.. _io_realm_RealmQuery_like_String_String_: - -.. _io_realm_RealmQuery_like_String__String_: - -.. _like_java_lang_String_java_lang_String_: - -.. _like_java_lang_String__java_lang_String_: - -.. _like_java_lang_String_String_: - -.. _like_java_lang_String__String_: - -.. _like_String_java_lang_String_: - -.. _like_String__java_lang_String_: - -.. _like_String_String_: - -.. _like_String__String_: - -.. _RealmQuery_like_java_lang_String_java_lang_String_: - -.. _RealmQuery_like_java_lang_String__java_lang_String_: - -.. _RealmQuery_like_java_lang_String_String_: - -.. _RealmQuery_like_java_lang_String__String_: - -.. _RealmQuery_like_String_java_lang_String_: - -.. _RealmQuery_like_String__java_lang_String_: - -.. _RealmQuery_like_String_String_: - -.. _RealmQuery_like_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`like ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Condition that the value of field matches with the specified substring, with wildcards: - - - '\*' matches [0, n] unicode chars - - - - '?' matches a single unicode char. - - - - - - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the wildcard string. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _limit: - -.. _limit__: - -.. _RealmQuery_limit: - -.. _RealmQuery_limit__: - -.. _io_realm_RealmQuery_limit: - -.. _io_realm_RealmQuery_limit__: - - - -limit ------ - -.. _io_realm_RealmQuery_limit_long_: - -.. _limit_long_: - -.. _RealmQuery_limit_long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`limit ` ( - | **long** limit - | ) - - - - - * - Limits the number of objects returned in case the query matched more objects.Note that when using this method in combination with :ref:`sort(String) ` and :ref:`distinct(String, String...) ` they will be executed in the order they where added which can affect the end result. - - - - - - - - - **Parameters** - - - ``limit`` - a limit that is ``≥ 1`` . - - - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the provided ``limit`` is less than 1. - - - - - - - - - - - - - - -.. _max: - -.. _max__: - -.. _RealmQuery_max: - -.. _RealmQuery_max__: - -.. _io_realm_RealmQuery_max: - -.. _io_realm_RealmQuery_max__: - - - -max ----- - -.. _io_realm_RealmQuery_max_java_lang_String_: - -.. _io_realm_RealmQuery_max_String_: - -.. _max_java_lang_String_: - -.. _max_String_: - -.. _RealmQuery_max_java_lang_String_: - -.. _RealmQuery_max_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`max ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum value of a field. - - - - - **Parameters** - - - ``fieldName`` - the field to look for a maximum on. Only number fields are supported. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given field, ``null`` will be returned. Otherwise the maximum value is returned. When determining the maximum value, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a number type. - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _maxRealmAny: - -.. _maxRealmAny__: - -.. _RealmQuery_maxRealmAny: - -.. _RealmQuery_maxRealmAny__: - -.. _io_realm_RealmQuery_maxRealmAny: - -.. _io_realm_RealmQuery_maxRealmAny__: - - - -maxRealmAny ------------ - -.. _io_realm_RealmQuery_maxRealmAny_java_lang_String_: - -.. _io_realm_RealmQuery_maxRealmAny_String_: - -.. _maxRealmAny_java_lang_String_: - -.. _maxRealmAny_String_: - -.. _RealmQuery_maxRealmAny_java_lang_String_: - -.. _RealmQuery_maxRealmAny_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAny ` :ref:`maxRealmAny ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum value of a :ref:`RealmAny ` field. - - - - - - - **Parameters** - - - ``fieldName`` - the field containing a RealmAny value. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given RealmAny field, :ref:`RealmAny.Type.NULL ` will be returned. Otherwise the maximum RealmAny is returned. When determining the maximum RealmAny, objects with ``null`` values are ignored. See the :ref:`RealmAny ` documentation for more details on how RealmAny values are compared. - - - - - - - **Throws** - - - `java.lang.UnsupportedOperationException `__ - if the query is not valid ("syntax error"). - - - - - - - - - - - - -.. _maximumDate: - -.. _maximumDate__: - -.. _RealmQuery_maximumDate: - -.. _RealmQuery_maximumDate__: - -.. _io_realm_RealmQuery_maximumDate: - -.. _io_realm_RealmQuery_maximumDate__: - - - -maximumDate ------------ - -.. _io_realm_RealmQuery_maximumDate_java_lang_String_: - -.. _io_realm_RealmQuery_maximumDate_String_: - -.. _maximumDate_java_lang_String_: - -.. _maximumDate_String_: - -.. _RealmQuery_maximumDate_java_lang_String_: - -.. _RealmQuery_maximumDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`maximumDate ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum value of a field. - - - - - **Parameters** - - - ``fieldName`` - the field name. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given date field, ``null`` will be returned. Otherwise the maximum date is returned. When determining the maximum date, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.UnsupportedOperationException `__ - if the query is not valid ("syntax error"). - - - - - - - - - - - - -.. _min: - -.. _min__: - -.. _RealmQuery_min: - -.. _RealmQuery_min__: - -.. _io_realm_RealmQuery_min: - -.. _io_realm_RealmQuery_min__: - - - -min ----- - -.. _io_realm_RealmQuery_min_java_lang_String_: - -.. _io_realm_RealmQuery_min_String_: - -.. _min_java_lang_String_: - -.. _min_String_: - -.. _RealmQuery_min_java_lang_String_: - -.. _RealmQuery_min_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`min ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum value of a field. - - - - - **Parameters** - - - ``fieldName`` - the field to look for a minimum on. Only number fields are supported. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given field, ``null`` will be returned. Otherwise the minimum value is returned. When determining the minimum value, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a number type. - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _minRealmAny: - -.. _minRealmAny__: - -.. _RealmQuery_minRealmAny: - -.. _RealmQuery_minRealmAny__: - -.. _io_realm_RealmQuery_minRealmAny: - -.. _io_realm_RealmQuery_minRealmAny__: - - - -minRealmAny ------------ - -.. _io_realm_RealmQuery_minRealmAny_java_lang_String_: - -.. _io_realm_RealmQuery_minRealmAny_String_: - -.. _minRealmAny_java_lang_String_: - -.. _minRealmAny_String_: - -.. _RealmQuery_minRealmAny_java_lang_String_: - -.. _RealmQuery_minRealmAny_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAny ` :ref:`minRealmAny ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum value of a :ref:`RealmAny ` field. - - - - - - - **Parameters** - - - ``fieldName`` - the field containing a RealmAny value. - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given RealmAny field, :ref:`RealmAny.Type.NULL ` will be returned. Otherwise the minimum RealmAny is returned. When determining the minimum RealmAny, objects with ``null`` values are ignored. See the :ref:`RealmAny ` documentation for more details on how RealmAny values are compared. - - - - - - - **Throws** - - - `java.lang.UnsupportedOperationException `__ - if the query is not valid ("syntax error"). - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _minimumDate: - -.. _minimumDate__: - -.. _RealmQuery_minimumDate: - -.. _RealmQuery_minimumDate__: - -.. _io_realm_RealmQuery_minimumDate: - -.. _io_realm_RealmQuery_minimumDate__: - - - -minimumDate ------------ - -.. _io_realm_RealmQuery_minimumDate_java_lang_String_: - -.. _io_realm_RealmQuery_minimumDate_String_: - -.. _minimumDate_java_lang_String_: - -.. _minimumDate_String_: - -.. _RealmQuery_minimumDate_java_lang_String_: - -.. _RealmQuery_minimumDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`minimumDate ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum value of a field. - - - - - **Parameters** - - - ``fieldName`` - the field name - - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given date field, ``null`` will be returned. Otherwise the minimum date is returned. When determining the minimum date, objects with ``null`` values are ignored. - - - - - - - **Throws** - - - `java.lang.UnsupportedOperationException `__ - if the query is not valid ("syntax error"). - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - -.. _not: - -.. _not__: - -.. _RealmQuery_not: - -.. _RealmQuery_not__: - -.. _io_realm_RealmQuery_not: - -.. _io_realm_RealmQuery_not__: - - - -not ----- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`not ` () - | - - - - - * - Negate condition. - - - - - - - **Returns** - - the query object. - - - - - - - - - - - -.. _notEqualTo: - -.. _notEqualTo__: - -.. _RealmQuery_notEqualTo: - -.. _RealmQuery_notEqualTo__: - -.. _io_realm_RealmQuery_notEqualTo: - -.. _io_realm_RealmQuery_notEqualTo__: - - - -notEqualTo ----------- - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_ObjectId_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__ObjectId_: - -.. _io_realm_RealmQuery_notEqualTo_String_ObjectId_: - -.. _io_realm_RealmQuery_notEqualTo_String__ObjectId_: - -.. _notEqualTo_java_lang_String_ObjectId_: - -.. _notEqualTo_java_lang_String__ObjectId_: - -.. _notEqualTo_String_ObjectId_: - -.. _notEqualTo_String__ObjectId_: - -.. _RealmQuery_notEqualTo_java_lang_String_ObjectId_: - -.. _RealmQuery_notEqualTo_java_lang_String__ObjectId_: - -.. _RealmQuery_notEqualTo_String_ObjectId_: - -.. _RealmQuery_notEqualTo_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`notEqualTo ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Not-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_Decimal128_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__Decimal128_: - -.. _io_realm_RealmQuery_notEqualTo_String_Decimal128_: - -.. _io_realm_RealmQuery_notEqualTo_String__Decimal128_: - -.. _notEqualTo_java_lang_String_Decimal128_: - -.. _notEqualTo_java_lang_String__Decimal128_: - -.. _notEqualTo_String_Decimal128_: - -.. _notEqualTo_String__Decimal128_: - -.. _RealmQuery_notEqualTo_java_lang_String_Decimal128_: - -.. _RealmQuery_notEqualTo_java_lang_String__Decimal128_: - -.. _RealmQuery_notEqualTo_String_Decimal128_: - -.. _RealmQuery_notEqualTo_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`notEqualTo ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Not-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__RealmAny__Case_: - -.. _io_realm_RealmQuery_notEqualTo_String_io_realm_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String__io_realm_RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String_io_realm_RealmAny_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String__io_realm_RealmAny__Case_: - -.. _io_realm_RealmQuery_notEqualTo_String_RealmAny_io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String__RealmAny__io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String_RealmAny_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String__RealmAny__Case_: - -.. _notEqualTo_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _notEqualTo_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _notEqualTo_java_lang_String_io_realm_RealmAny_Case_: - -.. _notEqualTo_java_lang_String__io_realm_RealmAny__Case_: - -.. _notEqualTo_java_lang_String_RealmAny_io_realm_Case_: - -.. _notEqualTo_java_lang_String__RealmAny__io_realm_Case_: - -.. _notEqualTo_java_lang_String_RealmAny_Case_: - -.. _notEqualTo_java_lang_String__RealmAny__Case_: - -.. _notEqualTo_String_io_realm_RealmAny_io_realm_Case_: - -.. _notEqualTo_String__io_realm_RealmAny__io_realm_Case_: - -.. _notEqualTo_String_io_realm_RealmAny_Case_: - -.. _notEqualTo_String__io_realm_RealmAny__Case_: - -.. _notEqualTo_String_RealmAny_io_realm_Case_: - -.. _notEqualTo_String__RealmAny__io_realm_Case_: - -.. _notEqualTo_String_RealmAny_Case_: - -.. _notEqualTo_String__RealmAny__Case_: - -.. _RealmQuery_notEqualTo_java_lang_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_notEqualTo_java_lang_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String_RealmAny_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String__RealmAny__Case_: - -.. _RealmQuery_notEqualTo_String_io_realm_RealmAny_io_realm_Case_: - -.. _RealmQuery_notEqualTo_String__io_realm_RealmAny__io_realm_Case_: - -.. _RealmQuery_notEqualTo_String_io_realm_RealmAny_Case_: - -.. _RealmQuery_notEqualTo_String__io_realm_RealmAny__Case_: - -.. _RealmQuery_notEqualTo_String_RealmAny_io_realm_Case_: - -.. _RealmQuery_notEqualTo_String__RealmAny__io_realm_Case_: - -.. _RealmQuery_notEqualTo_String_RealmAny_Case_: - -.. _RealmQuery_notEqualTo_String__RealmAny__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`notEqualTo ` ( - | `String `__ fieldName, - | :ref:`RealmAny ` value, - | :ref:`Case ` casing - | ) - - - - - * - Not-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - ``casing`` - how casing is handled. :ref:`Case.INSENSITIVE ` works only for the Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_String_Case_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__String__Case_: - -.. _io_realm_RealmQuery_notEqualTo_String_java_lang_String_io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String__java_lang_String__io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String_java_lang_String_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String__java_lang_String__Case_: - -.. _io_realm_RealmQuery_notEqualTo_String_String_io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String__String__io_realm_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String_String_Case_: - -.. _io_realm_RealmQuery_notEqualTo_String__String__Case_: - -.. _notEqualTo_java_lang_String_java_lang_String_io_realm_Case_: - -.. _notEqualTo_java_lang_String__java_lang_String__io_realm_Case_: - -.. _notEqualTo_java_lang_String_java_lang_String_Case_: - -.. _notEqualTo_java_lang_String__java_lang_String__Case_: - -.. _notEqualTo_java_lang_String_String_io_realm_Case_: - -.. _notEqualTo_java_lang_String__String__io_realm_Case_: - -.. _notEqualTo_java_lang_String_String_Case_: - -.. _notEqualTo_java_lang_String__String__Case_: - -.. _notEqualTo_String_java_lang_String_io_realm_Case_: - -.. _notEqualTo_String__java_lang_String__io_realm_Case_: - -.. _notEqualTo_String_java_lang_String_Case_: - -.. _notEqualTo_String__java_lang_String__Case_: - -.. _notEqualTo_String_String_io_realm_Case_: - -.. _notEqualTo_String__String__io_realm_Case_: - -.. _notEqualTo_String_String_Case_: - -.. _notEqualTo_String__String__Case_: - -.. _RealmQuery_notEqualTo_java_lang_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String_java_lang_String_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String__java_lang_String__Case_: - -.. _RealmQuery_notEqualTo_java_lang_String_String_io_realm_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String__String__io_realm_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String_String_Case_: - -.. _RealmQuery_notEqualTo_java_lang_String__String__Case_: - -.. _RealmQuery_notEqualTo_String_java_lang_String_io_realm_Case_: - -.. _RealmQuery_notEqualTo_String__java_lang_String__io_realm_Case_: - -.. _RealmQuery_notEqualTo_String_java_lang_String_Case_: - -.. _RealmQuery_notEqualTo_String__java_lang_String__Case_: - -.. _RealmQuery_notEqualTo_String_String_io_realm_Case_: - -.. _RealmQuery_notEqualTo_String__String__io_realm_Case_: - -.. _RealmQuery_notEqualTo_String_String_Case_: - -.. _RealmQuery_notEqualTo_String__String__Case_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`notEqualTo ` ( - | `String `__ fieldName, - | `String `__ value, - | :ref:`Case ` casing - | ) - - - - - * - Not-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - ``casing`` - how casing is handled. :ref:`Case.INSENSITIVE ` works only for the Latin-1 characters. - - - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_java_lang_String_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__java_lang_String_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String_String_: - -.. _io_realm_RealmQuery_notEqualTo_java_lang_String__String_: - -.. _io_realm_RealmQuery_notEqualTo_String_java_lang_String_: - -.. _io_realm_RealmQuery_notEqualTo_String__java_lang_String_: - -.. _io_realm_RealmQuery_notEqualTo_String_String_: - -.. _io_realm_RealmQuery_notEqualTo_String__String_: - -.. _notEqualTo_java_lang_String_java_lang_String_: - -.. _notEqualTo_java_lang_String__java_lang_String_: - -.. _notEqualTo_java_lang_String_String_: - -.. _notEqualTo_java_lang_String__String_: - -.. _notEqualTo_String_java_lang_String_: - -.. _notEqualTo_String__java_lang_String_: - -.. _notEqualTo_String_String_: - -.. _notEqualTo_String__String_: - -.. _RealmQuery_notEqualTo_java_lang_String_java_lang_String_: - -.. _RealmQuery_notEqualTo_java_lang_String__java_lang_String_: - -.. _RealmQuery_notEqualTo_java_lang_String_String_: - -.. _RealmQuery_notEqualTo_java_lang_String__String_: - -.. _RealmQuery_notEqualTo_String_java_lang_String_: - -.. _RealmQuery_notEqualTo_String__java_lang_String_: - -.. _RealmQuery_notEqualTo_String_String_: - -.. _RealmQuery_notEqualTo_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`notEqualTo ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Not-equal-to comparison. - - - - - **Parameters** - - - ``fieldName`` - the field to compare. - - - - - ``value`` - the value to compare with. - - - - - - - - **Returns** - - the query object. - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if one or more arguments do not match class or field type. - - - - - - - - - - - - -.. _or: - -.. _or__: - -.. _RealmQuery_or: - -.. _RealmQuery_or__: - -.. _io_realm_RealmQuery_or: - -.. _io_realm_RealmQuery_or__: - - - -or ----- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`or ` () - | - - - - - * - Logical-or two conditions. - - - - - - - **Returns** - - the query object. - - - - - - - - - - - -.. _rawPredicate: - -.. _rawPredicate__: - -.. _RealmQuery_rawPredicate: - -.. _RealmQuery_rawPredicate__: - -.. _io_realm_RealmQuery_rawPredicate: - -.. _io_realm_RealmQuery_rawPredicate__: - - - -rawPredicate ------------- - -.. _io_realm_RealmQuery_rawPredicate_java_lang_String_java_lang_Object_: - -.. _io_realm_RealmQuery_rawPredicate_java_lang_String__java_lang_Object_: - -.. _io_realm_RealmQuery_rawPredicate_java_lang_String_Object_: - -.. _io_realm_RealmQuery_rawPredicate_java_lang_String__Object_: - -.. _io_realm_RealmQuery_rawPredicate_java_lang_String_Object____: - -.. _io_realm_RealmQuery_rawPredicate_java_lang_String__Object____: - -.. _io_realm_RealmQuery_rawPredicate_String_java_lang_Object_: - -.. _io_realm_RealmQuery_rawPredicate_String__java_lang_Object_: - -.. _io_realm_RealmQuery_rawPredicate_String_Object_: - -.. _io_realm_RealmQuery_rawPredicate_String__Object_: - -.. _io_realm_RealmQuery_rawPredicate_String_Object____: - -.. _io_realm_RealmQuery_rawPredicate_String__Object____: - -.. _rawPredicate_java_lang_String_java_lang_Object_: - -.. _rawPredicate_java_lang_String__java_lang_Object_: - -.. _rawPredicate_java_lang_String_Object_: - -.. _rawPredicate_java_lang_String__Object_: - -.. _rawPredicate_java_lang_String_Object____: - -.. _rawPredicate_java_lang_String__Object____: - -.. _rawPredicate_String_java_lang_Object_: - -.. _rawPredicate_String__java_lang_Object_: - -.. _rawPredicate_String_Object_: - -.. _rawPredicate_String__Object_: - -.. _rawPredicate_String_Object____: - -.. _rawPredicate_String__Object____: - -.. _RealmQuery_rawPredicate_java_lang_String_java_lang_Object_: - -.. _RealmQuery_rawPredicate_java_lang_String__java_lang_Object_: - -.. _RealmQuery_rawPredicate_java_lang_String_Object_: - -.. _RealmQuery_rawPredicate_java_lang_String__Object_: - -.. _RealmQuery_rawPredicate_java_lang_String_Object____: - -.. _RealmQuery_rawPredicate_java_lang_String__Object____: - -.. _RealmQuery_rawPredicate_String_java_lang_Object_: - -.. _RealmQuery_rawPredicate_String__java_lang_Object_: - -.. _RealmQuery_rawPredicate_String_Object_: - -.. _RealmQuery_rawPredicate_String__Object_: - -.. _RealmQuery_rawPredicate_String_Object____: - -.. _RealmQuery_rawPredicate_String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`rawPredicate ` ( - | `String `__ predicate, - | `java.lang.Object[] `__ arguments - | ) - - - - - * - Create a text-based predicate using the Realm Query Language. This predicate can be combined with other raw or type safe predicates, it accepts Realm values as arguments.Class and property names used in the raw predicate can be either the names defined in the Realm Model classes or the internal names defined using the :ref:`io.realm.annotations.RealmClass ` or :ref:`io.realm.annotations.RealmField ` annotations. If a class or property name contains spaces those must be escaped. - - - - Arguments are defined in the string predicate as $argument_index, where $argument_index is a decimal integer that specifies the position of the argument in the argument list. The first argument is referenced by $0, the second by $1, etc.See `these docs `__ for a more detailed description of the Realm Query Language. - - Examples: - - - .. code-block:: java - - - RealmQuery query = realm.where(Person.class); - - // Simple query - query.rawPredicate("name = 'Jane'"); - - // Spaces in property name - query.rawPredicate("my\ property = 'Jane'"); - - // Multiple predicates - query.rawPredicate("name = 'Jane' OR name = 'John'") - - // Collection queries - query.rawPredicate("children.@count > 3") - query.rawPredicate("ALL children.age > 18") - - // Sub queries - query.rawPredicate("SUBQUERY(children, $child, $child.age > 21 AND $child.gender = 'male').@count > 0"); - - // Sort, Distinct, Limit - query.rawPredicate("name = 'Jane' SORT(lastName ASC) DISTINCT(city) LIMIT(5)"); - - // Arguments - query.rawPredicate("name = $0 AND age > $1", "Jane", 18); - - - - - - - - - - - **Parameters** - - - ``predicate`` - a Realm Query Language predicate. - - - - - ``arguments`` - Realm values for the predicate. - - - - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if there is an syntax error. - - - - - - - - - - - - -.. _sort: - -.. _sort__: - -.. _RealmQuery_sort: - -.. _RealmQuery_sort__: - -.. _io_realm_RealmQuery_sort: - -.. _io_realm_RealmQuery_sort__: - - - -sort ----- - -.. _io_realm_RealmQuery_sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_Sort____: - -.. _io_realm_RealmQuery_sort_java_lang_String__Sort____: - -.. _io_realm_RealmQuery_sort_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String_Sort_: - -.. _io_realm_RealmQuery_sort_String__Sort_: - -.. _io_realm_RealmQuery_sort_String_Sort____: - -.. _io_realm_RealmQuery_sort_String__Sort____: - -.. _io_realm_RealmQuery_sort_String____io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String_____io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String____Sort_: - -.. _io_realm_RealmQuery_sort_String_____Sort_: - -.. _io_realm_RealmQuery_sort_String____Sort____: - -.. _io_realm_RealmQuery_sort_String_____Sort____: - -.. _sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort____: - -.. _sort_java_lang_String__Sort____: - -.. _sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort_: - -.. _sort_String_Sort_: - -.. _sort_String__Sort_: - -.. _sort_String_Sort____: - -.. _sort_String__Sort____: - -.. _sort_String____io_realm_Sort_: - -.. _sort_String_____io_realm_Sort_: - -.. _sort_String____Sort_: - -.. _sort_String_____Sort_: - -.. _sort_String____Sort____: - -.. _sort_String_____Sort____: - -.. _RealmQuery_sort_java_lang_String_io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String__io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String_Sort_: - -.. _RealmQuery_sort_java_lang_String__Sort_: - -.. _RealmQuery_sort_java_lang_String_Sort____: - -.. _RealmQuery_sort_java_lang_String__Sort____: - -.. _RealmQuery_sort_String_io_realm_Sort_: - -.. _RealmQuery_sort_String__io_realm_Sort_: - -.. _RealmQuery_sort_String_Sort_: - -.. _RealmQuery_sort_String__Sort_: - -.. _RealmQuery_sort_String_Sort____: - -.. _RealmQuery_sort_String__Sort____: - -.. _RealmQuery_sort_String____io_realm_Sort_: - -.. _RealmQuery_sort_String_____io_realm_Sort_: - -.. _RealmQuery_sort_String____Sort_: - -.. _RealmQuery_sort_String_____Sort_: - -.. _RealmQuery_sort_String____Sort____: - -.. _RealmQuery_sort_String_____Sort____: - -.. _io_realm_RealmQuery_sort_String[]__Sort[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`sort ` ( - | `java.lang.String[] `__ fieldNames, - | :ref:`io.realm.Sort[] ` sortOrders - | ) - - - - - * - Sorts the query result by the specific field names in the provided orders. Later fields will only be used if the previous field values are equal.Sorting is currently limited to character sets in 'Latin Basic', 'Latin Supplement', 'Latin Extended A', 'Latin Extended B' (UTF-8 range 0-591). For other character sets, sorting will have no effect. - - - - - - - **Parameters** - - - ``fieldNames`` - an array of field names to sort by. - - - - - ``sortOrders`` - how to sort the field names. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name does not exist. - - - - - `IllegalStateException `__ - if a sorting order was already defined. - - - - - - - - - - -.. _io_realm_RealmQuery_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_Sort_String_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__Sort__String__Sort_: - -.. _io_realm_RealmQuery_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmQuery_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_RealmQuery_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String_io_realm_Sort_String_Sort_: - -.. _io_realm_RealmQuery_sort_String__io_realm_Sort__String__Sort_: - -.. _io_realm_RealmQuery_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmQuery_sort_String__Sort__java_lang_String__Sort_: - -.. _io_realm_RealmQuery_sort_String_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String__Sort__String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String_Sort_String_Sort_: - -.. _io_realm_RealmQuery_sort_String__Sort__String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_String_Sort_: - -.. _sort_java_lang_String__Sort__String__Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_String_Sort_: - -.. _sort_String__io_realm_Sort__String__Sort_: - -.. _sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_Sort_java_lang_String_Sort_: - -.. _sort_String__Sort__java_lang_String__Sort_: - -.. _sort_String_Sort_String_io_realm_Sort_: - -.. _sort_String__Sort__String__io_realm_Sort_: - -.. _sort_String_Sort_String_Sort_: - -.. _sort_String__Sort__String__Sort_: - -.. _RealmQuery_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _RealmQuery_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _RealmQuery_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _RealmQuery_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _RealmQuery_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _RealmQuery_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _RealmQuery_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String_Sort_String_Sort_: - -.. _RealmQuery_sort_java_lang_String__Sort__String__Sort_: - -.. _RealmQuery_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmQuery_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _RealmQuery_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _RealmQuery_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _RealmQuery_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _RealmQuery_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _RealmQuery_sort_String_io_realm_Sort_String_Sort_: - -.. _RealmQuery_sort_String__io_realm_Sort__String__Sort_: - -.. _RealmQuery_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmQuery_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _RealmQuery_sort_String_Sort_java_lang_String_Sort_: - -.. _RealmQuery_sort_String__Sort__java_lang_String__Sort_: - -.. _RealmQuery_sort_String_Sort_String_io_realm_Sort_: - -.. _RealmQuery_sort_String__Sort__String__io_realm_Sort_: - -.. _RealmQuery_sort_String_Sort_String_Sort_: - -.. _RealmQuery_sort_String__Sort__String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - - - * - Sorts the query result by the specific field names in the provided orders. ``fieldName2`` is only used in case of equal values in ``fieldName1`` . - - Sorting is currently limited to character sets in 'Latin Basic', 'Latin Supplement', 'Latin Extended A', 'Latin Extended B' (UTF-8 range 0-591). For other character sets, sorting will have no effect. - - - - - - - **Parameters** - - - ``fieldName1`` - first field name - - - - - ``sortOrder1`` - sort order for first field - - - - - ``fieldName2`` - second field name - - - - - ``sortOrder2`` - sort order for second field - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name does not exist. - - - - - `IllegalStateException `__ - if a sorting order was already defined. - - - - - - - - - - -.. _io_realm_RealmQuery_sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String_Sort_: - -.. _io_realm_RealmQuery_sort_java_lang_String__Sort_: - -.. _io_realm_RealmQuery_sort_String_io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String__io_realm_Sort_: - -.. _io_realm_RealmQuery_sort_String_Sort_: - -.. _io_realm_RealmQuery_sort_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort_: - -.. _sort_String_Sort_: - -.. _sort_String__Sort_: - -.. _RealmQuery_sort_java_lang_String_io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String__io_realm_Sort_: - -.. _RealmQuery_sort_java_lang_String_Sort_: - -.. _RealmQuery_sort_java_lang_String__Sort_: - -.. _RealmQuery_sort_String_io_realm_Sort_: - -.. _RealmQuery_sort_String__io_realm_Sort_: - -.. _RealmQuery_sort_String_Sort_: - -.. _RealmQuery_sort_String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`sort ` ( - | `String `__ fieldName, - | :ref:`Sort ` sortOrder - | ) - - - - - * - Sorts the query result by the specified field name and order.Sorting is currently limited to character sets in 'Latin Basic', 'Latin Supplement', 'Latin Extended A', 'Latin Extended B' (UTF-8 range 0-591). For other character sets, sorting will have no effect. - - - - - - - **Parameters** - - - ``fieldName`` - the field name to sort by. - - - - - ``sortOrder`` - how to sort the results. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name does not exist. - - - - - `IllegalStateException `__ - if a sorting order was already defined. - - - - - - - - - - -.. _io_realm_RealmQuery_sort_java_lang_String_: - -.. _io_realm_RealmQuery_sort_String_: - -.. _sort_java_lang_String_: - -.. _sort_String_: - -.. _RealmQuery_sort_java_lang_String_: - -.. _RealmQuery_sort_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`sort ` ( - | `String `__ fieldName - | ) - - - - - * - Sorts the query result by the specific field name in ascending order.Sorting is currently limited to character sets in 'Latin Basic', 'Latin Supplement', 'Latin Extended A', 'Latin Extended B' (UTF-8 range 0-591). For other character sets, sorting will have no effect. - - - - - - - **Parameters** - - - ``fieldName`` - the field name to sort by. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field name does not exist. - - - - - `IllegalStateException `__ - if a sorting order was already defined. - - - - - - - - - - - - -.. _sum: - -.. _sum__: - -.. _RealmQuery_sum: - -.. _RealmQuery_sum__: - -.. _io_realm_RealmQuery_sum: - -.. _io_realm_RealmQuery_sum__: - - - -sum ----- - -.. _io_realm_RealmQuery_sum_java_lang_String_: - -.. _io_realm_RealmQuery_sum_String_: - -.. _sum_java_lang_String_: - -.. _sum_String_: - -.. _RealmQuery_sum_java_lang_String_: - -.. _RealmQuery_sum_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`sum ` ( - | `String `__ fieldName - | ) - - - - - * - Calculates the sum of a given field. - - - - - **Parameters** - - - ``fieldName`` - the field to sum. Only number and RealmAny fields are supported. - - - - - - - - **Returns** - - the sum of fields of the matching objects. If no objects exist or they all have ``null`` as the value for the given field, ``0`` will be returned. When computing the sum, objects with ``null`` values are ignored. When applied to a RealmAny field, only numeric values will be summed up (Byte/Integer/Integer/Long/Float/Double/Decimal128) and the returning type will be ``Decimal128`` . - - - - - - - **Throws** - - - `java.lang.IllegalArgumentException `__ - if the field is not a number type. - - - - - :ref:`RealmException ` - if called from the UI thread after opting out via :ref:`RealmConfiguration.Builder.allowQueriesOnUiThread(boolean) ` . - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmResults.txt b/source/sdk/temp/java/api/io/realm/RealmResults.txt deleted file mode 100644 index 36c25ee5bc..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmResults.txt +++ /dev/null @@ -1,3386 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmResults -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmResults: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.util.AbstractCollection `__ - | `java.util.AbstractList `__ - | **io.realm.OrderedRealmCollectionImpl** - | io.realm.RealmResults - - -This class holds all the matches of a :ref:`RealmQuery ` for a given Realm. The objects are not copied from the Realm to the RealmResults list, but are just referenced from the RealmResult instead. This saves memory and increases speed. - -RealmResults are live views, which means that if it is on an **Looper** thread, it will automatically update its query results after a transaction has been committed. If on a non-looper thread, **Realm.refresh()** must be called to update the results. - - - -Updates to RealmObjects from a RealmResults list must be done from within a transaction and the modified objects are persisted to the Realm file during the commit of the transaction. - -A RealmResults object cannot be passed between different threads. - -Notice that a RealmResults is never ``null`` not even in the case where it contains no objects. You should always use the **RealmResults.size()** method to check if a RealmResults is empty or not. - - - -If a RealmResults is built on RealmList through :ref:`RealmList.where() ` , it will become empty when the source RealmList gets deleted. - - - -:ref:`RealmResults ` can contain more elements than ``Integer.MAX_VALUE`` . In that case, you can access only first ``Integer.MAX_VALUE`` elements in it. - - - - - - -.. seealso:: - - - - - :ref:`RealmQuery.findAll() ` - - - - - :ref:`Realm.executeTransaction(Realm.Transaction) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.OrderedRealmCollectionChangeListener\> ` listener - | ) - - - Adds a change listener to this :ref:`RealmResults ` . - - - - - - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - Adds a change listener to this :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`asChangesetObservable ` () - | - - - Returns an Rx Observable that monitors changes to this RealmResults. - - - - - * - public **** - - | :ref:`asFlowable ` () - | - - - Returns an Rx Flowable that monitors changes to this RealmResults. - - - - - * - public `String `__ - - | :ref:`asJSON ` () - | - - - Returns a JSON representation of the matches of a :ref:`RealmQuery ` . - - - - - - - * - public :ref:`RealmResults ` - - | :ref:`freeze ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`isFrozen ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`isLoaded ` () - | - - - Returns ``false`` if the results are not yet loaded, ``true`` if they are loaded. - - - - - - - * - public **boolean** - - | :ref:`load ` () - | - - - Makes an asynchronous query blocking. - - - - - * - public **void** - - | :ref:`removeAllChangeListeners ` () - | - - - Removes all user-defined change listeners. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.OrderedRealmCollectionChangeListener\> ` listener - | ) - - - Removes the specified change listener. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - Removes the specified change listener. - - - - - * - public **void** - - | :ref:`setBlob ` ( - | `String `__ fieldName, - | **byte[]** value - | ) - - - Sets the binary value of the given field in all of the objects in the collection. - - - - - * - public **void** - - | :ref:`setBoolean ` ( - | `String `__ fieldName, - | **boolean** value - | ) - - - Sets the ``boolean`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setByte ` ( - | `String `__ fieldName, - | **byte** value - | ) - - - Sets the ``byte`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setDate ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - Sets the ``Date`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setDecimal128 ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - Sets the ``Decimal128`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setDouble ` ( - | `String `__ fieldName, - | **double** value - | ) - - - Sets the ``double`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setFloat ` ( - | `String `__ fieldName, - | **float** value - | ) - - - Sets the ``float`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setInt ` ( - | `String `__ fieldName, - | **int** value - | ) - - - Sets the ``int`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setList ` <**T** >( - | `String `__ fieldName, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Replaces the RealmList at the given field on all objects in this collection. - - - - - * - public **void** - - | :ref:`setLong ` ( - | `String `__ fieldName, - | **long** value - | ) - - - Sets the ``long`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setNull ` ( - | `String `__ fieldName - | ) - - - Sets the value to ``null`` for the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setObject ` ( - | `String `__ fieldName, - | :ref:`RealmModel ` value - | ) - - - Sets a reference to another object on the given field in all of the objects in the collection. - - - - - * - public **void** - - | :ref:`setObjectId ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - Sets the ``ObjectId`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setShort ` ( - | `String `__ fieldName, - | **short** value - | ) - - - Sets the ``short`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setString ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - Sets the ``String`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setUUID ` ( - | `String `__ fieldName, - | `UUID `__ value - | ) - - - Sets the ``UUID`` value of the given field in all of the objects in the collection. - - - - - - - * - public **void** - - | :ref:`setValue ` ( - | `String `__ fieldName, - | `Object `__ value - | ) - - - Updates the field given by ``fieldName`` in all objects inside the query result. - - - - - - - * - public :ref:`RealmResults ` - - | :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - Sorts a collection based on the provided fields and sort orders. - - - - - * - public :ref:`RealmQuery ` - - | :ref:`where ` () - | - - - Returns a :ref:`RealmQuery ` , which can be used to query for specific objects from this collection. - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.util.AbstractCollection `__ : ``iterator`` , ``size`` , ``isEmpty`` , ``contains`` , ``toArray`` , ``toArray`` , ``add`` , ``remove`` , ``containsAll`` , ``addAll`` , ``removeAll`` , ``retainAll`` , ``clear`` , ``toString`` -- Methods inherited from class `java.util.AbstractList `__ : ``add`` , ``get`` , ``set`` , ``add`` , ``remove`` , ``indexOf`` , ``lastIndexOf`` , ``clear`` , ``addAll`` , ``iterator`` , ``listIterator`` , ``listIterator`` , ``subList`` , ``equals`` , ``hashCode`` , ``removeRange`` -- Methods inherited from class **io.realm.OrderedRealmCollectionImpl**: ``isValid`` , ``isManaged`` , ``contains`` , ``get`` , ``first`` , ``first`` , ``last`` , ``last`` , ``deleteFromRealm`` , ``deleteAllFromRealm`` , ``iterator`` , ``listIterator`` , ``listIterator`` , ``sort`` , ``sort`` , ``sort`` , ``sort`` , ``size`` , ``min`` , ``minDate`` , ``max`` , ``maxDate`` , ``sum`` , ``average`` , ``remove`` , ``remove`` , ``removeAll`` , ``set`` , ``retainAll`` , ``deleteLastFromRealm`` , ``deleteFirstFromRealm`` , ``clear`` , ``add`` , ``add`` , ``addAll`` , ``addAll`` , ``createSnapshot`` , ``getRealm`` , ``getCollectionOperator`` - - - - -Method Detail -============= - -.. _addChangeListener: - -.. _addChangeListener__: - -.. _RealmResults_addChangeListener: - -.. _RealmResults_addChangeListener__: - -.. _io_realm_RealmResults_addChangeListener: - -.. _io_realm_RealmResults_addChangeListener__: - - - -addChangeListener ------------------ - -.. _io_realm_RealmResults_addChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _io_realm_RealmResults_addChangeListener_OrderedRealmCollectionChangeListener_: - -.. _addChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _addChangeListener_OrderedRealmCollectionChangeListener_: - -.. _RealmResults_addChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _RealmResults_addChangeListener_OrderedRealmCollectionChangeListener_: - -.. _io_realm_RealmResults_addChangeListener_OrderedRealmCollectionChangeListener_RealmResults_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.OrderedRealmCollectionChangeListener\> ` listener - | ) - - - - - * - Adds a change listener to this :ref:`RealmResults ` . - - Registering a change listener will not prevent the underlying RealmResults from being garbage collected. If the RealmResults is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private RealmResults results; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - results = realm.where(Person.class).findAllAsync(); - results.addChangeListener(new OrderedRealmCollectionChangeListener>() { - @Override - public void onChange(RealmResults persons, OrderedCollectionChangeSet changeSet) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - -.. _io_realm_RealmResults_addChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmResults_addChangeListener_RealmChangeListener_: - -.. _addChangeListener_io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmChangeListener_: - -.. _RealmResults_addChangeListener_io_realm_RealmChangeListener_: - -.. _RealmResults_addChangeListener_RealmChangeListener_: - -.. _io_realm_RealmResults_addChangeListener_RealmChangeListener_RealmResults_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - - - * - Adds a change listener to this :ref:`RealmResults ` . - - Registering a change listener will not prevent the underlying RealmResults from being garbage collected. If the RealmResults is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private RealmResults results; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - results = realm.where(Person.class).findAllAsync(); - results.addChangeListener(new RealmChangeListener>() { - @Override - public void onChange(RealmResults persons) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the change listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - - - -.. _asChangesetObservable: - -.. _asChangesetObservable__: - -.. _RealmResults_asChangesetObservable: - -.. _RealmResults_asChangesetObservable__: - -.. _io_realm_RealmResults_asChangesetObservable: - -.. _io_realm_RealmResults_asChangesetObservable__: - - - -asChangesetObservable ---------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`asChangesetObservable ` () - | - - - - - * - Returns an Rx Observable that monitors changes to this RealmResults. It will emit the current RealmResults when subscribed. For each update to the RealmResult a pair consisting of the RealmResults and the :ref:`OrderedCollectionChangeSet ` will be sent. The changeset will be ``null`` the first time an RealmResults is emitted. - - RealmResults will continually be emitted as the RealmResults are updated - ``onComplete`` will never be called. - - - - Items emitted from Realm Observables are frozen (See :ref:`freeze() ` . This means that they are immutable and can be read on any thread. - - - - Realm Observables always emit items from the thread holding the live Realm. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - realm.where(Foo.class).findAllAsync().asChangesetObservable() - .observeOn(Schedulers.computation()) - .map((rxResults, changes) -> doExpensiveWork(rxResults, changes)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath or the corresponding Realm instance doesn't support RxJava. - - - - - `IllegalStateException `__ - if the Realm wasn't opened on a Looper thread. - - - - - - - - - - .. seealso:: - - - - - `RxJava and Realm `__ - - - - - - - - - - - - - -.. _asFlowable: - -.. _asFlowable__: - -.. _RealmResults_asFlowable: - -.. _RealmResults_asFlowable__: - -.. _io_realm_RealmResults_asFlowable: - -.. _io_realm_RealmResults_asFlowable__: - - - -asFlowable ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`asFlowable ` () - | - - - - - * - Returns an Rx Flowable that monitors changes to this RealmResults. It will emit the current RealmResults when subscribed to. RealmResults will continually be emitted as the RealmResults are updated - ``onComplete`` will never be called. - - Items emitted from Realm Flowables are frozen (See :ref:`freeze() ` . This means that they are immutable and can be read on any thread. - - - - Realm Flowables always emit items from the thread holding the live RealmResults. This means that if you need to do further processing, it is recommend to observe the values on a computation scheduler: - - - - .. code-block:: java - - realm.where(Foo.class).findAllAsync().asFlowable() - .observeOn(Schedulers.computation()) - .map(rxResults -> doExpensiveWork(rxResults)) - .observeOn(AndroidSchedulers.mainThread()) - .subscribe( ... ); - - - - - - - If you would like the ``asFlowable()`` to stop emitting items you can instruct RxJava to only emit only the first item by using the ``first()`` operator: - - - - - - .. code-block:: java - - - realm.where(Foo.class).findAllAsync().asFlowable() - .filter(results -> results.isLoaded()) - .first() - .subscribe( ... ) // You only get the results once - - - - - - - - - - - - - **Returns** - - RxJava Observable that only calls ``onNext`` . It will never call ``onComplete`` or ``OnError`` . - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if the required RxJava framework is not on the classpath or the corresponding Realm instance doesn't support RxJava. - - - - - `IllegalStateException `__ - if the Realm wasn't opened on a Looper thread. - - - - - - - - - - .. seealso:: - - - - - `RxJava and Realm `__ - - - - - - - - - - - - - -.. _asJSON: - -.. _asJSON__: - -.. _RealmResults_asJSON: - -.. _RealmResults_asJSON__: - -.. _io_realm_RealmResults_asJSON: - -.. _io_realm_RealmResults_asJSON__: - - - -asJSON ------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`asJSON ` () - | - - - - - * - Returns a JSON representation of the matches of a :ref:`RealmQuery ` . Cycles will be returned as row indices. This is a helper method used to inspect data, or for debugging purpose, this method could pull a large string which could cause an OutOfMemory error. - - - - - - - - - **Returns** - - string representation of a JSON array containing entries of the resulting :ref:`RealmQuery ` . - - - - - - - - - - - - - -.. _freeze: - -.. _freeze__: - -.. _RealmResults_freeze: - -.. _RealmResults_freeze__: - -.. _io_realm_RealmResults_freeze: - -.. _io_realm_RealmResults_freeze__: - - - -freeze ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`freeze ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _isFrozen: - -.. _isFrozen__: - -.. _RealmResults_isFrozen: - -.. _RealmResults_isFrozen__: - -.. _io_realm_RealmResults_isFrozen: - -.. _io_realm_RealmResults_isFrozen__: - - - -isFrozen --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isFrozen ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _isLoaded: - -.. _isLoaded__: - -.. _RealmResults_isLoaded: - -.. _RealmResults_isLoaded__: - -.. _io_realm_RealmResults_isLoaded: - -.. _io_realm_RealmResults_isLoaded__: - - - -isLoaded --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isLoaded ` () - | - - - - - * - Returns ``false`` if the results are not yet loaded, ``true`` if they are loaded. - - - - - - - - - **Returns** - - ``true`` if the query has completed and the data is available, ``false`` if the query is still running in the background. - - - - - - - - - - - - - -.. _load: - -.. _load__: - -.. _RealmResults_load: - -.. _RealmResults_load__: - -.. _io_realm_RealmResults_load: - -.. _io_realm_RealmResults_load__: - - - -load ----- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`load ` () - | - - - - - * - Makes an asynchronous query blocking. This will also trigger any registered :ref:`RealmChangeListener ` when the query completes. - - - - - - - - - **Returns** - - ``true`` if it successfully completed the query, ``false`` otherwise. - - - - - - - - - - - - - -.. _removeAllChangeListeners: - -.. _removeAllChangeListeners__: - -.. _RealmResults_removeAllChangeListeners: - -.. _RealmResults_removeAllChangeListeners__: - -.. _io_realm_RealmResults_removeAllChangeListeners: - -.. _io_realm_RealmResults_removeAllChangeListeners__: - - - -removeAllChangeListeners ------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeAllChangeListeners ` () - | - - - - - * - Removes all user-defined change listeners. - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if you try to remove listeners from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _removeChangeListener: - -.. _removeChangeListener__: - -.. _RealmResults_removeChangeListener: - -.. _RealmResults_removeChangeListener__: - -.. _io_realm_RealmResults_removeChangeListener: - -.. _io_realm_RealmResults_removeChangeListener__: - - - -removeChangeListener --------------------- - -.. _io_realm_RealmResults_removeChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _io_realm_RealmResults_removeChangeListener_OrderedRealmCollectionChangeListener_: - -.. _removeChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _removeChangeListener_OrderedRealmCollectionChangeListener_: - -.. _RealmResults_removeChangeListener_io_realm_OrderedRealmCollectionChangeListener_: - -.. _RealmResults_removeChangeListener_OrderedRealmCollectionChangeListener_: - -.. _io_realm_RealmResults_removeChangeListener_OrderedRealmCollectionChangeListener_RealmResults_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.OrderedRealmCollectionChangeListener\> ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - -.. _io_realm_RealmResults_removeChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmResults_removeChangeListener_RealmChangeListener_: - -.. _removeChangeListener_io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmChangeListener_: - -.. _RealmResults_removeChangeListener_io_realm_RealmChangeListener_: - -.. _RealmResults_removeChangeListener_RealmChangeListener_: - -.. _io_realm_RealmResults_removeChangeListener_RealmChangeListener_RealmResults_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _setBlob: - -.. _setBlob__: - -.. _RealmResults_setBlob: - -.. _RealmResults_setBlob__: - -.. _io_realm_RealmResults_setBlob: - -.. _io_realm_RealmResults_setBlob__: - - - -setBlob -------- - -.. _io_realm_RealmResults_setBlob_java_lang_String_byte_: - -.. _io_realm_RealmResults_setBlob_java_lang_String__byte_: - -.. _io_realm_RealmResults_setBlob_java_lang_String_byte____: - -.. _io_realm_RealmResults_setBlob_java_lang_String__byte____: - -.. _io_realm_RealmResults_setBlob_String_byte_: - -.. _io_realm_RealmResults_setBlob_String__byte_: - -.. _io_realm_RealmResults_setBlob_String_byte____: - -.. _io_realm_RealmResults_setBlob_String__byte____: - -.. _setBlob_java_lang_String_byte_: - -.. _setBlob_java_lang_String__byte_: - -.. _setBlob_java_lang_String_byte____: - -.. _setBlob_java_lang_String__byte____: - -.. _setBlob_String_byte_: - -.. _setBlob_String__byte_: - -.. _setBlob_String_byte____: - -.. _setBlob_String__byte____: - -.. _RealmResults_setBlob_java_lang_String_byte_: - -.. _RealmResults_setBlob_java_lang_String__byte_: - -.. _RealmResults_setBlob_java_lang_String_byte____: - -.. _RealmResults_setBlob_java_lang_String__byte____: - -.. _RealmResults_setBlob_String_byte_: - -.. _RealmResults_setBlob_String__byte_: - -.. _RealmResults_setBlob_String_byte____: - -.. _RealmResults_setBlob_String__byte____: - -.. _io_realm_RealmResults_setBlob_String__byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setBlob ` ( - | `String `__ fieldName, - | **byte[]** value - | ) - - - - - * - Sets the binary value of the given field in all of the objects in the collection. - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a binary field. - - - - - - - - - - - - -.. _setBoolean: - -.. _setBoolean__: - -.. _RealmResults_setBoolean: - -.. _RealmResults_setBoolean__: - -.. _io_realm_RealmResults_setBoolean: - -.. _io_realm_RealmResults_setBoolean__: - - - -setBoolean ----------- - -.. _io_realm_RealmResults_setBoolean_java_lang_String_boolean_: - -.. _io_realm_RealmResults_setBoolean_java_lang_String__boolean_: - -.. _io_realm_RealmResults_setBoolean_String_boolean_: - -.. _io_realm_RealmResults_setBoolean_String__boolean_: - -.. _setBoolean_java_lang_String_boolean_: - -.. _setBoolean_java_lang_String__boolean_: - -.. _setBoolean_String_boolean_: - -.. _setBoolean_String__boolean_: - -.. _RealmResults_setBoolean_java_lang_String_boolean_: - -.. _RealmResults_setBoolean_java_lang_String__boolean_: - -.. _RealmResults_setBoolean_String_boolean_: - -.. _RealmResults_setBoolean_String__boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setBoolean ` ( - | `String `__ fieldName, - | **boolean** value - | ) - - - - - * - Sets the ``boolean`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a boolean field. - - - - - - - - - - - - -.. _setByte: - -.. _setByte__: - -.. _RealmResults_setByte: - -.. _RealmResults_setByte__: - -.. _io_realm_RealmResults_setByte: - -.. _io_realm_RealmResults_setByte__: - - - -setByte -------- - -.. _io_realm_RealmResults_setByte_java_lang_String_byte_: - -.. _io_realm_RealmResults_setByte_java_lang_String__byte_: - -.. _io_realm_RealmResults_setByte_String_byte_: - -.. _io_realm_RealmResults_setByte_String__byte_: - -.. _setByte_java_lang_String_byte_: - -.. _setByte_java_lang_String__byte_: - -.. _setByte_String_byte_: - -.. _setByte_String__byte_: - -.. _RealmResults_setByte_java_lang_String_byte_: - -.. _RealmResults_setByte_java_lang_String__byte_: - -.. _RealmResults_setByte_String_byte_: - -.. _RealmResults_setByte_String__byte_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setByte ` ( - | `String `__ fieldName, - | **byte** value - | ) - - - - - * - Sets the ``byte`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a byte field. - - - - - - - - - - - - -.. _setDate: - -.. _setDate__: - -.. _RealmResults_setDate: - -.. _RealmResults_setDate__: - -.. _io_realm_RealmResults_setDate: - -.. _io_realm_RealmResults_setDate__: - - - -setDate -------- - -.. _io_realm_RealmResults_setDate_java_lang_String_java_util_Date_: - -.. _io_realm_RealmResults_setDate_java_lang_String__java_util_Date_: - -.. _io_realm_RealmResults_setDate_java_lang_String_Date_: - -.. _io_realm_RealmResults_setDate_java_lang_String__Date_: - -.. _io_realm_RealmResults_setDate_String_java_util_Date_: - -.. _io_realm_RealmResults_setDate_String__java_util_Date_: - -.. _io_realm_RealmResults_setDate_String_Date_: - -.. _io_realm_RealmResults_setDate_String__Date_: - -.. _setDate_java_lang_String_java_util_Date_: - -.. _setDate_java_lang_String__java_util_Date_: - -.. _setDate_java_lang_String_Date_: - -.. _setDate_java_lang_String__Date_: - -.. _setDate_String_java_util_Date_: - -.. _setDate_String__java_util_Date_: - -.. _setDate_String_Date_: - -.. _setDate_String__Date_: - -.. _RealmResults_setDate_java_lang_String_java_util_Date_: - -.. _RealmResults_setDate_java_lang_String__java_util_Date_: - -.. _RealmResults_setDate_java_lang_String_Date_: - -.. _RealmResults_setDate_java_lang_String__Date_: - -.. _RealmResults_setDate_String_java_util_Date_: - -.. _RealmResults_setDate_String__java_util_Date_: - -.. _RealmResults_setDate_String_Date_: - -.. _RealmResults_setDate_String__Date_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDate ` ( - | `String `__ fieldName, - | `Date `__ value - | ) - - - - - * - Sets the ``Date`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a ``Date`` field. - - - - - - - - - - - - - - -.. _setDecimal128: - -.. _setDecimal128__: - -.. _RealmResults_setDecimal128: - -.. _RealmResults_setDecimal128__: - -.. _io_realm_RealmResults_setDecimal128: - -.. _io_realm_RealmResults_setDecimal128__: - - - -setDecimal128 -------------- - -.. _io_realm_RealmResults_setDecimal128_java_lang_String_Decimal128_: - -.. _io_realm_RealmResults_setDecimal128_java_lang_String__Decimal128_: - -.. _io_realm_RealmResults_setDecimal128_String_Decimal128_: - -.. _io_realm_RealmResults_setDecimal128_String__Decimal128_: - -.. _setDecimal128_java_lang_String_Decimal128_: - -.. _setDecimal128_java_lang_String__Decimal128_: - -.. _setDecimal128_String_Decimal128_: - -.. _setDecimal128_String__Decimal128_: - -.. _RealmResults_setDecimal128_java_lang_String_Decimal128_: - -.. _RealmResults_setDecimal128_java_lang_String__Decimal128_: - -.. _RealmResults_setDecimal128_String_Decimal128_: - -.. _RealmResults_setDecimal128_String__Decimal128_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDecimal128 ` ( - | `String `__ fieldName, - | **Decimal128** value - | ) - - - - - * - Sets the ``Decimal128`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a ``Decimal128`` field. - - - - - - - - - - - - - - -.. _setDouble: - -.. _setDouble__: - -.. _RealmResults_setDouble: - -.. _RealmResults_setDouble__: - -.. _io_realm_RealmResults_setDouble: - -.. _io_realm_RealmResults_setDouble__: - - - -setDouble ---------- - -.. _io_realm_RealmResults_setDouble_java_lang_String_double_: - -.. _io_realm_RealmResults_setDouble_java_lang_String__double_: - -.. _io_realm_RealmResults_setDouble_String_double_: - -.. _io_realm_RealmResults_setDouble_String__double_: - -.. _setDouble_java_lang_String_double_: - -.. _setDouble_java_lang_String__double_: - -.. _setDouble_String_double_: - -.. _setDouble_String__double_: - -.. _RealmResults_setDouble_java_lang_String_double_: - -.. _RealmResults_setDouble_java_lang_String__double_: - -.. _RealmResults_setDouble_String_double_: - -.. _RealmResults_setDouble_String__double_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setDouble ` ( - | `String `__ fieldName, - | **double** value - | ) - - - - - * - Sets the ``double`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a double field. - - - - - - - - - - - - -.. _setFloat: - -.. _setFloat__: - -.. _RealmResults_setFloat: - -.. _RealmResults_setFloat__: - -.. _io_realm_RealmResults_setFloat: - -.. _io_realm_RealmResults_setFloat__: - - - -setFloat --------- - -.. _io_realm_RealmResults_setFloat_java_lang_String_float_: - -.. _io_realm_RealmResults_setFloat_java_lang_String__float_: - -.. _io_realm_RealmResults_setFloat_String_float_: - -.. _io_realm_RealmResults_setFloat_String__float_: - -.. _setFloat_java_lang_String_float_: - -.. _setFloat_java_lang_String__float_: - -.. _setFloat_String_float_: - -.. _setFloat_String__float_: - -.. _RealmResults_setFloat_java_lang_String_float_: - -.. _RealmResults_setFloat_java_lang_String__float_: - -.. _RealmResults_setFloat_String_float_: - -.. _RealmResults_setFloat_String__float_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setFloat ` ( - | `String `__ fieldName, - | **float** value - | ) - - - - - * - Sets the ``float`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a float field. - - - - - - - - - - - - -.. _setInt: - -.. _setInt__: - -.. _RealmResults_setInt: - -.. _RealmResults_setInt__: - -.. _io_realm_RealmResults_setInt: - -.. _io_realm_RealmResults_setInt__: - - - -setInt ------- - -.. _io_realm_RealmResults_setInt_java_lang_String_int_: - -.. _io_realm_RealmResults_setInt_java_lang_String__int_: - -.. _io_realm_RealmResults_setInt_String_int_: - -.. _io_realm_RealmResults_setInt_String__int_: - -.. _setInt_java_lang_String_int_: - -.. _setInt_java_lang_String__int_: - -.. _setInt_String_int_: - -.. _setInt_String__int_: - -.. _RealmResults_setInt_java_lang_String_int_: - -.. _RealmResults_setInt_java_lang_String__int_: - -.. _RealmResults_setInt_String_int_: - -.. _RealmResults_setInt_String__int_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setInt ` ( - | `String `__ fieldName, - | **int** value - | ) - - - - - * - Sets the ``int`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't an integer field. - - - - - - - - - - - - -.. _setList: - -.. _setList__: - -.. _RealmResults_setList: - -.. _RealmResults_setList__: - -.. _io_realm_RealmResults_setList: - -.. _io_realm_RealmResults_setList__: - - - -setList -------- - -.. _io_realm_RealmResults_setList_java_lang_String_io_realm_RealmList_: - -.. _io_realm_RealmResults_setList_java_lang_String__io_realm_RealmList_: - -.. _io_realm_RealmResults_setList_java_lang_String_RealmList_: - -.. _io_realm_RealmResults_setList_java_lang_String__RealmList_: - -.. _io_realm_RealmResults_setList_String_io_realm_RealmList_: - -.. _io_realm_RealmResults_setList_String__io_realm_RealmList_: - -.. _io_realm_RealmResults_setList_String_RealmList_: - -.. _io_realm_RealmResults_setList_String__RealmList_: - -.. _setList_java_lang_String_io_realm_RealmList_: - -.. _setList_java_lang_String__io_realm_RealmList_: - -.. _setList_java_lang_String_RealmList_: - -.. _setList_java_lang_String__RealmList_: - -.. _setList_String_io_realm_RealmList_: - -.. _setList_String__io_realm_RealmList_: - -.. _setList_String_RealmList_: - -.. _setList_String__RealmList_: - -.. _RealmResults_setList_java_lang_String_io_realm_RealmList_: - -.. _RealmResults_setList_java_lang_String__io_realm_RealmList_: - -.. _RealmResults_setList_java_lang_String_RealmList_: - -.. _RealmResults_setList_java_lang_String__RealmList_: - -.. _RealmResults_setList_String_io_realm_RealmList_: - -.. _RealmResults_setList_String__io_realm_RealmList_: - -.. _RealmResults_setList_String_RealmList_: - -.. _RealmResults_setList_String__RealmList_: - -.. _io_realm_RealmResults_setList_String__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setList ` <**T** >( - | `String `__ fieldName, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Replaces the RealmList at the given field on all objects in this collection. - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``list`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, isn't a RealmList field , if the objects in the list are not managed or the type of the objects in the list are wrong. - - - - - - - - - - - - -.. _setLong: - -.. _setLong__: - -.. _RealmResults_setLong: - -.. _RealmResults_setLong__: - -.. _io_realm_RealmResults_setLong: - -.. _io_realm_RealmResults_setLong__: - - - -setLong -------- - -.. _io_realm_RealmResults_setLong_java_lang_String_long_: - -.. _io_realm_RealmResults_setLong_java_lang_String__long_: - -.. _io_realm_RealmResults_setLong_String_long_: - -.. _io_realm_RealmResults_setLong_String__long_: - -.. _setLong_java_lang_String_long_: - -.. _setLong_java_lang_String__long_: - -.. _setLong_String_long_: - -.. _setLong_String__long_: - -.. _RealmResults_setLong_java_lang_String_long_: - -.. _RealmResults_setLong_java_lang_String__long_: - -.. _RealmResults_setLong_String_long_: - -.. _RealmResults_setLong_String__long_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setLong ` ( - | `String `__ fieldName, - | **long** value - | ) - - - - - * - Sets the ``long`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a long field. - - - - - - - - - - - - -.. _setNull: - -.. _setNull__: - -.. _RealmResults_setNull: - -.. _RealmResults_setNull__: - -.. _io_realm_RealmResults_setNull: - -.. _io_realm_RealmResults_setNull__: - - - -setNull -------- - -.. _io_realm_RealmResults_setNull_java_lang_String_: - -.. _io_realm_RealmResults_setNull_String_: - -.. _setNull_java_lang_String_: - -.. _setNull_String_: - -.. _RealmResults_setNull_java_lang_String_: - -.. _RealmResults_setNull_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setNull ` ( - | `String `__ fieldName - | ) - - - - - * - Sets the value to ``null`` for the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist or is a primary key property. - - - - - `IllegalStateException `__ - if the field cannot hold ``null`` values. - - - - - - - - - - - - - - -.. _setObject: - -.. _setObject__: - -.. _RealmResults_setObject: - -.. _RealmResults_setObject__: - -.. _io_realm_RealmResults_setObject: - -.. _io_realm_RealmResults_setObject__: - - - -setObject ---------- - -.. _io_realm_RealmResults_setObject_java_lang_String_io_realm_RealmModel_: - -.. _io_realm_RealmResults_setObject_java_lang_String__io_realm_RealmModel_: - -.. _io_realm_RealmResults_setObject_java_lang_String_RealmModel_: - -.. _io_realm_RealmResults_setObject_java_lang_String__RealmModel_: - -.. _io_realm_RealmResults_setObject_String_io_realm_RealmModel_: - -.. _io_realm_RealmResults_setObject_String__io_realm_RealmModel_: - -.. _io_realm_RealmResults_setObject_String_RealmModel_: - -.. _io_realm_RealmResults_setObject_String__RealmModel_: - -.. _setObject_java_lang_String_io_realm_RealmModel_: - -.. _setObject_java_lang_String__io_realm_RealmModel_: - -.. _setObject_java_lang_String_RealmModel_: - -.. _setObject_java_lang_String__RealmModel_: - -.. _setObject_String_io_realm_RealmModel_: - -.. _setObject_String__io_realm_RealmModel_: - -.. _setObject_String_RealmModel_: - -.. _setObject_String__RealmModel_: - -.. _RealmResults_setObject_java_lang_String_io_realm_RealmModel_: - -.. _RealmResults_setObject_java_lang_String__io_realm_RealmModel_: - -.. _RealmResults_setObject_java_lang_String_RealmModel_: - -.. _RealmResults_setObject_java_lang_String__RealmModel_: - -.. _RealmResults_setObject_String_io_realm_RealmModel_: - -.. _RealmResults_setObject_String__io_realm_RealmModel_: - -.. _RealmResults_setObject_String_RealmModel_: - -.. _RealmResults_setObject_String__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setObject ` ( - | `String `__ fieldName, - | :ref:`RealmModel ` value - | ) - - - - - * - Sets a reference to another object on the given field in all of the objects in the collection. - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new object referenced by this field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't an Object reference field. - - - - - - - - - - - - -.. _setObjectId: - -.. _setObjectId__: - -.. _RealmResults_setObjectId: - -.. _RealmResults_setObjectId__: - -.. _io_realm_RealmResults_setObjectId: - -.. _io_realm_RealmResults_setObjectId__: - - - -setObjectId ------------ - -.. _io_realm_RealmResults_setObjectId_java_lang_String_ObjectId_: - -.. _io_realm_RealmResults_setObjectId_java_lang_String__ObjectId_: - -.. _io_realm_RealmResults_setObjectId_String_ObjectId_: - -.. _io_realm_RealmResults_setObjectId_String__ObjectId_: - -.. _setObjectId_java_lang_String_ObjectId_: - -.. _setObjectId_java_lang_String__ObjectId_: - -.. _setObjectId_String_ObjectId_: - -.. _setObjectId_String__ObjectId_: - -.. _RealmResults_setObjectId_java_lang_String_ObjectId_: - -.. _RealmResults_setObjectId_java_lang_String__ObjectId_: - -.. _RealmResults_setObjectId_String_ObjectId_: - -.. _RealmResults_setObjectId_String__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setObjectId ` ( - | `String `__ fieldName, - | **ObjectId** value - | ) - - - - - * - Sets the ``ObjectId`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a ``ObjectId`` field. - - - - - - - - - - - - - - -.. _setShort: - -.. _setShort__: - -.. _RealmResults_setShort: - -.. _RealmResults_setShort__: - -.. _io_realm_RealmResults_setShort: - -.. _io_realm_RealmResults_setShort__: - - - -setShort --------- - -.. _io_realm_RealmResults_setShort_java_lang_String_short_: - -.. _io_realm_RealmResults_setShort_java_lang_String__short_: - -.. _io_realm_RealmResults_setShort_String_short_: - -.. _io_realm_RealmResults_setShort_String__short_: - -.. _setShort_java_lang_String_short_: - -.. _setShort_java_lang_String__short_: - -.. _setShort_String_short_: - -.. _setShort_String__short_: - -.. _RealmResults_setShort_java_lang_String_short_: - -.. _RealmResults_setShort_java_lang_String__short_: - -.. _RealmResults_setShort_String_short_: - -.. _RealmResults_setShort_String__short_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setShort ` ( - | `String `__ fieldName, - | **short** value - | ) - - - - - * - Sets the ``short`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a short field. - - - - - - - - - - - - -.. _setString: - -.. _setString__: - -.. _RealmResults_setString: - -.. _RealmResults_setString__: - -.. _io_realm_RealmResults_setString: - -.. _io_realm_RealmResults_setString__: - - - -setString ---------- - -.. _io_realm_RealmResults_setString_java_lang_String_java_lang_String_: - -.. _io_realm_RealmResults_setString_java_lang_String__java_lang_String_: - -.. _io_realm_RealmResults_setString_java_lang_String_String_: - -.. _io_realm_RealmResults_setString_java_lang_String__String_: - -.. _io_realm_RealmResults_setString_String_java_lang_String_: - -.. _io_realm_RealmResults_setString_String__java_lang_String_: - -.. _io_realm_RealmResults_setString_String_String_: - -.. _io_realm_RealmResults_setString_String__String_: - -.. _setString_java_lang_String_java_lang_String_: - -.. _setString_java_lang_String__java_lang_String_: - -.. _setString_java_lang_String_String_: - -.. _setString_java_lang_String__String_: - -.. _setString_String_java_lang_String_: - -.. _setString_String__java_lang_String_: - -.. _setString_String_String_: - -.. _setString_String__String_: - -.. _RealmResults_setString_java_lang_String_java_lang_String_: - -.. _RealmResults_setString_java_lang_String__java_lang_String_: - -.. _RealmResults_setString_java_lang_String_String_: - -.. _RealmResults_setString_java_lang_String__String_: - -.. _RealmResults_setString_String_java_lang_String_: - -.. _RealmResults_setString_String__java_lang_String_: - -.. _RealmResults_setString_String_String_: - -.. _RealmResults_setString_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setString ` ( - | `String `__ fieldName, - | `String `__ value - | ) - - - - - * - Sets the ``String`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a String field. - - - - - - - - - - - - -.. _setUUID: - -.. _setUUID__: - -.. _RealmResults_setUUID: - -.. _RealmResults_setUUID__: - -.. _io_realm_RealmResults_setUUID: - -.. _io_realm_RealmResults_setUUID__: - - - -setUUID -------- - -.. _io_realm_RealmResults_setUUID_java_lang_String_java_util_UUID_: - -.. _io_realm_RealmResults_setUUID_java_lang_String__java_util_UUID_: - -.. _io_realm_RealmResults_setUUID_java_lang_String_UUID_: - -.. _io_realm_RealmResults_setUUID_java_lang_String__UUID_: - -.. _io_realm_RealmResults_setUUID_String_java_util_UUID_: - -.. _io_realm_RealmResults_setUUID_String__java_util_UUID_: - -.. _io_realm_RealmResults_setUUID_String_UUID_: - -.. _io_realm_RealmResults_setUUID_String__UUID_: - -.. _setUUID_java_lang_String_java_util_UUID_: - -.. _setUUID_java_lang_String__java_util_UUID_: - -.. _setUUID_java_lang_String_UUID_: - -.. _setUUID_java_lang_String__UUID_: - -.. _setUUID_String_java_util_UUID_: - -.. _setUUID_String__java_util_UUID_: - -.. _setUUID_String_UUID_: - -.. _setUUID_String__UUID_: - -.. _RealmResults_setUUID_java_lang_String_java_util_UUID_: - -.. _RealmResults_setUUID_java_lang_String__java_util_UUID_: - -.. _RealmResults_setUUID_java_lang_String_UUID_: - -.. _RealmResults_setUUID_java_lang_String__UUID_: - -.. _RealmResults_setUUID_String_java_util_UUID_: - -.. _RealmResults_setUUID_String__java_util_UUID_: - -.. _RealmResults_setUUID_String_UUID_: - -.. _RealmResults_setUUID_String__UUID_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setUUID ` ( - | `String `__ fieldName, - | `UUID `__ value - | ) - - - - - * - Sets the ``UUID`` value of the given field in all of the objects in the collection. - - - - - - - **Parameters** - - - ``fieldName`` - name of the field to update. - - - - - ``value`` - new value for the field. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if field name doesn't exist, is a primary key property or isn't a ``UUID`` field. - - - - - - - - - - - - - - -.. _setValue: - -.. _setValue__: - -.. _RealmResults_setValue: - -.. _RealmResults_setValue__: - -.. _io_realm_RealmResults_setValue: - -.. _io_realm_RealmResults_setValue__: - - - -setValue --------- - -.. _io_realm_RealmResults_setValue_java_lang_String_java_lang_Object_: - -.. _io_realm_RealmResults_setValue_java_lang_String__java_lang_Object_: - -.. _io_realm_RealmResults_setValue_java_lang_String_Object_: - -.. _io_realm_RealmResults_setValue_java_lang_String__Object_: - -.. _io_realm_RealmResults_setValue_String_java_lang_Object_: - -.. _io_realm_RealmResults_setValue_String__java_lang_Object_: - -.. _io_realm_RealmResults_setValue_String_Object_: - -.. _io_realm_RealmResults_setValue_String__Object_: - -.. _setValue_java_lang_String_java_lang_Object_: - -.. _setValue_java_lang_String__java_lang_Object_: - -.. _setValue_java_lang_String_Object_: - -.. _setValue_java_lang_String__Object_: - -.. _setValue_String_java_lang_Object_: - -.. _setValue_String__java_lang_Object_: - -.. _setValue_String_Object_: - -.. _setValue_String__Object_: - -.. _RealmResults_setValue_java_lang_String_java_lang_Object_: - -.. _RealmResults_setValue_java_lang_String__java_lang_Object_: - -.. _RealmResults_setValue_java_lang_String_Object_: - -.. _RealmResults_setValue_java_lang_String__Object_: - -.. _RealmResults_setValue_String_java_lang_Object_: - -.. _RealmResults_setValue_String__java_lang_Object_: - -.. _RealmResults_setValue_String_Object_: - -.. _RealmResults_setValue_String__Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setValue ` ( - | `String `__ fieldName, - | `Object `__ value - | ) - - - - - * - Updates the field given by ``fieldName`` in all objects inside the query result. - - This method will automatically try to convert numbers and booleans that are given as ``String`` to their appropriate type. For example ``"10"`` will be converted to ``10`` if the field type is :ref:`RealmFieldType.INTEGER ` . - - - - Using the typed setters like :ref:`setInt(String, int) ` will be faster than using this method. - - - - - - - - - **Parameters** - - - ``fieldName`` - field to update - - - - - ``value`` - value to update with. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the field could not be found, could not be updated or the argument didn't match the field type or could not be converted to match the underlying field type. - - - - - - - - - - - - -.. _sort: - -.. _sort__: - -.. _RealmResults_sort: - -.. _RealmResults_sort__: - -.. _io_realm_RealmResults_sort: - -.. _io_realm_RealmResults_sort__: - - - -sort ----- - -.. _io_realm_RealmResults_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String_Sort_String_Sort_: - -.. _io_realm_RealmResults_sort_java_lang_String__Sort__String__Sort_: - -.. _io_realm_RealmResults_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmResults_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmResults_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmResults_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _io_realm_RealmResults_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmResults_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _io_realm_RealmResults_sort_String_io_realm_Sort_String_Sort_: - -.. _io_realm_RealmResults_sort_String__io_realm_Sort__String__Sort_: - -.. _io_realm_RealmResults_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _io_realm_RealmResults_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _io_realm_RealmResults_sort_String_Sort_java_lang_String_Sort_: - -.. _io_realm_RealmResults_sort_String__Sort__java_lang_String__Sort_: - -.. _io_realm_RealmResults_sort_String_Sort_String_io_realm_Sort_: - -.. _io_realm_RealmResults_sort_String__Sort__String__io_realm_Sort_: - -.. _io_realm_RealmResults_sort_String_Sort_String_Sort_: - -.. _io_realm_RealmResults_sort_String__Sort__String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _sort_java_lang_String_Sort_String_Sort_: - -.. _sort_java_lang_String__Sort__String__Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _sort_String_io_realm_Sort_String_Sort_: - -.. _sort_String__io_realm_Sort__String__Sort_: - -.. _sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _sort_String_Sort_java_lang_String_Sort_: - -.. _sort_String__Sort__java_lang_String__Sort_: - -.. _sort_String_Sort_String_io_realm_Sort_: - -.. _sort_String__Sort__String__io_realm_Sort_: - -.. _sort_String_Sort_String_Sort_: - -.. _sort_String__Sort__String__Sort_: - -.. _RealmResults_sort_java_lang_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmResults_sort_java_lang_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _RealmResults_sort_java_lang_String_io_realm_Sort_java_lang_String_Sort_: - -.. _RealmResults_sort_java_lang_String__io_realm_Sort__java_lang_String__Sort_: - -.. _RealmResults_sort_java_lang_String_io_realm_Sort_String_io_realm_Sort_: - -.. _RealmResults_sort_java_lang_String__io_realm_Sort__String__io_realm_Sort_: - -.. _RealmResults_sort_java_lang_String_io_realm_Sort_String_Sort_: - -.. _RealmResults_sort_java_lang_String__io_realm_Sort__String__Sort_: - -.. _RealmResults_sort_java_lang_String_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmResults_sort_java_lang_String__Sort__java_lang_String__io_realm_Sort_: - -.. _RealmResults_sort_java_lang_String_Sort_java_lang_String_Sort_: - -.. _RealmResults_sort_java_lang_String__Sort__java_lang_String__Sort_: - -.. _RealmResults_sort_java_lang_String_Sort_String_io_realm_Sort_: - -.. _RealmResults_sort_java_lang_String__Sort__String__io_realm_Sort_: - -.. _RealmResults_sort_java_lang_String_Sort_String_Sort_: - -.. _RealmResults_sort_java_lang_String__Sort__String__Sort_: - -.. _RealmResults_sort_String_io_realm_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmResults_sort_String__io_realm_Sort__java_lang_String__io_realm_Sort_: - -.. _RealmResults_sort_String_io_realm_Sort_java_lang_String_Sort_: - -.. _RealmResults_sort_String__io_realm_Sort__java_lang_String__Sort_: - -.. _RealmResults_sort_String_io_realm_Sort_String_io_realm_Sort_: - -.. _RealmResults_sort_String__io_realm_Sort__String__io_realm_Sort_: - -.. _RealmResults_sort_String_io_realm_Sort_String_Sort_: - -.. _RealmResults_sort_String__io_realm_Sort__String__Sort_: - -.. _RealmResults_sort_String_Sort_java_lang_String_io_realm_Sort_: - -.. _RealmResults_sort_String__Sort__java_lang_String__io_realm_Sort_: - -.. _RealmResults_sort_String_Sort_java_lang_String_Sort_: - -.. _RealmResults_sort_String__Sort__java_lang_String__Sort_: - -.. _RealmResults_sort_String_Sort_String_io_realm_Sort_: - -.. _RealmResults_sort_String__Sort__String__io_realm_Sort_: - -.. _RealmResults_sort_String_Sort_String_Sort_: - -.. _RealmResults_sort_String__Sort__String__Sort_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResults ` :ref:`sort ` ( - | `String `__ fieldName1, - | :ref:`Sort ` sortOrder1, - | `String `__ fieldName2, - | :ref:`Sort ` sortOrder2 - | ) - - - - - * - Sorts a collection based on the provided fields and sort orders. - - - - - - - **Returns** - - a new sorted :ref:`RealmResults ` will be created and returned. The original collection stays unchanged. - - - - - - - - - **Overrides** - - ``sort`` in class **OrderedRealmCollectionImpl** - - - - - - -.. _where: - -.. _where__: - -.. _RealmResults_where: - -.. _RealmResults_where__: - -.. _io_realm_RealmResults_where: - -.. _io_realm_RealmResults_where__: - - - -where ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`where ` () - | - - - - - * - Returns a :ref:`RealmQuery ` , which can be used to query for specific objects from this collection. - - - - - - - - - **Returns** - - a RealmQuery object. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmSchema.txt b/source/sdk/temp/java/api/io/realm/RealmSchema.txt deleted file mode 100644 index 7b7e8b09f6..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmSchema.txt +++ /dev/null @@ -1,1113 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmSchema -^^^^^^^^^^^^^^^^^ - -.. _io_realm_RealmSchema: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmSchema - - -Class for interacting with the Realm schema. This makes it possible to inspect, add, delete and change the classes in the Realm.:ref:`Realm.getSchema() ` returns an immutable ``RealmSchema`` which can only be used for inspecting. Use :ref:`DynamicRealm.getSchema() ` to get a mutable schema. - - - -All changes must happen inside a write transaction for the particular Realm. - - - - -.. seealso:: - - - - - :ref:`RealmMigration ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`contains ` ( - | `String `__ className - | ) - - - Checks if a given class already exists in the schema. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`create ` ( - | `String `__ className - | ) - - - Adds a new class to the Realm. - - - - - * - public **void** - - | :ref:`createKeyPathMapping ` () - | - - - Create the underlying keypath mapping. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`createWithPrimaryKeyField ` ( - | `String `__ className, - | `String `__ primaryKeyFieldName, - | `java.lang.Class\ `__ fieldType, - | :ref:`io.realm.FieldAttribute[] ` attributes - | ) - - - Adds a new class to the Realm with a primary key field defined. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`get ` ( - | `String `__ className - | ) - - - Returns the :ref:`RealmObjectSchema ` for a given class. - - - - - - - * - public abstract `Set `__ - - | :ref:`getAll ` () - | - - - Returns the :ref:`RealmObjectSchema ` s for all RealmObject classes that can be saved in this Realm. - - - - - - - * - protected final **ColumnInfo** - - | :ref:`getColumnInfo ` ( - | `String `__ className - | ) - - - - - - - - * - public abstract **void** - - | :ref:`remove ` ( - | `String `__ className - | ) - - - Removes a class from the Realm. - - - - - * - public abstract :ref:`RealmObjectSchema ` - - | :ref:`rename ` ( - | `String `__ oldClassName, - | `String `__ newClassName - | ) - - - Renames a class already in the Realm. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _contains: - -.. _contains__: - -.. _RealmSchema_contains: - -.. _RealmSchema_contains__: - -.. _io_realm_RealmSchema_contains: - -.. _io_realm_RealmSchema_contains__: - - - -contains --------- - -.. _io_realm_RealmSchema_contains_java_lang_String_: - -.. _io_realm_RealmSchema_contains_String_: - -.. _contains_java_lang_String_: - -.. _contains_String_: - -.. _RealmSchema_contains_java_lang_String_: - -.. _RealmSchema_contains_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`contains ` ( - | `String `__ className - | ) - - - - - * - Checks if a given class already exists in the schema. - - - - - **Parameters** - - - ``className`` - class name to check. - - - - - - - - **Returns** - - ``true`` if the class already exists. ``false`` otherwise. - - - - - - - - - - - - - -.. _create: - -.. _create__: - -.. _RealmSchema_create: - -.. _RealmSchema_create__: - -.. _io_realm_RealmSchema_create: - -.. _io_realm_RealmSchema_create__: - - - -create ------- - -.. _io_realm_RealmSchema_create_java_lang_String_: - -.. _io_realm_RealmSchema_create_String_: - -.. _create_java_lang_String_: - -.. _create_String_: - -.. _RealmSchema_create_java_lang_String_: - -.. _RealmSchema_create_String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`create ` ( - | `String `__ className - | ) - - - - - * - Adds a new class to the Realm. - - - - - **Parameters** - - - ``className`` - name of the class. - - - - - - - - **Returns** - - a Realm schema object for that class. - - - - - **Throws** - - - `UnsupportedOperationException `__ - if this :ref:`RealmSchema ` is immutable. - - - - - - - - - - - - - - -.. _createKeyPathMapping: - -.. _createKeyPathMapping__: - -.. _RealmSchema_createKeyPathMapping: - -.. _RealmSchema_createKeyPathMapping__: - -.. _io_realm_RealmSchema_createKeyPathMapping: - -.. _io_realm_RealmSchema_createKeyPathMapping__: - - - -createKeyPathMapping --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`createKeyPathMapping ` () - | - - - - - * - Create the underlying keypath mapping. Should only be called by typed Realms. - - - - - - - - - - - - - - - -.. _createWithPrimaryKeyField: - -.. _createWithPrimaryKeyField__: - -.. _RealmSchema_createWithPrimaryKeyField: - -.. _RealmSchema_createWithPrimaryKeyField__: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField__: - - - -createWithPrimaryKeyField -------------------------- - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_String_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__String__Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_String_Class_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__String__Class__FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String_String_Class_FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_java_lang_String__String__Class__FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__java_lang_String__Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_java_lang_String_Class_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__java_lang_String__Class__FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_java_lang_String_Class_FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__java_lang_String__Class__FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__String__java_lang_Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_String_java_lang_Class_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__String__java_lang_Class__FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_String_java_lang_Class_FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__String__java_lang_Class__FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_String_Class_io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__String__Class__io_realm_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_String_Class_FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__String__Class__FieldAttribute_: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String_String_Class_FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__String__Class__FieldAttribute____: - -.. _createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__FieldAttribute____: - -.. _createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_FieldAttribute____: - -.. _createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__FieldAttribute____: - -.. _createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_FieldAttribute____: - -.. _createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__FieldAttribute____: - -.. _createWithPrimaryKeyField_java_lang_String_String_Class_io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String__String__Class__io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String_String_Class_FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String__String__Class__FieldAttribute_: - -.. _createWithPrimaryKeyField_java_lang_String_String_Class_FieldAttribute____: - -.. _createWithPrimaryKeyField_java_lang_String__String__Class__FieldAttribute____: - -.. _createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__FieldAttribute_: - -.. _createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__FieldAttribute____: - -.. _createWithPrimaryKeyField_String_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_String__java_lang_String__Class__io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_String_java_lang_String_Class_FieldAttribute_: - -.. _createWithPrimaryKeyField_String__java_lang_String__Class__FieldAttribute_: - -.. _createWithPrimaryKeyField_String_java_lang_String_Class_FieldAttribute____: - -.. _createWithPrimaryKeyField_String__java_lang_String__Class__FieldAttribute____: - -.. _createWithPrimaryKeyField_String_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_String__String__java_lang_Class__io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_String_String_java_lang_Class_FieldAttribute_: - -.. _createWithPrimaryKeyField_String__String__java_lang_Class__FieldAttribute_: - -.. _createWithPrimaryKeyField_String_String_java_lang_Class_FieldAttribute____: - -.. _createWithPrimaryKeyField_String__String__java_lang_Class__FieldAttribute____: - -.. _createWithPrimaryKeyField_String_String_Class_io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_String__String__Class__io_realm_FieldAttribute_: - -.. _createWithPrimaryKeyField_String_String_Class_FieldAttribute_: - -.. _createWithPrimaryKeyField_String__String__Class__FieldAttribute_: - -.. _createWithPrimaryKeyField_String_String_Class_FieldAttribute____: - -.. _createWithPrimaryKeyField_String__String__Class__FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__java_lang_Class__FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_java_lang_String_Class_FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__java_lang_String__Class__FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_String_java_lang_Class_FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__String__java_lang_Class__FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_String_Class_io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__String__Class__io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_String_Class_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__String__Class__FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String_String_Class_FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_java_lang_String__String__Class__FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String_java_lang_String_java_lang_Class_FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_String__java_lang_String__java_lang_Class__FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_String_java_lang_String_Class_io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String__java_lang_String__Class__io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String_java_lang_String_Class_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String__java_lang_String__Class__FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String_java_lang_String_Class_FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_String__java_lang_String__Class__FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_String_String_java_lang_Class_io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String__String__java_lang_Class__io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String_String_java_lang_Class_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String__String__java_lang_Class__FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String_String_java_lang_Class_FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_String__String__java_lang_Class__FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_String_String_Class_io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String__String__Class__io_realm_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String_String_Class_FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String__String__Class__FieldAttribute_: - -.. _RealmSchema_createWithPrimaryKeyField_String_String_Class_FieldAttribute____: - -.. _RealmSchema_createWithPrimaryKeyField_String__String__Class__FieldAttribute____: - -.. _io_realm_RealmSchema_createWithPrimaryKeyField_String__String__Class_____FieldAttribute____: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`createWithPrimaryKeyField ` ( - | `String `__ className, - | `String `__ primaryKeyFieldName, - | `java.lang.Class\ `__ fieldType, - | :ref:`io.realm.FieldAttribute[] ` attributes - | ) - - - - - * - Adds a new class to the Realm with a primary key field defined. - - - - - **Parameters** - - - ``className`` - name of the class. - - - - - ``primaryKeyFieldName`` - name of the primary key field. - - - - - ``fieldType`` - type of field to add. Only ``byte`` , ``short`` , ``int`` , ``long`` and their boxed types or the ``String`` is supported. - - - - - - - ``attributes`` - set of attributes for this field. This method implicitly adds :ref:`FieldAttribute.PRIMARY_KEY ` and :ref:`FieldAttribute.INDEXED ` attributes to the field. - - - - - - - - - - **Returns** - - a Realm schema object for that class. - - - - - **Throws** - - - `UnsupportedOperationException `__ - if this :ref:`RealmSchema ` is immutable. - - - - - - - - - - - - - - -.. _get: - -.. _get__: - -.. _RealmSchema_get: - -.. _RealmSchema_get__: - -.. _io_realm_RealmSchema_get: - -.. _io_realm_RealmSchema_get__: - - - -get ----- - -.. _io_realm_RealmSchema_get_java_lang_String_: - -.. _io_realm_RealmSchema_get_String_: - -.. _get_java_lang_String_: - -.. _get_String_: - -.. _RealmSchema_get_java_lang_String_: - -.. _RealmSchema_get_String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`get ` ( - | `String `__ className - | ) - - - - - * - Returns the :ref:`RealmObjectSchema ` for a given class. If this :ref:`RealmSchema ` is immutable, an immutable :ref:`RealmObjectSchema ` will be returned. Otherwise, it returns a mutable :ref:`RealmObjectSchema ` . - - - - - - - **Parameters** - - - ``className`` - name of the class - - - - - - - - **Returns** - - schema object for that class or ``null`` if the class doesn't exists. - - - - - - - - - - - - - -.. _getAll: - -.. _getAll__: - -.. _RealmSchema_getAll: - -.. _RealmSchema_getAll__: - -.. _io_realm_RealmSchema_getAll: - -.. _io_realm_RealmSchema_getAll__: - - - -getAll ------- - -.. list-table:: - :header-rows: 1 - - * - | public abstract `Set `__ :ref:`getAll ` () - | - - - - - * - Returns the :ref:`RealmObjectSchema ` s for all RealmObject classes that can be saved in this Realm. If this :ref:`RealmSchema ` is immutable, an immutable :ref:`RealmObjectSchema ` set will be returned. Otherwise, it returns an mutable :ref:`RealmObjectSchema ` set. - - - - - - - - - **Returns** - - the set of all classes in this Realm or no RealmObject classes can be saved in the Realm. - - - - - - - - - - - -.. _getColumnInfo: - -.. _getColumnInfo__: - -.. _RealmSchema_getColumnInfo: - -.. _RealmSchema_getColumnInfo__: - -.. _io_realm_RealmSchema_getColumnInfo: - -.. _io_realm_RealmSchema_getColumnInfo__: - - - -getColumnInfo -------------- - -.. _io_realm_RealmSchema_getColumnInfo_java_lang_String_: - -.. _io_realm_RealmSchema_getColumnInfo_String_: - -.. _getColumnInfo_java_lang_String_: - -.. _getColumnInfo_String_: - -.. _RealmSchema_getColumnInfo_java_lang_String_: - -.. _RealmSchema_getColumnInfo_String_: - -.. list-table:: - :header-rows: 1 - - * - | protected final **ColumnInfo** :ref:`getColumnInfo ` ( - | `String `__ className - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _remove: - -.. _remove__: - -.. _RealmSchema_remove: - -.. _RealmSchema_remove__: - -.. _io_realm_RealmSchema_remove: - -.. _io_realm_RealmSchema_remove__: - - - -remove ------- - -.. _io_realm_RealmSchema_remove_java_lang_String_: - -.. _io_realm_RealmSchema_remove_String_: - -.. _remove_java_lang_String_: - -.. _remove_String_: - -.. _RealmSchema_remove_java_lang_String_: - -.. _RealmSchema_remove_String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract **void** :ref:`remove ` ( - | `String `__ className - | ) - - - - - * - Removes a class from the Realm. All data will be removed. Removing a class while other classes point to it will throw an `IllegalStateException `__ . Removes those classes or fields first. - - - - - - - **Parameters** - - - ``className`` - name of the class to remove. - - - - - - - - - - **Throws** - - - `UnsupportedOperationException `__ - if this :ref:`RealmSchema ` is immutable or of a synced Realm. - - - - - - - - - - - - - - -.. _rename: - -.. _rename__: - -.. _RealmSchema_rename: - -.. _RealmSchema_rename__: - -.. _io_realm_RealmSchema_rename: - -.. _io_realm_RealmSchema_rename__: - - - -rename ------- - -.. _io_realm_RealmSchema_rename_java_lang_String_java_lang_String_: - -.. _io_realm_RealmSchema_rename_java_lang_String__java_lang_String_: - -.. _io_realm_RealmSchema_rename_java_lang_String_String_: - -.. _io_realm_RealmSchema_rename_java_lang_String__String_: - -.. _io_realm_RealmSchema_rename_String_java_lang_String_: - -.. _io_realm_RealmSchema_rename_String__java_lang_String_: - -.. _io_realm_RealmSchema_rename_String_String_: - -.. _io_realm_RealmSchema_rename_String__String_: - -.. _rename_java_lang_String_java_lang_String_: - -.. _rename_java_lang_String__java_lang_String_: - -.. _rename_java_lang_String_String_: - -.. _rename_java_lang_String__String_: - -.. _rename_String_java_lang_String_: - -.. _rename_String__java_lang_String_: - -.. _rename_String_String_: - -.. _rename_String__String_: - -.. _RealmSchema_rename_java_lang_String_java_lang_String_: - -.. _RealmSchema_rename_java_lang_String__java_lang_String_: - -.. _RealmSchema_rename_java_lang_String_String_: - -.. _RealmSchema_rename_java_lang_String__String_: - -.. _RealmSchema_rename_String_java_lang_String_: - -.. _RealmSchema_rename_String__java_lang_String_: - -.. _RealmSchema_rename_String_String_: - -.. _RealmSchema_rename_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public abstract :ref:`RealmObjectSchema ` :ref:`rename ` ( - | `String `__ oldClassName, - | `String `__ newClassName - | ) - - - - - * - Renames a class already in the Realm. - - - - - **Parameters** - - - ``oldClassName`` - old class name. - - - - - ``newClassName`` - new class name. - - - - - - - - **Returns** - - a schema object for renamed class. - - - - - **Throws** - - - `UnsupportedOperationException `__ - if this :ref:`RealmSchema ` is immutable or of a synced Realm. - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/RealmSet.txt b/source/sdk/temp/java/api/io/realm/RealmSet.txt deleted file mode 100644 index 4575cab8f9..0000000000 --- a/source/sdk/temp/java/api/io/realm/RealmSet.txt +++ /dev/null @@ -1,2721 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmSet -^^^^^^^^^^^^^^ - -.. _io_realm_RealmSet: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.RealmSet - - -**Implemented interfaces:** - - - -- `java.util.Set `__ -- :ref:`io.realm.RealmCollection ` -- `java.util.Collection `__ -- `java.lang.Iterable `__ -- `java.util.Collection `__ -- `java.lang.Iterable `__ - - -RealmSet is a collection that contains no duplicate elements.Similarly to :ref:`RealmList ` s, a RealmSet can operate in managed and unmanaged modes. In managed mode a RealmSet persists all its contents inside a Realm whereas in unmanaged mode it functions like a `HashSet `__ . - - - -Managed RealmSets can only be created by Realm and will automatically update their content whenever the underlying Realm is updated. Managed RealmSet can only be accessed using the getter that points to a RealmSet field of a :ref:`RealmObject ` . - - - -Unmanaged elements in this set can be added to a Realm using the :ref:`Realm.copyToRealm(Iterable, ImportFlag...) ` method. - - - -**Warning: **the following methods are not supported for classes containing set fields yet: - - - -- :ref:`Realm.insert(RealmModel) ` - - - - -- :ref:`Realm.insert(Collection) ` - - - - -- :ref:`Realm.insertOrUpdate(RealmModel) ` - - - - -- :ref:`Realm.insertOrUpdate(Collection) ` - - - - -- **Realm.createAllFromJson(Class, String)** - - - - -- :ref:`Realm.createAllFromJson(Class, JSONArray) ` - - - - -- **Realm.createAllFromJson(Class, InputStream)** - - - - -- **Realm.createObjectFromJson(Class, String)** - - - - -- :ref:`Realm.createObjectFromJson(Class, JSONObject) ` } - - - - -- **Realm.createObjectFromJson(Class, InputStream)**} - - - - -- **Realm.createOrUpdateAllFromJson(Class, String)** - - - - -- :ref:`Realm.createOrUpdateAllFromJson(Class, JSONArray) ` - - - - -- **Realm.createOrUpdateAllFromJson(Class, InputStream)** - - - - -- **Realm.createOrUpdateObjectFromJson(Class, String)** - - - - -- :ref:`Realm.createOrUpdateObjectFromJson(Class, JSONObject) ` - - - - -- **Realm.createOrUpdateObjectFromJson(Class, InputStream)** - - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmSet ` () - | - - - Instantiates a RealmSet in unmanaged mode. - - - - - * - | :ref:`RealmSet ` ( - | `java.util.Collection\ `__ collection - | ) - - - Instantiates a RealmSet in unmanaged mode with another collection. - - - - - * - | :ref:`RealmSet ` ( - | **BaseRealm** baseRealm, - | **OsSet** osSet, - | `java.lang.Class\ `__ valueClass - | ) - - - Instantiates a RealmSet in managed mode. - - - - - * - | :ref:`RealmSet ` ( - | **BaseRealm** baseRealm, - | **OsSet** osSet, - | `String `__ className - | ) - - - Instantiates a RealmSet in managed mode. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`add ` ( - | **E** e - | ) - - - - - - - - - - * - public **boolean** - - | :ref:`addAll ` ( - | `java.util.Collection\ `__ c - | ) - - - - - - - - - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.SetChangeListener\ ` listener - | ) - - - Adds a change listener to this :ref:`RealmSet ` . - - - - - - - * - public **void** - - | :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - Adds a change listener to this :ref:`RealmSet ` . - - - - - - - * - public **double** - - | :ref:`average ` ( - | `String `__ fieldName - | ) - - - Returns the average of a given field. - - - - - * - public **void** - - | :ref:`clear ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`contains ` ( - | `Object `__ o - | ) - - - Tests whether this ``Collection`` contains the specified object. - - - - - - - * - public **boolean** - - | :ref:`containsAll ` ( - | `java.util.Collection\ `__ c - | ) - - - - - - - - - - * - public **boolean** - - | :ref:`deleteAllFromRealm ` () - | - - - This deletes all objects in the collection from the underlying Realm as well as from the collection. - - - - - * - public :ref:`RealmSet ` - - | :ref:`freeze ` () - | - - - - - - - - - - * - public `Class `__ - - | :ref:`getValueClass ` () - | - - - - - - - - * - public `String `__ - - | :ref:`getValueClassName ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isEmpty ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`isFrozen ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`isLoaded ` () - | - - - Checks if a collection has finished loading its data yet. - - - - - * - public **boolean** - - | :ref:`isManaged ` () - | - - - Checks if the collection is managed by Realm. - - - - - * - public **boolean** - - | :ref:`isValid ` () - | - - - Checks if the collection is still valid to use, i.e., the :ref:`io.realm.Realm ` instance hasn't been closed. - - - - - - - * - public `Iterator `__ - - | :ref:`iterator ` () - | - - - - - - - - - - * - public **boolean** - - | :ref:`load ` () - | - - - Blocks the collection until all data are available. - - - - - * - public `Number `__ - - | :ref:`max ` ( - | `String `__ fieldName - | ) - - - Finds the maximum value of a field. - - - - - * - public `Date `__ - - | :ref:`maxDate ` ( - | `String `__ fieldName - | ) - - - Finds the maximum date. - - - - - * - public `Number `__ - - | :ref:`min ` ( - | `String `__ fieldName - | ) - - - Finds the minimum value of a field. - - - - - * - public `Date `__ - - | :ref:`minDate ` ( - | `String `__ fieldName - | ) - - - Finds the minimum date. - - - - - * - public **boolean** - - | :ref:`remove ` ( - | `Object `__ o - | ) - - - - - - - - - - * - public **boolean** - - | :ref:`removeAll ` ( - | `java.util.Collection\ `__ c - | ) - - - - - - - - - - * - public **void** - - | :ref:`removeAllChangeListeners ` () - | - - - Removes all user-defined change listeners. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.SetChangeListener\ ` listener - | ) - - - Removes the specified change listener. - - - - - * - public **void** - - | :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - Removes the specified change listener. - - - - - * - public **boolean** - - | :ref:`retainAll ` ( - | `java.util.Collection\ `__ c - | ) - - - - - - - - - - * - public **int** - - | :ref:`size ` () - | - - - - - - - - - - * - public `Number `__ - - | :ref:`sum ` ( - | `String `__ fieldName - | ) - - - Calculates the sum of a given field. - - - - - * - public **T** - - | :ref:`toArray ` <**T** >( - | **T[]** a - | ) - - - - - - - - - - * - public `Object `__ - - | :ref:`toArray ` () - | - - - - - - - - - - * - public :ref:`RealmQuery ` - - | :ref:`where ` () - | - - - Returns a RealmQuery, which can be used to query for specific objects of this class. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _RealmSet: - -.. _RealmSet__: - -.. _io_realm_RealmSet: - -.. _io_realm_RealmSet__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSet ` () - | - - - - - * - Instantiates a RealmSet in unmanaged mode. - - - - - - - - - - - -.. _RealmSet: - -.. _RealmSet__: - -.. _io_realm_RealmSet: - -.. _io_realm_RealmSet__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSet ` ( - | `java.util.Collection\ `__ collection - | ) - - - - - * - Instantiates a RealmSet in unmanaged mode with another collection. - - - - - **Parameters** - - - ``collection`` - the collection with which the set will be initially populated. - - - - - - - - - - - - -.. _RealmSet: - -.. _RealmSet__: - -.. _io_realm_RealmSet: - -.. _io_realm_RealmSet__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSet ` ( - | **BaseRealm** baseRealm, - | **OsSet** osSet, - | `java.lang.Class\ `__ valueClass - | ) - - - - - * - Instantiates a RealmSet in managed mode. This constructor is used internally by Realm. - - - - - **Parameters** - - - ``baseRealm`` - - - - - - ``osSet`` - - - - - - ``valueClass`` - - - - - - - - - - - - - -.. _RealmSet: - -.. _RealmSet__: - -.. _io_realm_RealmSet: - -.. _io_realm_RealmSet__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSet ` ( - | **BaseRealm** baseRealm, - | **OsSet** osSet, - | `String `__ className - | ) - - - - - * - Instantiates a RealmSet in managed mode. This constructor is used internally by a Dynamic Realm. - - - - - **Parameters** - - - ``baseRealm`` - - - - - - ``osSet`` - - - - - - ``className`` - - - - - - - - - - - - - - - -Method Detail -============= - -.. _add: - -.. _add__: - -.. _RealmSet_add: - -.. _RealmSet_add__: - -.. _io_realm_RealmSet_add: - -.. _io_realm_RealmSet_add__: - - - -add ----- - -.. _io_realm_RealmSet_add_E_: - -.. _add_E_: - -.. _RealmSet_add_E_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`add ` ( - | **E** e - | ) - - - - - * - - - - - - - - - - - - - - - - - - -.. _addAll: - -.. _addAll__: - -.. _RealmSet_addAll: - -.. _RealmSet_addAll__: - -.. _io_realm_RealmSet_addAll: - -.. _io_realm_RealmSet_addAll__: - - - -addAll ------- - -.. _io_realm_RealmSet_addAll_java_util_Collection_: - -.. _io_realm_RealmSet_addAll_Collection_: - -.. _io_realm_RealmSet_addAll_Collection___extends_E__: - -.. _addAll_java_util_Collection_: - -.. _addAll_Collection_: - -.. _addAll_Collection___extends_E__: - -.. _RealmSet_addAll_java_util_Collection_: - -.. _RealmSet_addAll_Collection_: - -.. _RealmSet_addAll_Collection___extends_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`addAll ` ( - | `java.util.Collection\ `__ c - | ) - - - - - * - - - - - - - - - - - - - - - - - - -.. _addChangeListener: - -.. _addChangeListener__: - -.. _RealmSet_addChangeListener: - -.. _RealmSet_addChangeListener__: - -.. _io_realm_RealmSet_addChangeListener: - -.. _io_realm_RealmSet_addChangeListener__: - - - -addChangeListener ------------------ - -.. _io_realm_RealmSet_addChangeListener_io_realm_SetChangeListener_: - -.. _io_realm_RealmSet_addChangeListener_SetChangeListener_: - -.. _addChangeListener_io_realm_SetChangeListener_: - -.. _addChangeListener_SetChangeListener_: - -.. _RealmSet_addChangeListener_io_realm_SetChangeListener_: - -.. _RealmSet_addChangeListener_SetChangeListener_: - -.. _io_realm_RealmSet_addChangeListener_SetChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.SetChangeListener\ ` listener - | ) - - - - - * - Adds a change listener to this :ref:`RealmSet ` . - - Registering a change listener will not prevent the underlying RealmSet from being garbage collected. If the RealmSet is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private RealmSet dogs; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - dogs = realm.where(Person.class).findFirst().getDogs(); - dogs.addChangeListener(new SetChangeListener() { - @Override - public void onChange(RealmSet set, SetChangeSet changeSet) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - -.. _io_realm_RealmSet_addChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmSet_addChangeListener_RealmChangeListener_: - -.. _addChangeListener_io_realm_RealmChangeListener_: - -.. _addChangeListener_RealmChangeListener_: - -.. _RealmSet_addChangeListener_io_realm_RealmChangeListener_: - -.. _RealmSet_addChangeListener_RealmChangeListener_: - -.. _io_realm_RealmSet_addChangeListener_RealmChangeListener_RealmSet_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - - - * - Adds a change listener to this :ref:`RealmSet ` . - - Registering a change listener will not prevent the underlying RealmSet from being garbage collected. If the RealmSet is garbage collected, the change listener will stop being triggered. To avoid this, keep a strong reference for as long as appropriate e.g. in a class variable. - - - - .. code-block:: java - - - public class MyActivity extends Activity { - - private RealmSet dogs; // Strong reference to keep listeners alive - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - dogs = realm.where(Person.class).findFirst().getDogs(); - dogs.addChangeListener(new RealmChangeListener>() { - @Override - public void onChange(RealmSet map) { - // React to change - } - }); - } - } - - - - - - - - - - - **Parameters** - - - ``listener`` - the listener to be notified. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to add a listener from a non-Looper or `android.app.IntentService `__ thread. - - - - - - - - - - - - - - -.. _average: - -.. _average__: - -.. _RealmSet_average: - -.. _RealmSet_average__: - -.. _io_realm_RealmSet_average: - -.. _io_realm_RealmSet_average__: - - - -average -------- - -.. _io_realm_RealmSet_average_java_lang_String_: - -.. _io_realm_RealmSet_average_String_: - -.. _average_java_lang_String_: - -.. _average_String_: - -.. _RealmSet_average_java_lang_String_: - -.. _RealmSet_average_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **double** :ref:`average ` ( - | `String `__ fieldName - | ) - - - - - * - Returns the average of a given field. - - - - - - - **Returns** - - the average for the given field amongst objects in query results. This will be of type double for all types of number fields. If no objects exist or they all have ``null`` as the value for the given field, ``0`` will be returned. When computing the average, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _clear: - -.. _clear__: - -.. _RealmSet_clear: - -.. _RealmSet_clear__: - -.. _io_realm_RealmSet_clear: - -.. _io_realm_RealmSet_clear__: - - - -clear ------ - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`clear ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _contains: - -.. _contains__: - -.. _RealmSet_contains: - -.. _RealmSet_contains__: - -.. _io_realm_RealmSet_contains: - -.. _io_realm_RealmSet_contains__: - - - -contains --------- - -.. _io_realm_RealmSet_contains_java_lang_Object_: - -.. _io_realm_RealmSet_contains_Object_: - -.. _contains_java_lang_Object_: - -.. _contains_Object_: - -.. _RealmSet_contains_java_lang_Object_: - -.. _RealmSet_contains_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`contains ` ( - | `Object `__ o - | ) - - - - - * - Tests whether this ``Collection`` contains the specified object. Returns ``true`` if and only if at least one element ``elem`` in this ``Collection`` meets following requirement: ``(object==null ? elem==null : object.equals(elem))`` . - - - - - - - - - **Returns** - - ``true`` if object is an element of this ``Collection`` , ``false`` otherwise. - - - - - - - - - - - - - -.. _containsAll: - -.. _containsAll__: - -.. _RealmSet_containsAll: - -.. _RealmSet_containsAll__: - -.. _io_realm_RealmSet_containsAll: - -.. _io_realm_RealmSet_containsAll__: - - - -containsAll ------------ - -.. _io_realm_RealmSet_containsAll_java_util_Collection_: - -.. _io_realm_RealmSet_containsAll_Collection_: - -.. _containsAll_java_util_Collection_: - -.. _containsAll_Collection_: - -.. _RealmSet_containsAll_java_util_Collection_: - -.. _RealmSet_containsAll_Collection_: - -.. _io_realm_RealmSet_containsAll_Collection____: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`containsAll ` ( - | `java.util.Collection\ `__ c - | ) - - - - - * - - - - - - - - - - - - - - - - - - -.. _deleteAllFromRealm: - -.. _deleteAllFromRealm__: - -.. _RealmSet_deleteAllFromRealm: - -.. _RealmSet_deleteAllFromRealm__: - -.. _io_realm_RealmSet_deleteAllFromRealm: - -.. _io_realm_RealmSet_deleteAllFromRealm__: - - - -deleteAllFromRealm ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`deleteAllFromRealm ` () - | - - - - - * - This deletes all objects in the collection from the underlying Realm as well as from the collection. - - - - - - - **Returns** - - ``true`` if objects was deleted, ``false`` otherwise. - - - - - - - - - - - - - -.. _freeze: - -.. _freeze__: - -.. _RealmSet_freeze: - -.. _RealmSet_freeze__: - -.. _io_realm_RealmSet_freeze: - -.. _io_realm_RealmSet_freeze__: - - - -freeze ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmSet ` :ref:`freeze ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _getValueClass: - -.. _getValueClass__: - -.. _RealmSet_getValueClass: - -.. _RealmSet_getValueClass__: - -.. _io_realm_RealmSet_getValueClass: - -.. _io_realm_RealmSet_getValueClass__: - - - -getValueClass -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Class `__ :ref:`getValueClass ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _getValueClassName: - -.. _getValueClassName__: - -.. _RealmSet_getValueClassName: - -.. _RealmSet_getValueClassName__: - -.. _io_realm_RealmSet_getValueClassName: - -.. _io_realm_RealmSet_getValueClassName__: - - - -getValueClassName ------------------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getValueClassName ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _isEmpty: - -.. _isEmpty__: - -.. _RealmSet_isEmpty: - -.. _RealmSet_isEmpty__: - -.. _io_realm_RealmSet_isEmpty: - -.. _io_realm_RealmSet_isEmpty__: - - - -isEmpty -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEmpty ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _isFrozen: - -.. _isFrozen__: - -.. _RealmSet_isFrozen: - -.. _RealmSet_isFrozen__: - -.. _io_realm_RealmSet_isFrozen: - -.. _io_realm_RealmSet_isFrozen__: - - - -isFrozen --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isFrozen ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _isLoaded: - -.. _isLoaded__: - -.. _RealmSet_isLoaded: - -.. _RealmSet_isLoaded__: - -.. _io_realm_RealmSet_isLoaded: - -.. _io_realm_RealmSet_isLoaded__: - - - -isLoaded --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isLoaded ` () - | - - - - - * - Checks if a collection has finished loading its data yet. - - - - - - - **Returns** - - ``true`` if data has been loaded and is available, ``false`` if data is still being loaded. - - - - - - - - - - - - - -.. _isManaged: - -.. _isManaged__: - -.. _RealmSet_isManaged: - -.. _RealmSet_isManaged__: - -.. _io_realm_RealmSet_isManaged: - -.. _io_realm_RealmSet_isManaged__: - - - -isManaged ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isManaged ` () - | - - - - - * - Checks if the collection is managed by Realm. A managed collection is just a wrapper around the data in the underlying Realm file. On Looper threads, a managed collection will be live-updated so it always points to the latest data. Managed collections are thread confined so that they cannot be accessed from other threads than the one that created them.If this method returns ``false`` , the collection is unmanaged. An unmanaged collection is just a normal java collection, so it will not be live updated. - - - - - - - - - - - **Returns** - - ``true`` if this is a managed :ref:`RealmCollection ` , ``false`` otherwise. - - - - - - - - - - - - - -.. _isValid: - -.. _isValid__: - -.. _RealmSet_isValid: - -.. _RealmSet_isValid__: - -.. _io_realm_RealmSet_isValid: - -.. _io_realm_RealmSet_isValid__: - - - -isValid -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isValid ` () - | - - - - - * - Checks if the collection is still valid to use, i.e., the :ref:`io.realm.Realm ` instance hasn't been closed. It will always return ``true`` for an unmanaged collection. - - - - - - - - - **Returns** - - ``true`` if it is still valid to use or an unmanaged collection, ``false`` otherwise. - - - - - - - - - - - - - -.. _iterator: - -.. _iterator__: - -.. _RealmSet_iterator: - -.. _RealmSet_iterator__: - -.. _io_realm_RealmSet_iterator: - -.. _io_realm_RealmSet_iterator__: - - - -iterator --------- - -.. list-table:: - :header-rows: 1 - - * - | public `Iterator `__ :ref:`iterator ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _load: - -.. _load__: - -.. _RealmSet_load: - -.. _RealmSet_load__: - -.. _io_realm_RealmSet_load: - -.. _io_realm_RealmSet_load__: - - - -load ----- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`load ` () - | - - - - - * - Blocks the collection until all data are available. - - - - - - - **Returns** - - ``true`` if the data could be successfully loaded, ``false`` otherwise. - - - - - - - - - - - - - -.. _max: - -.. _max__: - -.. _RealmSet_max: - -.. _RealmSet_max__: - -.. _io_realm_RealmSet_max: - -.. _io_realm_RealmSet_max__: - - - -max ----- - -.. _io_realm_RealmSet_max_java_lang_String_: - -.. _io_realm_RealmSet_max_String_: - -.. _max_java_lang_String_: - -.. _max_String_: - -.. _RealmSet_max_java_lang_String_: - -.. _RealmSet_max_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`max ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum value of a field. - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given field, ``null`` will be returned. Otherwise the maximum value is returned. When determining the maximum value, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _maxDate: - -.. _maxDate__: - -.. _RealmSet_maxDate: - -.. _RealmSet_maxDate__: - -.. _io_realm_RealmSet_maxDate: - -.. _io_realm_RealmSet_maxDate__: - - - -maxDate -------- - -.. _io_realm_RealmSet_maxDate_java_lang_String_: - -.. _io_realm_RealmSet_maxDate_String_: - -.. _maxDate_java_lang_String_: - -.. _maxDate_String_: - -.. _RealmSet_maxDate_java_lang_String_: - -.. _RealmSet_maxDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`maxDate ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the maximum date. - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given date field, ``null`` will be returned. Otherwise the maximum date is returned. When determining the maximum date, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _min: - -.. _min__: - -.. _RealmSet_min: - -.. _RealmSet_min__: - -.. _io_realm_RealmSet_min: - -.. _io_realm_RealmSet_min__: - - - -min ----- - -.. _io_realm_RealmSet_min_java_lang_String_: - -.. _io_realm_RealmSet_min_String_: - -.. _min_java_lang_String_: - -.. _min_String_: - -.. _RealmSet_min_java_lang_String_: - -.. _RealmSet_min_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`min ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum value of a field. - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given field, ``null`` will be returned. Otherwise the minimum value is returned. When determining the minimum value, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _minDate: - -.. _minDate__: - -.. _RealmSet_minDate: - -.. _RealmSet_minDate__: - -.. _io_realm_RealmSet_minDate: - -.. _io_realm_RealmSet_minDate__: - - - -minDate -------- - -.. _io_realm_RealmSet_minDate_java_lang_String_: - -.. _io_realm_RealmSet_minDate_String_: - -.. _minDate_java_lang_String_: - -.. _minDate_String_: - -.. _RealmSet_minDate_java_lang_String_: - -.. _RealmSet_minDate_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`minDate ` ( - | `String `__ fieldName - | ) - - - - - * - Finds the minimum date. - - - - - - - **Returns** - - if no objects exist or they all have ``null`` as the value for the given date field, ``null`` will be returned. Otherwise the minimum date is returned. When determining the minimum date, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _remove: - -.. _remove__: - -.. _RealmSet_remove: - -.. _RealmSet_remove__: - -.. _io_realm_RealmSet_remove: - -.. _io_realm_RealmSet_remove__: - - - -remove ------- - -.. _io_realm_RealmSet_remove_java_lang_Object_: - -.. _io_realm_RealmSet_remove_Object_: - -.. _remove_java_lang_Object_: - -.. _remove_Object_: - -.. _RealmSet_remove_java_lang_Object_: - -.. _RealmSet_remove_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`remove ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - - - - - - - -.. _removeAll: - -.. _removeAll__: - -.. _RealmSet_removeAll: - -.. _RealmSet_removeAll__: - -.. _io_realm_RealmSet_removeAll: - -.. _io_realm_RealmSet_removeAll__: - - - -removeAll ---------- - -.. _io_realm_RealmSet_removeAll_java_util_Collection_: - -.. _io_realm_RealmSet_removeAll_Collection_: - -.. _removeAll_java_util_Collection_: - -.. _removeAll_Collection_: - -.. _RealmSet_removeAll_java_util_Collection_: - -.. _RealmSet_removeAll_Collection_: - -.. _io_realm_RealmSet_removeAll_Collection____: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`removeAll ` ( - | `java.util.Collection\ `__ c - | ) - - - - - * - - - - - - - - - - - - - - - - - - -.. _removeAllChangeListeners: - -.. _removeAllChangeListeners__: - -.. _RealmSet_removeAllChangeListeners: - -.. _RealmSet_removeAllChangeListeners__: - -.. _io_realm_RealmSet_removeAllChangeListeners: - -.. _io_realm_RealmSet_removeAllChangeListeners__: - - - -removeAllChangeListeners ------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeAllChangeListeners ` () - | - - - - - * - Removes all user-defined change listeners. - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if you try to remove listeners from a non-Looper Thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmChangeListener ` - - - - - - - - - - - - -.. _removeChangeListener: - -.. _removeChangeListener__: - -.. _RealmSet_removeChangeListener: - -.. _RealmSet_removeChangeListener__: - -.. _io_realm_RealmSet_removeChangeListener: - -.. _io_realm_RealmSet_removeChangeListener__: - - - -removeChangeListener --------------------- - -.. _io_realm_RealmSet_removeChangeListener_io_realm_SetChangeListener_: - -.. _io_realm_RealmSet_removeChangeListener_SetChangeListener_: - -.. _removeChangeListener_io_realm_SetChangeListener_: - -.. _removeChangeListener_SetChangeListener_: - -.. _RealmSet_removeChangeListener_io_realm_SetChangeListener_: - -.. _RealmSet_removeChangeListener_SetChangeListener_: - -.. _io_realm_RealmSet_removeChangeListener_SetChangeListener_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.SetChangeListener\ ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - -.. _io_realm_RealmSet_removeChangeListener_io_realm_RealmChangeListener_: - -.. _io_realm_RealmSet_removeChangeListener_RealmChangeListener_: - -.. _removeChangeListener_io_realm_RealmChangeListener_: - -.. _removeChangeListener_RealmChangeListener_: - -.. _RealmSet_removeChangeListener_io_realm_RealmChangeListener_: - -.. _RealmSet_removeChangeListener_RealmChangeListener_: - -.. _io_realm_RealmSet_removeChangeListener_RealmChangeListener_RealmSet_E___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeChangeListener ` ( - | :ref:`io.realm.RealmChangeListener\> ` listener - | ) - - - - - * - Removes the specified change listener. - - - - - **Parameters** - - - ``listener`` - the change listener to be removed. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the change listener is ``null`` . - - - - - - - `IllegalStateException `__ - if you try to remove a listener from a non-Looper Thread. - - - - - - - - - - - - -.. _retainAll: - -.. _retainAll__: - -.. _RealmSet_retainAll: - -.. _RealmSet_retainAll__: - -.. _io_realm_RealmSet_retainAll: - -.. _io_realm_RealmSet_retainAll__: - - - -retainAll ---------- - -.. _io_realm_RealmSet_retainAll_java_util_Collection_: - -.. _io_realm_RealmSet_retainAll_Collection_: - -.. _retainAll_java_util_Collection_: - -.. _retainAll_Collection_: - -.. _RealmSet_retainAll_java_util_Collection_: - -.. _RealmSet_retainAll_Collection_: - -.. _io_realm_RealmSet_retainAll_Collection____: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`retainAll ` ( - | `java.util.Collection\ `__ c - | ) - - - - - * - - - - - - - - - - - - - - - - - - -.. _size: - -.. _size__: - -.. _RealmSet_size: - -.. _RealmSet_size__: - -.. _io_realm_RealmSet_size: - -.. _io_realm_RealmSet_size__: - - - -size ----- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`size ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _sum: - -.. _sum__: - -.. _RealmSet_sum: - -.. _RealmSet_sum__: - -.. _io_realm_RealmSet_sum: - -.. _io_realm_RealmSet_sum__: - - - -sum ----- - -.. _io_realm_RealmSet_sum_java_lang_String_: - -.. _io_realm_RealmSet_sum_String_: - -.. _sum_java_lang_String_: - -.. _sum_String_: - -.. _RealmSet_sum_java_lang_String_: - -.. _RealmSet_sum_String_: - -.. list-table:: - :header-rows: 1 - - * - | public `Number `__ :ref:`sum ` ( - | `String `__ fieldName - | ) - - - - - * - Calculates the sum of a given field. - - - - - - - **Returns** - - the sum. If no objects exist or they all have ``null`` as the value for the given field, ``0`` will be returned. When computing the sum, objects with ``null`` values are ignored. - - - - - - - - - - - - - -.. _toArray: - -.. _toArray__: - -.. _RealmSet_toArray: - -.. _RealmSet_toArray__: - -.. _io_realm_RealmSet_toArray: - -.. _io_realm_RealmSet_toArray__: - - - -toArray -------- - -.. _io_realm_RealmSet_toArray_T_: - -.. _io_realm_RealmSet_toArray_T____: - -.. _toArray_T_: - -.. _toArray_T____: - -.. _RealmSet_toArray_T_: - -.. _RealmSet_toArray_T____: - -.. _io_realm_RealmSet_toArray_T[]_: - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`toArray ` <**T** >( - | **T[]** a - | ) - - - - - * - - - - - - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public `Object `__ :ref:`toArray ` () - | - - - - - * - - - - - - - - - - - - - - - - - - -.. _where: - -.. _where__: - -.. _RealmSet_where: - -.. _RealmSet_where__: - -.. _io_realm_RealmSet_where: - -.. _io_realm_RealmSet_where__: - - - -where ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmQuery ` :ref:`where ` () - | - - - - - * - Returns a RealmQuery, which can be used to query for specific objects of this class. - - - - - - - **Returns** - - a RealmQuery object. - - - - - **Throws** - - - `IllegalStateException `__ - if Realm instance has been closed or parent object has been removed. - - - - - - - - - - .. seealso:: - - - - - :ref:`io.realm.RealmQuery ` - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/SetChangeListener.txt b/source/sdk/temp/java/api/io/realm/SetChangeListener.txt deleted file mode 100644 index dde9ee19e7..0000000000 --- a/source/sdk/temp/java/api/io/realm/SetChangeListener.txt +++ /dev/null @@ -1,164 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SetChangeListener -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_SetChangeListener: - - - -io.realm -======== - -:ref:`SetChangeListener ` can be registered with a :ref:`RealmSet ` to receive a notification with a :ref:`SetChangeSet ` to describe the details of what have been changed in the set since last time. - -Realm instances on a thread without an `android.os.Looper `__ cannot register a :ref:`SetChangeListener ` . - - - - - - -.. seealso:: - - - - - :ref:`RealmSet.addChangeListener(SetChangeListener) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onChange ` ( - | :ref:`io.realm.RealmSet\ ` set, - | :ref:`SetChangeSet ` changes - | ) - - - - - - - - - - -Method Detail -============= - -.. _onChange: - -.. _onChange__: - -.. _SetChangeListener_onChange: - -.. _SetChangeListener_onChange__: - -.. _io_realm_SetChangeListener_onChange: - -.. _io_realm_SetChangeListener_onChange__: - - - -onChange --------- - -.. _io_realm_SetChangeListener_onChange_io_realm_RealmSet_io_realm_SetChangeSet_: - -.. _io_realm_SetChangeListener_onChange_io_realm_RealmSet__io_realm_SetChangeSet_: - -.. _io_realm_SetChangeListener_onChange_io_realm_RealmSet_SetChangeSet_: - -.. _io_realm_SetChangeListener_onChange_io_realm_RealmSet__SetChangeSet_: - -.. _io_realm_SetChangeListener_onChange_RealmSet_io_realm_SetChangeSet_: - -.. _io_realm_SetChangeListener_onChange_RealmSet__io_realm_SetChangeSet_: - -.. _io_realm_SetChangeListener_onChange_RealmSet_SetChangeSet_: - -.. _io_realm_SetChangeListener_onChange_RealmSet__SetChangeSet_: - -.. _onChange_io_realm_RealmSet_io_realm_SetChangeSet_: - -.. _onChange_io_realm_RealmSet__io_realm_SetChangeSet_: - -.. _onChange_io_realm_RealmSet_SetChangeSet_: - -.. _onChange_io_realm_RealmSet__SetChangeSet_: - -.. _onChange_RealmSet_io_realm_SetChangeSet_: - -.. _onChange_RealmSet__io_realm_SetChangeSet_: - -.. _onChange_RealmSet_SetChangeSet_: - -.. _onChange_RealmSet__SetChangeSet_: - -.. _SetChangeListener_onChange_io_realm_RealmSet_io_realm_SetChangeSet_: - -.. _SetChangeListener_onChange_io_realm_RealmSet__io_realm_SetChangeSet_: - -.. _SetChangeListener_onChange_io_realm_RealmSet_SetChangeSet_: - -.. _SetChangeListener_onChange_io_realm_RealmSet__SetChangeSet_: - -.. _SetChangeListener_onChange_RealmSet_io_realm_SetChangeSet_: - -.. _SetChangeListener_onChange_RealmSet__io_realm_SetChangeSet_: - -.. _SetChangeListener_onChange_RealmSet_SetChangeSet_: - -.. _SetChangeListener_onChange_RealmSet__SetChangeSet_: - -.. _io_realm_SetChangeListener_onChange_RealmSet_T___SetChangeSet_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onChange ` ( - | :ref:`io.realm.RealmSet\ ` set, - | :ref:`SetChangeSet ` changes - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/SetChangeSet.txt b/source/sdk/temp/java/api/io/realm/SetChangeSet.txt deleted file mode 100644 index 8a295d6735..0000000000 --- a/source/sdk/temp/java/api/io/realm/SetChangeSet.txt +++ /dev/null @@ -1,284 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class SetChangeSet -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_SetChangeSet: - - - -io.realm -======== - - - | `java.lang.Object `__ - | io.realm.SetChangeSet - - -This class describes the changes made to a set during the last update.:ref:`SetChangeSet ` is passed to the :ref:`SetChangeListener ` which is registered by :ref:`RealmSet.addChangeListener(SetChangeListener) ` . - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`SetChangeSet ` ( - | **OsCollectionChangeSet** osCollectionChangeSet - | ) - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **int** - - | :ref:`getNumberOfDeletions ` () - | - - - The number of entries that have been deleted - - - - - * - public **int** - - | :ref:`getNumberOfInsertions ` () - | - - - The number of entries that have been inserted. - - - - - * - public **boolean** - - | :ref:`isEmpty ` () - | - - - Whether the change set is empty or not. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _SetChangeSet: - -.. _SetChangeSet__: - -.. _io_realm_SetChangeSet: - -.. _io_realm_SetChangeSet__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SetChangeSet ` ( - | **OsCollectionChangeSet** osCollectionChangeSet - | ) - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _getNumberOfDeletions: - -.. _getNumberOfDeletions__: - -.. _SetChangeSet_getNumberOfDeletions: - -.. _SetChangeSet_getNumberOfDeletions__: - -.. _io_realm_SetChangeSet_getNumberOfDeletions: - -.. _io_realm_SetChangeSet_getNumberOfDeletions__: - - - -getNumberOfDeletions --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getNumberOfDeletions ` () - | - - - - - * - The number of entries that have been deleted - - - - - - - **Returns** - - the number of deletions - - - - - - - - - - - -.. _getNumberOfInsertions: - -.. _getNumberOfInsertions__: - -.. _SetChangeSet_getNumberOfInsertions: - -.. _SetChangeSet_getNumberOfInsertions__: - -.. _io_realm_SetChangeSet_getNumberOfInsertions: - -.. _io_realm_SetChangeSet_getNumberOfInsertions__: - - - -getNumberOfInsertions ---------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getNumberOfInsertions ` () - | - - - - - * - The number of entries that have been inserted. - - - - - - - **Returns** - - the number of insertions. - - - - - - - - - - - -.. _isEmpty: - -.. _isEmpty__: - -.. _SetChangeSet_isEmpty: - -.. _SetChangeSet_isEmpty__: - -.. _io_realm_SetChangeSet_isEmpty: - -.. _io_realm_SetChangeSet_isEmpty__: - - - -isEmpty -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEmpty ` () - | - - - - - * - Whether the change set is empty or not. This is needed to detect whether a notification has been triggered right after subscription. - - - - - - - **Returns** - - whether the change set contains changes. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/Sort.txt b/source/sdk/temp/java/api/io/realm/Sort.txt deleted file mode 100644 index 4a842679b5..0000000000 --- a/source/sdk/temp/java/api/io/realm/Sort.txt +++ /dev/null @@ -1,304 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum Sort -^^^^^^^^^ - -.. _io_realm_Sort: - - - -io.realm -======== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.Sort - - -This class describes the sorting order used in Realm queries. - - -.. seealso:: - - - - - :ref:`io.realm.RealmQuery.sort(String, Sort) ` - - - - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`ASCENDING ` - - - - - - - * - :ref:`DESCENDING ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`getValue ` () - | - - - Returns the value for this setting that is used by the underlying query engine. - - - - - * - public static :ref:`Sort ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`Sort ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_Sort_ASCENDING: - -.. _Sort_ASCENDING: - - - -``ASCENDING`` --------------- - -public static final :ref:`Sort ` - - - - - -.. _io_realm_Sort_DESCENDING: - -.. _Sort_DESCENDING: - - - -``DESCENDING`` ---------------- - -public static final :ref:`Sort ` - - - - - - -Method Detail -============= - -.. _getValue: - -.. _getValue__: - -.. _Sort_getValue: - -.. _Sort_getValue__: - -.. _io_realm_Sort_getValue: - -.. _io_realm_Sort_getValue__: - - - -getValue --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`getValue ` () - | - - - - - * - Returns the value for this setting that is used by the underlying query engine. - - - - - - - **Returns** - - the value used by the underlying query engine to indicate this value. - - - - - - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _Sort_valueOf: - -.. _Sort_valueOf__: - -.. _io_realm_Sort_valueOf: - -.. _io_realm_Sort_valueOf__: - - - -valueOf -------- - -.. _io_realm_Sort_valueOf_java_lang_String_: - -.. _io_realm_Sort_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _Sort_valueOf_java_lang_String_: - -.. _Sort_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Sort ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _Sort_values: - -.. _Sort_values__: - -.. _io_realm_Sort_values: - -.. _io_realm_Sort_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Sort ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations.txt b/source/sdk/temp/java/api/io/realm/annotations.txt deleted file mode 100644 index 7926aeacf9..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations.txt +++ /dev/null @@ -1,45 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.annotations -^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - Beta - Ignore - Index - LinkingObjects - PrimaryKey - RealmClass - RealmField - RealmModule - RealmNamingPolicy - Required - - - -| - -- :ref:`io.realm.annotations.Beta ` -- :ref:`io.realm.annotations.Ignore ` -- :ref:`io.realm.annotations.Index ` -- :ref:`io.realm.annotations.LinkingObjects ` -- :ref:`io.realm.annotations.PrimaryKey ` -- :ref:`io.realm.annotations.RealmClass ` -- :ref:`io.realm.annotations.RealmField ` -- :ref:`io.realm.annotations.RealmModule ` -- :ref:`io.realm.annotations.RealmNamingPolicy ` -- :ref:`io.realm.annotations.Required ` - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/Beta.txt b/source/sdk/temp/java/api/io/realm/annotations/Beta.txt deleted file mode 100644 index 9671157537..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/Beta.txt +++ /dev/null @@ -1,28 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type Beta -^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_Beta: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - -This annotation is added to classes, constructors or methods which are considered in beta phase. It indicates that any public interface can change without prior announcements. Moreover, classes, constructors, and methods annotated as beta are not considered at production quality, and should be used with care. - diff --git a/source/sdk/temp/java/api/io/realm/annotations/Ignore.txt b/source/sdk/temp/java/api/io/realm/annotations/Ignore.txt deleted file mode 100644 index 41c9e42362..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/Ignore.txt +++ /dev/null @@ -1,28 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type Ignore -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_Ignore: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/Index.txt b/source/sdk/temp/java/api/io/realm/annotations/Index.txt deleted file mode 100644 index 05cc36e549..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/Index.txt +++ /dev/null @@ -1,30 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type Index -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_Index: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - -This annotation will add a search index to the field. A search index will make the Realm file larger and inserts slower but queries will be faster.NOTICE: Only String, int, byte, short, long, boolean and Date fields can be indexed. - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/LinkingObjects.txt b/source/sdk/temp/java/api/io/realm/annotations/LinkingObjects.txt deleted file mode 100644 index 228c6c2bf2..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/LinkingObjects.txt +++ /dev/null @@ -1,193 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type LinkingObjects -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_LinkingObjects: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - -Annotation for defining a reverse relationship from one class to another. This annotation can only be added to a field of the type ``RealmResults`` . - - To expose reverse relationships for use, create a declaration as follows: - - -.. code-block:: java - - - - public class Person extends RealmObject { - String name; - Dog dog; // Normal relation - } - - public class Dog extends RealmObject { - // This holds all Person objects with a relation to this Dog object (= linking objects) - @LinkingObjects("dog") - final RealmResults owners = null; - } - - // Find all Dogs with at least one owner named John - realm.where(Dog.class).equalTo("owners.name", "John").findAll(); - - - - - -In the above example \`Person\` is related to \`Dog\` through the field \`dog\`. This in turn means that an implicit reverse relationship exists between the class \`Dog\` and the class \`Person\`. This inverse relationship is made public and queryable by the \`RealmResults\` field annotated with \`\@LinkingObject\`. This makes it possible to query properties of the dogs owner without having to manually maintain a "owner" field in the \`Dog\` class.Linking objects have the following properties: - - - -- The link is maintained by Realm and only works for managed objects. - - -- They can be queried just like normal relation. - - -- They can be followed just like normal relation. - - -- They are ignored when doing a \`copyToRealm().\` - - -- They are ignored when doing a \`copyFromRealm().\` - - -- They are ignored when using the various \`createObjectFromJson\*\` and \`createAllFromJson\*\` methods. - - -- Listeners on an object with a \`\@LinkingObject\` field will not be triggered if the linking objects change, e.g: if another object drops a reference to this object. - - - - -In addition, they have the following restrictions: - - - -- \@Ignore takes precedence. A \@LinkingObjects annotation on \@Ignore field will be ignored. - - - - -- The annotated field cannot be \@Required. - - - - -- The annotated field must be \`final\`. - - -- The annotation argument (the name of the backlinked field) is required. - - -- The annotation argument must be a simple field name. It cannot contain periods ('.'). - - -- The annotated field must be of type \`RealmResults\` where T is concrete class that extends \`RealmModel\`. - - - - -Note that when the source of the reverse reference (\`dog\` in the case above) is a \`List\`, there is a reverse reference for each forward reference, even if both forward references are to the same object. If the \`Person\` class above were defined as: - -.. code-block:: java - - public class DogLover extends RealmObject { - String name; - List dogs = new ArrayList; - } - - - then the following code executes without error - -.. code-block:: java - - Dog fido = new Dog(); - DogLover john = new DogLover() - john.dogs.add(fido); - john.dogs.add(fido); - assert john.dogs.size() == 2; - assert fido.owners.size() == 2; - - - - -Querying inverse relationship is like querying any ``RealmResults`` . This means that an inverse relationship cannot be ``null`` but it can be empty (length is 0). It is possible to query fields in the source class. This is equivalent to link queries. Please read - -`for more information `__ . - - - - -Optional Element Summary -======================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Optional Element and Description - - * - public `String `__ - - - - The name of a field that contains a relation to an instance of the class containing this annotation. - - - - - - - -Element Detail -============== - -.. _value: - -.. _value__: - -.. _LinkingObjects_value: - -.. _LinkingObjects_value__: - -.. _io_realm_annotations_LinkingObjects_value: - -.. _io_realm_annotations_LinkingObjects_value__: - -.. list-table:: - :header-rows: 1 - - * - value - - * - ``public String value`` - - The name of a field that contains a relation to an instance of the class containing this annotation. If this argument is not provided the annotation processor will abort with an ``IllegalArgumentException`` . - - - - - **Default:** - ``""`` - - - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/PrimaryKey.txt b/source/sdk/temp/java/api/io/realm/annotations/PrimaryKey.txt deleted file mode 100644 index 1bb765ac8d..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/PrimaryKey.txt +++ /dev/null @@ -1,42 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type PrimaryKey -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_PrimaryKey: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - -The \@PrimaryKey annotation will mark a field as a primary key inside Realm. Only one field in a RealmObject class can have this annotation, and the field should uniquely identify the object. Trying to insert an object with an existing primary key will result in an ``io.realm.exceptions.RealmPrimaryKeyConstraintException`` . Primary key cannot be changed after the object created. - -Primary keys also count as having the :ref:`Index ` annotation. - - - -It is allowed to apply this annotation on the following primitive types: byte, short, int, and long. String, Byte, Short, Integer, Long, ObjectId and UUID are also allowed, and further permitted to have ``null`` as a primary key value. - - - -This annotation is not allowed inside Realm classes marked as ``@RealmClass(embedded = true)`` . - - - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/RealmClass.txt b/source/sdk/temp/java/api/io/realm/annotations/RealmClass.txt deleted file mode 100644 index fe7f2ca283..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/RealmClass.txt +++ /dev/null @@ -1,277 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type RealmClass -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_RealmClass: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - -Interface used to mark a class that can be persisted by Realm. - - -Optional Element Summary -======================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Optional Element and Description - - * - public **boolean** - - - - Define objects of this type as "Embedded". - - - - - * - public :ref:`RealmNamingPolicy ` - - - - The naming policy applied to all fields in this class. - - - - - * - public `String `__ - - - - Manually set the internal name used by Realm for this class. - - - - - * - public `String `__ - - - - Manually set the internal name used by Realm for this class. - - - - - - - -Element Detail -============== - -.. _embedded: - -.. _embedded__: - -.. _RealmClass_embedded: - -.. _RealmClass_embedded__: - -.. _io_realm_annotations_RealmClass_embedded: - -.. _io_realm_annotations_RealmClass_embedded__: - -.. list-table:: - :header-rows: 1 - - * - embedded - - * - ``public boolean embedded`` - - Define objects of this type as "Embedded". Embedded objects have a slightly different behavior than normal objects: - - - They must have exactly 1 parent linking to them when the embedded object is added to the Realm. Embedded objects can be the parent of other embedded objects. The parent cannot be changed later, except by copying the object. - - - - They cannot have fields annotated with ``@PrimaryKey`` . - - - - - - When a parent object is deleted, all embedded objects are also deleted. - - - - It is possible to define an easy reference to the parent object using the ``@LinkingObjects`` annotation: - - - - - - .. code-block:: java - - - @LinkingObjects - public Parent parent; - - - - - - - - - - - - **Default:** - ``false`` - - - - -.. _fieldNamingPolicy: - -.. _fieldNamingPolicy__: - -.. _RealmClass_fieldNamingPolicy: - -.. _RealmClass_fieldNamingPolicy__: - -.. _io_realm_annotations_RealmClass_fieldNamingPolicy: - -.. _io_realm_annotations_RealmClass_fieldNamingPolicy__: - -.. list-table:: - :header-rows: 1 - - * - fieldNamingPolicy - - * - ``public RealmNamingPolicy fieldNamingPolicy`` - - The naming policy applied to all fields in this class. The default policy is :ref:`RealmNamingPolicy.NO_POLICY ` . - - It is possible to override the naming policy for each field by using the :ref:`RealmField ` annotation. - - - - - - - **Default:** - ``io.realm.annotations.RealmNamingPolicy.NO_POLICY`` - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.RealmNamingPolicy for more information about what setting this policy means. ` - - - - - - - - - - -.. _name: - -.. _name__: - -.. _RealmClass_name: - -.. _RealmClass_name__: - -.. _io_realm_annotations_RealmClass_name: - -.. _io_realm_annotations_RealmClass_name__: - -.. list-table:: - :header-rows: 1 - - * - name - - * - ``public String name`` - - Manually set the internal name used by Realm for this class. If this class is part of any modules, this will also override any name policy set using :ref:`RealmModule.classNamingPolicy() ` . - - - - - **Default:** - ``""`` - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.RealmNamingPolicy for more information about what setting the name means. ` - - - - - - - - - - -.. _value: - -.. _value__: - -.. _RealmClass_value: - -.. _RealmClass_value__: - -.. _io_realm_annotations_RealmClass_value: - -.. _io_realm_annotations_RealmClass_value__: - -.. list-table:: - :header-rows: 1 - - * - value - - * - ``public String value`` - - Manually set the internal name used by Realm for this class. If this class is part of any modules, this will also override any name policy set using :ref:`RealmModule.classNamingPolicy() ` . - - - - - **Default:** - ``""`` - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.RealmNamingPolicy for more information about what setting the name means. ` - - - - - :ref:`name() ` - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/RealmField.txt b/source/sdk/temp/java/api/io/realm/annotations/RealmField.txt deleted file mode 100644 index 5d820c73a2..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/RealmField.txt +++ /dev/null @@ -1,153 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type RealmField -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_RealmField: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - -Annotation used on fields in Realm model classes. It describes metadata about the field. - - -Optional Element Summary -======================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Optional Element and Description - - * - public `String `__ - - - - Manually set the internal name used by Realm for this field. - - - - - * - public `String `__ - - - - Manually set the internal name used by Realm for this field. - - - - - - - -Element Detail -============== - -.. _name: - -.. _name__: - -.. _RealmField_name: - -.. _RealmField_name__: - -.. _io_realm_annotations_RealmField_name: - -.. _io_realm_annotations_RealmField_name__: - -.. list-table:: - :header-rows: 1 - - * - name - - * - ``public String name`` - - Manually set the internal name used by Realm for this field. This will override any :ref:`RealmNamingPolicy ` set on the class or the module. - - - - - **Default:** - ``""`` - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.RealmNamingPolicy for more information about what setting the name means. ` - - - - - - - - - - -.. _value: - -.. _value__: - -.. _RealmField_value: - -.. _RealmField_value__: - -.. _io_realm_annotations_RealmField_value: - -.. _io_realm_annotations_RealmField_value__: - -.. list-table:: - :header-rows: 1 - - * - value - - * - ``public String value`` - - Manually set the internal name used by Realm for this field. This will override any :ref:`RealmNamingPolicy ` set on the class or the module. - - - - - **Default:** - ``""`` - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.RealmNamingPolicy for more information about what setting the name means. ` - - - - - :ref:`name() ` - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/RealmModule.txt b/source/sdk/temp/java/api/io/realm/annotations/RealmModule.txt deleted file mode 100644 index 5afe5e39eb..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/RealmModule.txt +++ /dev/null @@ -1,315 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type RealmModule -^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_RealmModule: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - -By default a Realm can store all classes extending RealmObject in a project. However, if you want to restrict a Realm to only contain a subset of classes or want to share them between a library project and an app project, you must use a RealmModule.A RealmModule is a collection of classes extending RealmObject that can be combined with other RealmModules to create the schema for a Realm. This makes it easier to control versioning and migration of those Realms. - -A RealmModule can either be a library module or an app module. The distinction is made by setting ``library = true`` . Setting ``library = true`` is normally only relevant for library authors. See below for further details. - - - -Currently, it is not possible to have multiple RealmModule declarations in a single file. If you have more than one RealmModule, you will have to use separate Java files for each module. - - - -RealmModules and libraries -========================== - -Realms default behavior is to automatically create a RealmModule called ``DefaultRealmModule`` which contains all classes extending RealmObject in a project. This module is automatically known by Realm. - -This behavior is problematic when combining a library project and an app project that both uses Realm. This is because the ``DefaultRealmModule`` will be created for both the library project and the app project, which will cause the project to fail with duplicate class definition errors. - - - -Library authors are responsible for avoiding this conflict by using explicit modules where ``library = true`` is set. This disables the generation of the DefaultRealmModule for the library project and allows the library to be included in the app project that also uses Realm. This means that library projects that uses Realm internally are required to specify a specific module using ``RealmConfiguration.modules()`` . - - - -App developers are not required to specify any modules, as they implicitly use the ``DefaultRealmModule`` , but they now has the option of adding the library project classes to their schema using ``RealmConfiguration.addModule()`` . - - - - - - -.. seealso:: - - - - - `Example of a project using modules `__ - - - - - - - - - - -Optional Element Summary -======================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Optional Element and Description - - * - public **boolean** - - - - Instead of adding all Realm classes manually to a module, set this boolean to true to automatically include all Realm classes in this project. - - - - - * - public :ref:`RealmNamingPolicy ` - - - - The naming policy applied to all classes part of this module. - - - - - * - public `Class `__ - - - - Specifies the classes extending RealmObject that should be part of this module. - - - - - * - public :ref:`RealmNamingPolicy ` - - - - The naming policy applied to all field names in all classes part of this module. - - - - - * - public **boolean** - - - - Setting this to true will mark this module as a library module. - - - - - - - -Element Detail -============== - -.. _allClasses: - -.. _allClasses__: - -.. _RealmModule_allClasses: - -.. _RealmModule_allClasses__: - -.. _io_realm_annotations_RealmModule_allClasses: - -.. _io_realm_annotations_RealmModule_allClasses__: - -.. list-table:: - :header-rows: 1 - - * - allClasses - - * - ``public boolean allClasses`` - - Instead of adding all Realm classes manually to a module, set this boolean to true to automatically include all Realm classes in this project. This does not include classes from other libraries which must be exposed using their own module. Setting both ``allClasses = true`` and ``classes()`` will result in the annotation processor throwing an exception. - - - - - **Default:** - ``false`` - - - - -.. _classNamingPolicy: - -.. _classNamingPolicy__: - -.. _RealmModule_classNamingPolicy: - -.. _RealmModule_classNamingPolicy__: - -.. _io_realm_annotations_RealmModule_classNamingPolicy: - -.. _io_realm_annotations_RealmModule_classNamingPolicy__: - -.. list-table:: - :header-rows: 1 - - * - classNamingPolicy - - * - ``public RealmNamingPolicy classNamingPolicy`` - - The naming policy applied to all classes part of this module. The default policy is :ref:`RealmNamingPolicy.NO_POLICY ` . To define a naming policy for all fields in the classes, use :ref:`fieldNamingPolicy() ` . - - It is possible to override the naming policy specified in the module in each class using the :ref:`RealmClass ` annotation. - - - - If a class is part of multiple modules, the same naming policy must be applied to both modules, otherwise an error will be thrown. - - - - - **Default:** - ``io.realm.annotations.RealmNamingPolicy.NO_POLICY`` - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.RealmNamingPolicy for more information about what setting this policy means. ` - - - - - - - - - - -.. _classes: - -.. _classes__: - -.. _RealmModule_classes: - -.. _RealmModule_classes__: - -.. _io_realm_annotations_RealmModule_classes: - -.. _io_realm_annotations_RealmModule_classes__: - -.. list-table:: - :header-rows: 1 - - * - classes - - * - ``public Class classes`` - - Specifies the classes extending RealmObject that should be part of this module. Only classes in this project can be included. Classes from other libraries must be exposed using their own module. Setting both ``allClasses = true`` and ``classes()`` will result in the annotation processor throwing an exception. - - - - - **Default:** - ``{}`` - - - - -.. _fieldNamingPolicy: - -.. _fieldNamingPolicy__: - -.. _RealmModule_fieldNamingPolicy: - -.. _RealmModule_fieldNamingPolicy__: - -.. _io_realm_annotations_RealmModule_fieldNamingPolicy: - -.. _io_realm_annotations_RealmModule_fieldNamingPolicy__: - -.. list-table:: - :header-rows: 1 - - * - fieldNamingPolicy - - * - ``public RealmNamingPolicy fieldNamingPolicy`` - - The naming policy applied to all field names in all classes part of this module. The default policy is :ref:`RealmNamingPolicy.NO_POLICY ` . To define a naming policy for class names, use :ref:`classNamingPolicy() ` . - - It is possible to override this naming policy using either :ref:`RealmClass.fieldNamingPolicy() ` or :ref:`RealmField.name() ` . - - - - - - - **Default:** - ``io.realm.annotations.RealmNamingPolicy.NO_POLICY`` - - - - .. seealso:: - - - - - :ref:`io.realm.annotations.RealmNamingPolicy for more information about what setting this policy means. ` - - - - - - - - - - -.. _library: - -.. _library__: - -.. _RealmModule_library: - -.. _RealmModule_library__: - -.. _io_realm_annotations_RealmModule_library: - -.. _io_realm_annotations_RealmModule_library__: - -.. list-table:: - :header-rows: 1 - - * - library - - * - ``public boolean library`` - - Setting this to true will mark this module as a library module. This will prevent Realm from generating the ``DefaultRealmModule`` containing all classes. This is required by libraries so they do not interfere with Realms running in app code, but it also means that all libraries using Realm must explicitly use a module and cannot rely on the default module being present. Creating library modules and normal modules in the same project is not allowed and will result in the annotation processor throwing an exception. - - - - - **Default:** - ``false`` - - - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/RealmNamingPolicy.txt b/source/sdk/temp/java/api/io/realm/annotations/RealmNamingPolicy.txt deleted file mode 100644 index 94937d9bfd..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/RealmNamingPolicy.txt +++ /dev/null @@ -1,459 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum RealmNamingPolicy -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_RealmNamingPolicy: - - - -io.realm.annotations -==================== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.annotations.RealmNamingPolicy - - -This enum defines the possible ways class and field names can be mapped from what is used in Java to the name used internally in the Realm file.Examples where this is useful: - - - -- To support two model classes with the same simple name but in different packages. - - -- To make it easier to work with cross platform schemas as naming conventions are different. - - -- To use a Java class name that is longer than the 57 character limit enforced by Realm. - - -- To change a field name in Java without forcing app users through a migration process. - - - - -Depending on where the policy is applied, it will have slightly different semantics: - -- If applied to :ref:`RealmModule.classNamingPolicy ` all classes part of that module will be affected. If a class is part of multiple modules, the same naming policy must be applied to both modules, otherwise an error will be thrown. - - - - -- If applied to :ref:`RealmModule.fieldNamingPolicy ` all persistable fields in all classes part of this module will be affected. - - - - -- If applied to :ref:`RealmClass.fieldNamingPolicy ` all fields in that class will be affected. This will override any field naming policy specified on a module. - - - - - - -An example of this: - - - -.. code-block:: java - - - @RealmClass(name = "__person", fieldNamingPolicy = RealmNamingPolicy.LOWER_CASE_WITH_UNDERSCORES) - public class Person implements RealmModel { // is converted to "__person" internally - public string firstName; // Is converted to "first_name" internally - } - - - - - -Choosing an internal name that differs from the name used in the Java model classes has the following implications: - - - -- Queries on ``DynamicRealm`` must use the internal name. Queries on normal ``Realm`` instances must continue to use the name as it is defined in the Java class. - - - - -- Migrations must use the internal name when creating classes and fields. - - -- Schema errors reported will use the internal names. - - - - -When automatically converting Java variable names, each variable name is normalized by splitting it into a list of words that are then joined using the rules of the target format. The following heuristics are used for determining what constitutes a "word". - - - -1. Anytime a ``_`` or ``$`` is encountered. Examples are "_FirstName", "_First_Name" and "$First$Name" which all becomes "First" and "Name". - - - - -#. Anytime you switch from a lower case character to an upper case character as identified by `Character.isUpperCase(int) `__ and `Character.isLowerCase(int) `__ . Example is "FirstName" which becomes "First" and "Name". - - - - -#. Anytime you switch from more than one uppercase character to a lower case one. The last upper case letter is assumed to be part of the next word. This is identified by using `Character.isUpperCase(int) `__ and `Character.isLowerCase(int) `__ . Example is "FIRSTName" which becomes "FIRST" and "Name. - - - - -#. Some characters like emojiis are neither uppercase nor lowercase characters, so they will be part of the current word. Examples are "my😁" and "MY😁" which are both treated as one word. - - -#. Hungarian notation, i.e. variable names starting with lowercase "m" followed by uppercase letter is stripped and not considered part of any word. Example is "mFirstName" and "mFIRSTName" which becomes "First" and "Name. - - - - -Note that changing the internal name does *NOT* affect importing data from JSON. The JSON data must still follow the names as defined in the Realm Java class. - -When it comes to parsing JSON using standard libraries like Moshi, GSON or Jackson it is important to keep in mind that these libraries define the transformation from JSON to Java while setting internal Realm names define the transformation from Java to the Realm file. - -This means that if you want to import data into Realm from JSON using these libraries you still need to provide the annotations from both the JSON parser library and Realm. - -Using Moshi, it would look something like this: - - - -.. code-block:: java - - - public class Person extends RealmObject { - @Json(name = "first_name") // Name used in JSON input. - @RealmField(name = "first_name") // Name used internally in the Realm file. - public string firstName; // name used in Java - } - - - - - - - - -.. seealso:: - - - - - :ref:`RealmModule ` - - - - - :ref:`RealmClass ` - - - - - :ref:`RealmField ` - - - - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`CAMEL_CASE ` - - The name in the Java model class is converted to camelCase, i.e. - - - - - * - :ref:`IDENTITY ` - - The name in the Java model class is used as is internally. - - - - - * - :ref:`LOWER_CASE_WITH_UNDERSCORES ` - - The name in the Java model class is converted lowercase with each word separated by ``_`` . - - - - - - - * - :ref:`NO_POLICY ` - - No policy is applied. - - - - - * - :ref:`PASCAL_CASE ` - - The name in the Java model class is converted to PascalCase, i.e. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`RealmNamingPolicy ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`RealmNamingPolicy ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_annotations_RealmNamingPolicy_CAMEL_CASE: - -.. _RealmNamingPolicy_CAMEL_CASE: - - - -``CAMEL_CASE`` ---------------- - -public static final :ref:`RealmNamingPolicy ` - -The name in the Java model class is converted to camelCase, i.e. all words are joined together with the first letter in the first word lower cased, and the first letter of all subsequent words upper cased. This is the standard naming schema in Java, Kotlin, Swift and JavaScript.Examples: "firstName", "FirstName", "mFirstName", "FIRST_NAME", "First$Name" all becomes "firstName". - - - - - -.. _io_realm_annotations_RealmNamingPolicy_IDENTITY: - -.. _RealmNamingPolicy_IDENTITY: - - - -``IDENTITY`` -------------- - -public static final :ref:`RealmNamingPolicy ` - -The name in the Java model class is used as is internally. - - - -.. _io_realm_annotations_RealmNamingPolicy_LOWER_CASE_WITH_UNDERSCORES: - -.. _RealmNamingPolicy_LOWER_CASE_WITH_UNDERSCORES: - - - -``LOWER_CASE_WITH_UNDERSCORES`` --------------------------------- - -public static final :ref:`RealmNamingPolicy ` - -The name in the Java model class is converted lowercase with each word separated by ``_`` . This is the default naming scheme in C++. - -Examples: "firstName", "FirstName", "mFirstName", "FIRST_NAME", "First$Name" all becomes "first_name". - - - - - -.. _io_realm_annotations_RealmNamingPolicy_NO_POLICY: - -.. _RealmNamingPolicy_NO_POLICY: - - - -``NO_POLICY`` --------------- - -public static final :ref:`RealmNamingPolicy ` - -No policy is applied. This policy will not override any policy set on a parent element, e.g. if set in :ref:`RealmClass.fieldNamingPolicy ` , the module policy will still apply to field names. - -If two modules disagree on the policy and one of them is ``NO_POLICY`` , the other will be chosen without an error being thrown. - - - -This policy is the default. - - - - - -.. _io_realm_annotations_RealmNamingPolicy_PASCAL_CASE: - -.. _RealmNamingPolicy_PASCAL_CASE: - - - -``PASCAL_CASE`` ----------------- - -public static final :ref:`RealmNamingPolicy ` - -The name in the Java model class is converted to PascalCase, i.e. all words are joined together with the first letter of all words upper cased. This is the default naming scheme in .NET.Examples: "firstName", "FirstName", "mFirstName", "FIRST_NAME", "First$Name" all becomes "FirstName". - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _RealmNamingPolicy_valueOf: - -.. _RealmNamingPolicy_valueOf__: - -.. _io_realm_annotations_RealmNamingPolicy_valueOf: - -.. _io_realm_annotations_RealmNamingPolicy_valueOf__: - - - -valueOf -------- - -.. _io_realm_annotations_RealmNamingPolicy_valueOf_java_lang_String_: - -.. _io_realm_annotations_RealmNamingPolicy_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _RealmNamingPolicy_valueOf_java_lang_String_: - -.. _RealmNamingPolicy_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmNamingPolicy ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _RealmNamingPolicy_values: - -.. _RealmNamingPolicy_values__: - -.. _io_realm_annotations_RealmNamingPolicy_values: - -.. _io_realm_annotations_RealmNamingPolicy_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmNamingPolicy ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/annotations/Required.txt b/source/sdk/temp/java/api/io/realm/annotations/Required.txt deleted file mode 100644 index 09f4ca6490..0000000000 --- a/source/sdk/temp/java/api/io/realm/annotations/Required.txt +++ /dev/null @@ -1,50 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Annotation Type Required -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_annotations_Required: - - - -io.realm.annotations -==================== - -**Implemented interfaces:** - - - -- `java.lang.annotation.Annotation `__ - - -This annotation will mark the field or the element in ``io.realm.RealmList`` as not nullable. - -When a field of type ``Boolean, Byte, Short, Integer, Long, Float, Double, String, byte[], Date`` is annotated with :ref:`Required ` , it cannot be set to ``null`` and Realm will throw an exception if it happens. - - - -Fields with primitive types are implicitly required. Note, ``String`` is not a primitive type, so in Java it is default nullable unless it is marked ``@Required`` . In Kotlin the reverse is true, so a ``String`` is non-null. To specify a nullable String in Kotlin you should use ``String?`` . - - - -If this annotation is used on a ``RealmList`` , the annotation is applied to the elements inside the list and not the list itself. The list itself is always non-null. This means that a list marked with this annotation are never allowed to hold ``null`` values even if the datatype would otherwise allow it. Realm will throw an exception if you attempt to store null values into a list marked ``@Required`` . - - - -This annotation cannot be used on a ``RealmAny`` , as the inner value of a RealmAny field is always nullable. Realm will throw an exception if you attempt mark a ``RealmAny`` as ``@Required`` . - - - -Compiling will fail if the :ref:`Required ` annotation is put an a ``RealmList`` containing references to other Realm objects. - - - - - diff --git a/source/sdk/temp/java/api/io/realm/coroutines.txt b/source/sdk/temp/java/api/io/realm/coroutines.txt deleted file mode 100644 index 733e3ab173..0000000000 --- a/source/sdk/temp/java/api/io/realm/coroutines.txt +++ /dev/null @@ -1,29 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.coroutines -^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - FlowFactory - RealmFlowFactory - - - -| - -- :ref:`io.realm.coroutines.FlowFactory ` -- :ref:`io.realm.coroutines.RealmFlowFactory ` - - - diff --git a/source/sdk/temp/java/api/io/realm/coroutines/FlowFactory.txt b/source/sdk/temp/java/api/io/realm/coroutines/FlowFactory.txt deleted file mode 100644 index f381c8c8b2..0000000000 --- a/source/sdk/temp/java/api/io/realm/coroutines/FlowFactory.txt +++ /dev/null @@ -1,1630 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface FlowFactory -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_coroutines_FlowFactory: - - - -io.realm.coroutines -=================== - -Factory interface for creating Kotlin **Flow**s for Realm classes. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **** - - | :ref:`changesetFrom ` ( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`DynamicRealmObject ` dynamicRealmObject - | ) - - - Creates a **Flow** for a :ref:`DynamicRealmObject ` . - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | **T** realmObject - | ) - - - Creates a **Flow** for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates a **Flow** for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates a **Flow** for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a **Flow** for a :ref:`RealmResults ` instance. - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a **Flow** for a :ref:`RealmResults ` instance. - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`DynamicRealmObject ` dynamicRealmObject - | ) - - - Creates a **Flow** for a :ref:`DynamicRealmObject ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | **T** realmObject - | ) - - - Creates a **Flow** for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmList\ ` realmList - | ) - - - Creates a **Flow** for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` realmList - | ) - - - Creates a **Flow** for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a **Flow** for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a **Flow** for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`DynamicRealm ` dynamicRealm - | ) - - - Creates a **Flow** for a :ref:`DynamicRealm ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`Realm ` realm - | ) - - - Creates a **Flow** for a :ref:`Realm ` . - - - - - - - - - -Method Detail -============= - -.. _changesetFrom: - -.. _changesetFrom__: - -.. _FlowFactory_changesetFrom: - -.. _FlowFactory_changesetFrom__: - -.. _io_realm_coroutines_FlowFactory_changesetFrom: - -.. _io_realm_coroutines_FlowFactory_changesetFrom__: - - - -changesetFrom -------------- - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm__DynamicRealmObject_: - -.. _changesetFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _changesetFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _changesetFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _changesetFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _changesetFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _changesetFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _changesetFrom_DynamicRealm_DynamicRealmObject_: - -.. _changesetFrom_DynamicRealm__DynamicRealmObject_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _FlowFactory_changesetFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _FlowFactory_changesetFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _FlowFactory_changesetFrom_DynamicRealm_DynamicRealmObject_: - -.. _FlowFactory_changesetFrom_DynamicRealm__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` ( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`DynamicRealmObject ` dynamicRealmObject - | ) - - - - - * - Creates a **Flow** for a :ref:`DynamicRealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object plus the :ref:`io.realm.ObjectChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - **Parameters** - - - ``dynamicRealm`` - :ref:`DynamicRealm ` instance from where the object is coming. - - - - - - - ``dynamicRealmObject`` - :ref:`DynamicRealmObject ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the DynamicRealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm_T_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm__T_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm_RealmModel_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm__RealmModel_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm_T_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm__T_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm_RealmModel_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm__RealmModel_: - -.. _changesetFrom_io_realm_Realm_T_: - -.. _changesetFrom_io_realm_Realm__T_: - -.. _changesetFrom_io_realm_Realm_RealmModel_: - -.. _changesetFrom_io_realm_Realm__RealmModel_: - -.. _changesetFrom_Realm_T_: - -.. _changesetFrom_Realm__T_: - -.. _changesetFrom_Realm_RealmModel_: - -.. _changesetFrom_Realm__RealmModel_: - -.. _FlowFactory_changesetFrom_io_realm_Realm_T_: - -.. _FlowFactory_changesetFrom_io_realm_Realm__T_: - -.. _FlowFactory_changesetFrom_io_realm_Realm_RealmModel_: - -.. _FlowFactory_changesetFrom_io_realm_Realm__RealmModel_: - -.. _FlowFactory_changesetFrom_Realm_T_: - -.. _FlowFactory_changesetFrom_Realm__T_: - -.. _FlowFactory_changesetFrom_Realm_RealmModel_: - -.. _FlowFactory_changesetFrom_Realm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | **T** realmObject - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object plus the :ref:`io.realm.ObjectChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - **Parameters** - - - ``realm`` - :ref:`Realm ` instance from where the object is coming. - - - - - - - ``realmObject`` - :ref:`RealmObject ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the DynamicRealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm__RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm__RealmList_: - -.. _changesetFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _changesetFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _changesetFrom_io_realm_DynamicRealm_RealmList_: - -.. _changesetFrom_io_realm_DynamicRealm__RealmList_: - -.. _changesetFrom_DynamicRealm_io_realm_RealmList_: - -.. _changesetFrom_DynamicRealm__io_realm_RealmList_: - -.. _changesetFrom_DynamicRealm_RealmList_: - -.. _changesetFrom_DynamicRealm__RealmList_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm_RealmList_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm__RealmList_: - -.. _FlowFactory_changesetFrom_DynamicRealm_io_realm_RealmList_: - -.. _FlowFactory_changesetFrom_DynamicRealm__io_realm_RealmList_: - -.. _FlowFactory_changesetFrom_DynamicRealm_RealmList_: - -.. _FlowFactory_changesetFrom_DynamicRealm__RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmList ` . It should emit the initial list when subscribed to and on each subsequent update of the list it should emit the list plus the :ref:`io.realm.rx.CollectionChange ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - **Parameters** - - - ``dynamicRealm`` - :ref:`DynamicRealm ` instance from where the object is coming. - - - - - - - ``list`` - :ref:`RealmList ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmList. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm_io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm__io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm__RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm_io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm__io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm__RealmList_: - -.. _changesetFrom_io_realm_Realm_io_realm_RealmList_: - -.. _changesetFrom_io_realm_Realm__io_realm_RealmList_: - -.. _changesetFrom_io_realm_Realm_RealmList_: - -.. _changesetFrom_io_realm_Realm__RealmList_: - -.. _changesetFrom_Realm_io_realm_RealmList_: - -.. _changesetFrom_Realm__io_realm_RealmList_: - -.. _changesetFrom_Realm_RealmList_: - -.. _changesetFrom_Realm__RealmList_: - -.. _FlowFactory_changesetFrom_io_realm_Realm_io_realm_RealmList_: - -.. _FlowFactory_changesetFrom_io_realm_Realm__io_realm_RealmList_: - -.. _FlowFactory_changesetFrom_io_realm_Realm_RealmList_: - -.. _FlowFactory_changesetFrom_io_realm_Realm__RealmList_: - -.. _FlowFactory_changesetFrom_Realm_io_realm_RealmList_: - -.. _FlowFactory_changesetFrom_Realm__io_realm_RealmList_: - -.. _FlowFactory_changesetFrom_Realm_RealmList_: - -.. _FlowFactory_changesetFrom_Realm__RealmList_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmList ` . It should emit the initial list when subscribed to and on each subsequent update of the list it should emit the list plus the :ref:`io.realm.rx.CollectionChange ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - **Parameters** - - - ``realm`` - :ref:`Realm ` instance from where the object is coming. - - - - - - - ``list`` - :ref:`RealmList ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmList. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_DynamicRealm__RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm__RealmResults_: - -.. _changesetFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _changesetFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _changesetFrom_io_realm_DynamicRealm_RealmResults_: - -.. _changesetFrom_io_realm_DynamicRealm__RealmResults_: - -.. _changesetFrom_DynamicRealm_io_realm_RealmResults_: - -.. _changesetFrom_DynamicRealm__io_realm_RealmResults_: - -.. _changesetFrom_DynamicRealm_RealmResults_: - -.. _changesetFrom_DynamicRealm__RealmResults_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm_RealmResults_: - -.. _FlowFactory_changesetFrom_io_realm_DynamicRealm__RealmResults_: - -.. _FlowFactory_changesetFrom_DynamicRealm_io_realm_RealmResults_: - -.. _FlowFactory_changesetFrom_DynamicRealm__io_realm_RealmResults_: - -.. _FlowFactory_changesetFrom_DynamicRealm_RealmResults_: - -.. _FlowFactory_changesetFrom_DynamicRealm__RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_DynamicRealm__RealmResults_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmResults ` instance. It should emit the initial results when subscribed to and on each subsequent update of the results it should emit the results plus the :ref:`io.realm.rx.CollectionChange ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - **Parameters** - - - ``dynamicRealm`` - :ref:`DynamicRealm ` instance from where the object is coming. - - - - - - - ``results`` - :ref:`RealmResults ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmResults. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_io_realm_Realm__RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm_io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm__io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm__RealmResults_: - -.. _changesetFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _changesetFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _changesetFrom_io_realm_Realm_RealmResults_: - -.. _changesetFrom_io_realm_Realm__RealmResults_: - -.. _changesetFrom_Realm_io_realm_RealmResults_: - -.. _changesetFrom_Realm__io_realm_RealmResults_: - -.. _changesetFrom_Realm_RealmResults_: - -.. _changesetFrom_Realm__RealmResults_: - -.. _FlowFactory_changesetFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _FlowFactory_changesetFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _FlowFactory_changesetFrom_io_realm_Realm_RealmResults_: - -.. _FlowFactory_changesetFrom_io_realm_Realm__RealmResults_: - -.. _FlowFactory_changesetFrom_Realm_io_realm_RealmResults_: - -.. _FlowFactory_changesetFrom_Realm__io_realm_RealmResults_: - -.. _FlowFactory_changesetFrom_Realm_RealmResults_: - -.. _FlowFactory_changesetFrom_Realm__RealmResults_: - -.. _io_realm_coroutines_FlowFactory_changesetFrom_Realm__RealmResults_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmResults ` instance. It should emit the initial results when subscribed to and on each subsequent update of the results it should emit the results plus the :ref:`io.realm.rx.CollectionChange ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - **Parameters** - - - ``realm`` - :ref:`Realm ` instance from where the object is coming. - - - - - - - ``results`` - :ref:`RealmResults ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmResults. - - - - - - - - - - - - - -.. _from: - -.. _from__: - -.. _FlowFactory_from: - -.. _FlowFactory_from__: - -.. _io_realm_coroutines_FlowFactory_from: - -.. _io_realm_coroutines_FlowFactory_from__: - - - -from ----- - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm__DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _from_DynamicRealm_DynamicRealmObject_: - -.. _from_DynamicRealm__DynamicRealmObject_: - -.. _FlowFactory_from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _FlowFactory_from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _FlowFactory_from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _FlowFactory_from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _FlowFactory_from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _FlowFactory_from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _FlowFactory_from_DynamicRealm_DynamicRealmObject_: - -.. _FlowFactory_from_DynamicRealm__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`DynamicRealmObject ` dynamicRealmObject - | ) - - - - - * - Creates a **Flow** for a :ref:`DynamicRealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object. - - - - - - - **Parameters** - - - ``dynamicRealm`` - :ref:`DynamicRealm ` instance from where the object is coming. - - - - - - - ``dynamicRealmObject`` - :ref:`DynamicRealmObject ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the DynamicRealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm_T_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm__T_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm_RealmModel_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm__RealmModel_: - -.. _io_realm_coroutines_FlowFactory_from_Realm_T_: - -.. _io_realm_coroutines_FlowFactory_from_Realm__T_: - -.. _io_realm_coroutines_FlowFactory_from_Realm_RealmModel_: - -.. _io_realm_coroutines_FlowFactory_from_Realm__RealmModel_: - -.. _from_io_realm_Realm_T_: - -.. _from_io_realm_Realm__T_: - -.. _from_io_realm_Realm_RealmModel_: - -.. _from_io_realm_Realm__RealmModel_: - -.. _from_Realm_T_: - -.. _from_Realm__T_: - -.. _from_Realm_RealmModel_: - -.. _from_Realm__RealmModel_: - -.. _FlowFactory_from_io_realm_Realm_T_: - -.. _FlowFactory_from_io_realm_Realm__T_: - -.. _FlowFactory_from_io_realm_Realm_RealmModel_: - -.. _FlowFactory_from_io_realm_Realm__RealmModel_: - -.. _FlowFactory_from_Realm_T_: - -.. _FlowFactory_from_Realm__T_: - -.. _FlowFactory_from_Realm_RealmModel_: - -.. _FlowFactory_from_Realm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | **T** realmObject - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object. - - - - - **Type Parameters** - - - ``T`` - type of query target - - - - - - - - **Parameters** - - - ``realmObject`` - :ref:`RealmObject ` instance being observed for changes to be emitted by the flow. - - - - - - - ``realm`` - :ref:`Realm ` instance from where the object is coming. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the DynamicRealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm__RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm__RealmList_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _from_io_realm_DynamicRealm_RealmList_: - -.. _from_io_realm_DynamicRealm__RealmList_: - -.. _from_DynamicRealm_io_realm_RealmList_: - -.. _from_DynamicRealm__io_realm_RealmList_: - -.. _from_DynamicRealm_RealmList_: - -.. _from_DynamicRealm__RealmList_: - -.. _FlowFactory_from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _FlowFactory_from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _FlowFactory_from_io_realm_DynamicRealm_RealmList_: - -.. _FlowFactory_from_io_realm_DynamicRealm__RealmList_: - -.. _FlowFactory_from_DynamicRealm_io_realm_RealmList_: - -.. _FlowFactory_from_DynamicRealm__io_realm_RealmList_: - -.. _FlowFactory_from_DynamicRealm_RealmList_: - -.. _FlowFactory_from_DynamicRealm__RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmList\ ` realmList - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmList ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmList. - - Note: :ref:`io.realm.RealmChangeListener ` is currently not supported on RealmLists. - - - - - - - **Type Parameters** - - - ``T`` - type of RealmObject - - - - - - - - **Parameters** - - - ``realmList`` - :ref:`RealmList ` instance being observed for changes to be emitted by the flow. - - - - - - - ``dynamicRealm`` - :ref:`DynamicRealm ` instance from where the results are coming. - - - - - - - - - - **Returns** - - **Flow** that emit all updates to the RealmList. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm_io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm__io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm__RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_Realm_io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_Realm__io_realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_Realm_RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_Realm__RealmList_: - -.. _from_io_realm_Realm_io_realm_RealmList_: - -.. _from_io_realm_Realm__io_realm_RealmList_: - -.. _from_io_realm_Realm_RealmList_: - -.. _from_io_realm_Realm__RealmList_: - -.. _from_Realm_io_realm_RealmList_: - -.. _from_Realm__io_realm_RealmList_: - -.. _from_Realm_RealmList_: - -.. _from_Realm__RealmList_: - -.. _FlowFactory_from_io_realm_Realm_io_realm_RealmList_: - -.. _FlowFactory_from_io_realm_Realm__io_realm_RealmList_: - -.. _FlowFactory_from_io_realm_Realm_RealmList_: - -.. _FlowFactory_from_io_realm_Realm__RealmList_: - -.. _FlowFactory_from_Realm_io_realm_RealmList_: - -.. _FlowFactory_from_Realm__io_realm_RealmList_: - -.. _FlowFactory_from_Realm_RealmList_: - -.. _FlowFactory_from_Realm__RealmList_: - -.. _io_realm_coroutines_FlowFactory_from_Realm__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` realmList - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmList ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmList. - - Note: :ref:`io.realm.RealmChangeListener ` is currently not supported on RealmLists. - - - - - - - **Type Parameters** - - - ``T`` - type of RealmObject - - - - - - - - **Parameters** - - - ``realmList`` - :ref:`RealmList ` instance being observed for changes to be emitted by the flow. - - - - - - - ``realm`` - :ref:`Realm ` instance from where the results are coming. - - - - - - - - - - **Returns** - - **Flow** that emit all updates to the RealmList. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm__RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm__RealmResults_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _from_io_realm_DynamicRealm_RealmResults_: - -.. _from_io_realm_DynamicRealm__RealmResults_: - -.. _from_DynamicRealm_io_realm_RealmResults_: - -.. _from_DynamicRealm__io_realm_RealmResults_: - -.. _from_DynamicRealm_RealmResults_: - -.. _from_DynamicRealm__RealmResults_: - -.. _FlowFactory_from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _FlowFactory_from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _FlowFactory_from_io_realm_DynamicRealm_RealmResults_: - -.. _FlowFactory_from_io_realm_DynamicRealm__RealmResults_: - -.. _FlowFactory_from_DynamicRealm_io_realm_RealmResults_: - -.. _FlowFactory_from_DynamicRealm__io_realm_RealmResults_: - -.. _FlowFactory_from_DynamicRealm_RealmResults_: - -.. _FlowFactory_from_DynamicRealm__RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm__RealmResults_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults. - - - - - **Type Parameters** - - - ``T`` - type of RealmObject. - - - - - - - - **Parameters** - - - ``results`` - :ref:`RealmResults ` instance being observed for changes to be emitted by the flow. - - - - - - - ``dynamicRealm`` - :ref:`DynamicRealm ` instance from where the results are coming. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm_io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm__io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm__RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_Realm_io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_Realm__io_realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_Realm_RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_Realm__RealmResults_: - -.. _from_io_realm_Realm_io_realm_RealmResults_: - -.. _from_io_realm_Realm__io_realm_RealmResults_: - -.. _from_io_realm_Realm_RealmResults_: - -.. _from_io_realm_Realm__RealmResults_: - -.. _from_Realm_io_realm_RealmResults_: - -.. _from_Realm__io_realm_RealmResults_: - -.. _from_Realm_RealmResults_: - -.. _from_Realm__RealmResults_: - -.. _FlowFactory_from_io_realm_Realm_io_realm_RealmResults_: - -.. _FlowFactory_from_io_realm_Realm__io_realm_RealmResults_: - -.. _FlowFactory_from_io_realm_Realm_RealmResults_: - -.. _FlowFactory_from_io_realm_Realm__RealmResults_: - -.. _FlowFactory_from_Realm_io_realm_RealmResults_: - -.. _FlowFactory_from_Realm__io_realm_RealmResults_: - -.. _FlowFactory_from_Realm_RealmResults_: - -.. _FlowFactory_from_Realm__RealmResults_: - -.. _io_realm_coroutines_FlowFactory_from_Realm__RealmResults_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults. - - - - - **Type Parameters** - - - ``T`` - type of RealmObject. - - - - - - - - **Parameters** - - - ``results`` - :ref:`RealmResults ` instance being observed for changes to be emitted by the flow. - - - - - - - ``realm`` - :ref:`Realm ` instance from where the results are coming. - - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_from_io_realm_DynamicRealm_: - -.. _io_realm_coroutines_FlowFactory_from_DynamicRealm_: - -.. _from_io_realm_DynamicRealm_: - -.. _from_DynamicRealm_: - -.. _FlowFactory_from_io_realm_DynamicRealm_: - -.. _FlowFactory_from_DynamicRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`DynamicRealm ` dynamicRealm - | ) - - - - - * - Creates a **Flow** for a :ref:`DynamicRealm ` . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm. - - - - - - - **Parameters** - - - ``dynamicRealm`` - :ref:`DynamicRealm ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - Flow that emits all updates to the Realm. - - - - - - - - - -.. _io_realm_coroutines_FlowFactory_from_io_realm_Realm_: - -.. _io_realm_coroutines_FlowFactory_from_Realm_: - -.. _from_io_realm_Realm_: - -.. _from_Realm_: - -.. _FlowFactory_from_io_realm_Realm_: - -.. _FlowFactory_from_Realm_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`Realm ` realm - | ) - - - - - * - Creates a **Flow** for a :ref:`Realm ` . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm. - - - - - - - **Parameters** - - - ``realm`` - :ref:`Realm ` instance being observed for changes to be emitted by the flow. - - - - - - - - - - **Returns** - - Flow that emits all updates to the Realm. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/coroutines/RealmFlowFactory.txt b/source/sdk/temp/java/api/io/realm/coroutines/RealmFlowFactory.txt deleted file mode 100644 index 3e03c12fd5..0000000000 --- a/source/sdk/temp/java/api/io/realm/coroutines/RealmFlowFactory.txt +++ /dev/null @@ -1,1468 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmFlowFactory -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_coroutines_RealmFlowFactory: - - - -io.realm.coroutines -=================== - - - | `java.lang.Object `__ - | io.realm.coroutines.RealmFlowFactory - - -**Implemented interfaces:** - - - -- :ref:`io.realm.coroutines.FlowFactory ` - - -Factory class used to create coroutine **Flow**s. - -This class is used by default unless overridden in :ref:`io.realm.RealmConfiguration.Builder.flowFactory(FlowFactory) ` . - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmFlowFactory ` ( - | `Boolean `__ returnFrozenObjects - | ) - - - Constructor for the Flow factory. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **** - - | :ref:`changesetFrom ` ( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`DynamicRealmObject ` dynamicRealmObject - | ) - - - Creates a **Flow** for a :ref:`DynamicRealmObject ` . - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | **T** realmObject - | ) - - - Creates a **Flow** for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates a **Flow** for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates a **Flow** for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a **Flow** for a :ref:`RealmResults ` instance. - - - - - - - * - public **** - - | :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a **Flow** for a :ref:`RealmResults ` instance. - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`DynamicRealmObject ` dynamicRealmObject - | ) - - - Creates a **Flow** for a :ref:`DynamicRealmObject ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | **T** realmObject - | ) - - - Creates a **Flow** for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmList\ ` realmList - | ) - - - Creates a **Flow** for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` realmList - | ) - - - Creates a **Flow** for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a **Flow** for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a **Flow** for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`DynamicRealm ` dynamicRealm - | ) - - - Creates a **Flow** for a :ref:`DynamicRealm ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`Realm ` realm - | ) - - - Creates a **Flow** for a :ref:`Realm ` . - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _RealmFlowFactory: - -.. _RealmFlowFactory__: - -.. _io_realm_coroutines_RealmFlowFactory: - -.. _io_realm_coroutines_RealmFlowFactory__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFlowFactory ` ( - | `Boolean `__ returnFrozenObjects - | ) - - - - - * - Constructor for the Flow factory. - - - - - **Parameters** - - - ``returnFrozenObjects`` - whether the emissions should return frozen objects or not. - - - - - - - - - - - - - - -Method Detail -============= - -.. _changesetFrom: - -.. _changesetFrom__: - -.. _RealmFlowFactory_changesetFrom: - -.. _RealmFlowFactory_changesetFrom__: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom__: - - - -changesetFrom -------------- - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm__DynamicRealmObject_: - -.. _changesetFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _changesetFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _changesetFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _changesetFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _changesetFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _changesetFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _changesetFrom_DynamicRealm_DynamicRealmObject_: - -.. _changesetFrom_DynamicRealm__DynamicRealmObject_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm_DynamicRealmObject_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` ( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`DynamicRealmObject ` dynamicRealmObject - | ) - - - - - * - Creates a **Flow** for a :ref:`DynamicRealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object plus the :ref:`io.realm.ObjectChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the DynamicRealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm_T_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm__T_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm_RealmModel_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm__RealmModel_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm_T_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm__T_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm_RealmModel_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm__RealmModel_: - -.. _changesetFrom_io_realm_Realm_T_: - -.. _changesetFrom_io_realm_Realm__T_: - -.. _changesetFrom_io_realm_Realm_RealmModel_: - -.. _changesetFrom_io_realm_Realm__RealmModel_: - -.. _changesetFrom_Realm_T_: - -.. _changesetFrom_Realm__T_: - -.. _changesetFrom_Realm_RealmModel_: - -.. _changesetFrom_Realm__RealmModel_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm_T_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm__T_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm_RealmModel_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm__RealmModel_: - -.. _RealmFlowFactory_changesetFrom_Realm_T_: - -.. _RealmFlowFactory_changesetFrom_Realm__T_: - -.. _RealmFlowFactory_changesetFrom_Realm_RealmModel_: - -.. _RealmFlowFactory_changesetFrom_Realm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | **T** realmObject - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object plus the :ref:`io.realm.ObjectChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the DynamicRealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm__RealmList_: - -.. _changesetFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _changesetFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _changesetFrom_io_realm_DynamicRealm_RealmList_: - -.. _changesetFrom_io_realm_DynamicRealm__RealmList_: - -.. _changesetFrom_DynamicRealm_io_realm_RealmList_: - -.. _changesetFrom_DynamicRealm__io_realm_RealmList_: - -.. _changesetFrom_DynamicRealm_RealmList_: - -.. _changesetFrom_DynamicRealm__RealmList_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__RealmList_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm_io_realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm__io_realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm__RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmList ` . It should emit the initial list when subscribed to and on each subsequent update of the list it should emit the list plus the :ref:`io.realm.rx.CollectionChange ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmList. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm_io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm__io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm__RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm_io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm__io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm__RealmList_: - -.. _changesetFrom_io_realm_Realm_io_realm_RealmList_: - -.. _changesetFrom_io_realm_Realm__io_realm_RealmList_: - -.. _changesetFrom_io_realm_Realm_RealmList_: - -.. _changesetFrom_io_realm_Realm__RealmList_: - -.. _changesetFrom_Realm_io_realm_RealmList_: - -.. _changesetFrom_Realm__io_realm_RealmList_: - -.. _changesetFrom_Realm_RealmList_: - -.. _changesetFrom_Realm__RealmList_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm_io_realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm__io_realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm__RealmList_: - -.. _RealmFlowFactory_changesetFrom_Realm_io_realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_Realm__io_realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_Realm_RealmList_: - -.. _RealmFlowFactory_changesetFrom_Realm__RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmList ` . It should emit the initial list when subscribed to and on each subsequent update of the list it should emit the list plus the :ref:`io.realm.rx.CollectionChange ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmList. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm__RealmResults_: - -.. _changesetFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _changesetFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _changesetFrom_io_realm_DynamicRealm_RealmResults_: - -.. _changesetFrom_io_realm_DynamicRealm__RealmResults_: - -.. _changesetFrom_DynamicRealm_io_realm_RealmResults_: - -.. _changesetFrom_DynamicRealm__io_realm_RealmResults_: - -.. _changesetFrom_DynamicRealm_RealmResults_: - -.. _changesetFrom_DynamicRealm__RealmResults_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_io_realm_DynamicRealm__RealmResults_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm_io_realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm__io_realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_DynamicRealm__RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_DynamicRealm__RealmResults_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmResults ` instance. It should emit the initial results when subscribed to and on each subsequent update of the results it should emit the results plus the :ref:`io.realm.rx.CollectionChange ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmResults. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_io_realm_Realm__RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm_io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm__io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm__RealmResults_: - -.. _changesetFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _changesetFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _changesetFrom_io_realm_Realm_RealmResults_: - -.. _changesetFrom_io_realm_Realm__RealmResults_: - -.. _changesetFrom_Realm_io_realm_RealmResults_: - -.. _changesetFrom_Realm__io_realm_RealmResults_: - -.. _changesetFrom_Realm_RealmResults_: - -.. _changesetFrom_Realm__RealmResults_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_io_realm_Realm__RealmResults_: - -.. _RealmFlowFactory_changesetFrom_Realm_io_realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_Realm__io_realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_Realm_RealmResults_: - -.. _RealmFlowFactory_changesetFrom_Realm__RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_changesetFrom_Realm__RealmResults_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetFrom ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmResults ` instance. It should emit the initial results when subscribed to and on each subsequent update of the results it should emit the results plus the :ref:`io.realm.rx.CollectionChange ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmResults. - - - - - - - - - - - - - -.. _from: - -.. _from__: - -.. _RealmFlowFactory_from: - -.. _RealmFlowFactory_from__: - -.. _io_realm_coroutines_RealmFlowFactory_from: - -.. _io_realm_coroutines_RealmFlowFactory_from__: - - - -from ----- - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm__DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _from_DynamicRealm_DynamicRealmObject_: - -.. _from_DynamicRealm__DynamicRealmObject_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _RealmFlowFactory_from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RealmFlowFactory_from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RealmFlowFactory_from_DynamicRealm_DynamicRealmObject_: - -.. _RealmFlowFactory_from_DynamicRealm__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`DynamicRealmObject ` dynamicRealmObject - | ) - - - - - * - Creates a **Flow** for a :ref:`DynamicRealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the DynamicRealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm_T_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm__T_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm_RealmModel_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm__RealmModel_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm_T_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm__T_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm_RealmModel_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm__RealmModel_: - -.. _from_io_realm_Realm_T_: - -.. _from_io_realm_Realm__T_: - -.. _from_io_realm_Realm_RealmModel_: - -.. _from_io_realm_Realm__RealmModel_: - -.. _from_Realm_T_: - -.. _from_Realm__T_: - -.. _from_Realm_RealmModel_: - -.. _from_Realm__RealmModel_: - -.. _RealmFlowFactory_from_io_realm_Realm_T_: - -.. _RealmFlowFactory_from_io_realm_Realm__T_: - -.. _RealmFlowFactory_from_io_realm_Realm_RealmModel_: - -.. _RealmFlowFactory_from_io_realm_Realm__RealmModel_: - -.. _RealmFlowFactory_from_Realm_T_: - -.. _RealmFlowFactory_from_Realm__T_: - -.. _RealmFlowFactory_from_Realm_RealmModel_: - -.. _RealmFlowFactory_from_Realm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | **T** realmObject - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the DynamicRealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm__RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm__RealmList_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _from_io_realm_DynamicRealm_RealmList_: - -.. _from_io_realm_DynamicRealm__RealmList_: - -.. _from_DynamicRealm_io_realm_RealmList_: - -.. _from_DynamicRealm__io_realm_RealmList_: - -.. _from_DynamicRealm_RealmList_: - -.. _from_DynamicRealm__RealmList_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm_RealmList_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm__RealmList_: - -.. _RealmFlowFactory_from_DynamicRealm_io_realm_RealmList_: - -.. _RealmFlowFactory_from_DynamicRealm__io_realm_RealmList_: - -.. _RealmFlowFactory_from_DynamicRealm_RealmList_: - -.. _RealmFlowFactory_from_DynamicRealm__RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmList\ ` realmList - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmList ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmList. - - Note: :ref:`io.realm.RealmChangeListener ` is currently not supported on RealmLists. - - - - - - - - - - - **Returns** - - **Flow** that emit all updates to the RealmList. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm_io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm__io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm__RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm_io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm__io_realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm_RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm__RealmList_: - -.. _from_io_realm_Realm_io_realm_RealmList_: - -.. _from_io_realm_Realm__io_realm_RealmList_: - -.. _from_io_realm_Realm_RealmList_: - -.. _from_io_realm_Realm__RealmList_: - -.. _from_Realm_io_realm_RealmList_: - -.. _from_Realm__io_realm_RealmList_: - -.. _from_Realm_RealmList_: - -.. _from_Realm__RealmList_: - -.. _RealmFlowFactory_from_io_realm_Realm_io_realm_RealmList_: - -.. _RealmFlowFactory_from_io_realm_Realm__io_realm_RealmList_: - -.. _RealmFlowFactory_from_io_realm_Realm_RealmList_: - -.. _RealmFlowFactory_from_io_realm_Realm__RealmList_: - -.. _RealmFlowFactory_from_Realm_io_realm_RealmList_: - -.. _RealmFlowFactory_from_Realm__io_realm_RealmList_: - -.. _RealmFlowFactory_from_Realm_RealmList_: - -.. _RealmFlowFactory_from_Realm__RealmList_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm__RealmList_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` realmList - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmList ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmList. - - Note: :ref:`io.realm.RealmChangeListener ` is currently not supported on RealmLists. - - - - - - - - - - - **Returns** - - **Flow** that emit all updates to the RealmList. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm__RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm__RealmResults_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _from_io_realm_DynamicRealm_RealmResults_: - -.. _from_io_realm_DynamicRealm__RealmResults_: - -.. _from_DynamicRealm_io_realm_RealmResults_: - -.. _from_DynamicRealm__io_realm_RealmResults_: - -.. _from_DynamicRealm_RealmResults_: - -.. _from_DynamicRealm__RealmResults_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm_RealmResults_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm__RealmResults_: - -.. _RealmFlowFactory_from_DynamicRealm_io_realm_RealmResults_: - -.. _RealmFlowFactory_from_DynamicRealm__io_realm_RealmResults_: - -.. _RealmFlowFactory_from_DynamicRealm_RealmResults_: - -.. _RealmFlowFactory_from_DynamicRealm__RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm__RealmResults_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`DynamicRealm ` dynamicRealm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm_io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm__io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm__RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm_io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm__io_realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm_RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm__RealmResults_: - -.. _from_io_realm_Realm_io_realm_RealmResults_: - -.. _from_io_realm_Realm__io_realm_RealmResults_: - -.. _from_io_realm_Realm_RealmResults_: - -.. _from_io_realm_Realm__RealmResults_: - -.. _from_Realm_io_realm_RealmResults_: - -.. _from_Realm__io_realm_RealmResults_: - -.. _from_Realm_RealmResults_: - -.. _from_Realm__RealmResults_: - -.. _RealmFlowFactory_from_io_realm_Realm_io_realm_RealmResults_: - -.. _RealmFlowFactory_from_io_realm_Realm__io_realm_RealmResults_: - -.. _RealmFlowFactory_from_io_realm_Realm_RealmResults_: - -.. _RealmFlowFactory_from_io_realm_Realm__RealmResults_: - -.. _RealmFlowFactory_from_Realm_io_realm_RealmResults_: - -.. _RealmFlowFactory_from_Realm__io_realm_RealmResults_: - -.. _RealmFlowFactory_from_Realm_RealmResults_: - -.. _RealmFlowFactory_from_Realm__RealmResults_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm__RealmResults_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**T** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a **Flow** for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults. - - - - - - - - - **Returns** - - **Flow** that emits all updates to the RealmObject. - - - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_DynamicRealm_: - -.. _io_realm_coroutines_RealmFlowFactory_from_DynamicRealm_: - -.. _from_io_realm_DynamicRealm_: - -.. _from_DynamicRealm_: - -.. _RealmFlowFactory_from_io_realm_DynamicRealm_: - -.. _RealmFlowFactory_from_DynamicRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`DynamicRealm ` dynamicRealm - | ) - - - - - * - Creates a **Flow** for a :ref:`DynamicRealm ` . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm. - - - - - - - - - **Returns** - - Flow that emits all updates to the Realm. - - - - - - - - - -.. _io_realm_coroutines_RealmFlowFactory_from_io_realm_Realm_: - -.. _io_realm_coroutines_RealmFlowFactory_from_Realm_: - -.. _from_io_realm_Realm_: - -.. _from_Realm_: - -.. _RealmFlowFactory_from_io_realm_Realm_: - -.. _RealmFlowFactory_from_Realm_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`Realm ` realm - | ) - - - - - * - Creates a **Flow** for a :ref:`Realm ` . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm. - - - - - - - - - **Returns** - - Flow that emits all updates to the Realm. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/exceptions.txt b/source/sdk/temp/java/api/io/realm/exceptions.txt deleted file mode 100644 index c887890fd0..0000000000 --- a/source/sdk/temp/java/api/io/realm/exceptions.txt +++ /dev/null @@ -1,39 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.exceptions -^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - RealmFileException.Kind - DownloadingRealmInterruptedException - RealmException - RealmFileException - RealmMigrationNeededException - RealmPrimaryKeyConstraintException - RealmError - - - -| - -- :ref:`io.realm.exceptions.RealmFileException.Kind ` -- :ref:`io.realm.exceptions.DownloadingRealmInterruptedException ` -- :ref:`io.realm.exceptions.RealmException ` -- :ref:`io.realm.exceptions.RealmFileException ` -- :ref:`io.realm.exceptions.RealmMigrationNeededException ` -- :ref:`io.realm.exceptions.RealmPrimaryKeyConstraintException ` -- :ref:`io.realm.exceptions.RealmError ` - - - diff --git a/source/sdk/temp/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt b/source/sdk/temp/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt deleted file mode 100644 index 8326b8be82..0000000000 --- a/source/sdk/temp/java/api/io/realm/exceptions/DownloadingRealmInterruptedException.txt +++ /dev/null @@ -1,142 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Exception DownloadingRealmInterruptedException -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_exceptions_DownloadingRealmInterruptedException: - - - -io.realm.exceptions -=================== - - - | `java.lang.Object `__ - | `java.lang.Throwable `__ - | `java.lang.Exception `__ - | `java.lang.RuntimeException `__ - | io.realm.exceptions.DownloadingRealmInterruptedException - - -Exception class used when a Realm was interrupted while downloading the initial data set. This can only happen if :ref:`SyncConfiguration.Builder.waitForInitialRemoteData() ` is set. - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`DownloadingRealmInterruptedException ` ( - | :ref:`SyncConfiguration ` syncConfig, - | `Throwable `__ exception - | ) - - - - - - - - * - | :ref:`DownloadingRealmInterruptedException ` ( - | :ref:`SyncConfiguration ` syncConfig, - | `String `__ message - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Throwable `__ : ``getMessage`` , ``getLocalizedMessage`` , ``getCause`` , ``initCause`` , ``toString`` , ``printStackTrace`` , ``printStackTrace`` , ``printStackTrace`` , ``fillInStackTrace`` , ``getStackTrace`` , ``setStackTrace`` , ``addSuppressed`` , ``getSuppressed`` - - - - -Constructor Detail -================== - -.. _DownloadingRealmInterruptedException: - -.. _DownloadingRealmInterruptedException__: - -.. _io_realm_exceptions_DownloadingRealmInterruptedException: - -.. _io_realm_exceptions_DownloadingRealmInterruptedException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DownloadingRealmInterruptedException ` ( - | :ref:`SyncConfiguration ` syncConfig, - | `Throwable `__ exception - | ) - - - - - * - - - - - - - - - - - - -.. _DownloadingRealmInterruptedException: - -.. _DownloadingRealmInterruptedException__: - -.. _io_realm_exceptions_DownloadingRealmInterruptedException: - -.. _io_realm_exceptions_DownloadingRealmInterruptedException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DownloadingRealmInterruptedException ` ( - | :ref:`SyncConfiguration ` syncConfig, - | `String `__ message - | ) - - - - - * - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/exceptions/RealmError.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmError.txt deleted file mode 100644 index 728f1c6b44..0000000000 --- a/source/sdk/temp/java/api/io/realm/exceptions/RealmError.txt +++ /dev/null @@ -1,95 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Error RealmError -^^^^^^^^^^^^^^^^ - -.. _io_realm_exceptions_RealmError: - - - -io.realm.exceptions -=================== - - - | `java.lang.Object `__ - | `java.lang.Throwable `__ - | `java.lang.Error `__ - | io.realm.exceptions.RealmError - - -RealmError is a Realm specific Error used when unrecoverable problems happen in the underlying storage engine. A RealmError should never be caught or ignored. By doing so, the Realm could possibly get corrupted. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmError ` ( - | `String `__ detailMessage - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Throwable `__ : ``getMessage`` , ``getLocalizedMessage`` , ``getCause`` , ``initCause`` , ``toString`` , ``printStackTrace`` , ``printStackTrace`` , ``printStackTrace`` , ``fillInStackTrace`` , ``getStackTrace`` , ``setStackTrace`` , ``addSuppressed`` , ``getSuppressed`` - - - - -Constructor Detail -================== - -.. _RealmError: - -.. _RealmError__: - -.. _io_realm_exceptions_RealmError: - -.. _io_realm_exceptions_RealmError__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmError ` ( - | `String `__ detailMessage - | ) - - - - - * - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/exceptions/RealmException.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmException.txt deleted file mode 100644 index 6095088709..0000000000 --- a/source/sdk/temp/java/api/io/realm/exceptions/RealmException.txt +++ /dev/null @@ -1,138 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Exception RealmException -^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_exceptions_RealmException: - - - -io.realm.exceptions -=================== - - - | `java.lang.Object `__ - | `java.lang.Throwable `__ - | `java.lang.Exception `__ - | `java.lang.RuntimeException `__ - | io.realm.exceptions.RealmException - - -RealmException is for Realm specific exceptions. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmException ` ( - | `String `__ detailMessage - | ) - - - - - - - - * - | :ref:`RealmException ` ( - | `String `__ detailMessage, - | `Throwable `__ exception - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Throwable `__ : ``getMessage`` , ``getLocalizedMessage`` , ``getCause`` , ``initCause`` , ``toString`` , ``printStackTrace`` , ``printStackTrace`` , ``printStackTrace`` , ``fillInStackTrace`` , ``getStackTrace`` , ``setStackTrace`` , ``addSuppressed`` , ``getSuppressed`` - - - - -Constructor Detail -================== - -.. _RealmException: - -.. _RealmException__: - -.. _io_realm_exceptions_RealmException: - -.. _io_realm_exceptions_RealmException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmException ` ( - | `String `__ detailMessage - | ) - - - - - * - - - - - - - - - - - - -.. _RealmException: - -.. _RealmException__: - -.. _io_realm_exceptions_RealmException: - -.. _io_realm_exceptions_RealmException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmException ` ( - | `String `__ detailMessage, - | `Throwable `__ exception - | ) - - - - - * - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/exceptions/RealmFileException.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmFileException.txt deleted file mode 100644 index 0643959ca2..0000000000 --- a/source/sdk/temp/java/api/io/realm/exceptions/RealmFileException.txt +++ /dev/null @@ -1,378 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Exception RealmFileException -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_exceptions_RealmFileException: - - - -io.realm.exceptions -=================== - - - | `java.lang.Object `__ - | `java.lang.Throwable `__ - | `java.lang.Exception `__ - | `java.lang.RuntimeException `__ - | io.realm.exceptions.RealmFileException - - -Class for reporting problems when accessing the Realm related files. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmFileException ` ( - | **byte** value, - | `String `__ message - | ) - - - - - - - - * - | :ref:`RealmFileException ` ( - | :ref:`RealmFileException.Kind ` kind, - | `String `__ message - | ) - - - - - - - - * - | :ref:`RealmFileException ` ( - | :ref:`RealmFileException.Kind ` kind, - | `Throwable `__ cause - | ) - - - - - - - - * - | :ref:`RealmFileException ` ( - | :ref:`RealmFileException.Kind ` kind, - | `String `__ message, - | `Throwable `__ cause - | ) - - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static final`` - - :ref:`RealmFileException.Kind ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`RealmFileException.Kind ` - - | :ref:`getKind ` () - | - - - Gets the **kind** of this exception. - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Throwable `__ : ``getMessage`` , ``getLocalizedMessage`` , ``getCause`` , ``initCause`` , ``toString`` , ``printStackTrace`` , ``printStackTrace`` , ``printStackTrace`` , ``fillInStackTrace`` , ``getStackTrace`` , ``setStackTrace`` , ``addSuppressed`` , ``getSuppressed`` - - - - -Constructor Detail -================== - -.. _RealmFileException: - -.. _RealmFileException__: - -.. _io_realm_exceptions_RealmFileException: - -.. _io_realm_exceptions_RealmFileException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFileException ` ( - | **byte** value, - | `String `__ message - | ) - - - - - * - - - - - - - - - - - - -.. _RealmFileException: - -.. _RealmFileException__: - -.. _io_realm_exceptions_RealmFileException: - -.. _io_realm_exceptions_RealmFileException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFileException ` ( - | :ref:`RealmFileException.Kind ` kind, - | `String `__ message - | ) - - - - - * - - - - - - - - - - - - -.. _RealmFileException: - -.. _RealmFileException__: - -.. _io_realm_exceptions_RealmFileException: - -.. _io_realm_exceptions_RealmFileException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFileException ` ( - | :ref:`RealmFileException.Kind ` kind, - | `Throwable `__ cause - | ) - - - - - * - - - - - - - - - - - - -.. _RealmFileException: - -.. _RealmFileException__: - -.. _io_realm_exceptions_RealmFileException: - -.. _io_realm_exceptions_RealmFileException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFileException ` ( - | :ref:`RealmFileException.Kind ` kind, - | `String `__ message, - | `Throwable `__ cause - | ) - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _getKind: - -.. _getKind__: - -.. _RealmFileException_getKind: - -.. _RealmFileException_getKind__: - -.. _io_realm_exceptions_RealmFileException_getKind: - -.. _io_realm_exceptions_RealmFileException_getKind__: - - - -getKind -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmFileException.Kind ` :ref:`getKind ` () - | - - - - - * - Gets the **kind** of this exception. - - - - - - - - - **Returns** - - the **kind** of this exception. - - - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _RealmFileException_toString: - -.. _RealmFileException_toString__: - -.. _io_realm_exceptions_RealmFileException_toString: - -.. _io_realm_exceptions_RealmFileException_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Throwable `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/exceptions/RealmFileException/Kind.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmFileException/Kind.txt deleted file mode 100644 index 6ae016ee0b..0000000000 --- a/source/sdk/temp/java/api/io/realm/exceptions/RealmFileException/Kind.txt +++ /dev/null @@ -1,383 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum RealmFileException.Kind -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_exceptions_RealmFileException_Kind: - - - -io.realm.exceptions -=================== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.exceptions.RealmFileException.Kind - - - - -**Enclosing class:** - -:ref:`RealmFileException ` - - - -The specific kind of this :ref:`RealmFileException ` . - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`ACCESS_ERROR ` - - Thrown for any I/O related exception scenarios when a Realm is opened. - - - - - * - :ref:`BAD_HISTORY ` - - Thrown if the history type of the on-disk Realm is unexpected or incompatible. - - - - - * - :ref:`EXISTS ` - - Thrown if the destination file exists but it is not supposed to. - - - - - * - :ref:`FORMAT_UPGRADE_REQUIRED ` - - Thrown if the file needs to be upgraded to a new format, but upgrades have been explicitly disabled. - - - - - * - :ref:`INCOMPATIBLE_LOCK_FILE ` - - Thrown if the database file is currently open in another process which cannot share with the current process due to an architecture mismatch. - - - - - * - :ref:`INCOMPATIBLE_SYNC_FILE ` - - Thrown if an attempt was made to open an Realm file created with Realm Object Server 1.\*, which is not compatible with Realm Object Server 2.\*. - - - - - * - :ref:`NOT_FOUND ` - - Thrown if the relevant file cannot be found. - - - - - * - :ref:`PERMISSION_DENIED ` - - Thrown if the user does not have permission to open or create the specified file in the specified access mode when the Realm is opened. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`RealmFileException.Kind ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`RealmFileException.Kind ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_exceptions_RealmFileException_Kind_ACCESS_ERROR: - -.. _RealmFileException_Kind_ACCESS_ERROR: - - - -``ACCESS_ERROR`` ------------------ - -public static final :ref:`RealmFileException.Kind ` - -Thrown for any I/O related exception scenarios when a Realm is opened. - - - -.. _io_realm_exceptions_RealmFileException_Kind_BAD_HISTORY: - -.. _RealmFileException_Kind_BAD_HISTORY: - - - -``BAD_HISTORY`` ----------------- - -public static final :ref:`RealmFileException.Kind ` - -Thrown if the history type of the on-disk Realm is unexpected or incompatible. - - - -.. _io_realm_exceptions_RealmFileException_Kind_EXISTS: - -.. _RealmFileException_Kind_EXISTS: - - - -``EXISTS`` ------------ - -public static final :ref:`RealmFileException.Kind ` - -Thrown if the destination file exists but it is not supposed to. - - - -.. _io_realm_exceptions_RealmFileException_Kind_FORMAT_UPGRADE_REQUIRED: - -.. _RealmFileException_Kind_FORMAT_UPGRADE_REQUIRED: - - - -``FORMAT_UPGRADE_REQUIRED`` ----------------------------- - -public static final :ref:`RealmFileException.Kind ` - -Thrown if the file needs to be upgraded to a new format, but upgrades have been explicitly disabled. - - - -.. _io_realm_exceptions_RealmFileException_Kind_INCOMPATIBLE_LOCK_FILE: - -.. _RealmFileException_Kind_INCOMPATIBLE_LOCK_FILE: - - - -``INCOMPATIBLE_LOCK_FILE`` ---------------------------- - -public static final :ref:`RealmFileException.Kind ` - -Thrown if the database file is currently open in another process which cannot share with the current process due to an architecture mismatch. - - - -.. _io_realm_exceptions_RealmFileException_Kind_INCOMPATIBLE_SYNC_FILE: - -.. _RealmFileException_Kind_INCOMPATIBLE_SYNC_FILE: - - - -``INCOMPATIBLE_SYNC_FILE`` ---------------------------- - -public static final :ref:`RealmFileException.Kind ` - -Thrown if an attempt was made to open an Realm file created with Realm Object Server 1.\*, which is not compatible with Realm Object Server 2.\*. This exception should automatically be handled by Realm. - - - -.. _io_realm_exceptions_RealmFileException_Kind_NOT_FOUND: - -.. _RealmFileException_Kind_NOT_FOUND: - - - -``NOT_FOUND`` --------------- - -public static final :ref:`RealmFileException.Kind ` - -Thrown if the relevant file cannot be found. - - - -.. _io_realm_exceptions_RealmFileException_Kind_PERMISSION_DENIED: - -.. _RealmFileException_Kind_PERMISSION_DENIED: - - - -``PERMISSION_DENIED`` ----------------------- - -public static final :ref:`RealmFileException.Kind ` - -Thrown if the user does not have permission to open or create the specified file in the specified access mode when the Realm is opened. - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _Kind_valueOf: - -.. _Kind_valueOf__: - -.. _RealmFileException_Kind_valueOf: - -.. _RealmFileException_Kind_valueOf__: - -.. _io_realm_exceptions_RealmFileException_Kind_valueOf: - -.. _io_realm_exceptions_RealmFileException_Kind_valueOf__: - - - -valueOf -------- - -.. _io_realm_exceptions_RealmFileException_Kind_valueOf_java_lang_String_: - -.. _io_realm_exceptions_RealmFileException_Kind_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _RealmFileException_Kind_valueOf_java_lang_String_: - -.. _RealmFileException_Kind_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmFileException.Kind ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _Kind_values: - -.. _Kind_values__: - -.. _RealmFileException_Kind_values: - -.. _RealmFileException_Kind_values__: - -.. _io_realm_exceptions_RealmFileException_Kind_values: - -.. _io_realm_exceptions_RealmFileException_Kind_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmFileException.Kind ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/exceptions/RealmMigrationNeededException.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmMigrationNeededException.txt deleted file mode 100644 index c6c246261b..0000000000 --- a/source/sdk/temp/java/api/io/realm/exceptions/RealmMigrationNeededException.txt +++ /dev/null @@ -1,188 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Exception RealmMigrationNeededException -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_exceptions_RealmMigrationNeededException: - - - -io.realm.exceptions -=================== - - - | `java.lang.Object `__ - | `java.lang.Throwable `__ - | `java.lang.Exception `__ - | `java.lang.RuntimeException `__ - | io.realm.exceptions.RealmMigrationNeededException - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmMigrationNeededException ` ( - | `String `__ canonicalRealmPath, - | `String `__ detailMessage - | ) - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public `String `__ - - | :ref:`getPath ` () - | - - - Returns the canonical path to the Realm file that needs to be migrated. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Throwable `__ : ``getMessage`` , ``getLocalizedMessage`` , ``getCause`` , ``initCause`` , ``toString`` , ``printStackTrace`` , ``printStackTrace`` , ``printStackTrace`` , ``fillInStackTrace`` , ``getStackTrace`` , ``setStackTrace`` , ``addSuppressed`` , ``getSuppressed`` - - - - -Constructor Detail -================== - -.. _RealmMigrationNeededException: - -.. _RealmMigrationNeededException__: - -.. _io_realm_exceptions_RealmMigrationNeededException: - -.. _io_realm_exceptions_RealmMigrationNeededException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmMigrationNeededException ` ( - | `String `__ canonicalRealmPath, - | `String `__ detailMessage - | ) - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _getPath: - -.. _getPath__: - -.. _RealmMigrationNeededException_getPath: - -.. _RealmMigrationNeededException_getPath__: - -.. _io_realm_exceptions_RealmMigrationNeededException_getPath: - -.. _io_realm_exceptions_RealmMigrationNeededException_getPath__: - - - -getPath -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getPath ` () - | - - - - - * - Returns the canonical path to the Realm file that needs to be migrated.This can be used for easy reference during a migration: - - - - - - - - - **Returns** - - Canonical path to the Realm file. - - - - - - - - - .. seealso:: - - - - - `File.getCanonicalPath() `__ - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt b/source/sdk/temp/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt deleted file mode 100644 index a0f423f0b5..0000000000 --- a/source/sdk/temp/java/api/io/realm/exceptions/RealmPrimaryKeyConstraintException.txt +++ /dev/null @@ -1,110 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Exception RealmPrimaryKeyConstraintException -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_exceptions_RealmPrimaryKeyConstraintException: - - - -io.realm.exceptions -=================== - - - | `java.lang.Object `__ - | `java.lang.Throwable `__ - | `java.lang.Exception `__ - | `java.lang.RuntimeException `__ - | io.realm.exceptions.RealmPrimaryKeyConstraintException - - -Class for reporting problems when the primary key constraint is being broken. - - -.. seealso:: - - - - - :ref:`io.realm.annotations.PrimaryKey ` - - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmPrimaryKeyConstraintException ` ( - | `String `__ message - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Throwable `__ : ``getMessage`` , ``getLocalizedMessage`` , ``getCause`` , ``initCause`` , ``toString`` , ``printStackTrace`` , ``printStackTrace`` , ``printStackTrace`` , ``fillInStackTrace`` , ``getStackTrace`` , ``setStackTrace`` , ``addSuppressed`` , ``getSuppressed`` - - - - -Constructor Detail -================== - -.. _RealmPrimaryKeyConstraintException: - -.. _RealmPrimaryKeyConstraintException__: - -.. _io_realm_exceptions_RealmPrimaryKeyConstraintException: - -.. _io_realm_exceptions_RealmPrimaryKeyConstraintException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmPrimaryKeyConstraintException ` ( - | `String `__ message - | ) - - - - - * - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/gradle.txt b/source/sdk/temp/java/api/io/realm/gradle.txt deleted file mode 100644 index 2e2f7ebf74..0000000000 --- a/source/sdk/temp/java/api/io/realm/gradle.txt +++ /dev/null @@ -1,30 +0,0 @@ -:orphan: - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.gradle -^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - RealmPluginExtension - RealmPluginExtension.PropertyChangedListener - - - -| - -- :ref:`io.realm.gradle.RealmPluginExtension ` -- :ref:`io.realm.gradle.RealmPluginExtension.PropertyChangedListener ` - - - diff --git a/source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension.txt b/source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension.txt deleted file mode 100644 index 13eed26fa7..0000000000 --- a/source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension.txt +++ /dev/null @@ -1,529 +0,0 @@ -:orphan: - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmPluginExtension -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_gradle_RealmPluginExtension: - - - -io.realm.gradle -=============== - - - | `java.lang.Object `__ - | io.realm.gradle.RealmPluginExtension - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmPluginExtension ` () - | - - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static interface`` - - :ref:`RealmPluginExtension.PropertyChangedListener ` - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static final `String `__ - - - - :ref:`KEY_KOTLIN_EXTENSIONS_ENABLED ` - - - - - * - public static final `String `__ - - - - :ref:`KEY_SYNC_ENABLED ` - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`addPropertyListener ` ( - | `String `__ property, - | :ref:`io.realm.gradle.RealmPluginExtension.PropertyChangedListener ` listener - | ) - - - - - - - - * - public **boolean** - - | :ref:`isKotlinExtensionsEnabled ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isSyncEnabled ` () - | - - - - - - - - * - public **void** - - | :ref:`setKotlinExtensionsEnabled ` ( - | **boolean** kotlinExtensionsEnabled - | ) - - - - - - - - * - public **void** - - | :ref:`setSyncEnabled ` ( - | **boolean** syncEnabled - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_gradle_RealmPluginExtension_KEY_KOTLIN_EXTENSIONS_ENABLED: - - - -``KEY_KOTLIN_EXTENSIONS_ENABLED`` ----------------------------------- - - - - -.. _io_realm_gradle_RealmPluginExtension_KEY_SYNC_ENABLED: - - - -``KEY_SYNC_ENABLED`` ---------------------- - - - - - - -Constructor Detail -================== - -.. _RealmPluginExtension: - -.. _RealmPluginExtension__: - -.. _io_realm_gradle_RealmPluginExtension: - -.. _io_realm_gradle_RealmPluginExtension__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmPluginExtension ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _addPropertyListener: - -.. _addPropertyListener__: - -.. _RealmPluginExtension_addPropertyListener: - -.. _RealmPluginExtension_addPropertyListener__: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener__: - - - -addPropertyListener -------------------- - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_java_lang_String_io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_java_lang_String__io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_java_lang_String_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_java_lang_String__PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_java_lang_String_RealmPluginExtension_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_java_lang_String__RealmPluginExtension_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_String_io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_String__io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_String_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_String__PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_String_RealmPluginExtension_PropertyChangedListener_: - -.. _io_realm_gradle_RealmPluginExtension_addPropertyListener_String__RealmPluginExtension_PropertyChangedListener_: - -.. _addPropertyListener_java_lang_String_io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _addPropertyListener_java_lang_String__io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _addPropertyListener_java_lang_String_PropertyChangedListener_: - -.. _addPropertyListener_java_lang_String__PropertyChangedListener_: - -.. _addPropertyListener_java_lang_String_RealmPluginExtension_PropertyChangedListener_: - -.. _addPropertyListener_java_lang_String__RealmPluginExtension_PropertyChangedListener_: - -.. _addPropertyListener_String_io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _addPropertyListener_String__io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _addPropertyListener_String_PropertyChangedListener_: - -.. _addPropertyListener_String__PropertyChangedListener_: - -.. _addPropertyListener_String_RealmPluginExtension_PropertyChangedListener_: - -.. _addPropertyListener_String__RealmPluginExtension_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_java_lang_String_io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_java_lang_String__io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_java_lang_String_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_java_lang_String__PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_java_lang_String_RealmPluginExtension_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_java_lang_String__RealmPluginExtension_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_String_io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_String__io_realm_gradle_RealmPluginExtension_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_String_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_String__PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_String_RealmPluginExtension_PropertyChangedListener_: - -.. _RealmPluginExtension_addPropertyListener_String__RealmPluginExtension_PropertyChangedListener_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addPropertyListener ` ( - | `String `__ property, - | :ref:`io.realm.gradle.RealmPluginExtension.PropertyChangedListener ` listener - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _isKotlinExtensionsEnabled: - -.. _isKotlinExtensionsEnabled__: - -.. _RealmPluginExtension_isKotlinExtensionsEnabled: - -.. _RealmPluginExtension_isKotlinExtensionsEnabled__: - -.. _io_realm_gradle_RealmPluginExtension_isKotlinExtensionsEnabled: - -.. _io_realm_gradle_RealmPluginExtension_isKotlinExtensionsEnabled__: - - - -isKotlinExtensionsEnabled -------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isKotlinExtensionsEnabled ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _isSyncEnabled: - -.. _isSyncEnabled__: - -.. _RealmPluginExtension_isSyncEnabled: - -.. _RealmPluginExtension_isSyncEnabled__: - -.. _io_realm_gradle_RealmPluginExtension_isSyncEnabled: - -.. _io_realm_gradle_RealmPluginExtension_isSyncEnabled__: - - - -isSyncEnabled -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isSyncEnabled ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _setKotlinExtensionsEnabled: - -.. _setKotlinExtensionsEnabled__: - -.. _RealmPluginExtension_setKotlinExtensionsEnabled: - -.. _RealmPluginExtension_setKotlinExtensionsEnabled__: - -.. _io_realm_gradle_RealmPluginExtension_setKotlinExtensionsEnabled: - -.. _io_realm_gradle_RealmPluginExtension_setKotlinExtensionsEnabled__: - - - -setKotlinExtensionsEnabled --------------------------- - -.. _io_realm_gradle_RealmPluginExtension_setKotlinExtensionsEnabled_boolean_: - -.. _setKotlinExtensionsEnabled_boolean_: - -.. _RealmPluginExtension_setKotlinExtensionsEnabled_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setKotlinExtensionsEnabled ` ( - | **boolean** kotlinExtensionsEnabled - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _setSyncEnabled: - -.. _setSyncEnabled__: - -.. _RealmPluginExtension_setSyncEnabled: - -.. _RealmPluginExtension_setSyncEnabled__: - -.. _io_realm_gradle_RealmPluginExtension_setSyncEnabled: - -.. _io_realm_gradle_RealmPluginExtension_setSyncEnabled__: - - - -setSyncEnabled --------------- - -.. _io_realm_gradle_RealmPluginExtension_setSyncEnabled_boolean_: - -.. _setSyncEnabled_boolean_: - -.. _RealmPluginExtension_setSyncEnabled_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`setSyncEnabled ` ( - | **boolean** syncEnabled - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt b/source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt deleted file mode 100644 index 3e20988d19..0000000000 --- a/source/sdk/temp/java/api/io/realm/gradle/RealmPluginExtension/PropertyChangedListener.txt +++ /dev/null @@ -1,111 +0,0 @@ -:orphan: - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmPluginExtension.PropertyChangedListener -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_gradle_RealmPluginExtension_PropertyChangedListener: - - - -io.realm.gradle -=============== - - - -**Enclosing class:** - -:ref:`RealmPluginExtension ` - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onChange ` ( - | **T** value - | ) - - - - - - - - - - -Method Detail -============= - -.. _onChange: - -.. _onChange__: - -.. _PropertyChangedListener_onChange: - -.. _PropertyChangedListener_onChange__: - -.. _RealmPluginExtension_PropertyChangedListener_onChange: - -.. _RealmPluginExtension_PropertyChangedListener_onChange__: - -.. _io_realm_gradle_RealmPluginExtension_PropertyChangedListener_onChange: - -.. _io_realm_gradle_RealmPluginExtension_PropertyChangedListener_onChange__: - - - -onChange --------- - -.. _io_realm_gradle_RealmPluginExtension_PropertyChangedListener_onChange_T_: - -.. _onChange_T_: - -.. _RealmPluginExtension_PropertyChangedListener_onChange_T_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onChange ` ( - | **T** value - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/log.txt b/source/sdk/temp/java/api/io/realm/log.txt deleted file mode 100644 index d015ae12c9..0000000000 --- a/source/sdk/temp/java/api/io/realm/log.txt +++ /dev/null @@ -1,31 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.log -^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - LogLevel - RealmLog - RealmLogger - - - -| - -- :ref:`io.realm.log.LogLevel ` -- :ref:`io.realm.log.RealmLog ` -- :ref:`io.realm.log.RealmLogger ` - - - diff --git a/source/sdk/temp/java/api/io/realm/log/LogLevel.txt b/source/sdk/temp/java/api/io/realm/log/LogLevel.txt deleted file mode 100644 index d85b1888e2..0000000000 --- a/source/sdk/temp/java/api/io/realm/log/LogLevel.txt +++ /dev/null @@ -1,267 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class LogLevel -^^^^^^^^^^^^^^ - -.. _io_realm_log_LogLevel: - - - -io.realm.log -============ - - - | `java.lang.Object `__ - | io.realm.log.LogLevel - - -The Log levels defined and used by Realm when logging events in the API.Realm uses the log levels defined by Log4J: https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html - - - - -.. seealso:: - - - - - :ref:`RealmLog.add(RealmLogger) ` - - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`LogLevel ` () - | - - - - - - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static final **int** - - - - :ref:`ALL ` - - The ALL has the lowest possible rank and is intended to turn on all logging. - - - * - public static final **int** - - - - :ref:`DEBUG ` - - The DEBUG level designates fine-grained informational events that are mostly useful to debug an application. - - - * - public static final **int** - - - - :ref:`ERROR ` - - The ERROR level designates error events that might still allow the application to continue running. - - - * - public static final **int** - - - - :ref:`FATAL ` - - The FATAL level designates very severe error events that will presumably lead the application to abort. - - - * - public static final **int** - - - - :ref:`INFO ` - - The INFO level designates informational messages that highlight the progress of the application at coarse-grained level. - - - * - public static final **int** - - - - :ref:`OFF ` - - The OFF has the highest possible rank and is intended to turn off logging. - - - * - public static final **int** - - - - :ref:`TRACE ` - - The TRACE level designates finer-grained informational events than DEBUG. - - - * - public static final **int** - - - - :ref:`WARN ` - - The WARN level designates potentially harmful situations. - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_log_LogLevel_ALL: - - - -``ALL`` --------- - -The ALL has the lowest possible rank and is intended to turn on all logging. - - -.. _io_realm_log_LogLevel_DEBUG: - - - -``DEBUG`` ----------- - -The DEBUG level designates fine-grained informational events that are mostly useful to debug an application. - - -.. _io_realm_log_LogLevel_ERROR: - - - -``ERROR`` ----------- - -The ERROR level designates error events that might still allow the application to continue running. - - -.. _io_realm_log_LogLevel_FATAL: - - - -``FATAL`` ----------- - -The FATAL level designates very severe error events that will presumably lead the application to abort. - - -.. _io_realm_log_LogLevel_INFO: - - - -``INFO`` ---------- - -The INFO level designates informational messages that highlight the progress of the application at coarse-grained level. - - -.. _io_realm_log_LogLevel_OFF: - - - -``OFF`` --------- - -The OFF has the highest possible rank and is intended to turn off logging. - - -.. _io_realm_log_LogLevel_TRACE: - - - -``TRACE`` ----------- - -The TRACE level designates finer-grained informational events than DEBUG. - - -.. _io_realm_log_LogLevel_WARN: - - - -``WARN`` ---------- - -The WARN level designates potentially harmful situations. - - - - -Constructor Detail -================== - -.. _LogLevel: - -.. _LogLevel__: - -.. _io_realm_log_LogLevel: - -.. _io_realm_log_LogLevel__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`LogLevel ` () - | - - - - - * - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/log/RealmLog.txt b/source/sdk/temp/java/api/io/realm/log/RealmLog.txt deleted file mode 100644 index b597aff52f..0000000000 --- a/source/sdk/temp/java/api/io/realm/log/RealmLog.txt +++ /dev/null @@ -1,2961 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmLog -^^^^^^^^^^^^^^ - -.. _io_realm_log_RealmLog: - - - -io.realm.log -============ - - - | `java.lang.Object `__ - | io.realm.log.RealmLog - - -Global logger used by all Realm components. Custom loggers can be added by registering classes implementing :ref:`RealmLogger ` . - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmLog ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static **void** - - | :ref:`add ` ( - | :ref:`RealmLogger ` logger - | ) - - - Adds a logger implementation that will be notified on log events. - - - - - * - public static **void** - - | :ref:`clear ` () - | - - - Removes all loggers. - - - - - * - public static **void** - - | :ref:`debug ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs a :ref:`LogLevel.DEBUG ` event. - - - - - - - * - public static **void** - - | :ref:`debug ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs a :ref:`LogLevel.DEBUG ` event. - - - - - - - * - public static **void** - - | :ref:`debug ` ( - | `Throwable `__ throwable - | ) - - - Logs a :ref:`LogLevel.DEBUG ` exception. - - - - - - - * - public static **void** - - | :ref:`error ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs an :ref:`LogLevel.ERROR ` event. - - - - - - - * - public static **void** - - | :ref:`error ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs an :ref:`LogLevel.ERROR ` event. - - - - - - - * - public static **void** - - | :ref:`error ` ( - | `Throwable `__ throwable - | ) - - - Logs an :ref:`LogLevel.ERROR ` exception. - - - - - - - * - public static **void** - - | :ref:`fatal ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs a :ref:`LogLevel.FATAL ` event. - - - - - - - * - public static **void** - - | :ref:`fatal ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs an :ref:`LogLevel.FATAL ` event. - - - - - - - * - public static **void** - - | :ref:`fatal ` ( - | `Throwable `__ throwable - | ) - - - Logs a :ref:`LogLevel.FATAL ` exception. - - - - - - - * - public static **int** - - | :ref:`getLevel ` () - | - - - Get the current :ref:`LogLevel ` . - - - - - - - * - public static **void** - - | :ref:`info ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs an :ref:`LogLevel.INFO ` event. - - - - - - - * - public static **void** - - | :ref:`info ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs an :ref:`LogLevel.INFO ` event. - - - - - - - * - public static **void** - - | :ref:`info ` ( - | `Throwable `__ throwable - | ) - - - Logs an :ref:`LogLevel.INFO ` exception. - - - - - - - * - public static **void** - - | :ref:`registerDefaultLogger ` () - | - - - Adds default native logger if it has been removed before. - - - - - * - public static **boolean** - - | :ref:`remove ` ( - | :ref:`RealmLogger ` logger - | ) - - - Removes the given logger if it is currently added. - - - - - * - public static **void** - - | :ref:`setLevel ` ( - | **int** level - | ) - - - Sets the current :ref:`LogLevel ` . - - - - - - - * - public static **void** - - | :ref:`trace ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs a :ref:`LogLevel.TRACE ` event. - - - - - - - * - public static **void** - - | :ref:`trace ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs a :ref:`LogLevel.TRACE ` event. - - - - - - - * - public static **void** - - | :ref:`trace ` ( - | `Throwable `__ throwable - | ) - - - Logs a :ref:`LogLevel.TRACE ` exception. - - - - - - - * - public static **void** - - | :ref:`warn ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs a :ref:`LogLevel.WARN ` event. - - - - - - - * - public static **void** - - | :ref:`warn ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - Logs a :ref:`LogLevel.WARN ` event. - - - - - - - * - public static **void** - - | :ref:`warn ` ( - | `Throwable `__ throwable - | ) - - - Logs a :ref:`LogLevel.WARN ` exception. - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _RealmLog: - -.. _RealmLog__: - -.. _io_realm_log_RealmLog: - -.. _io_realm_log_RealmLog__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmLog ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _add: - -.. _add__: - -.. _RealmLog_add: - -.. _RealmLog_add__: - -.. _io_realm_log_RealmLog_add: - -.. _io_realm_log_RealmLog_add__: - - - -add ----- - -.. _io_realm_log_RealmLog_add_io_realm_log_RealmLogger_: - -.. _io_realm_log_RealmLog_add_RealmLogger_: - -.. _add_io_realm_log_RealmLogger_: - -.. _add_RealmLogger_: - -.. _RealmLog_add_io_realm_log_RealmLogger_: - -.. _RealmLog_add_RealmLogger_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`add ` ( - | :ref:`RealmLogger ` logger - | ) - - - - - * - Adds a logger implementation that will be notified on log events. - - - - - **Parameters** - - - ``logger`` - the reference to a :ref:`RealmLogger ` implementation. - - - - - - - - - - - - - - - - - - -.. _clear: - -.. _clear__: - -.. _RealmLog_clear: - -.. _RealmLog_clear__: - -.. _io_realm_log_RealmLog_clear: - -.. _io_realm_log_RealmLog_clear__: - - - -clear ------ - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`clear ` () - | - - - - - * - Removes all loggers. The default native logger will be removed as well. Use :ref:`registerDefaultLogger() ` to add it back. - - - - - - - - - - - - - - - - - -.. _debug: - -.. _debug__: - -.. _RealmLog_debug: - -.. _RealmLog_debug__: - -.. _io_realm_log_RealmLog_debug: - -.. _io_realm_log_RealmLog_debug__: - - - -debug ------ - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable__String__Object____: - -.. _io_realm_log_RealmLog_debug_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_debug_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_debug_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_debug_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_debug_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_debug_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_debug_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_debug_Throwable__String__Object____: - -.. _debug_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _debug_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _debug_java_lang_Throwable_java_lang_String_Object_: - -.. _debug_java_lang_Throwable__java_lang_String__Object_: - -.. _debug_java_lang_Throwable_java_lang_String_Object____: - -.. _debug_java_lang_Throwable__java_lang_String__Object____: - -.. _debug_java_lang_Throwable_String_java_lang_Object_: - -.. _debug_java_lang_Throwable__String__java_lang_Object_: - -.. _debug_java_lang_Throwable_String_Object_: - -.. _debug_java_lang_Throwable__String__Object_: - -.. _debug_java_lang_Throwable_String_Object____: - -.. _debug_java_lang_Throwable__String__Object____: - -.. _debug_Throwable_java_lang_String_java_lang_Object_: - -.. _debug_Throwable__java_lang_String__java_lang_Object_: - -.. _debug_Throwable_java_lang_String_Object_: - -.. _debug_Throwable__java_lang_String__Object_: - -.. _debug_Throwable_java_lang_String_Object____: - -.. _debug_Throwable__java_lang_String__Object____: - -.. _debug_Throwable_String_java_lang_Object_: - -.. _debug_Throwable__String__java_lang_Object_: - -.. _debug_Throwable_String_Object_: - -.. _debug_Throwable__String__Object_: - -.. _debug_Throwable_String_Object____: - -.. _debug_Throwable__String__Object____: - -.. _RealmLog_debug_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_debug_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_debug_java_lang_Throwable_java_lang_String_Object_: - -.. _RealmLog_debug_java_lang_Throwable__java_lang_String__Object_: - -.. _RealmLog_debug_java_lang_Throwable_java_lang_String_Object____: - -.. _RealmLog_debug_java_lang_Throwable__java_lang_String__Object____: - -.. _RealmLog_debug_java_lang_Throwable_String_java_lang_Object_: - -.. _RealmLog_debug_java_lang_Throwable__String__java_lang_Object_: - -.. _RealmLog_debug_java_lang_Throwable_String_Object_: - -.. _RealmLog_debug_java_lang_Throwable__String__Object_: - -.. _RealmLog_debug_java_lang_Throwable_String_Object____: - -.. _RealmLog_debug_java_lang_Throwable__String__Object____: - -.. _RealmLog_debug_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_debug_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_debug_Throwable_java_lang_String_Object_: - -.. _RealmLog_debug_Throwable__java_lang_String__Object_: - -.. _RealmLog_debug_Throwable_java_lang_String_Object____: - -.. _RealmLog_debug_Throwable__java_lang_String__Object____: - -.. _RealmLog_debug_Throwable_String_java_lang_Object_: - -.. _RealmLog_debug_Throwable__String__java_lang_Object_: - -.. _RealmLog_debug_Throwable_String_Object_: - -.. _RealmLog_debug_Throwable__String__Object_: - -.. _RealmLog_debug_Throwable_String_Object____: - -.. _RealmLog_debug_Throwable__String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`debug ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs a :ref:`LogLevel.DEBUG ` event. - - - - - - - **Parameters** - - - ``throwable`` - optional exception to log. - - - - - ``message`` - optional message. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_debug_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_String__Object_: - -.. _io_realm_log_RealmLog_debug_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_debug_java_lang_String__Object____: - -.. _io_realm_log_RealmLog_debug_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_debug_String_Object_: - -.. _io_realm_log_RealmLog_debug_String__Object_: - -.. _io_realm_log_RealmLog_debug_String_Object____: - -.. _io_realm_log_RealmLog_debug_String__Object____: - -.. _debug_java_lang_String_java_lang_Object_: - -.. _debug_java_lang_String__java_lang_Object_: - -.. _debug_java_lang_String_Object_: - -.. _debug_java_lang_String__Object_: - -.. _debug_java_lang_String_Object____: - -.. _debug_java_lang_String__Object____: - -.. _debug_String_java_lang_Object_: - -.. _debug_String__java_lang_Object_: - -.. _debug_String_Object_: - -.. _debug_String__Object_: - -.. _debug_String_Object____: - -.. _debug_String__Object____: - -.. _RealmLog_debug_java_lang_String_java_lang_Object_: - -.. _RealmLog_debug_java_lang_String__java_lang_Object_: - -.. _RealmLog_debug_java_lang_String_Object_: - -.. _RealmLog_debug_java_lang_String__Object_: - -.. _RealmLog_debug_java_lang_String_Object____: - -.. _RealmLog_debug_java_lang_String__Object____: - -.. _RealmLog_debug_String_java_lang_Object_: - -.. _RealmLog_debug_String__java_lang_Object_: - -.. _RealmLog_debug_String_Object_: - -.. _RealmLog_debug_String__Object_: - -.. _RealmLog_debug_String_Object____: - -.. _RealmLog_debug_String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`debug ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs a :ref:`LogLevel.DEBUG ` event. - - - - - - - **Parameters** - - - ``message`` - message to log. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_debug_java_lang_Throwable_: - -.. _io_realm_log_RealmLog_debug_Throwable_: - -.. _debug_java_lang_Throwable_: - -.. _debug_Throwable_: - -.. _RealmLog_debug_java_lang_Throwable_: - -.. _RealmLog_debug_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`debug ` ( - | `Throwable `__ throwable - | ) - - - - - * - Logs a :ref:`LogLevel.DEBUG ` exception. - - - - - - - **Parameters** - - - ``throwable`` - exception to log. - - - - - - - - - - - - - - - - -.. _error: - -.. _error__: - -.. _RealmLog_error: - -.. _RealmLog_error__: - -.. _io_realm_log_RealmLog_error: - -.. _io_realm_log_RealmLog_error__: - - - -error ------ - -.. _io_realm_log_RealmLog_error_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_error_java_lang_Throwable__String__Object____: - -.. _io_realm_log_RealmLog_error_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_error_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_error_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_error_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_error_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_error_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_error_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_error_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_error_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_error_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_error_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_error_Throwable__String__Object____: - -.. _error_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _error_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _error_java_lang_Throwable_java_lang_String_Object_: - -.. _error_java_lang_Throwable__java_lang_String__Object_: - -.. _error_java_lang_Throwable_java_lang_String_Object____: - -.. _error_java_lang_Throwable__java_lang_String__Object____: - -.. _error_java_lang_Throwable_String_java_lang_Object_: - -.. _error_java_lang_Throwable__String__java_lang_Object_: - -.. _error_java_lang_Throwable_String_Object_: - -.. _error_java_lang_Throwable__String__Object_: - -.. _error_java_lang_Throwable_String_Object____: - -.. _error_java_lang_Throwable__String__Object____: - -.. _error_Throwable_java_lang_String_java_lang_Object_: - -.. _error_Throwable__java_lang_String__java_lang_Object_: - -.. _error_Throwable_java_lang_String_Object_: - -.. _error_Throwable__java_lang_String__Object_: - -.. _error_Throwable_java_lang_String_Object____: - -.. _error_Throwable__java_lang_String__Object____: - -.. _error_Throwable_String_java_lang_Object_: - -.. _error_Throwable__String__java_lang_Object_: - -.. _error_Throwable_String_Object_: - -.. _error_Throwable__String__Object_: - -.. _error_Throwable_String_Object____: - -.. _error_Throwable__String__Object____: - -.. _RealmLog_error_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_error_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_error_java_lang_Throwable_java_lang_String_Object_: - -.. _RealmLog_error_java_lang_Throwable__java_lang_String__Object_: - -.. _RealmLog_error_java_lang_Throwable_java_lang_String_Object____: - -.. _RealmLog_error_java_lang_Throwable__java_lang_String__Object____: - -.. _RealmLog_error_java_lang_Throwable_String_java_lang_Object_: - -.. _RealmLog_error_java_lang_Throwable__String__java_lang_Object_: - -.. _RealmLog_error_java_lang_Throwable_String_Object_: - -.. _RealmLog_error_java_lang_Throwable__String__Object_: - -.. _RealmLog_error_java_lang_Throwable_String_Object____: - -.. _RealmLog_error_java_lang_Throwable__String__Object____: - -.. _RealmLog_error_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_error_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_error_Throwable_java_lang_String_Object_: - -.. _RealmLog_error_Throwable__java_lang_String__Object_: - -.. _RealmLog_error_Throwable_java_lang_String_Object____: - -.. _RealmLog_error_Throwable__java_lang_String__Object____: - -.. _RealmLog_error_Throwable_String_java_lang_Object_: - -.. _RealmLog_error_Throwable__String__java_lang_Object_: - -.. _RealmLog_error_Throwable_String_Object_: - -.. _RealmLog_error_Throwable__String__Object_: - -.. _RealmLog_error_Throwable_String_Object____: - -.. _RealmLog_error_Throwable__String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`error ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs an :ref:`LogLevel.ERROR ` event. - - - - - - - **Parameters** - - - ``throwable`` - optional exception to log. - - - - - ``message`` - optional message. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_error_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_error_java_lang_String__Object_: - -.. _io_realm_log_RealmLog_error_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_error_java_lang_String__Object____: - -.. _io_realm_log_RealmLog_error_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_error_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_error_String_Object_: - -.. _io_realm_log_RealmLog_error_String__Object_: - -.. _io_realm_log_RealmLog_error_String_Object____: - -.. _io_realm_log_RealmLog_error_String__Object____: - -.. _error_java_lang_String_java_lang_Object_: - -.. _error_java_lang_String__java_lang_Object_: - -.. _error_java_lang_String_Object_: - -.. _error_java_lang_String__Object_: - -.. _error_java_lang_String_Object____: - -.. _error_java_lang_String__Object____: - -.. _error_String_java_lang_Object_: - -.. _error_String__java_lang_Object_: - -.. _error_String_Object_: - -.. _error_String__Object_: - -.. _error_String_Object____: - -.. _error_String__Object____: - -.. _RealmLog_error_java_lang_String_java_lang_Object_: - -.. _RealmLog_error_java_lang_String__java_lang_Object_: - -.. _RealmLog_error_java_lang_String_Object_: - -.. _RealmLog_error_java_lang_String__Object_: - -.. _RealmLog_error_java_lang_String_Object____: - -.. _RealmLog_error_java_lang_String__Object____: - -.. _RealmLog_error_String_java_lang_Object_: - -.. _RealmLog_error_String__java_lang_Object_: - -.. _RealmLog_error_String_Object_: - -.. _RealmLog_error_String__Object_: - -.. _RealmLog_error_String_Object____: - -.. _RealmLog_error_String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`error ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs an :ref:`LogLevel.ERROR ` event. - - - - - - - **Parameters** - - - ``message`` - message to log. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_error_java_lang_Throwable_: - -.. _io_realm_log_RealmLog_error_Throwable_: - -.. _error_java_lang_Throwable_: - -.. _error_Throwable_: - -.. _RealmLog_error_java_lang_Throwable_: - -.. _RealmLog_error_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`error ` ( - | `Throwable `__ throwable - | ) - - - - - * - Logs an :ref:`LogLevel.ERROR ` exception. - - - - - - - **Parameters** - - - ``throwable`` - exception to log. - - - - - - - - - - - - - - - - -.. _fatal: - -.. _fatal__: - -.. _RealmLog_fatal: - -.. _RealmLog_fatal__: - -.. _io_realm_log_RealmLog_fatal: - -.. _io_realm_log_RealmLog_fatal__: - - - -fatal ------ - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable__String__Object____: - -.. _io_realm_log_RealmLog_fatal_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_fatal_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_fatal_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_fatal_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_fatal_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_fatal_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_fatal_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_fatal_Throwable__String__Object____: - -.. _fatal_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _fatal_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _fatal_java_lang_Throwable_java_lang_String_Object_: - -.. _fatal_java_lang_Throwable__java_lang_String__Object_: - -.. _fatal_java_lang_Throwable_java_lang_String_Object____: - -.. _fatal_java_lang_Throwable__java_lang_String__Object____: - -.. _fatal_java_lang_Throwable_String_java_lang_Object_: - -.. _fatal_java_lang_Throwable__String__java_lang_Object_: - -.. _fatal_java_lang_Throwable_String_Object_: - -.. _fatal_java_lang_Throwable__String__Object_: - -.. _fatal_java_lang_Throwable_String_Object____: - -.. _fatal_java_lang_Throwable__String__Object____: - -.. _fatal_Throwable_java_lang_String_java_lang_Object_: - -.. _fatal_Throwable__java_lang_String__java_lang_Object_: - -.. _fatal_Throwable_java_lang_String_Object_: - -.. _fatal_Throwable__java_lang_String__Object_: - -.. _fatal_Throwable_java_lang_String_Object____: - -.. _fatal_Throwable__java_lang_String__Object____: - -.. _fatal_Throwable_String_java_lang_Object_: - -.. _fatal_Throwable__String__java_lang_Object_: - -.. _fatal_Throwable_String_Object_: - -.. _fatal_Throwable__String__Object_: - -.. _fatal_Throwable_String_Object____: - -.. _fatal_Throwable__String__Object____: - -.. _RealmLog_fatal_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_fatal_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_fatal_java_lang_Throwable_java_lang_String_Object_: - -.. _RealmLog_fatal_java_lang_Throwable__java_lang_String__Object_: - -.. _RealmLog_fatal_java_lang_Throwable_java_lang_String_Object____: - -.. _RealmLog_fatal_java_lang_Throwable__java_lang_String__Object____: - -.. _RealmLog_fatal_java_lang_Throwable_String_java_lang_Object_: - -.. _RealmLog_fatal_java_lang_Throwable__String__java_lang_Object_: - -.. _RealmLog_fatal_java_lang_Throwable_String_Object_: - -.. _RealmLog_fatal_java_lang_Throwable__String__Object_: - -.. _RealmLog_fatal_java_lang_Throwable_String_Object____: - -.. _RealmLog_fatal_java_lang_Throwable__String__Object____: - -.. _RealmLog_fatal_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_fatal_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_fatal_Throwable_java_lang_String_Object_: - -.. _RealmLog_fatal_Throwable__java_lang_String__Object_: - -.. _RealmLog_fatal_Throwable_java_lang_String_Object____: - -.. _RealmLog_fatal_Throwable__java_lang_String__Object____: - -.. _RealmLog_fatal_Throwable_String_java_lang_Object_: - -.. _RealmLog_fatal_Throwable__String__java_lang_Object_: - -.. _RealmLog_fatal_Throwable_String_Object_: - -.. _RealmLog_fatal_Throwable__String__Object_: - -.. _RealmLog_fatal_Throwable_String_Object____: - -.. _RealmLog_fatal_Throwable__String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`fatal ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs a :ref:`LogLevel.FATAL ` event. - - - - - - - **Parameters** - - - ``throwable`` - optional exception to log. - - - - - ``message`` - optional message. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_fatal_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_String__Object_: - -.. _io_realm_log_RealmLog_fatal_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_fatal_java_lang_String__Object____: - -.. _io_realm_log_RealmLog_fatal_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_fatal_String_Object_: - -.. _io_realm_log_RealmLog_fatal_String__Object_: - -.. _io_realm_log_RealmLog_fatal_String_Object____: - -.. _io_realm_log_RealmLog_fatal_String__Object____: - -.. _fatal_java_lang_String_java_lang_Object_: - -.. _fatal_java_lang_String__java_lang_Object_: - -.. _fatal_java_lang_String_Object_: - -.. _fatal_java_lang_String__Object_: - -.. _fatal_java_lang_String_Object____: - -.. _fatal_java_lang_String__Object____: - -.. _fatal_String_java_lang_Object_: - -.. _fatal_String__java_lang_Object_: - -.. _fatal_String_Object_: - -.. _fatal_String__Object_: - -.. _fatal_String_Object____: - -.. _fatal_String__Object____: - -.. _RealmLog_fatal_java_lang_String_java_lang_Object_: - -.. _RealmLog_fatal_java_lang_String__java_lang_Object_: - -.. _RealmLog_fatal_java_lang_String_Object_: - -.. _RealmLog_fatal_java_lang_String__Object_: - -.. _RealmLog_fatal_java_lang_String_Object____: - -.. _RealmLog_fatal_java_lang_String__Object____: - -.. _RealmLog_fatal_String_java_lang_Object_: - -.. _RealmLog_fatal_String__java_lang_Object_: - -.. _RealmLog_fatal_String_Object_: - -.. _RealmLog_fatal_String__Object_: - -.. _RealmLog_fatal_String_Object____: - -.. _RealmLog_fatal_String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`fatal ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs an :ref:`LogLevel.FATAL ` event. - - - - - - - **Parameters** - - - ``message`` - message to log. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_fatal_java_lang_Throwable_: - -.. _io_realm_log_RealmLog_fatal_Throwable_: - -.. _fatal_java_lang_Throwable_: - -.. _fatal_Throwable_: - -.. _RealmLog_fatal_java_lang_Throwable_: - -.. _RealmLog_fatal_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`fatal ` ( - | `Throwable `__ throwable - | ) - - - - - * - Logs a :ref:`LogLevel.FATAL ` exception. - - - - - - - **Parameters** - - - ``throwable`` - exception to log. - - - - - - - - - - - - - - - - -.. _getLevel: - -.. _getLevel__: - -.. _RealmLog_getLevel: - -.. _RealmLog_getLevel__: - -.. _io_realm_log_RealmLog_getLevel: - -.. _io_realm_log_RealmLog_getLevel__: - - - -getLevel --------- - -.. list-table:: - :header-rows: 1 - - * - | public static **int** :ref:`getLevel ` () - | - - - - - * - Get the current :ref:`LogLevel ` . - - - - - - - - - **Returns** - - the current :ref:`LogLevel ` . - - - - - - - - - - - - - -.. _info: - -.. _info__: - -.. _RealmLog_info: - -.. _RealmLog_info__: - -.. _io_realm_log_RealmLog_info: - -.. _io_realm_log_RealmLog_info__: - - - -info ----- - -.. _io_realm_log_RealmLog_info_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_info_java_lang_Throwable__String__Object____: - -.. _io_realm_log_RealmLog_info_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_info_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_info_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_info_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_info_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_info_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_info_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_info_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_info_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_info_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_info_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_info_Throwable__String__Object____: - -.. _info_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _info_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _info_java_lang_Throwable_java_lang_String_Object_: - -.. _info_java_lang_Throwable__java_lang_String__Object_: - -.. _info_java_lang_Throwable_java_lang_String_Object____: - -.. _info_java_lang_Throwable__java_lang_String__Object____: - -.. _info_java_lang_Throwable_String_java_lang_Object_: - -.. _info_java_lang_Throwable__String__java_lang_Object_: - -.. _info_java_lang_Throwable_String_Object_: - -.. _info_java_lang_Throwable__String__Object_: - -.. _info_java_lang_Throwable_String_Object____: - -.. _info_java_lang_Throwable__String__Object____: - -.. _info_Throwable_java_lang_String_java_lang_Object_: - -.. _info_Throwable__java_lang_String__java_lang_Object_: - -.. _info_Throwable_java_lang_String_Object_: - -.. _info_Throwable__java_lang_String__Object_: - -.. _info_Throwable_java_lang_String_Object____: - -.. _info_Throwable__java_lang_String__Object____: - -.. _info_Throwable_String_java_lang_Object_: - -.. _info_Throwable__String__java_lang_Object_: - -.. _info_Throwable_String_Object_: - -.. _info_Throwable__String__Object_: - -.. _info_Throwable_String_Object____: - -.. _info_Throwable__String__Object____: - -.. _RealmLog_info_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_info_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_info_java_lang_Throwable_java_lang_String_Object_: - -.. _RealmLog_info_java_lang_Throwable__java_lang_String__Object_: - -.. _RealmLog_info_java_lang_Throwable_java_lang_String_Object____: - -.. _RealmLog_info_java_lang_Throwable__java_lang_String__Object____: - -.. _RealmLog_info_java_lang_Throwable_String_java_lang_Object_: - -.. _RealmLog_info_java_lang_Throwable__String__java_lang_Object_: - -.. _RealmLog_info_java_lang_Throwable_String_Object_: - -.. _RealmLog_info_java_lang_Throwable__String__Object_: - -.. _RealmLog_info_java_lang_Throwable_String_Object____: - -.. _RealmLog_info_java_lang_Throwable__String__Object____: - -.. _RealmLog_info_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_info_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_info_Throwable_java_lang_String_Object_: - -.. _RealmLog_info_Throwable__java_lang_String__Object_: - -.. _RealmLog_info_Throwable_java_lang_String_Object____: - -.. _RealmLog_info_Throwable__java_lang_String__Object____: - -.. _RealmLog_info_Throwable_String_java_lang_Object_: - -.. _RealmLog_info_Throwable__String__java_lang_Object_: - -.. _RealmLog_info_Throwable_String_Object_: - -.. _RealmLog_info_Throwable__String__Object_: - -.. _RealmLog_info_Throwable_String_Object____: - -.. _RealmLog_info_Throwable__String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`info ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs an :ref:`LogLevel.INFO ` event. - - - - - - - **Parameters** - - - ``throwable`` - optional exception to log. - - - - - ``message`` - optional message. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_info_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_info_java_lang_String__Object_: - -.. _io_realm_log_RealmLog_info_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_info_java_lang_String__Object____: - -.. _io_realm_log_RealmLog_info_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_info_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_info_String_Object_: - -.. _io_realm_log_RealmLog_info_String__Object_: - -.. _io_realm_log_RealmLog_info_String_Object____: - -.. _io_realm_log_RealmLog_info_String__Object____: - -.. _info_java_lang_String_java_lang_Object_: - -.. _info_java_lang_String__java_lang_Object_: - -.. _info_java_lang_String_Object_: - -.. _info_java_lang_String__Object_: - -.. _info_java_lang_String_Object____: - -.. _info_java_lang_String__Object____: - -.. _info_String_java_lang_Object_: - -.. _info_String__java_lang_Object_: - -.. _info_String_Object_: - -.. _info_String__Object_: - -.. _info_String_Object____: - -.. _info_String__Object____: - -.. _RealmLog_info_java_lang_String_java_lang_Object_: - -.. _RealmLog_info_java_lang_String__java_lang_Object_: - -.. _RealmLog_info_java_lang_String_Object_: - -.. _RealmLog_info_java_lang_String__Object_: - -.. _RealmLog_info_java_lang_String_Object____: - -.. _RealmLog_info_java_lang_String__Object____: - -.. _RealmLog_info_String_java_lang_Object_: - -.. _RealmLog_info_String__java_lang_Object_: - -.. _RealmLog_info_String_Object_: - -.. _RealmLog_info_String__Object_: - -.. _RealmLog_info_String_Object____: - -.. _RealmLog_info_String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`info ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs an :ref:`LogLevel.INFO ` event. - - - - - - - **Parameters** - - - ``message`` - message to log. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_info_java_lang_Throwable_: - -.. _io_realm_log_RealmLog_info_Throwable_: - -.. _info_java_lang_Throwable_: - -.. _info_Throwable_: - -.. _RealmLog_info_java_lang_Throwable_: - -.. _RealmLog_info_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`info ` ( - | `Throwable `__ throwable - | ) - - - - - * - Logs an :ref:`LogLevel.INFO ` exception. - - - - - - - **Parameters** - - - ``throwable`` - exception to log. - - - - - - - - - - - - - - - - -.. _registerDefaultLogger: - -.. _registerDefaultLogger__: - -.. _RealmLog_registerDefaultLogger: - -.. _RealmLog_registerDefaultLogger__: - -.. _io_realm_log_RealmLog_registerDefaultLogger: - -.. _io_realm_log_RealmLog_registerDefaultLogger__: - - - -registerDefaultLogger ---------------------- - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`registerDefaultLogger ` () - | - - - - - * - Adds default native logger if it has been removed before. If the default logger has been registered already, it won't be added again. The default logger on Android will log to logcat. - - - - - - - - - - - - - - - -.. _remove: - -.. _remove__: - -.. _RealmLog_remove: - -.. _RealmLog_remove__: - -.. _io_realm_log_RealmLog_remove: - -.. _io_realm_log_RealmLog_remove__: - - - -remove ------- - -.. _io_realm_log_RealmLog_remove_io_realm_log_RealmLogger_: - -.. _io_realm_log_RealmLog_remove_RealmLogger_: - -.. _remove_io_realm_log_RealmLogger_: - -.. _remove_RealmLogger_: - -.. _RealmLog_remove_io_realm_log_RealmLogger_: - -.. _RealmLog_remove_RealmLogger_: - -.. list-table:: - :header-rows: 1 - - * - | public static **boolean** :ref:`remove ` ( - | :ref:`RealmLogger ` logger - | ) - - - - - * - Removes the given logger if it is currently added. - - - - - - - **Returns** - - ``true`` if the logger was removed, ``false`` otherwise. - - - - - - - - - - - - - -.. _setLevel: - -.. _setLevel__: - -.. _RealmLog_setLevel: - -.. _RealmLog_setLevel__: - -.. _io_realm_log_RealmLog_setLevel: - -.. _io_realm_log_RealmLog_setLevel__: - - - -setLevel --------- - -.. _io_realm_log_RealmLog_setLevel_int_: - -.. _setLevel_int_: - -.. _RealmLog_setLevel_int_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`setLevel ` ( - | **int** level - | ) - - - - - * - Sets the current :ref:`LogLevel ` . Setting this will affect all registered loggers. - - - - - - - **Parameters** - - - ``level`` - see :ref:`LogLevel ` . - - - - - - - - - - - - - - - - - - -.. _trace: - -.. _trace__: - -.. _RealmLog_trace: - -.. _RealmLog_trace__: - -.. _io_realm_log_RealmLog_trace: - -.. _io_realm_log_RealmLog_trace__: - - - -trace ------ - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable__String__Object____: - -.. _io_realm_log_RealmLog_trace_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_trace_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_trace_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_trace_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_trace_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_trace_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_trace_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_trace_Throwable__String__Object____: - -.. _trace_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _trace_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _trace_java_lang_Throwable_java_lang_String_Object_: - -.. _trace_java_lang_Throwable__java_lang_String__Object_: - -.. _trace_java_lang_Throwable_java_lang_String_Object____: - -.. _trace_java_lang_Throwable__java_lang_String__Object____: - -.. _trace_java_lang_Throwable_String_java_lang_Object_: - -.. _trace_java_lang_Throwable__String__java_lang_Object_: - -.. _trace_java_lang_Throwable_String_Object_: - -.. _trace_java_lang_Throwable__String__Object_: - -.. _trace_java_lang_Throwable_String_Object____: - -.. _trace_java_lang_Throwable__String__Object____: - -.. _trace_Throwable_java_lang_String_java_lang_Object_: - -.. _trace_Throwable__java_lang_String__java_lang_Object_: - -.. _trace_Throwable_java_lang_String_Object_: - -.. _trace_Throwable__java_lang_String__Object_: - -.. _trace_Throwable_java_lang_String_Object____: - -.. _trace_Throwable__java_lang_String__Object____: - -.. _trace_Throwable_String_java_lang_Object_: - -.. _trace_Throwable__String__java_lang_Object_: - -.. _trace_Throwable_String_Object_: - -.. _trace_Throwable__String__Object_: - -.. _trace_Throwable_String_Object____: - -.. _trace_Throwable__String__Object____: - -.. _RealmLog_trace_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_trace_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_trace_java_lang_Throwable_java_lang_String_Object_: - -.. _RealmLog_trace_java_lang_Throwable__java_lang_String__Object_: - -.. _RealmLog_trace_java_lang_Throwable_java_lang_String_Object____: - -.. _RealmLog_trace_java_lang_Throwable__java_lang_String__Object____: - -.. _RealmLog_trace_java_lang_Throwable_String_java_lang_Object_: - -.. _RealmLog_trace_java_lang_Throwable__String__java_lang_Object_: - -.. _RealmLog_trace_java_lang_Throwable_String_Object_: - -.. _RealmLog_trace_java_lang_Throwable__String__Object_: - -.. _RealmLog_trace_java_lang_Throwable_String_Object____: - -.. _RealmLog_trace_java_lang_Throwable__String__Object____: - -.. _RealmLog_trace_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_trace_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_trace_Throwable_java_lang_String_Object_: - -.. _RealmLog_trace_Throwable__java_lang_String__Object_: - -.. _RealmLog_trace_Throwable_java_lang_String_Object____: - -.. _RealmLog_trace_Throwable__java_lang_String__Object____: - -.. _RealmLog_trace_Throwable_String_java_lang_Object_: - -.. _RealmLog_trace_Throwable__String__java_lang_Object_: - -.. _RealmLog_trace_Throwable_String_Object_: - -.. _RealmLog_trace_Throwable__String__Object_: - -.. _RealmLog_trace_Throwable_String_Object____: - -.. _RealmLog_trace_Throwable__String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`trace ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs a :ref:`LogLevel.TRACE ` event. - - - - - - - **Parameters** - - - ``throwable`` - optional exception to log. - - - - - ``message`` - optional message. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_trace_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_String__Object_: - -.. _io_realm_log_RealmLog_trace_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_trace_java_lang_String__Object____: - -.. _io_realm_log_RealmLog_trace_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_trace_String_Object_: - -.. _io_realm_log_RealmLog_trace_String__Object_: - -.. _io_realm_log_RealmLog_trace_String_Object____: - -.. _io_realm_log_RealmLog_trace_String__Object____: - -.. _trace_java_lang_String_java_lang_Object_: - -.. _trace_java_lang_String__java_lang_Object_: - -.. _trace_java_lang_String_Object_: - -.. _trace_java_lang_String__Object_: - -.. _trace_java_lang_String_Object____: - -.. _trace_java_lang_String__Object____: - -.. _trace_String_java_lang_Object_: - -.. _trace_String__java_lang_Object_: - -.. _trace_String_Object_: - -.. _trace_String__Object_: - -.. _trace_String_Object____: - -.. _trace_String__Object____: - -.. _RealmLog_trace_java_lang_String_java_lang_Object_: - -.. _RealmLog_trace_java_lang_String__java_lang_Object_: - -.. _RealmLog_trace_java_lang_String_Object_: - -.. _RealmLog_trace_java_lang_String__Object_: - -.. _RealmLog_trace_java_lang_String_Object____: - -.. _RealmLog_trace_java_lang_String__Object____: - -.. _RealmLog_trace_String_java_lang_Object_: - -.. _RealmLog_trace_String__java_lang_Object_: - -.. _RealmLog_trace_String_Object_: - -.. _RealmLog_trace_String__Object_: - -.. _RealmLog_trace_String_Object____: - -.. _RealmLog_trace_String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`trace ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs a :ref:`LogLevel.TRACE ` event. - - - - - - - **Parameters** - - - ``message`` - message to log. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_trace_java_lang_Throwable_: - -.. _io_realm_log_RealmLog_trace_Throwable_: - -.. _trace_java_lang_Throwable_: - -.. _trace_Throwable_: - -.. _RealmLog_trace_java_lang_Throwable_: - -.. _RealmLog_trace_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`trace ` ( - | `Throwable `__ throwable - | ) - - - - - * - Logs a :ref:`LogLevel.TRACE ` exception. - - - - - - - **Parameters** - - - ``throwable`` - exception to log. - - - - - - - - - - - - - - - - -.. _warn: - -.. _warn__: - -.. _RealmLog_warn: - -.. _RealmLog_warn__: - -.. _io_realm_log_RealmLog_warn: - -.. _io_realm_log_RealmLog_warn__: - - - -warn ----- - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable__String__Object____: - -.. _io_realm_log_RealmLog_warn_Throwable_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_Throwable__java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_Throwable_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_warn_Throwable__java_lang_String__Object_: - -.. _io_realm_log_RealmLog_warn_Throwable_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_warn_Throwable__java_lang_String__Object____: - -.. _io_realm_log_RealmLog_warn_Throwable_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_Throwable__String__java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_Throwable_String_Object_: - -.. _io_realm_log_RealmLog_warn_Throwable__String__Object_: - -.. _io_realm_log_RealmLog_warn_Throwable_String_Object____: - -.. _io_realm_log_RealmLog_warn_Throwable__String__Object____: - -.. _warn_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _warn_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _warn_java_lang_Throwable_java_lang_String_Object_: - -.. _warn_java_lang_Throwable__java_lang_String__Object_: - -.. _warn_java_lang_Throwable_java_lang_String_Object____: - -.. _warn_java_lang_Throwable__java_lang_String__Object____: - -.. _warn_java_lang_Throwable_String_java_lang_Object_: - -.. _warn_java_lang_Throwable__String__java_lang_Object_: - -.. _warn_java_lang_Throwable_String_Object_: - -.. _warn_java_lang_Throwable__String__Object_: - -.. _warn_java_lang_Throwable_String_Object____: - -.. _warn_java_lang_Throwable__String__Object____: - -.. _warn_Throwable_java_lang_String_java_lang_Object_: - -.. _warn_Throwable__java_lang_String__java_lang_Object_: - -.. _warn_Throwable_java_lang_String_Object_: - -.. _warn_Throwable__java_lang_String__Object_: - -.. _warn_Throwable_java_lang_String_Object____: - -.. _warn_Throwable__java_lang_String__Object____: - -.. _warn_Throwable_String_java_lang_Object_: - -.. _warn_Throwable__String__java_lang_Object_: - -.. _warn_Throwable_String_Object_: - -.. _warn_Throwable__String__Object_: - -.. _warn_Throwable_String_Object____: - -.. _warn_Throwable__String__Object____: - -.. _RealmLog_warn_java_lang_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_warn_java_lang_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_warn_java_lang_Throwable_java_lang_String_Object_: - -.. _RealmLog_warn_java_lang_Throwable__java_lang_String__Object_: - -.. _RealmLog_warn_java_lang_Throwable_java_lang_String_Object____: - -.. _RealmLog_warn_java_lang_Throwable__java_lang_String__Object____: - -.. _RealmLog_warn_java_lang_Throwable_String_java_lang_Object_: - -.. _RealmLog_warn_java_lang_Throwable__String__java_lang_Object_: - -.. _RealmLog_warn_java_lang_Throwable_String_Object_: - -.. _RealmLog_warn_java_lang_Throwable__String__Object_: - -.. _RealmLog_warn_java_lang_Throwable_String_Object____: - -.. _RealmLog_warn_java_lang_Throwable__String__Object____: - -.. _RealmLog_warn_Throwable_java_lang_String_java_lang_Object_: - -.. _RealmLog_warn_Throwable__java_lang_String__java_lang_Object_: - -.. _RealmLog_warn_Throwable_java_lang_String_Object_: - -.. _RealmLog_warn_Throwable__java_lang_String__Object_: - -.. _RealmLog_warn_Throwable_java_lang_String_Object____: - -.. _RealmLog_warn_Throwable__java_lang_String__Object____: - -.. _RealmLog_warn_Throwable_String_java_lang_Object_: - -.. _RealmLog_warn_Throwable__String__java_lang_Object_: - -.. _RealmLog_warn_Throwable_String_Object_: - -.. _RealmLog_warn_Throwable__String__Object_: - -.. _RealmLog_warn_Throwable_String_Object____: - -.. _RealmLog_warn_Throwable__String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`warn ` ( - | `Throwable `__ throwable, - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs a :ref:`LogLevel.WARN ` event. - - - - - - - **Parameters** - - - ``throwable`` - optional exception to log. - - - - - ``message`` - optional message. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_warn_java_lang_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_String_Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_String__Object_: - -.. _io_realm_log_RealmLog_warn_java_lang_String_Object____: - -.. _io_realm_log_RealmLog_warn_java_lang_String__Object____: - -.. _io_realm_log_RealmLog_warn_String_java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_String__java_lang_Object_: - -.. _io_realm_log_RealmLog_warn_String_Object_: - -.. _io_realm_log_RealmLog_warn_String__Object_: - -.. _io_realm_log_RealmLog_warn_String_Object____: - -.. _io_realm_log_RealmLog_warn_String__Object____: - -.. _warn_java_lang_String_java_lang_Object_: - -.. _warn_java_lang_String__java_lang_Object_: - -.. _warn_java_lang_String_Object_: - -.. _warn_java_lang_String__Object_: - -.. _warn_java_lang_String_Object____: - -.. _warn_java_lang_String__Object____: - -.. _warn_String_java_lang_Object_: - -.. _warn_String__java_lang_Object_: - -.. _warn_String_Object_: - -.. _warn_String__Object_: - -.. _warn_String_Object____: - -.. _warn_String__Object____: - -.. _RealmLog_warn_java_lang_String_java_lang_Object_: - -.. _RealmLog_warn_java_lang_String__java_lang_Object_: - -.. _RealmLog_warn_java_lang_String_Object_: - -.. _RealmLog_warn_java_lang_String__Object_: - -.. _RealmLog_warn_java_lang_String_Object____: - -.. _RealmLog_warn_java_lang_String__Object____: - -.. _RealmLog_warn_String_java_lang_Object_: - -.. _RealmLog_warn_String__java_lang_Object_: - -.. _RealmLog_warn_String_Object_: - -.. _RealmLog_warn_String__Object_: - -.. _RealmLog_warn_String_Object____: - -.. _RealmLog_warn_String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`warn ` ( - | `String `__ message, - | `java.lang.Object[] `__ args - | ) - - - - - * - Logs a :ref:`LogLevel.WARN ` event. - - - - - - - **Parameters** - - - ``message`` - message to log. - - - - - ``args`` - optional args used to format the message using `String.format(String, Object...) `__ . - - - - - - - - - - - - - - - - -.. _io_realm_log_RealmLog_warn_java_lang_Throwable_: - -.. _io_realm_log_RealmLog_warn_Throwable_: - -.. _warn_java_lang_Throwable_: - -.. _warn_Throwable_: - -.. _RealmLog_warn_java_lang_Throwable_: - -.. _RealmLog_warn_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`warn ` ( - | `Throwable `__ throwable - | ) - - - - - * - Logs a :ref:`LogLevel.WARN ` exception. - - - - - - - **Parameters** - - - ``throwable`` - exception to log. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/log/RealmLogger.txt b/source/sdk/temp/java/api/io/realm/log/RealmLogger.txt deleted file mode 100644 index 7a76d8da15..0000000000 --- a/source/sdk/temp/java/api/io/realm/log/RealmLogger.txt +++ /dev/null @@ -1,218 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmLogger -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_log_RealmLogger: - - - -io.realm.log -============ - -Interface for custom loggers that can be registered at :ref:`RealmLog.add(RealmLogger) ` . The different log levels are described in :ref:`LogLevel ` . - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`log ` ( - | **int** level, - | `String `__ tag, - | `Throwable `__ throwable, - | `String `__ message - | ) - - - Handles a log event. - - - - - - - -Method Detail -============= - -.. _log: - -.. _log__: - -.. _RealmLogger_log: - -.. _RealmLogger_log__: - -.. _io_realm_log_RealmLogger_log: - -.. _io_realm_log_RealmLogger_log__: - - - -log ----- - -.. _io_realm_log_RealmLogger_log_int_java_lang_String_java_lang_Throwable_java_lang_String_: - -.. _io_realm_log_RealmLogger_log_int__java_lang_String__java_lang_Throwable__java_lang_String_: - -.. _io_realm_log_RealmLogger_log_int_java_lang_String_java_lang_Throwable_String_: - -.. _io_realm_log_RealmLogger_log_int__java_lang_String__java_lang_Throwable__String_: - -.. _io_realm_log_RealmLogger_log_int_java_lang_String_Throwable_java_lang_String_: - -.. _io_realm_log_RealmLogger_log_int__java_lang_String__Throwable__java_lang_String_: - -.. _io_realm_log_RealmLogger_log_int_java_lang_String_Throwable_String_: - -.. _io_realm_log_RealmLogger_log_int__java_lang_String__Throwable__String_: - -.. _io_realm_log_RealmLogger_log_int_String_java_lang_Throwable_java_lang_String_: - -.. _io_realm_log_RealmLogger_log_int__String__java_lang_Throwable__java_lang_String_: - -.. _io_realm_log_RealmLogger_log_int_String_java_lang_Throwable_String_: - -.. _io_realm_log_RealmLogger_log_int__String__java_lang_Throwable__String_: - -.. _io_realm_log_RealmLogger_log_int_String_Throwable_java_lang_String_: - -.. _io_realm_log_RealmLogger_log_int__String__Throwable__java_lang_String_: - -.. _io_realm_log_RealmLogger_log_int_String_Throwable_String_: - -.. _io_realm_log_RealmLogger_log_int__String__Throwable__String_: - -.. _log_int_java_lang_String_java_lang_Throwable_java_lang_String_: - -.. _log_int__java_lang_String__java_lang_Throwable__java_lang_String_: - -.. _log_int_java_lang_String_java_lang_Throwable_String_: - -.. _log_int__java_lang_String__java_lang_Throwable__String_: - -.. _log_int_java_lang_String_Throwable_java_lang_String_: - -.. _log_int__java_lang_String__Throwable__java_lang_String_: - -.. _log_int_java_lang_String_Throwable_String_: - -.. _log_int__java_lang_String__Throwable__String_: - -.. _log_int_String_java_lang_Throwable_java_lang_String_: - -.. _log_int__String__java_lang_Throwable__java_lang_String_: - -.. _log_int_String_java_lang_Throwable_String_: - -.. _log_int__String__java_lang_Throwable__String_: - -.. _log_int_String_Throwable_java_lang_String_: - -.. _log_int__String__Throwable__java_lang_String_: - -.. _log_int_String_Throwable_String_: - -.. _log_int__String__Throwable__String_: - -.. _RealmLogger_log_int_java_lang_String_java_lang_Throwable_java_lang_String_: - -.. _RealmLogger_log_int__java_lang_String__java_lang_Throwable__java_lang_String_: - -.. _RealmLogger_log_int_java_lang_String_java_lang_Throwable_String_: - -.. _RealmLogger_log_int__java_lang_String__java_lang_Throwable__String_: - -.. _RealmLogger_log_int_java_lang_String_Throwable_java_lang_String_: - -.. _RealmLogger_log_int__java_lang_String__Throwable__java_lang_String_: - -.. _RealmLogger_log_int_java_lang_String_Throwable_String_: - -.. _RealmLogger_log_int__java_lang_String__Throwable__String_: - -.. _RealmLogger_log_int_String_java_lang_Throwable_java_lang_String_: - -.. _RealmLogger_log_int__String__java_lang_Throwable__java_lang_String_: - -.. _RealmLogger_log_int_String_java_lang_Throwable_String_: - -.. _RealmLogger_log_int__String__java_lang_Throwable__String_: - -.. _RealmLogger_log_int_String_Throwable_java_lang_String_: - -.. _RealmLogger_log_int__String__Throwable__java_lang_String_: - -.. _RealmLogger_log_int_String_Throwable_String_: - -.. _RealmLogger_log_int__String__Throwable__String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`log ` ( - | **int** level, - | `String `__ tag, - | `Throwable `__ throwable, - | `String `__ message - | ) - - - - - * - Handles a log event. - - - - - **Parameters** - - - ``level`` - for this log event. It can only be a value between :ref:`LogLevel.TRACE ` and :ref:`LogLevel.FATAL ` - - - - - - - ``tag`` - for this log event. - - - - - ``throwable`` - optional exception to log. - - - - - ``message`` - optional additional message. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb.txt b/source/sdk/temp/java/api/io/realm/mongodb.txt deleted file mode 100644 index a5615994ee..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb.txt +++ /dev/null @@ -1,36 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb -^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - App - App.Callback - App.Result - AppConfiguration - AppConfiguration.Builder - AuthenticationListener - Credentials - Credentials.Provider - ErrorCode - ErrorCode.Category - ErrorCode.Type - RealmEventStreamAsyncTask - RealmEventStreamTask - RealmResultTask - User - User.State - UserIdentity - UserProfile - AppException diff --git a/source/sdk/temp/java/api/io/realm/mongodb/App.txt b/source/sdk/temp/java/api/io/realm/mongodb/App.txt deleted file mode 100644 index 58c1bafe2e..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/App.txt +++ /dev/null @@ -1,1623 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class App -^^^^^^^^^ - -.. _io_realm_mongodb_App: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.App - - -An *App* is the main client-side entry point for interacting with a *MongoDB Realm App*.The *App* can be used to: - - - -- Register uses and perform various user-related operations through authentication providers (:ref:`io.realm.mongodb.auth.ApiKeyAuth ` , **EmailPasswordAuthImpl**) - - - - -- Synchronize data between the local device and a remote Realm App with Synchronized Realms - - -- Invoke Realm App functions with :ref:`Functions ` - - - - -- Access remote data from MongoDB databases with a :ref:`io.realm.mongodb.mongo.MongoClient ` - - - - - - -To create an app that is linked with a remote *Realm App* initialize Realm and configure the *App* as shown below: - - - -.. code-block:: java - - class MyApplication extends Application { - - App APP; // The App instance should be a global singleton - - @Override - public void onCreate() { - super.onCreate(); - - Realm.init(this); - - AppConfiguration appConfiguration = new AppConfiguration.Builder(BuildConfig.MONGODB_REALM_APP_ID) - .appName(BuildConfig.VERSION_NAME) - .appVersion(Integer.toString(BuildConfig.VERSION_CODE)) - .build(); - - APP = new App(appConfiguration); - } - - } - - -After configuring the *App* you can start managing users, configure Synchronized -Realms, call remote Realm Functions and access remote data through Mongo Collections. -The examples below show the synchronized APIs which cannot be used from the main -thread. For the equivalent asynchronous counterparts, see -https://github.com/realm/realm-java/tree/main/examples/mongoDbRealmExample . - -To register a new user and/or login with an existing user do as shown below: - - - -.. code-block:: java - - // Register new user - APP.getEmailPassword().registerUser(username, password); - - // Login with existing user - User user = APP.login(Credentials.emailPassword(username, password)) - - -With an authorized user you can synchronize data between the local device and the remote Realm App by opening a Realm with a :ref:`io.realm.mongodb.sync.SyncConfiguration ` as indicated below: - - - - - -.. code-block:: java - - SyncConfiguration syncConfiguration = new SyncConfiguration.Builder(user, "") - .build(); - - Realm instance = Realm.getInstance(syncConfiguration); - SyncSession session = APP.getSync().getSession(syncConfiguration); - - instance.executeTransaction(realm -> { - realm.insert(...); - }); - session.uploadAllLocalChanges(); - instance.close(); - - -You can call remote Realm functions as shown below: - - - -.. code-block:: java - - Functions functions = user.getFunctions(); - Integer sum = functions.callFunction("sum", Arrays.asList(1, 2, 3, 4), Integer.class); - - -And access collections from the remote Realm App as shown here: - - - -.. code-block:: java - - MongoClient client = user.getMongoClient(SERVICE_NAME) - MongoDatabase database = client.getDatabase(DATABASE_NAME) - MongoCollection collection = database.getCollection(COLLECTION_NAME); - Long count = collection.count().get() - - - - - -.. seealso:: - - - - - :ref:`AppConfiguration.Builder ` - - - - - :ref:`EmailPasswordAuth ` - - - - - :ref:`io.realm.mongodb.sync.SyncConfiguration ` - - - - - :ref:`User.getFunctions() ` - - - - - :ref:`User.getMongoClient(String) ` - - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`App ` ( - | `String `__ appId - | ) - - - - - - - - * - | :ref:`App ` ( - | :ref:`AppConfiguration ` config - | ) - - - Constructor for creating an *App* according to the given *AppConfiguration*. - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static`` - - :ref:`App.Result ` - - - * - ``public static interface`` - - :ref:`App.Callback ` - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static `ThreadPoolExecutor `__ - - - - :ref:`NETWORK_POOL_EXECUTOR ` - - Thread pool used when doing network requests against MongoDB Realm.This pool is only exposed for testing purposes and replacing it while the queue is not empty will result in undefined behaviour. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`addAuthenticationListener ` ( - | :ref:`AuthenticationListener ` listener - | ) - - - Sets a global authentication listener that will be notified about User events like login and logout. - - - - - * - public `Map `__ - - | :ref:`allUsers ` () - | - - - Returns all known users that are either :ref:`User.State.LOGGED_IN ` or :ref:`User.State.LOGGED_OUT ` . - - - - - - - * - public :ref:`User ` - - | :ref:`currentUser ` () - | - - - Returns the current user that is logged in and still valid. - - - - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - Two Apps are considered equal and will share their underlying state if they both refer to the same :ref:`AppConfiguration.getAppId() ` . - - - - - - - * - public :ref:`AppConfiguration ` - - | :ref:`getConfiguration ` () - | - - - Returns the configuration object for this app. - - - - - * - public :ref:`EmailPasswordAuth ` - - | :ref:`getEmailPassword ` () - | - - - Returns a wrapper for interacting with functionality related to users either being created or logged in using the :ref:`Credentials.Provider.EMAIL_PASSWORD ` identity provider. - - - - - - - * - public :ref:`Functions ` - - | :ref:`getFunctions ` ( - | :ref:`User ` user, - | **CodecRegistry** codecRegistry - | ) - - - Returns a *Functions* manager for invoking the Realm App's Realm Functions with a custom codec registry for encoding and decoding arguments and results. - - - - - * - public :ref:`Functions ` - - | :ref:`getFunctions ` ( - | :ref:`User ` user - | ) - - - Returns a *Functions* manager for invoking the Realm App's Realm Functions. - - - - - * - public :ref:`Sync ` - - | :ref:`getSync ` () - | - - - Returns the *Sync* instance managing the ongoing *Realm Sync* sessions synchronizing data between the local and the remote *Realm App* associated with this app. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public :ref:`User ` - - | :ref:`login ` ( - | :ref:`Credentials ` credentials - | ) - - - Logs in as a user with the given credentials associated with an authentication provider. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`loginAsync ` ( - | :ref:`Credentials ` credentials, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Logs in as a user with the given credentials associated with an authentication provider. - - - - - * - public **void** - - | :ref:`removeAuthenticationListener ` ( - | :ref:`AuthenticationListener ` listener - | ) - - - Removes the provided global authentication listener. - - - - - * - public :ref:`User ` - - | :ref:`removeUser ` ( - | :ref:`User ` user - | ) - - - Removes a users credentials from this device. - - - - - * - protected **void** - - | :ref:`setNetworkTransport ` ( - | **OsJavaNetworkTransport** transport - | ) - - - Exposed for testing. - - - - - * - public :ref:`User ` - - | :ref:`switchUser ` ( - | :ref:`User ` user - | ) - - - Switch current user. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_mongodb_App_NETWORK_POOL_EXECUTOR: - - - -``NETWORK_POOL_EXECUTOR`` --------------------------- - -Thread pool used when doing network requests against MongoDB Realm.This pool is only exposed for testing purposes and replacing it while the queue is not empty will result in undefined behaviour. - - - - - - -Constructor Detail -================== - -.. _App: - -.. _App__: - -.. _io_realm_mongodb_App: - -.. _io_realm_mongodb_App__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`App ` ( - | `String `__ appId - | ) - - - - - * - - - - - - - - - - - - -.. _App: - -.. _App__: - -.. _io_realm_mongodb_App: - -.. _io_realm_mongodb_App__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`App ` ( - | :ref:`AppConfiguration ` config - | ) - - - - - * - Constructor for creating an *App* according to the given *AppConfiguration*. - - - - - **Parameters** - - - ``config`` - The configuration to use for this *App* instance. - - - - - - - - - - .. seealso:: - - - - - :ref:`AppConfiguration.Builder ` - - - - - - - - - - - - - - -Method Detail -============= - -.. _addAuthenticationListener: - -.. _addAuthenticationListener__: - -.. _App_addAuthenticationListener: - -.. _App_addAuthenticationListener__: - -.. _io_realm_mongodb_App_addAuthenticationListener: - -.. _io_realm_mongodb_App_addAuthenticationListener__: - - - -addAuthenticationListener -------------------------- - -.. _io_realm_mongodb_App_addAuthenticationListener_io_realm_mongodb_AuthenticationListener_: - -.. _io_realm_mongodb_App_addAuthenticationListener_AuthenticationListener_: - -.. _addAuthenticationListener_io_realm_mongodb_AuthenticationListener_: - -.. _addAuthenticationListener_AuthenticationListener_: - -.. _App_addAuthenticationListener_io_realm_mongodb_AuthenticationListener_: - -.. _App_addAuthenticationListener_AuthenticationListener_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`addAuthenticationListener ` ( - | :ref:`AuthenticationListener ` listener - | ) - - - - - * - Sets a global authentication listener that will be notified about User events like login and logout.Callbacks to authentication listeners will happen on the UI thread. - - - - - - - **Parameters** - - - ``listener`` - listener to register. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if ``listener`` is ``null`` . - - - - - - - - - - - - - - -.. _allUsers: - -.. _allUsers__: - -.. _App_allUsers: - -.. _App_allUsers__: - -.. _io_realm_mongodb_App_allUsers: - -.. _io_realm_mongodb_App_allUsers__: - - - -allUsers --------- - -.. list-table:: - :header-rows: 1 - - * - | public `Map `__ :ref:`allUsers ` () - | - - - - - * - Returns all known users that are either :ref:`User.State.LOGGED_IN ` or :ref:`User.State.LOGGED_OUT ` . - - Only users that at some point logged into this device will be returned. - - - - - - - - - **Returns** - - a map of user identifiers and users known locally. - - - - - - - - - - - -.. _currentUser: - -.. _currentUser__: - -.. _App_currentUser: - -.. _App_currentUser__: - -.. _io_realm_mongodb_App_currentUser: - -.. _io_realm_mongodb_App_currentUser__: - - - -currentUser ------------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`currentUser ` () - | - - - - - * - Returns the current user that is logged in and still valid.A user is invalidated when he/she logs out or the user's refresh token expires or is revoked. - - If two or more users are logged in, it is the last valid user that is returned by this method. - - - - - - - - - **Returns** - - current :ref:`User ` that has logged in and is still valid. ``null`` if no user is logged in or the user has expired. - - - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _App_equals: - -.. _App_equals__: - -.. _io_realm_mongodb_App_equals: - -.. _io_realm_mongodb_App_equals__: - - - -equals ------- - -.. _io_realm_mongodb_App_equals_java_lang_Object_: - -.. _io_realm_mongodb_App_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _App_equals_java_lang_Object_: - -.. _App_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - Two Apps are considered equal and will share their underlying state if they both refer to the same :ref:`AppConfiguration.getAppId() ` . - - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getConfiguration: - -.. _getConfiguration__: - -.. _App_getConfiguration: - -.. _App_getConfiguration__: - -.. _io_realm_mongodb_App_getConfiguration: - -.. _io_realm_mongodb_App_getConfiguration__: - - - -getConfiguration ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration ` :ref:`getConfiguration ` () - | - - - - - * - Returns the configuration object for this app. - - - - - - - **Returns** - - the configuration for this app. - - - - - - - - - - - -.. _getEmailPassword: - -.. _getEmailPassword__: - -.. _App_getEmailPassword: - -.. _App_getEmailPassword__: - -.. _io_realm_mongodb_App_getEmailPassword: - -.. _io_realm_mongodb_App_getEmailPassword__: - - - -getEmailPassword ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`EmailPasswordAuth ` :ref:`getEmailPassword ` () - | - - - - - * - Returns a wrapper for interacting with functionality related to users either being created or logged in using the :ref:`Credentials.Provider.EMAIL_PASSWORD ` identity provider. - - - - - - - - - **Returns** - - wrapper for interacting with the :ref:`Credentials.Provider.EMAIL_PASSWORD ` identity provider. - - - - - - - - - - - - - -.. _getFunctions: - -.. _getFunctions__: - -.. _App_getFunctions: - -.. _App_getFunctions__: - -.. _io_realm_mongodb_App_getFunctions: - -.. _io_realm_mongodb_App_getFunctions__: - - - -getFunctions ------------- - -.. _io_realm_mongodb_App_getFunctions_io_realm_mongodb_User_CodecRegistry_: - -.. _io_realm_mongodb_App_getFunctions_io_realm_mongodb_User__CodecRegistry_: - -.. _io_realm_mongodb_App_getFunctions_User_CodecRegistry_: - -.. _io_realm_mongodb_App_getFunctions_User__CodecRegistry_: - -.. _getFunctions_io_realm_mongodb_User_CodecRegistry_: - -.. _getFunctions_io_realm_mongodb_User__CodecRegistry_: - -.. _getFunctions_User_CodecRegistry_: - -.. _getFunctions_User__CodecRegistry_: - -.. _App_getFunctions_io_realm_mongodb_User_CodecRegistry_: - -.. _App_getFunctions_io_realm_mongodb_User__CodecRegistry_: - -.. _App_getFunctions_User_CodecRegistry_: - -.. _App_getFunctions_User__CodecRegistry_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Functions ` :ref:`getFunctions ` ( - | :ref:`User ` user, - | **CodecRegistry** codecRegistry - | ) - - - - - * - Returns a *Functions* manager for invoking the Realm App's Realm Functions with a custom codec registry for encoding and decoding arguments and results. - - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Functions ` - - - - - - - - - - -.. _io_realm_mongodb_App_getFunctions_io_realm_mongodb_User_: - -.. _io_realm_mongodb_App_getFunctions_User_: - -.. _getFunctions_io_realm_mongodb_User_: - -.. _getFunctions_User_: - -.. _App_getFunctions_io_realm_mongodb_User_: - -.. _App_getFunctions_User_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Functions ` :ref:`getFunctions ` ( - | :ref:`User ` user - | ) - - - - - * - Returns a *Functions* manager for invoking the Realm App's Realm Functions.This will use the app's default codec registry to encode and decode arguments and results. - - - - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Functions ` - - - - - :ref:`AppConfiguration.getDefaultCodecRegistry() ` - - - - - - - - - - - - -.. _getSync: - -.. _getSync__: - -.. _App_getSync: - -.. _App_getSync__: - -.. _io_realm_mongodb_App_getSync: - -.. _io_realm_mongodb_App_getSync__: - - - -getSync -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Sync ` :ref:`getSync ` () - | - - - - - * - Returns the *Sync* instance managing the ongoing *Realm Sync* sessions synchronizing data between the local and the remote *Realm App* associated with this app. - - - - - - - **Returns** - - the *Sync* instance associated with this *App*. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _App_hashCode: - -.. _App_hashCode__: - -.. _io_realm_mongodb_App_hashCode: - -.. _io_realm_mongodb_App_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _login: - -.. _login__: - -.. _App_login: - -.. _App_login__: - -.. _io_realm_mongodb_App_login: - -.. _io_realm_mongodb_App_login__: - - - -login ------ - -.. _io_realm_mongodb_App_login_io_realm_mongodb_Credentials_: - -.. _io_realm_mongodb_App_login_Credentials_: - -.. _login_io_realm_mongodb_Credentials_: - -.. _login_Credentials_: - -.. _App_login_io_realm_mongodb_Credentials_: - -.. _App_login_Credentials_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`login ` ( - | :ref:`Credentials ` credentials - | ) - - - - - * - Logs in as a user with the given credentials associated with an authentication provider.The user who logs in becomes the current user. Other App functionality acts on behalf of the current user. - - If there was already a current user, that user is still logged in and can be found in the list returned by :ref:`allUsers() ` . - - - - It is also possible to switch between which user is considered the current user by using :ref:`switchUser(User) ` . - - - - - - - - - **Parameters** - - - ``credentials`` - the credentials representing the type of login. - - - - - - - - **Returns** - - a :ref:`User ` representing the logged in user. - - - - - - - **Throws** - - - :ref:`AppException ` - if the user could not be logged in. - - - - - - - - - - - - -.. _loginAsync: - -.. _loginAsync__: - -.. _App_loginAsync: - -.. _App_loginAsync__: - -.. _io_realm_mongodb_App_loginAsync: - -.. _io_realm_mongodb_App_loginAsync__: - - - -loginAsync ----------- - -.. _io_realm_mongodb_App_loginAsync_io_realm_mongodb_Credentials_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_App_loginAsync_io_realm_mongodb_Credentials__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_App_loginAsync_io_realm_mongodb_Credentials_Callback_: - -.. _io_realm_mongodb_App_loginAsync_io_realm_mongodb_Credentials__Callback_: - -.. _io_realm_mongodb_App_loginAsync_io_realm_mongodb_Credentials_App_Callback_: - -.. _io_realm_mongodb_App_loginAsync_io_realm_mongodb_Credentials__App_Callback_: - -.. _io_realm_mongodb_App_loginAsync_Credentials_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_App_loginAsync_Credentials__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_App_loginAsync_Credentials_Callback_: - -.. _io_realm_mongodb_App_loginAsync_Credentials__Callback_: - -.. _io_realm_mongodb_App_loginAsync_Credentials_App_Callback_: - -.. _io_realm_mongodb_App_loginAsync_Credentials__App_Callback_: - -.. _loginAsync_io_realm_mongodb_Credentials_io_realm_mongodb_App_Callback_: - -.. _loginAsync_io_realm_mongodb_Credentials__io_realm_mongodb_App_Callback_: - -.. _loginAsync_io_realm_mongodb_Credentials_Callback_: - -.. _loginAsync_io_realm_mongodb_Credentials__Callback_: - -.. _loginAsync_io_realm_mongodb_Credentials_App_Callback_: - -.. _loginAsync_io_realm_mongodb_Credentials__App_Callback_: - -.. _loginAsync_Credentials_io_realm_mongodb_App_Callback_: - -.. _loginAsync_Credentials__io_realm_mongodb_App_Callback_: - -.. _loginAsync_Credentials_Callback_: - -.. _loginAsync_Credentials__Callback_: - -.. _loginAsync_Credentials_App_Callback_: - -.. _loginAsync_Credentials__App_Callback_: - -.. _App_loginAsync_io_realm_mongodb_Credentials_io_realm_mongodb_App_Callback_: - -.. _App_loginAsync_io_realm_mongodb_Credentials__io_realm_mongodb_App_Callback_: - -.. _App_loginAsync_io_realm_mongodb_Credentials_Callback_: - -.. _App_loginAsync_io_realm_mongodb_Credentials__Callback_: - -.. _App_loginAsync_io_realm_mongodb_Credentials_App_Callback_: - -.. _App_loginAsync_io_realm_mongodb_Credentials__App_Callback_: - -.. _App_loginAsync_Credentials_io_realm_mongodb_App_Callback_: - -.. _App_loginAsync_Credentials__io_realm_mongodb_App_Callback_: - -.. _App_loginAsync_Credentials_Callback_: - -.. _App_loginAsync_Credentials__Callback_: - -.. _App_loginAsync_Credentials_App_Callback_: - -.. _App_loginAsync_Credentials__App_Callback_: - -.. _io_realm_mongodb_App_loginAsync_Credentials__App_Callback_User__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`loginAsync ` ( - | :ref:`Credentials ` credentials, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Logs in as a user with the given credentials associated with an authentication provider.The user who logs in becomes the current user. Other App functionality acts on behalf of the current user. - - If there was already a current user, that user is still logged in and can be found in the list returned by :ref:`allUsers() ` . - - - - It is also possible to switch between which user is considered the current user by using :ref:`switchUser(User) ` . - - - - - - - - - **Parameters** - - - ``credentials`` - the credentials representing the type of login. - - - - - ``callback`` - callback when logging in has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if not called on a looper thread. - - - - - - - - - - - - -.. _removeAuthenticationListener: - -.. _removeAuthenticationListener__: - -.. _App_removeAuthenticationListener: - -.. _App_removeAuthenticationListener__: - -.. _io_realm_mongodb_App_removeAuthenticationListener: - -.. _io_realm_mongodb_App_removeAuthenticationListener__: - - - -removeAuthenticationListener ----------------------------- - -.. _io_realm_mongodb_App_removeAuthenticationListener_io_realm_mongodb_AuthenticationListener_: - -.. _io_realm_mongodb_App_removeAuthenticationListener_AuthenticationListener_: - -.. _removeAuthenticationListener_io_realm_mongodb_AuthenticationListener_: - -.. _removeAuthenticationListener_AuthenticationListener_: - -.. _App_removeAuthenticationListener_io_realm_mongodb_AuthenticationListener_: - -.. _App_removeAuthenticationListener_AuthenticationListener_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`removeAuthenticationListener ` ( - | :ref:`AuthenticationListener ` listener - | ) - - - - - * - Removes the provided global authentication listener. - - - - - **Parameters** - - - ``listener`` - listener to remove. - - - - - - - - - - - - - - - - -.. _removeUser: - -.. _removeUser__: - -.. _App_removeUser: - -.. _App_removeUser__: - -.. _io_realm_mongodb_App_removeUser: - -.. _io_realm_mongodb_App_removeUser__: - - - -removeUser ----------- - -.. _io_realm_mongodb_App_removeUser_io_realm_mongodb_User_: - -.. _io_realm_mongodb_App_removeUser_User_: - -.. _removeUser_io_realm_mongodb_User_: - -.. _removeUser_User_: - -.. _App_removeUser_io_realm_mongodb_User_: - -.. _App_removeUser_User_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`removeUser ` ( - | :ref:`User ` user - | ) - - - - - * - Removes a users credentials from this device. If the user was currently logged in, they will be logged out as part of the process. This is only a local change and does not affect the user state on the server. - - - - - **Parameters** - - - ``user`` - to remove - - - - - - - - **Returns** - - user that was removed. - - - - - **Throws** - - - :ref:`AppException ` - if called from the UI thread or if the user was logged in, but could not be logged out. - - - - - - - - - - - - -.. _setNetworkTransport: - -.. _setNetworkTransport__: - -.. _App_setNetworkTransport: - -.. _App_setNetworkTransport__: - -.. _io_realm_mongodb_App_setNetworkTransport: - -.. _io_realm_mongodb_App_setNetworkTransport__: - - - -setNetworkTransport -------------------- - -.. _io_realm_mongodb_App_setNetworkTransport_OsJavaNetworkTransport_: - -.. _setNetworkTransport_OsJavaNetworkTransport_: - -.. _App_setNetworkTransport_OsJavaNetworkTransport_: - -.. list-table:: - :header-rows: 1 - - * - | protected **void** :ref:`setNetworkTransport ` ( - | **OsJavaNetworkTransport** transport - | ) - - - - - * - Exposed for testing.Swap the currently configured network transport with the provided one. This should only be done if no network requests are currently running. - - - - - - - - - - - - - - - - - -.. _switchUser: - -.. _switchUser__: - -.. _App_switchUser: - -.. _App_switchUser__: - -.. _io_realm_mongodb_App_switchUser: - -.. _io_realm_mongodb_App_switchUser__: - - - -switchUser ----------- - -.. _io_realm_mongodb_App_switchUser_io_realm_mongodb_User_: - -.. _io_realm_mongodb_App_switchUser_User_: - -.. _switchUser_io_realm_mongodb_User_: - -.. _switchUser_User_: - -.. _App_switchUser_io_realm_mongodb_User_: - -.. _App_switchUser_User_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`switchUser ` ( - | :ref:`User ` user - | ) - - - - - * - Switch current user.The current user is the user returned by :ref:`currentUser() ` . - - - - - - - - - **Parameters** - - - ``user`` - the new current user. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the user is is not :ref:`User.State.LOGGED_IN ` . - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/App/Callback.txt b/source/sdk/temp/java/api/io/realm/mongodb/App/Callback.txt deleted file mode 100644 index 5731c6b60d..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/App/Callback.txt +++ /dev/null @@ -1,134 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface App.Callback -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_App_Callback: - - - -io.realm.mongodb -================ - - - -**Enclosing class:** - -:ref:`App ` - - - -Callback for async methods available to the :ref:`App ` . - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onResult ` ( - | :ref:`io.realm.mongodb.App.Result\ ` result - | ) - - - Returns the result of the request when available. - - - - - - - -Method Detail -============= - -.. _onResult: - -.. _onResult__: - -.. _Callback_onResult: - -.. _Callback_onResult__: - -.. _App_Callback_onResult: - -.. _App_Callback_onResult__: - -.. _io_realm_mongodb_App_Callback_onResult: - -.. _io_realm_mongodb_App_Callback_onResult__: - - - -onResult --------- - -.. _io_realm_mongodb_App_Callback_onResult_io_realm_mongodb_App_Result_: - -.. _io_realm_mongodb_App_Callback_onResult_Result_: - -.. _io_realm_mongodb_App_Callback_onResult_App_Result_: - -.. _onResult_io_realm_mongodb_App_Result_: - -.. _onResult_Result_: - -.. _onResult_App_Result_: - -.. _App_Callback_onResult_io_realm_mongodb_App_Result_: - -.. _App_Callback_onResult_Result_: - -.. _App_Callback_onResult_App_Result_: - -.. _io_realm_mongodb_App_Callback_onResult_App_Result_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onResult ` ( - | :ref:`io.realm.mongodb.App.Result\ ` result - | ) - - - - - * - Returns the result of the request when available. - - - - - **Parameters** - - - ``result`` - the request response. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/App/Result.txt b/source/sdk/temp/java/api/io/realm/mongodb/App/Result.txt deleted file mode 100644 index d12a2228b6..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/App/Result.txt +++ /dev/null @@ -1,606 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class App.Result -^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_App_Result: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.App.Result - - - - -**Enclosing class:** - -:ref:`App ` - - - -Result class representing the result of an async request from this app towards MongoDB Realm. - - -.. seealso:: - - - - - :ref:`Callback ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **T** - - | :ref:`get ` () - | - - - Returns the response in case the request was a success. - - - - - * - public :ref:`AppException ` - - | :ref:`getError ` () - | - - - Returns the error in case of a failed request. - - - - - * - public **T** - - | :ref:`getOrDefault ` ( - | **T** defaultValue - | ) - - - Returns the response if the request was a success. - - - - - * - public **T** - - | :ref:`getOrThrow ` () - | - - - If the request was successful the response is returned, otherwise the provided error is thrown. - - - - - * - public **boolean** - - | :ref:`isSuccess ` () - | - - - Returns whether or not request was successful - - - - - * - public static :ref:`App.Result ` - - | :ref:`success ` <**T** >() - | - - - Creates a successful request result with no return value. - - - - - * - public static :ref:`App.Result ` - - | :ref:`withError ` <**T** >( - | :ref:`AppException ` exception - | ) - - - Creates a failed request result. - - - - - * - public static :ref:`App.Result ` - - | :ref:`withResult ` <**T** >( - | **T** result - | ) - - - Creates a successful request result with a return value. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _get: - -.. _get__: - -.. _Result_get: - -.. _Result_get__: - -.. _App_Result_get: - -.. _App_Result_get__: - -.. _io_realm_mongodb_App_Result_get: - -.. _io_realm_mongodb_App_Result_get__: - - - -get ----- - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`get ` () - | - - - - - * - Returns the response in case the request was a success. - - - - - - - **Returns** - - the response value in case of a successful request. - - - - - - - - - - - -.. _getError: - -.. _getError__: - -.. _Result_getError: - -.. _Result_getError__: - -.. _App_Result_getError: - -.. _App_Result_getError__: - -.. _io_realm_mongodb_App_Result_getError: - -.. _io_realm_mongodb_App_Result_getError__: - - - -getError --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppException ` :ref:`getError ` () - | - - - - - * - Returns the error in case of a failed request. - - - - - - - **Returns** - - the :ref:`AppException ` in case of a failed request. - - - - - - - - - - - - - -.. _getOrDefault: - -.. _getOrDefault__: - -.. _Result_getOrDefault: - -.. _Result_getOrDefault__: - -.. _App_Result_getOrDefault: - -.. _App_Result_getOrDefault__: - -.. _io_realm_mongodb_App_Result_getOrDefault: - -.. _io_realm_mongodb_App_Result_getOrDefault__: - - - -getOrDefault ------------- - -.. _io_realm_mongodb_App_Result_getOrDefault_T_: - -.. _getOrDefault_T_: - -.. _App_Result_getOrDefault_T_: - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`getOrDefault ` ( - | **T** defaultValue - | ) - - - - - * - Returns the response if the request was a success. If it failed, the default value is returned instead. - - - - - - - **Returns** - - the response value in case of a successful request. If the request failed, the default value is returned instead. - - - - - - - - - - - -.. _getOrThrow: - -.. _getOrThrow__: - -.. _Result_getOrThrow: - -.. _Result_getOrThrow__: - -.. _App_Result_getOrThrow: - -.. _App_Result_getOrThrow__: - -.. _io_realm_mongodb_App_Result_getOrThrow: - -.. _io_realm_mongodb_App_Result_getOrThrow__: - - - -getOrThrow ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`getOrThrow ` () - | - - - - - * - If the request was successful the response is returned, otherwise the provided error is thrown. - - - - - - - **Returns** - - the response object in case the request was a success. - - - - - **Throws** - - - :ref:`AppException ` - provided error in case the request failed. - - - - - - - - - - - - -.. _isSuccess: - -.. _isSuccess__: - -.. _Result_isSuccess: - -.. _Result_isSuccess__: - -.. _App_Result_isSuccess: - -.. _App_Result_isSuccess__: - -.. _io_realm_mongodb_App_Result_isSuccess: - -.. _io_realm_mongodb_App_Result_isSuccess__: - - - -isSuccess ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isSuccess ` () - | - - - - - * - Returns whether or not request was successful - - - - - - - **Returns** - - ``true`` if the request was a success, ``false`` if not. - - - - - - - - - - - - - -.. _success: - -.. _success__: - -.. _Result_success: - -.. _Result_success__: - -.. _App_Result_success: - -.. _App_Result_success__: - -.. _io_realm_mongodb_App_Result_success: - -.. _io_realm_mongodb_App_Result_success__: - - - -success -------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`App.Result ` :ref:`success ` <**T** >() - | - - - - - * - Creates a successful request result with no return value. - - - - - - - - - - - - - - - -.. _withError: - -.. _withError__: - -.. _Result_withError: - -.. _Result_withError__: - -.. _App_Result_withError: - -.. _App_Result_withError__: - -.. _io_realm_mongodb_App_Result_withError: - -.. _io_realm_mongodb_App_Result_withError__: - - - -withError ---------- - -.. _io_realm_mongodb_App_Result_withError_io_realm_mongodb_AppException_: - -.. _io_realm_mongodb_App_Result_withError_AppException_: - -.. _withError_io_realm_mongodb_AppException_: - -.. _withError_AppException_: - -.. _App_Result_withError_io_realm_mongodb_AppException_: - -.. _App_Result_withError_AppException_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`App.Result ` :ref:`withError ` <**T** >( - | :ref:`AppException ` exception - | ) - - - - - * - Creates a failed request result. The request failed for some reason, either because there was a network error or the Realm Object Server returned an error. - - - - - **Parameters** - - - ``exception`` - error that occurred. - - - - - - - - - - - - - - - - -.. _withResult: - -.. _withResult__: - -.. _Result_withResult: - -.. _Result_withResult__: - -.. _App_Result_withResult: - -.. _App_Result_withResult__: - -.. _io_realm_mongodb_App_Result_withResult: - -.. _io_realm_mongodb_App_Result_withResult__: - - - -withResult ----------- - -.. _io_realm_mongodb_App_Result_withResult_T_: - -.. _withResult_T_: - -.. _App_Result_withResult_T_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`App.Result ` :ref:`withResult ` <**T** >( - | **T** result - | ) - - - - - * - Creates a successful request result with a return value. - - - - - **Parameters** - - - ``result`` - the result value. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration.txt b/source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration.txt deleted file mode 100644 index 4fca216cdb..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration.txt +++ /dev/null @@ -1,1270 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class AppConfiguration -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_AppConfiguration: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.AppConfiguration - - -An AppConfiguration is used to setup a MongoDB Realm application.Instances of an AppConfiguration can only created by using the :ref:`AppConfiguration.Builder ` and calling its :ref:`AppConfiguration.Builder.build() ` method. - - - -Configuring an App is only required if the default settings are not enough. Otherwise calling ``new App("app-id")`` is sufficient. - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static`` - - :ref:`AppConfiguration.Builder ` - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static final `String `__ - - - - :ref:`DEFAULT_AUTHORIZATION_HEADER_NAME ` - - The default header name used to carry authorization data when making network requests towards MongoDB Realm. - - - * - public static final `String `__ - - - - :ref:`DEFAULT_BASE_URL ` - - The default url for MongoDB Realm applications. - - - * - public static final **CodecRegistry** - - - - :ref:`DEFAULT_BSON_CODEC_REGISTRY ` - - Default BSON codec registry for encoding/decoding arguments and results to/from MongoDB App Services backend.This will encode/decode most primitive types, list and map types and BsonValues. - - - - - * - public static final **long** - - - - :ref:`DEFAULT_REQUEST_TIMEOUT ` - - The default request timeout for network requests towards MongoDB Realm in seconds. - - - * - public static final `Map `__ - - - - :ref:`loginObfuscators ` - - Default obfuscators for login requests used in a MongoDB Realm app.This map is needed to instantiate the default :ref:`HttpLogObfuscator ` , which will keep all login-sensitive information from being shown in Logcat. - - - - This map's keys represent the different login identity providers which can be used to authenticate against an app and the values are the concrete obfuscators used for that provider. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public `String `__ - - | :ref:`getAppId ` () - | - - - Returns the unique app id that identities the Realm application. - - - - - * - public `String `__ - - | :ref:`getAppName ` () - | - - - Returns the name used to describe the Realm application. - - - - - * - public `String `__ - - | :ref:`getAppVersion ` () - | - - - Returns the version of this Realm application. - - - - - * - public `String `__ - - | :ref:`getAuthorizationHeaderName ` () - | - - - Returns the name of the header used to carry authentication data when making network requests towards MongoDB Realm. - - - - - * - public `URL `__ - - | :ref:`getBaseUrl ` () - | - - - Returns the base url for this Realm application. - - - - - * - public `Map `__ - - | :ref:`getCustomRequestHeaders ` () - | - - - Returns any custom configured headers that will be sent alongside other headers when making network requests towards MongoDB Realm. - - - - - * - public :ref:`SyncSession.ClientResetHandler ` - - | :ref:`getDefaultClientResetHandler ` () - | - - - Returns the default Client Reset handler used by synced Realms if there are problems with their :ref:`SyncSession ` . - - - - - - - * - public **CodecRegistry** - - | :ref:`getDefaultCodecRegistry ` () - | - - - Returns the default codec registry used to encode and decode BSON arguments and results when calling remote Realm :ref:`io.realm.mongodb.functions.Functions ` and accessing a remote :ref:`io.realm.mongodb.mongo.MongoDatabase ` . - - - - - - - * - public :ref:`SyncSession.ErrorHandler ` - - | :ref:`getDefaultErrorHandler ` () - | - - - Returns the default error handler used by synced Realms if there are problems with their :ref:`SyncSession ` . - - - - - - - * - public :ref:`SyncClientResetStrategy ` - - | :ref:`getDefaultSyncClientResetStrategy ` () - | - - - Returns the default sync client reset strategy used by synced Realms if there are problems with their :ref:`SyncSession ` . - - - - - - - * - public **byte** - - | :ref:`getEncryptionKey ` () - | - - - Returns the encryption key, if any, that is used to encrypt Realm users meta data on this device. - - - - - * - public :ref:`HttpLogObfuscator ` - - | :ref:`getHttpLogObfuscator ` () - | - - - Returns the :ref:`HttpLogObfuscator ` used in the app, which keeps sensitive information in HTTP requests from being displayed in the logcat. - - - - - - - * - public **long** - - | :ref:`getRequestTimeoutMs ` () - | - - - Returns the default timeout for network requests against the Realm application in milliseconds. - - - - - * - public `File `__ - - | :ref:`getSyncRootDirectory ` () - | - - - Returns the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_mongodb_AppConfiguration_DEFAULT_AUTHORIZATION_HEADER_NAME: - - - -``DEFAULT_AUTHORIZATION_HEADER_NAME`` --------------------------------------- - -The default header name used to carry authorization data when making network requests towards MongoDB Realm. - - -.. _io_realm_mongodb_AppConfiguration_DEFAULT_BASE_URL: - - - -``DEFAULT_BASE_URL`` ---------------------- - -The default url for MongoDB Realm applications. - - -.. seealso:: - - - - - :ref:`Builder.baseUrl(String) ` - - - - - - - - - -.. _io_realm_mongodb_AppConfiguration_DEFAULT_BSON_CODEC_REGISTRY: - - - -``DEFAULT_BSON_CODEC_REGISTRY`` --------------------------------- - -Default BSON codec registry for encoding/decoding arguments and results to/from MongoDB App Services backend.This will encode/decode most primitive types, list and map types and BsonValues. - - - - -.. seealso:: - - - - - :ref:`AppConfiguration.getDefaultCodecRegistry() ` - - - - - :ref:`AppConfiguration.Builder.codecRegistry(CodecRegistry) ` - - - - - **ValueCodecProvider** - - - - - **BsonValueCodecProvider** - - - - - **IterableCodecProvider** - - - - - **MapCodecProvider** - - - - - **DocumentCodecProvider** - - - - - - - - - -.. _io_realm_mongodb_AppConfiguration_DEFAULT_REQUEST_TIMEOUT: - - - -``DEFAULT_REQUEST_TIMEOUT`` ----------------------------- - -The default request timeout for network requests towards MongoDB Realm in seconds. - - -.. seealso:: - - - - - :ref:`Builder.requestTimeout(long, TimeUnit) ` - - - - - - - - - -.. _io_realm_mongodb_AppConfiguration_loginObfuscators: - - - -``loginObfuscators`` ---------------------- - -Default obfuscators for login requests used in a MongoDB Realm app.This map is needed to instantiate the default :ref:`HttpLogObfuscator ` , which will keep all login-sensitive information from being shown in Logcat. - - - -This map's keys represent the different login identity providers which can be used to authenticate against an app and the values are the concrete obfuscators used for that provider. - - - - -.. seealso:: - - - - - :ref:`Credentials.Provider ` - - - - - **RegexPatternObfuscator** - - - - - **ApiKeyObfuscator** - - - - - **TokenObfuscator** - - - - - **CustomFunctionObfuscator** - - - - - **EmailPasswordObfuscator** - - - - - :ref:`HttpLogObfuscator ` - - - - - - - - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _AppConfiguration_equals: - -.. _AppConfiguration_equals__: - -.. _io_realm_mongodb_AppConfiguration_equals: - -.. _io_realm_mongodb_AppConfiguration_equals__: - - - -equals ------- - -.. _io_realm_mongodb_AppConfiguration_equals_java_lang_Object_: - -.. _io_realm_mongodb_AppConfiguration_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _AppConfiguration_equals_java_lang_Object_: - -.. _AppConfiguration_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getAppId: - -.. _getAppId__: - -.. _AppConfiguration_getAppId: - -.. _AppConfiguration_getAppId__: - -.. _io_realm_mongodb_AppConfiguration_getAppId: - -.. _io_realm_mongodb_AppConfiguration_getAppId__: - - - -getAppId --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getAppId ` () - | - - - - - * - Returns the unique app id that identities the Realm application. - - - - - - - **Returns** - - the app unique identifier. - - - - - - - - - - - -.. _getAppName: - -.. _getAppName__: - -.. _AppConfiguration_getAppName: - -.. _AppConfiguration_getAppName__: - -.. _io_realm_mongodb_AppConfiguration_getAppName: - -.. _io_realm_mongodb_AppConfiguration_getAppName__: - - - -getAppName ----------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getAppName ` () - | - - - - - * - Returns the name used to describe the Realm application. This is only used as debug information. - - - - - - - **Returns** - - the app name. - - - - - - - - - - - -.. _getAppVersion: - -.. _getAppVersion__: - -.. _AppConfiguration_getAppVersion: - -.. _AppConfiguration_getAppVersion__: - -.. _io_realm_mongodb_AppConfiguration_getAppVersion: - -.. _io_realm_mongodb_AppConfiguration_getAppVersion__: - - - -getAppVersion -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getAppVersion ` () - | - - - - - * - Returns the version of this Realm application. This is only used as debug information. - - - - - - - **Returns** - - the app version. - - - - - - - - - - - -.. _getAuthorizationHeaderName: - -.. _getAuthorizationHeaderName__: - -.. _AppConfiguration_getAuthorizationHeaderName: - -.. _AppConfiguration_getAuthorizationHeaderName__: - -.. _io_realm_mongodb_AppConfiguration_getAuthorizationHeaderName: - -.. _io_realm_mongodb_AppConfiguration_getAuthorizationHeaderName__: - - - -getAuthorizationHeaderName --------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getAuthorizationHeaderName ` () - | - - - - - * - Returns the name of the header used to carry authentication data when making network requests towards MongoDB Realm. - - - - - - - **Returns** - - the authentication header name. - - - - - - - - - - - -.. _getBaseUrl: - -.. _getBaseUrl__: - -.. _AppConfiguration_getBaseUrl: - -.. _AppConfiguration_getBaseUrl__: - -.. _io_realm_mongodb_AppConfiguration_getBaseUrl: - -.. _io_realm_mongodb_AppConfiguration_getBaseUrl__: - - - -getBaseUrl ----------- - -.. list-table:: - :header-rows: 1 - - * - | public `URL `__ :ref:`getBaseUrl ` () - | - - - - - * - Returns the base url for this Realm application. - - - - - - - **Returns** - - the app base url. - - - - - - - - - - - -.. _getCustomRequestHeaders: - -.. _getCustomRequestHeaders__: - -.. _AppConfiguration_getCustomRequestHeaders: - -.. _AppConfiguration_getCustomRequestHeaders__: - -.. _io_realm_mongodb_AppConfiguration_getCustomRequestHeaders: - -.. _io_realm_mongodb_AppConfiguration_getCustomRequestHeaders__: - - - -getCustomRequestHeaders ------------------------ - -.. list-table:: - :header-rows: 1 - - * - | public `Map `__ :ref:`getCustomRequestHeaders ` () - | - - - - - * - Returns any custom configured headers that will be sent alongside other headers when making network requests towards MongoDB Realm. - - - - - - - **Returns** - - a ``Map`` of custom configured headers. - - - - - - - - - - - - - -.. _getDefaultClientResetHandler: - -.. _getDefaultClientResetHandler__: - -.. _AppConfiguration_getDefaultClientResetHandler: - -.. _AppConfiguration_getDefaultClientResetHandler__: - -.. _io_realm_mongodb_AppConfiguration_getDefaultClientResetHandler: - -.. _io_realm_mongodb_AppConfiguration_getDefaultClientResetHandler__: - - - -getDefaultClientResetHandler ----------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncSession.ClientResetHandler ` :ref:`getDefaultClientResetHandler ` () - | - - - - - * - Returns the default Client Reset handler used by synced Realms if there are problems with their :ref:`SyncSession ` . - - - - - - - - - **Returns** - - the app default error handler. - - - - - - - - - - - -.. _getDefaultCodecRegistry: - -.. _getDefaultCodecRegistry__: - -.. _AppConfiguration_getDefaultCodecRegistry: - -.. _AppConfiguration_getDefaultCodecRegistry__: - -.. _io_realm_mongodb_AppConfiguration_getDefaultCodecRegistry: - -.. _io_realm_mongodb_AppConfiguration_getDefaultCodecRegistry__: - - - -getDefaultCodecRegistry ------------------------ - -.. list-table:: - :header-rows: 1 - - * - | public **CodecRegistry** :ref:`getDefaultCodecRegistry ` () - | - - - - - * - Returns the default codec registry used to encode and decode BSON arguments and results when calling remote Realm :ref:`io.realm.mongodb.functions.Functions ` and accessing a remote :ref:`io.realm.mongodb.mongo.MongoDatabase ` . - - - - - - - - - **Returns** - - The default codec registry for the App. - - - - - - - - - .. seealso:: - - - - - :ref:`DEFAULT_BSON_CODEC_REGISTRY ` - - - - - **Builder.getDefaultCodecRegistry()** - - - - - - - - - - - - -.. _getDefaultErrorHandler: - -.. _getDefaultErrorHandler__: - -.. _AppConfiguration_getDefaultErrorHandler: - -.. _AppConfiguration_getDefaultErrorHandler__: - -.. _io_realm_mongodb_AppConfiguration_getDefaultErrorHandler: - -.. _io_realm_mongodb_AppConfiguration_getDefaultErrorHandler__: - - - -getDefaultErrorHandler ----------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncSession.ErrorHandler ` :ref:`getDefaultErrorHandler ` () - | - - - - - * - Returns the default error handler used by synced Realms if there are problems with their :ref:`SyncSession ` . - - - - - - - - - **Returns** - - the app default error handler. - - - - - - - - - - - -.. _getDefaultSyncClientResetStrategy: - -.. _getDefaultSyncClientResetStrategy__: - -.. _AppConfiguration_getDefaultSyncClientResetStrategy: - -.. _AppConfiguration_getDefaultSyncClientResetStrategy__: - -.. _io_realm_mongodb_AppConfiguration_getDefaultSyncClientResetStrategy: - -.. _io_realm_mongodb_AppConfiguration_getDefaultSyncClientResetStrategy__: - - - -getDefaultSyncClientResetStrategy ---------------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncClientResetStrategy ` :ref:`getDefaultSyncClientResetStrategy ` () - | - - - - - * - Returns the default sync client reset strategy used by synced Realms if there are problems with their :ref:`SyncSession ` . - - - - - - - - - **Returns** - - the app default error handler. - - - - - - - - - - - -.. _getEncryptionKey: - -.. _getEncryptionKey__: - -.. _AppConfiguration_getEncryptionKey: - -.. _AppConfiguration_getEncryptionKey__: - -.. _io_realm_mongodb_AppConfiguration_getEncryptionKey: - -.. _io_realm_mongodb_AppConfiguration_getEncryptionKey__: - - - -getEncryptionKey ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **byte** :ref:`getEncryptionKey ` () - | - - - - - * - Returns the encryption key, if any, that is used to encrypt Realm users meta data on this device. If no key is returned, the data is not encrypted. - - - - - - - **Returns** - - the encryption key if exists, or ``null`` otherwise. - - - - - - - - - - - - - -.. _getHttpLogObfuscator: - -.. _getHttpLogObfuscator__: - -.. _AppConfiguration_getHttpLogObfuscator: - -.. _AppConfiguration_getHttpLogObfuscator__: - -.. _io_realm_mongodb_AppConfiguration_getHttpLogObfuscator: - -.. _io_realm_mongodb_AppConfiguration_getHttpLogObfuscator__: - - - -getHttpLogObfuscator --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`HttpLogObfuscator ` :ref:`getHttpLogObfuscator ` () - | - - - - - * - Returns the :ref:`HttpLogObfuscator ` used in the app, which keeps sensitive information in HTTP requests from being displayed in the logcat. - - - - - - - - - **Returns** - - the HTTP log obfuscator. - - - - - - - - - - - -.. _getRequestTimeoutMs: - -.. _getRequestTimeoutMs__: - -.. _AppConfiguration_getRequestTimeoutMs: - -.. _AppConfiguration_getRequestTimeoutMs__: - -.. _io_realm_mongodb_AppConfiguration_getRequestTimeoutMs: - -.. _io_realm_mongodb_AppConfiguration_getRequestTimeoutMs__: - - - -getRequestTimeoutMs -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getRequestTimeoutMs ` () - | - - - - - * - Returns the default timeout for network requests against the Realm application in milliseconds. - - - - - - - **Returns** - - the default timeout for network requests in milliseconds. - - - - - - - - - - - -.. _getSyncRootDirectory: - -.. _getSyncRootDirectory__: - -.. _AppConfiguration_getSyncRootDirectory: - -.. _AppConfiguration_getSyncRootDirectory__: - -.. _io_realm_mongodb_AppConfiguration_getSyncRootDirectory: - -.. _io_realm_mongodb_AppConfiguration_getSyncRootDirectory__: - - - -getSyncRootDirectory --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public `File `__ :ref:`getSyncRootDirectory ` () - | - - - - - * - Returns the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm. - - - - - - - **Returns** - - the sync root directory. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _AppConfiguration_hashCode: - -.. _AppConfiguration_hashCode__: - -.. _io_realm_mongodb_AppConfiguration_hashCode: - -.. _io_realm_mongodb_AppConfiguration_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration/Builder.txt b/source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration/Builder.txt deleted file mode 100644 index 0ee82aabd2..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/AppConfiguration/Builder.txt +++ /dev/null @@ -1,1503 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class AppConfiguration.Builder -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_AppConfiguration_Builder: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.AppConfiguration.Builder - - - - -**Enclosing class:** - -:ref:`AppConfiguration ` - - - -Builder used to construct instances of a :ref:`AppConfiguration ` in a fluent manner. - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Builder ` ( - | `String `__ appId - | ) - - - Creates an instance of the Builder for the AppConfiguration. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`addCustomRequestHeader ` ( - | `String `__ headerName, - | `String `__ headerValue - | ) - - - Adds an extra HTTP header to append to every request to a Realm Object Server. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`addCustomRequestHeaders ` ( - | `java.util.Map\ `__ headers - | ) - - - Adds extra HTTP headers to append to every request to a Realm Object Server. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`appName ` ( - | `String `__ appName - | ) - - - Sets the apps name. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`appVersion ` ( - | `String `__ appVersion - | ) - - - Sets the apps version. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`authorizationHeaderName ` ( - | `String `__ headerName - | ) - - - Sets the name of the HTTP header used to send authorization data in when making requests to MongoDB Realm. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`baseUrl ` ( - | `String `__ baseUrl - | ) - - - Sets the base url for the MongoDB Realm Application. - - - - - * - public :ref:`AppConfiguration ` - - | :ref:`build ` () - | - - - Creates the AppConfiguration. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`codecRegistry ` ( - | **CodecRegistry** codecRegistry - | ) - - - Set the default codec registry used to encode and decode BSON arguments and results when calling remote Realm :ref:`io.realm.mongodb.functions.Functions ` and accessing a remote :ref:`io.realm.mongodb.mongo.MongoDatabase ` . - - - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`defaultClientResetHandler ` ( - | :ref:`SyncSession.ClientResetHandler ` handler - | ) - - - Sets the default Client Reset handler used by Synced Realms when they report a Client Reset. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`defaultSyncClientResetStrategy ` ( - | :ref:`DiscardUnsyncedChangesStrategy ` strategy - | ) - - - Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`defaultSyncClientResetStrategy ` ( - | :ref:`ManuallyRecoverUnsyncedChangesStrategy ` strategy - | ) - - - Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`defaultSyncErrorHandler ` ( - | :ref:`SyncSession.ErrorHandler ` errorHandler - | ) - - - Sets the default error handler used by Synced Realms when reporting errors with their session. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`encryptionKey ` ( - | **byte[]** key - | ) - - - Sets the encryption key used to encrypt user meta data only. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`httpLogObfuscator ` ( - | :ref:`HttpLogObfuscator ` httpLogObfuscator - | ) - - - Sets the :ref:`HttpLogObfuscator ` used to keep sensitive information in HTTP requests from being displayed in the logcat. - - - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`requestTimeout ` ( - | **long** time, - | `TimeUnit `__ unit - | ) - - - Sets the default timeout used by network requests against the MongoDB Realm application. - - - - - * - public :ref:`AppConfiguration.Builder ` - - | :ref:`syncRootDirectory ` ( - | `File `__ rootDir - | ) - - - Configures the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _Builder: - -.. _Builder__: - -.. _io_realm_mongodb_AppConfiguration_Builder: - -.. _io_realm_mongodb_AppConfiguration_Builder__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Builder ` ( - | `String `__ appId - | ) - - - - - * - Creates an instance of the Builder for the AppConfiguration. - - - - - **Parameters** - - - ``appId`` - the application id of the MongoDB Realm Application. - - - - - - - - - - - - - - -Method Detail -============= - -.. _addCustomRequestHeader: - -.. _addCustomRequestHeader__: - -.. _Builder_addCustomRequestHeader: - -.. _Builder_addCustomRequestHeader__: - -.. _AppConfiguration_Builder_addCustomRequestHeader: - -.. _AppConfiguration_Builder_addCustomRequestHeader__: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader__: - - - -addCustomRequestHeader ----------------------- - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader_java_lang_String_java_lang_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader_java_lang_String__java_lang_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader_java_lang_String_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader_java_lang_String__String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader_String_java_lang_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader_String__java_lang_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader_String_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeader_String__String_: - -.. _addCustomRequestHeader_java_lang_String_java_lang_String_: - -.. _addCustomRequestHeader_java_lang_String__java_lang_String_: - -.. _addCustomRequestHeader_java_lang_String_String_: - -.. _addCustomRequestHeader_java_lang_String__String_: - -.. _addCustomRequestHeader_String_java_lang_String_: - -.. _addCustomRequestHeader_String__java_lang_String_: - -.. _addCustomRequestHeader_String_String_: - -.. _addCustomRequestHeader_String__String_: - -.. _AppConfiguration_Builder_addCustomRequestHeader_java_lang_String_java_lang_String_: - -.. _AppConfiguration_Builder_addCustomRequestHeader_java_lang_String__java_lang_String_: - -.. _AppConfiguration_Builder_addCustomRequestHeader_java_lang_String_String_: - -.. _AppConfiguration_Builder_addCustomRequestHeader_java_lang_String__String_: - -.. _AppConfiguration_Builder_addCustomRequestHeader_String_java_lang_String_: - -.. _AppConfiguration_Builder_addCustomRequestHeader_String__java_lang_String_: - -.. _AppConfiguration_Builder_addCustomRequestHeader_String_String_: - -.. _AppConfiguration_Builder_addCustomRequestHeader_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`addCustomRequestHeader ` ( - | `String `__ headerName, - | `String `__ headerValue - | ) - - - - - * - Adds an extra HTTP header to append to every request to a Realm Object Server. - - - - - **Parameters** - - - ``headerName`` - the name of the header. - - - - - ``headerValue`` - the value of header. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if a non-empty ``headerName`` is provided or a null ``headerValue`` . - - - - - - - - - - - - - - -.. _addCustomRequestHeaders: - -.. _addCustomRequestHeaders__: - -.. _Builder_addCustomRequestHeaders: - -.. _Builder_addCustomRequestHeaders__: - -.. _AppConfiguration_Builder_addCustomRequestHeaders: - -.. _AppConfiguration_Builder_addCustomRequestHeaders__: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeaders: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeaders__: - - - -addCustomRequestHeaders ------------------------ - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeaders_java_util_Map_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeaders_Map_: - -.. _addCustomRequestHeaders_java_util_Map_: - -.. _addCustomRequestHeaders_Map_: - -.. _AppConfiguration_Builder_addCustomRequestHeaders_java_util_Map_: - -.. _AppConfiguration_Builder_addCustomRequestHeaders_Map_: - -.. _io_realm_mongodb_AppConfiguration_Builder_addCustomRequestHeaders_Map_String__String__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`addCustomRequestHeaders ` ( - | `java.util.Map\ `__ headers - | ) - - - - - * - Adds extra HTTP headers to append to every request to a Realm Object Server. - - - - - **Parameters** - - - ``headers`` - map of (headerName, headerValue) pairs. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - If any of the headers provided are illegal. - - - - - - - - - - - - -.. _appName: - -.. _appName__: - -.. _Builder_appName: - -.. _Builder_appName__: - -.. _AppConfiguration_Builder_appName: - -.. _AppConfiguration_Builder_appName__: - -.. _io_realm_mongodb_AppConfiguration_Builder_appName: - -.. _io_realm_mongodb_AppConfiguration_Builder_appName__: - - - -appName -------- - -.. _io_realm_mongodb_AppConfiguration_Builder_appName_java_lang_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_appName_String_: - -.. _appName_java_lang_String_: - -.. _appName_String_: - -.. _AppConfiguration_Builder_appName_java_lang_String_: - -.. _AppConfiguration_Builder_appName_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`appName ` ( - | `String `__ appName - | ) - - - - - * - Sets the apps name. This is only used as part of debug headers sent when making network requests at the MongoDB Realm application. - - - - - **Parameters** - - - ``appName`` - app name used to identify the application. - - - - - - - - - - - - - - - - -.. _appVersion: - -.. _appVersion__: - -.. _Builder_appVersion: - -.. _Builder_appVersion__: - -.. _AppConfiguration_Builder_appVersion: - -.. _AppConfiguration_Builder_appVersion__: - -.. _io_realm_mongodb_AppConfiguration_Builder_appVersion: - -.. _io_realm_mongodb_AppConfiguration_Builder_appVersion__: - - - -appVersion ----------- - -.. _io_realm_mongodb_AppConfiguration_Builder_appVersion_java_lang_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_appVersion_String_: - -.. _appVersion_java_lang_String_: - -.. _appVersion_String_: - -.. _AppConfiguration_Builder_appVersion_java_lang_String_: - -.. _AppConfiguration_Builder_appVersion_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`appVersion ` ( - | `String `__ appVersion - | ) - - - - - * - Sets the apps version. This is only used as part of debug headers sent when making network requests at the MongoDB Realm application. - - - - - **Parameters** - - - ``appVersion`` - app version used to identify the application. - - - - - - - - - - - - - - - - -.. _authorizationHeaderName: - -.. _authorizationHeaderName__: - -.. _Builder_authorizationHeaderName: - -.. _Builder_authorizationHeaderName__: - -.. _AppConfiguration_Builder_authorizationHeaderName: - -.. _AppConfiguration_Builder_authorizationHeaderName__: - -.. _io_realm_mongodb_AppConfiguration_Builder_authorizationHeaderName: - -.. _io_realm_mongodb_AppConfiguration_Builder_authorizationHeaderName__: - - - -authorizationHeaderName ------------------------ - -.. _io_realm_mongodb_AppConfiguration_Builder_authorizationHeaderName_java_lang_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_authorizationHeaderName_String_: - -.. _authorizationHeaderName_java_lang_String_: - -.. _authorizationHeaderName_String_: - -.. _AppConfiguration_Builder_authorizationHeaderName_java_lang_String_: - -.. _AppConfiguration_Builder_authorizationHeaderName_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`authorizationHeaderName ` ( - | `String `__ headerName - | ) - - - - - * - Sets the name of the HTTP header used to send authorization data in when making requests to MongoDB Realm. The MongoDB server or firewall must have been configured to expect a custom authorization header.The default authorization header is named **DEFAULT_AUTHORIZATION_HEADER_NAME**. - - - - - - - - - **Parameters** - - - ``headerName`` - name of the header. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if a null or empty header is provided. - - - - - - - - - - - - -.. _baseUrl: - -.. _baseUrl__: - -.. _Builder_baseUrl: - -.. _Builder_baseUrl__: - -.. _AppConfiguration_Builder_baseUrl: - -.. _AppConfiguration_Builder_baseUrl__: - -.. _io_realm_mongodb_AppConfiguration_Builder_baseUrl: - -.. _io_realm_mongodb_AppConfiguration_Builder_baseUrl__: - - - -baseUrl -------- - -.. _io_realm_mongodb_AppConfiguration_Builder_baseUrl_java_lang_String_: - -.. _io_realm_mongodb_AppConfiguration_Builder_baseUrl_String_: - -.. _baseUrl_java_lang_String_: - -.. _baseUrl_String_: - -.. _AppConfiguration_Builder_baseUrl_java_lang_String_: - -.. _AppConfiguration_Builder_baseUrl_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`baseUrl ` ( - | `String `__ baseUrl - | ) - - - - - * - Sets the base url for the MongoDB Realm Application. The default value is **DEFAULT_BASE_URL**. - - - - - - - **Parameters** - - - ``baseUrl`` - the base url for the MongoDB Realm application. - - - - - - - - - - - - - - - - -.. _build: - -.. _build__: - -.. _Builder_build: - -.. _Builder_build__: - -.. _AppConfiguration_Builder_build: - -.. _AppConfiguration_Builder_build__: - -.. _io_realm_mongodb_AppConfiguration_Builder_build: - -.. _io_realm_mongodb_AppConfiguration_Builder_build__: - - - -build ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration ` :ref:`build ` () - | - - - - - * - Creates the AppConfiguration. - - - - - - - **Returns** - - the AppConfiguration that can be used to create a :ref:`App ` . - - - - - - - - - - - - - -.. _codecRegistry: - -.. _codecRegistry__: - -.. _Builder_codecRegistry: - -.. _Builder_codecRegistry__: - -.. _AppConfiguration_Builder_codecRegistry: - -.. _AppConfiguration_Builder_codecRegistry__: - -.. _io_realm_mongodb_AppConfiguration_Builder_codecRegistry: - -.. _io_realm_mongodb_AppConfiguration_Builder_codecRegistry__: - - - -codecRegistry -------------- - -.. _io_realm_mongodb_AppConfiguration_Builder_codecRegistry_CodecRegistry_: - -.. _codecRegistry_CodecRegistry_: - -.. _AppConfiguration_Builder_codecRegistry_CodecRegistry_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`codecRegistry ` ( - | **CodecRegistry** codecRegistry - | ) - - - - - * - Set the default codec registry used to encode and decode BSON arguments and results when calling remote Realm :ref:`io.realm.mongodb.functions.Functions ` and accessing a remote :ref:`io.realm.mongodb.mongo.MongoDatabase ` . - - Will default to **DEFAULT_BSON_CODEC_REGISTRY** if not specified. - - - - - - - - - **Parameters** - - - ``codecRegistry`` - The default codec registry for the App. - - - - - - - - - - - - - - .. seealso:: - - - - - **DEFAULT_BSON_CODEC_REGISTRY** - - - - - **Builder.getDefaultCodecRegistry()** - - - - - - - - - - - - -.. _defaultClientResetHandler: - -.. _defaultClientResetHandler__: - -.. _Builder_defaultClientResetHandler: - -.. _Builder_defaultClientResetHandler__: - -.. _AppConfiguration_Builder_defaultClientResetHandler: - -.. _AppConfiguration_Builder_defaultClientResetHandler__: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultClientResetHandler: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultClientResetHandler__: - - - -defaultClientResetHandler -------------------------- - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultClientResetHandler_io_realm_mongodb_sync_SyncSession_ClientResetHandler_: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultClientResetHandler_ClientResetHandler_: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultClientResetHandler_SyncSession_ClientResetHandler_: - -.. _defaultClientResetHandler_io_realm_mongodb_sync_SyncSession_ClientResetHandler_: - -.. _defaultClientResetHandler_ClientResetHandler_: - -.. _defaultClientResetHandler_SyncSession_ClientResetHandler_: - -.. _AppConfiguration_Builder_defaultClientResetHandler_io_realm_mongodb_sync_SyncSession_ClientResetHandler_: - -.. _AppConfiguration_Builder_defaultClientResetHandler_ClientResetHandler_: - -.. _AppConfiguration_Builder_defaultClientResetHandler_SyncSession_ClientResetHandler_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`defaultClientResetHandler ` ( - | :ref:`SyncSession.ClientResetHandler ` handler - | ) - - - - - * - Sets the default Client Reset handler used by Synced Realms when they report a Client Reset. session.This default can be overridden by calling :ref:`io.realm.mongodb.sync.SyncConfiguration.Builder.clientResetHandler(SyncSession.ClientResetHandler) ` when creating the :ref:`io.realm.mongodb.sync.SyncConfiguration ` . - - - - - - - - - **Parameters** - - - ``handler`` - the default Client Reset handler. - - - - - - - - - - - - - - - - -.. _defaultSyncClientResetStrategy: - -.. _defaultSyncClientResetStrategy__: - -.. _Builder_defaultSyncClientResetStrategy: - -.. _Builder_defaultSyncClientResetStrategy__: - -.. _AppConfiguration_Builder_defaultSyncClientResetStrategy: - -.. _AppConfiguration_Builder_defaultSyncClientResetStrategy__: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncClientResetStrategy: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncClientResetStrategy__: - - - -defaultSyncClientResetStrategy ------------------------------- - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncClientResetStrategy_io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncClientResetStrategy_DiscardUnsyncedChangesStrategy_: - -.. _defaultSyncClientResetStrategy_io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_: - -.. _defaultSyncClientResetStrategy_DiscardUnsyncedChangesStrategy_: - -.. _AppConfiguration_Builder_defaultSyncClientResetStrategy_io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_: - -.. _AppConfiguration_Builder_defaultSyncClientResetStrategy_DiscardUnsyncedChangesStrategy_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`defaultSyncClientResetStrategy ` ( - | :ref:`DiscardUnsyncedChangesStrategy ` strategy - | ) - - - - - * - Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset. session.This default can be overridden by calling :ref:`io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(ManuallyRecoverUnsyncedChangesStrategy) ` or :ref:`io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(DiscardUnsyncedChangesStrategy) ` when creating the :ref:`io.realm.mongodb.sync.SyncConfiguration ` . - - - - - - - - - **Parameters** - - - ``strategy`` - the default sync client reset strategy. - - - - - - - - - - - - - - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncClientResetStrategy_io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncClientResetStrategy_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _defaultSyncClientResetStrategy_io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _defaultSyncClientResetStrategy_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _AppConfiguration_Builder_defaultSyncClientResetStrategy_io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _AppConfiguration_Builder_defaultSyncClientResetStrategy_ManuallyRecoverUnsyncedChangesStrategy_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`defaultSyncClientResetStrategy ` ( - | :ref:`ManuallyRecoverUnsyncedChangesStrategy ` strategy - | ) - - - - - * - Sets the default sync client reset strategy used by Synced Realms when they report a Client Reset. session.This default can be overridden by calling :ref:`io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(ManuallyRecoverUnsyncedChangesStrategy) ` or :ref:`io.realm.mongodb.sync.SyncConfiguration.Builder.syncClientResetStrategy(DiscardUnsyncedChangesStrategy) ` when creating the :ref:`io.realm.mongodb.sync.SyncConfiguration ` . - - - - - - - - - **Parameters** - - - ``strategy`` - the default sync client reset strategy. - - - - - - - - - - - - - - - - -.. _defaultSyncErrorHandler: - -.. _defaultSyncErrorHandler__: - -.. _Builder_defaultSyncErrorHandler: - -.. _Builder_defaultSyncErrorHandler__: - -.. _AppConfiguration_Builder_defaultSyncErrorHandler: - -.. _AppConfiguration_Builder_defaultSyncErrorHandler__: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncErrorHandler: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncErrorHandler__: - - - -defaultSyncErrorHandler ------------------------ - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncErrorHandler_io_realm_mongodb_sync_SyncSession_ErrorHandler_: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncErrorHandler_ErrorHandler_: - -.. _io_realm_mongodb_AppConfiguration_Builder_defaultSyncErrorHandler_SyncSession_ErrorHandler_: - -.. _defaultSyncErrorHandler_io_realm_mongodb_sync_SyncSession_ErrorHandler_: - -.. _defaultSyncErrorHandler_ErrorHandler_: - -.. _defaultSyncErrorHandler_SyncSession_ErrorHandler_: - -.. _AppConfiguration_Builder_defaultSyncErrorHandler_io_realm_mongodb_sync_SyncSession_ErrorHandler_: - -.. _AppConfiguration_Builder_defaultSyncErrorHandler_ErrorHandler_: - -.. _AppConfiguration_Builder_defaultSyncErrorHandler_SyncSession_ErrorHandler_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`defaultSyncErrorHandler ` ( - | :ref:`SyncSession.ErrorHandler ` errorHandler - | ) - - - - - * - Sets the default error handler used by Synced Realms when reporting errors with their session.This default can be overridden by calling :ref:`io.realm.mongodb.sync.SyncConfiguration.Builder.errorHandler(SyncSession.ErrorHandler) ` when creating the :ref:`io.realm.mongodb.sync.SyncConfiguration ` . - - - - - - - - - **Parameters** - - - ``errorHandler`` - the default error handler. - - - - - - - - - - - - - - - - -.. _encryptionKey: - -.. _encryptionKey__: - -.. _Builder_encryptionKey: - -.. _Builder_encryptionKey__: - -.. _AppConfiguration_Builder_encryptionKey: - -.. _AppConfiguration_Builder_encryptionKey__: - -.. _io_realm_mongodb_AppConfiguration_Builder_encryptionKey: - -.. _io_realm_mongodb_AppConfiguration_Builder_encryptionKey__: - - - -encryptionKey -------------- - -.. _io_realm_mongodb_AppConfiguration_Builder_encryptionKey_byte_: - -.. _io_realm_mongodb_AppConfiguration_Builder_encryptionKey_byte____: - -.. _encryptionKey_byte_: - -.. _encryptionKey_byte____: - -.. _AppConfiguration_Builder_encryptionKey_byte_: - -.. _AppConfiguration_Builder_encryptionKey_byte____: - -.. _io_realm_mongodb_AppConfiguration_Builder_encryptionKey_byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`encryptionKey ` ( - | **byte[]** key - | ) - - - - - * - Sets the encryption key used to encrypt user meta data only. Individual Realms needs to use :ref:`io.realm.mongodb.sync.SyncConfiguration.Builder.encryptionKey(byte[]) ` to make them encrypted. - - - - - - - **Parameters** - - - ``key`` - a 64 byte encryption key. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the key is not 64 bytes long. - - - - - - - - - - - - -.. _httpLogObfuscator: - -.. _httpLogObfuscator__: - -.. _Builder_httpLogObfuscator: - -.. _Builder_httpLogObfuscator__: - -.. _AppConfiguration_Builder_httpLogObfuscator: - -.. _AppConfiguration_Builder_httpLogObfuscator__: - -.. _io_realm_mongodb_AppConfiguration_Builder_httpLogObfuscator: - -.. _io_realm_mongodb_AppConfiguration_Builder_httpLogObfuscator__: - - - -httpLogObfuscator ------------------ - -.. _io_realm_mongodb_AppConfiguration_Builder_httpLogObfuscator_io_realm_mongodb_log_obfuscator_HttpLogObfuscator_: - -.. _io_realm_mongodb_AppConfiguration_Builder_httpLogObfuscator_HttpLogObfuscator_: - -.. _httpLogObfuscator_io_realm_mongodb_log_obfuscator_HttpLogObfuscator_: - -.. _httpLogObfuscator_HttpLogObfuscator_: - -.. _AppConfiguration_Builder_httpLogObfuscator_io_realm_mongodb_log_obfuscator_HttpLogObfuscator_: - -.. _AppConfiguration_Builder_httpLogObfuscator_HttpLogObfuscator_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`httpLogObfuscator ` ( - | :ref:`HttpLogObfuscator ` httpLogObfuscator - | ) - - - - - * - Sets the :ref:`HttpLogObfuscator ` used to keep sensitive information in HTTP requests from being displayed in the logcat. - - If left unspecified, it will default to obfuscating HTTP login requests. - - - - - - - **Parameters** - - - ``httpLogObfuscator`` - the default HTTP log obfuscator for the app. - - - - - - - - - - - - - - - - -.. _requestTimeout: - -.. _requestTimeout__: - -.. _Builder_requestTimeout: - -.. _Builder_requestTimeout__: - -.. _AppConfiguration_Builder_requestTimeout: - -.. _AppConfiguration_Builder_requestTimeout__: - -.. _io_realm_mongodb_AppConfiguration_Builder_requestTimeout: - -.. _io_realm_mongodb_AppConfiguration_Builder_requestTimeout__: - - - -requestTimeout --------------- - -.. _io_realm_mongodb_AppConfiguration_Builder_requestTimeout_long_java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_AppConfiguration_Builder_requestTimeout_long__java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_AppConfiguration_Builder_requestTimeout_long_TimeUnit_: - -.. _io_realm_mongodb_AppConfiguration_Builder_requestTimeout_long__TimeUnit_: - -.. _requestTimeout_long_java_util_concurrent_TimeUnit_: - -.. _requestTimeout_long__java_util_concurrent_TimeUnit_: - -.. _requestTimeout_long_TimeUnit_: - -.. _requestTimeout_long__TimeUnit_: - -.. _AppConfiguration_Builder_requestTimeout_long_java_util_concurrent_TimeUnit_: - -.. _AppConfiguration_Builder_requestTimeout_long__java_util_concurrent_TimeUnit_: - -.. _AppConfiguration_Builder_requestTimeout_long_TimeUnit_: - -.. _AppConfiguration_Builder_requestTimeout_long__TimeUnit_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`requestTimeout ` ( - | **long** time, - | `TimeUnit `__ unit - | ) - - - - - * - Sets the default timeout used by network requests against the MongoDB Realm application. Requests will terminate with a failure if they exceed this limit. The default value is :ref:`AppConfiguration.DEFAULT_REQUEST_TIMEOUT ` seconds. - - - - - - - **Parameters** - - - ``time`` - the timeout value for network requests. - - - - - ``unit`` - the unit of time used to define the timeout. - - - - - - - - - - - - - - - - -.. _syncRootDirectory: - -.. _syncRootDirectory__: - -.. _Builder_syncRootDirectory: - -.. _Builder_syncRootDirectory__: - -.. _AppConfiguration_Builder_syncRootDirectory: - -.. _AppConfiguration_Builder_syncRootDirectory__: - -.. _io_realm_mongodb_AppConfiguration_Builder_syncRootDirectory: - -.. _io_realm_mongodb_AppConfiguration_Builder_syncRootDirectory__: - - - -syncRootDirectory ------------------ - -.. _io_realm_mongodb_AppConfiguration_Builder_syncRootDirectory_java_io_File_: - -.. _io_realm_mongodb_AppConfiguration_Builder_syncRootDirectory_File_: - -.. _syncRootDirectory_java_io_File_: - -.. _syncRootDirectory_File_: - -.. _AppConfiguration_Builder_syncRootDirectory_java_io_File_: - -.. _AppConfiguration_Builder_syncRootDirectory_File_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppConfiguration.Builder ` :ref:`syncRootDirectory ` ( - | `File `__ rootDir - | ) - - - - - * - Configures the root folder containing all files and Realms used when synchronizing data between the device and MongoDB Realm.The default root dir is ``Context.getFilesDir()/mongodb-realm`` . - - - - - - - - - **Parameters** - - - ``rootDir`` - where to store sync related files. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/AppException.txt b/source/sdk/temp/java/api/io/realm/mongodb/AppException.txt deleted file mode 100644 index 6ca811e5d8..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/AppException.txt +++ /dev/null @@ -1,855 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Exception AppException -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_AppException: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | `java.lang.Throwable `__ - | `java.lang.Exception `__ - | `java.lang.RuntimeException `__ - | io.realm.mongodb.AppException - - -This class is a wrapper for all errors happening when communicating with a MongoDB Realm app. This include both exceptions and protocol errors. Only :ref:`getErrorCode() ` is guaranteed to contain a value. If the error was caused by an underlying exception :ref:`getErrorMessage() ` is ``null`` and :ref:`getException() ` is set, while if the error was a protocol error :ref:`getErrorMessage() ` is set and :ref:`getException() ` is null. - - - - -.. seealso:: - - - - - :ref:`ErrorCode for a list of possible errors. ` - - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `String `__ errorMessage - | ) - - - Create an error caused by an error in the protocol when communicating with the Object Server. - - - - - * - | :ref:`AppException ` ( - | `String `__ errorType, - | **int** errorCode, - | `String `__ errorMessage - | ) - - - Creates an unknown error that could not be mapped to any known error case. - - - - - * - | :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `Throwable `__ exception - | ) - - - Create an error caused by an an exception when communicating with the Object Server. - - - - - * - | :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `String `__ title, - | `String `__ hint - | ) - - - Errors happening while trying to authenticate a user. - - - - - * - | :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `String `__ errorMessage, - | `Throwable `__ exception - | ) - - - Generic error happening that could happen anywhere. - - - - - * - | :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `String `__ nativeErrorType, - | **int** nativeErrorCode, - | `String `__ errorMessage, - | `Throwable `__ exception - | ) - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`ErrorCode.Category ` - - | :ref:`getCategory ` () - | - - - Returns the :ref:`ErrorCode.Category ` category for this error. - - - - - - - * - public :ref:`ErrorCode ` - - | :ref:`getErrorCode ` () - | - - - Returns the :ref:`ErrorCode ` identifying the type of error. - - - - - - - * - public **int** - - | :ref:`getErrorIntValue ` () - | - - - Returns an integer representing this specific type of error. - - - - - * - public `String `__ - - | :ref:`getErrorMessage ` () - | - - - Returns a more detailed error message about the cause of this error. - - - - - * - public `String `__ - - | :ref:`getErrorType ` () - | - - - Returns a string describing the type of error it is. - - - - - * - public `Throwable `__ - - | :ref:`getException ` () - | - - - Returns the underlying exception causing this error, if any. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Throwable `__ : ``getMessage`` , ``getLocalizedMessage`` , ``getCause`` , ``initCause`` , ``toString`` , ``printStackTrace`` , ``printStackTrace`` , ``printStackTrace`` , ``fillInStackTrace`` , ``getStackTrace`` , ``setStackTrace`` , ``addSuppressed`` , ``getSuppressed`` - - - - -Constructor Detail -================== - -.. _AppException: - -.. _AppException__: - -.. _io_realm_mongodb_AppException: - -.. _io_realm_mongodb_AppException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `String `__ errorMessage - | ) - - - - - * - Create an error caused by an error in the protocol when communicating with the Object Server. - - - - - **Parameters** - - - ``errorCode`` - error code for this type of error. - - - - - ``errorMessage`` - detailed error message. - - - - - - - - - - - - -.. _AppException: - -.. _AppException__: - -.. _io_realm_mongodb_AppException: - -.. _io_realm_mongodb_AppException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppException ` ( - | `String `__ errorType, - | **int** errorCode, - | `String `__ errorMessage - | ) - - - - - * - Creates an unknown error that could not be mapped to any known error case.This means that :ref:`getErrorCode() ` will return :ref:`ErrorCode.UNKNOWN ` , but :ref:`getErrorType() ` and :ref:`getErrorIntValue() ` will return the underlying values which can help identify the real error. - - - - - - - - - **Parameters** - - - ``errorCode`` - error code for this type of error. - - - - - ``errorMessage`` - detailed error message. - - - - - - - - - - - - -.. _AppException: - -.. _AppException__: - -.. _io_realm_mongodb_AppException: - -.. _io_realm_mongodb_AppException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `Throwable `__ exception - | ) - - - - - * - Create an error caused by an an exception when communicating with the Object Server. - - - - - **Parameters** - - - ``errorCode`` - error code for this type of error. - - - - - ``exception`` - underlying exception causing this error. - - - - - - - - - - - - -.. _AppException: - -.. _AppException__: - -.. _io_realm_mongodb_AppException: - -.. _io_realm_mongodb_AppException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `String `__ title, - | `String `__ hint - | ) - - - - - * - Errors happening while trying to authenticate a user. - - - - - **Parameters** - - - ``errorCode`` - error code for this type of error. - - - - - ``title`` - title for this type of error. - - - - - ``hint`` - a hint for resolving the error. - - - - - - - - - - - - -.. _AppException: - -.. _AppException__: - -.. _io_realm_mongodb_AppException: - -.. _io_realm_mongodb_AppException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `String `__ errorMessage, - | `Throwable `__ exception - | ) - - - - - * - Generic error happening that could happen anywhere. - - - - - **Parameters** - - - ``errorCode`` - error code for this type of error. - - - - - ``errorMessage`` - detailed error message. - - - - - ``exception`` - underlying exception if the error was caused by this. - - - - - - - - - - - - -.. _AppException: - -.. _AppException__: - -.. _io_realm_mongodb_AppException: - -.. _io_realm_mongodb_AppException__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AppException ` ( - | :ref:`ErrorCode ` errorCode, - | `String `__ nativeErrorType, - | **int** nativeErrorCode, - | `String `__ errorMessage, - | `Throwable `__ exception - | ) - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _getCategory: - -.. _getCategory__: - -.. _AppException_getCategory: - -.. _AppException_getCategory__: - -.. _io_realm_mongodb_AppException_getCategory: - -.. _io_realm_mongodb_AppException_getCategory__: - - - -getCategory ------------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ErrorCode.Category ` :ref:`getCategory ` () - | - - - - - * - Returns the :ref:`ErrorCode.Category ` category for this error. Errors that are :ref:`ErrorCode.Category.RECOVERABLE ` mean that it is still possible for a given :ref:`SyncSession ` to resume synchronization. :ref:`ErrorCode.Category.FATAL ` errors means that session has stopped and cannot be recovered. - - - - - - - - - **Returns** - - the error category. - - - - - - - - - - - -.. _getErrorCode: - -.. _getErrorCode__: - -.. _AppException_getErrorCode: - -.. _AppException_getErrorCode__: - -.. _io_realm_mongodb_AppException_getErrorCode: - -.. _io_realm_mongodb_AppException_getErrorCode__: - - - -getErrorCode ------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ErrorCode ` :ref:`getErrorCode ` () - | - - - - - * - Returns the :ref:`ErrorCode ` identifying the type of error. - - If :ref:`ErrorCode.UNKNOWN ` is returned, it means that the error could not be mapped to any known errors. In that case :ref:`getErrorType() ` and :ref:`getErrorIntValue() ` will return the underlying error information which can better identify the type of error. - - - - - - - - - - - **Returns** - - the error code identifying the type of error. - - - - - - - - - .. seealso:: - - - - - :ref:`ErrorCode ` - - - - - - - - - - - - -.. _getErrorIntValue: - -.. _getErrorIntValue__: - -.. _AppException_getErrorIntValue: - -.. _AppException_getErrorIntValue__: - -.. _io_realm_mongodb_AppException_getErrorIntValue: - -.. _io_realm_mongodb_AppException_getErrorIntValue__: - - - -getErrorIntValue ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getErrorIntValue ` () - | - - - - - * - Returns an integer representing this specific type of error. This value is only unique within the value provided by :ref:`getErrorType() ` . - - - - - - - - - **Returns** - - the integer value representing this type of error. - - - - - - - - - - - -.. _getErrorMessage: - -.. _getErrorMessage__: - -.. _AppException_getErrorMessage: - -.. _AppException_getErrorMessage__: - -.. _io_realm_mongodb_AppException_getErrorMessage: - -.. _io_realm_mongodb_AppException_getErrorMessage__: - - - -getErrorMessage ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getErrorMessage ` () - | - - - - - * - Returns a more detailed error message about the cause of this error. - - - - - - - **Returns** - - a detailed error message or ``null`` if one was not available. - - - - - - - - - - - - - -.. _getErrorType: - -.. _getErrorType__: - -.. _AppException_getErrorType: - -.. _AppException_getErrorType__: - -.. _io_realm_mongodb_AppException_getErrorType: - -.. _io_realm_mongodb_AppException_getErrorType__: - - - -getErrorType ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getErrorType ` () - | - - - - - * - Returns a string describing the type of error it is. - - - - - - - **Returns** - - - - - - - - - - - - - -.. _getException: - -.. _getException__: - -.. _AppException_getException: - -.. _AppException_getException__: - -.. _io_realm_mongodb_AppException_getException: - -.. _io_realm_mongodb_AppException_getException__: - - - -getException ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Throwable `__ :ref:`getException ` () - | - - - - - * - Returns the underlying exception causing this error, if any. - - - - - - - **Returns** - - the underlying exception causing this error, or ``null`` if not caused by an exception. - - - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _AppException_toString: - -.. _AppException_toString__: - -.. _io_realm_mongodb_AppException_toString: - -.. _io_realm_mongodb_AppException_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Throwable `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/AuthenticationListener.txt b/source/sdk/temp/java/api/io/realm/mongodb/AuthenticationListener.txt deleted file mode 100644 index 82dc644d68..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/AuthenticationListener.txt +++ /dev/null @@ -1,190 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface AuthenticationListener -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_AuthenticationListener: - - - -io.realm.mongodb -================ - -Interface describing events related to Users and their authentication - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`loggedIn ` ( - | :ref:`User ` user - | ) - - - A user was logged into the Object Server - - - - - * - public **void** - - | :ref:`loggedOut ` ( - | :ref:`User ` user - | ) - - - A user was successfully logged out from the Object Server. - - - - - - - -Method Detail -============= - -.. _loggedIn: - -.. _loggedIn__: - -.. _AuthenticationListener_loggedIn: - -.. _AuthenticationListener_loggedIn__: - -.. _io_realm_mongodb_AuthenticationListener_loggedIn: - -.. _io_realm_mongodb_AuthenticationListener_loggedIn__: - - - -loggedIn --------- - -.. _io_realm_mongodb_AuthenticationListener_loggedIn_io_realm_mongodb_User_: - -.. _io_realm_mongodb_AuthenticationListener_loggedIn_User_: - -.. _loggedIn_io_realm_mongodb_User_: - -.. _loggedIn_User_: - -.. _AuthenticationListener_loggedIn_io_realm_mongodb_User_: - -.. _AuthenticationListener_loggedIn_User_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`loggedIn ` ( - | :ref:`User ` user - | ) - - - - - * - A user was logged into the Object Server - - - - - **Parameters** - - - ``user`` - :ref:`User ` that is now logged in. - - - - - - - - - - - - - - - - - - -.. _loggedOut: - -.. _loggedOut__: - -.. _AuthenticationListener_loggedOut: - -.. _AuthenticationListener_loggedOut__: - -.. _io_realm_mongodb_AuthenticationListener_loggedOut: - -.. _io_realm_mongodb_AuthenticationListener_loggedOut__: - - - -loggedOut ---------- - -.. _io_realm_mongodb_AuthenticationListener_loggedOut_io_realm_mongodb_User_: - -.. _io_realm_mongodb_AuthenticationListener_loggedOut_User_: - -.. _loggedOut_io_realm_mongodb_User_: - -.. _loggedOut_User_: - -.. _AuthenticationListener_loggedOut_io_realm_mongodb_User_: - -.. _AuthenticationListener_loggedOut_User_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`loggedOut ` ( - | :ref:`User ` user - | ) - - - - - * - A user was successfully logged out from the Object Server. - - - - - **Parameters** - - - ``user`` - :ref:`User ` that was successfully logged out. - - - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/Credentials.txt b/source/sdk/temp/java/api/io/realm/mongodb/Credentials.txt deleted file mode 100644 index c10df78fab..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/Credentials.txt +++ /dev/null @@ -1,1024 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Credentials -^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_Credentials: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.Credentials - - -Credentials represent a login with a given login provider, and are used by the MongoDB Realm to verify the user and grant access. The :ref:`Provider.EMAIL_PASSWORD ` provider is enabled by default. All other providers must be enabled on MongoDB Realm to work. - -Note that users wanting to login using Email/Password must register first using :ref:`EmailPasswordAuth.registerUser(String, String) ` . - - - -Credentials are used the following way: - -.. code-block:: java - - - // Example - App app = new App("app-id"); - Credentials credentials = Credentials.emailPassword("email", "password"); - User user = app.loginAsync(credentials, new App.Callback() { - @Override - public void onResult(Result result) { - if (result.isSuccess() { - handleLogin(result.get()); - } else { - handleError(result.getError()); - } - } - )); - } - - - - - - - - -.. seealso:: - - - - - `Authentication Providers `__ - - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static final`` - - :ref:`Credentials.Provider ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`Credentials ` - - | :ref:`anonymous ` () - | - - - Creates credentials representing an anonymous user. - - - - - * - public static :ref:`Credentials ` - - | :ref:`apiKey ` ( - | `String `__ key - | ) - - - Creates credentials representing a login using a user API key. - - - - - * - public static :ref:`Credentials ` - - | :ref:`apple ` ( - | `String `__ idToken - | ) - - - Creates credentials representing a login using an Apple ID token. - - - - - * - public `String `__ - - | :ref:`asJson ` () - | - - - Returns the credentials object serialized as a json string. - - - - - * - public static :ref:`Credentials ` - - | :ref:`customFunction ` ( - | **Document** arguments - | ) - - - Creates credentials representing a remote function from MongoDB Realm using a **Document** which will be parsed as an argument to the remote function, so the keys must match the format and names the function expects. - - - - - - - * - public static :ref:`Credentials ` - - | :ref:`emailPassword ` ( - | `String `__ email, - | `String `__ password - | ) - - - Creates credentials representing a login using email and password. - - - - - * - public static :ref:`Credentials ` - - | :ref:`facebook ` ( - | `String `__ accessToken - | ) - - - Creates credentials representing a login using a Facebook access token. - - - - - * - public :ref:`Credentials.Provider ` - - | :ref:`getIdentityProvider ` () - | - - - Returns the identity provider used to authenticate with. - - - - - * - public static :ref:`Credentials ` - - | :ref:`google ` ( - | `String `__ authorizationCode - | ) - - - Creates credentials representing a login using a :ref:`GoogleAuthType.AUTH_CODE ` Google access token. - - - - - - - * - public static :ref:`Credentials ` - - | :ref:`google ` ( - | `String `__ token, - | :ref:`GoogleAuthType ` type - | ) - - - Creates credentials representing a login using a Google access token of a given :ref:`GoogleAuthType ` . - - - - - - - * - public static :ref:`Credentials ` - - | :ref:`jwt ` ( - | `String `__ jwtToken - | ) - - - Creates credentials representing a login using a JWT Token. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _anonymous: - -.. _anonymous__: - -.. _Credentials_anonymous: - -.. _Credentials_anonymous__: - -.. _io_realm_mongodb_Credentials_anonymous: - -.. _io_realm_mongodb_Credentials_anonymous__: - - - -anonymous ---------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`anonymous ` () - | - - - - - * - Creates credentials representing an anonymous user.Logging the user out again means that data is lost with no means of recovery and it isn't possible to share the user details across devices. - - The anonymous user must be linked to another real user to preserve data after a log out. - - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - - - -.. _apiKey: - -.. _apiKey__: - -.. _Credentials_apiKey: - -.. _Credentials_apiKey__: - -.. _io_realm_mongodb_Credentials_apiKey: - -.. _io_realm_mongodb_Credentials_apiKey__: - - - -apiKey ------- - -.. _io_realm_mongodb_Credentials_apiKey_java_lang_String_: - -.. _io_realm_mongodb_Credentials_apiKey_String_: - -.. _apiKey_java_lang_String_: - -.. _apiKey_String_: - -.. _Credentials_apiKey_java_lang_String_: - -.. _Credentials_apiKey_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`apiKey ` ( - | `String `__ key - | ) - - - - - * - Creates credentials representing a login using a user API key.This provider must be enabled on MongoDB Realm to work. - - - - - - - **Parameters** - - - ``key`` - the API key to use for login. - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - - - -.. _apple: - -.. _apple__: - -.. _Credentials_apple: - -.. _Credentials_apple__: - -.. _io_realm_mongodb_Credentials_apple: - -.. _io_realm_mongodb_Credentials_apple__: - - - -apple ------ - -.. _io_realm_mongodb_Credentials_apple_java_lang_String_: - -.. _io_realm_mongodb_Credentials_apple_String_: - -.. _apple_java_lang_String_: - -.. _apple_String_: - -.. _Credentials_apple_java_lang_String_: - -.. _Credentials_apple_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`apple ` ( - | `String `__ idToken - | ) - - - - - * - Creates credentials representing a login using an Apple ID token.This provider must be enabled on MongoDB Realm to work. - - - - - - - **Parameters** - - - ``idToken`` - the ID token generated when using your Apple login. - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - - - -.. _asJson: - -.. _asJson__: - -.. _Credentials_asJson: - -.. _Credentials_asJson__: - -.. _io_realm_mongodb_Credentials_asJson: - -.. _io_realm_mongodb_Credentials_asJson__: - - - -asJson ------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`asJson ` () - | - - - - - * - Returns the credentials object serialized as a json string. - - - - - - - **Returns** - - a json serialized string of the credentials object. - - - - - - - - - - - -.. _customFunction: - -.. _customFunction__: - -.. _Credentials_customFunction: - -.. _Credentials_customFunction__: - -.. _io_realm_mongodb_Credentials_customFunction: - -.. _io_realm_mongodb_Credentials_customFunction__: - - - -customFunction --------------- - -.. _io_realm_mongodb_Credentials_customFunction_Document_: - -.. _customFunction_Document_: - -.. _Credentials_customFunction_Document_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`customFunction ` ( - | **Document** arguments - | ) - - - - - * - Creates credentials representing a remote function from MongoDB Realm using a **Document** which will be parsed as an argument to the remote function, so the keys must match the format and names the function expects. - - This provider must be enabled on MongoDB Realm to work. - - - - - - - **Parameters** - - - ``arguments`` - document containing the function arguments. - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - - - -.. _emailPassword: - -.. _emailPassword__: - -.. _Credentials_emailPassword: - -.. _Credentials_emailPassword__: - -.. _io_realm_mongodb_Credentials_emailPassword: - -.. _io_realm_mongodb_Credentials_emailPassword__: - - - -emailPassword -------------- - -.. _io_realm_mongodb_Credentials_emailPassword_java_lang_String_java_lang_String_: - -.. _io_realm_mongodb_Credentials_emailPassword_java_lang_String__java_lang_String_: - -.. _io_realm_mongodb_Credentials_emailPassword_java_lang_String_String_: - -.. _io_realm_mongodb_Credentials_emailPassword_java_lang_String__String_: - -.. _io_realm_mongodb_Credentials_emailPassword_String_java_lang_String_: - -.. _io_realm_mongodb_Credentials_emailPassword_String__java_lang_String_: - -.. _io_realm_mongodb_Credentials_emailPassword_String_String_: - -.. _io_realm_mongodb_Credentials_emailPassword_String__String_: - -.. _emailPassword_java_lang_String_java_lang_String_: - -.. _emailPassword_java_lang_String__java_lang_String_: - -.. _emailPassword_java_lang_String_String_: - -.. _emailPassword_java_lang_String__String_: - -.. _emailPassword_String_java_lang_String_: - -.. _emailPassword_String__java_lang_String_: - -.. _emailPassword_String_String_: - -.. _emailPassword_String__String_: - -.. _Credentials_emailPassword_java_lang_String_java_lang_String_: - -.. _Credentials_emailPassword_java_lang_String__java_lang_String_: - -.. _Credentials_emailPassword_java_lang_String_String_: - -.. _Credentials_emailPassword_java_lang_String__String_: - -.. _Credentials_emailPassword_String_java_lang_String_: - -.. _Credentials_emailPassword_String__java_lang_String_: - -.. _Credentials_emailPassword_String_String_: - -.. _Credentials_emailPassword_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`emailPassword ` ( - | `String `__ email, - | `String `__ password - | ) - - - - - * - Creates credentials representing a login using email and password. - - - - - **Parameters** - - - ``email`` - email of the user logging in. - - - - - ``password`` - password of the user logging in. - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - - - -.. _facebook: - -.. _facebook__: - -.. _Credentials_facebook: - -.. _Credentials_facebook__: - -.. _io_realm_mongodb_Credentials_facebook: - -.. _io_realm_mongodb_Credentials_facebook__: - - - -facebook --------- - -.. _io_realm_mongodb_Credentials_facebook_java_lang_String_: - -.. _io_realm_mongodb_Credentials_facebook_String_: - -.. _facebook_java_lang_String_: - -.. _facebook_String_: - -.. _Credentials_facebook_java_lang_String_: - -.. _Credentials_facebook_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`facebook ` ( - | `String `__ accessToken - | ) - - - - - * - Creates credentials representing a login using a Facebook access token.This provider must be enabled on MongoDB Realm to work. - - - - - - - **Parameters** - - - ``accessToken`` - the access token returned when logging in to Facebook. - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - - - -.. _getIdentityProvider: - -.. _getIdentityProvider__: - -.. _Credentials_getIdentityProvider: - -.. _Credentials_getIdentityProvider__: - -.. _io_realm_mongodb_Credentials_getIdentityProvider: - -.. _io_realm_mongodb_Credentials_getIdentityProvider__: - - - -getIdentityProvider -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Credentials.Provider ` :ref:`getIdentityProvider ` () - | - - - - - * - Returns the identity provider used to authenticate with. - - - - - - - **Returns** - - the provider identifying the chosen credentials. - - - - - - - - - - - -.. _google: - -.. _google__: - -.. _Credentials_google: - -.. _Credentials_google__: - -.. _io_realm_mongodb_Credentials_google: - -.. _io_realm_mongodb_Credentials_google__: - - - -google ------- - -.. _io_realm_mongodb_Credentials_google_java_lang_String_: - -.. _io_realm_mongodb_Credentials_google_String_: - -.. _google_java_lang_String_: - -.. _google_String_: - -.. _Credentials_google_java_lang_String_: - -.. _Credentials_google_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`google ` ( - | `String `__ authorizationCode - | ) - - - - - * - Creates credentials representing a login using a :ref:`GoogleAuthType.AUTH_CODE ` Google access token. - - This provider must be enabled on MongoDB Realm to work. - - - - - - - **Parameters** - - - ``authorizationCode`` - the authorization code returned when logging in to Google. - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - -.. _io_realm_mongodb_Credentials_google_java_lang_String_io_realm_mongodb_auth_GoogleAuthType_: - -.. _io_realm_mongodb_Credentials_google_java_lang_String__io_realm_mongodb_auth_GoogleAuthType_: - -.. _io_realm_mongodb_Credentials_google_java_lang_String_GoogleAuthType_: - -.. _io_realm_mongodb_Credentials_google_java_lang_String__GoogleAuthType_: - -.. _io_realm_mongodb_Credentials_google_String_io_realm_mongodb_auth_GoogleAuthType_: - -.. _io_realm_mongodb_Credentials_google_String__io_realm_mongodb_auth_GoogleAuthType_: - -.. _io_realm_mongodb_Credentials_google_String_GoogleAuthType_: - -.. _io_realm_mongodb_Credentials_google_String__GoogleAuthType_: - -.. _google_java_lang_String_io_realm_mongodb_auth_GoogleAuthType_: - -.. _google_java_lang_String__io_realm_mongodb_auth_GoogleAuthType_: - -.. _google_java_lang_String_GoogleAuthType_: - -.. _google_java_lang_String__GoogleAuthType_: - -.. _google_String_io_realm_mongodb_auth_GoogleAuthType_: - -.. _google_String__io_realm_mongodb_auth_GoogleAuthType_: - -.. _google_String_GoogleAuthType_: - -.. _google_String__GoogleAuthType_: - -.. _Credentials_google_java_lang_String_io_realm_mongodb_auth_GoogleAuthType_: - -.. _Credentials_google_java_lang_String__io_realm_mongodb_auth_GoogleAuthType_: - -.. _Credentials_google_java_lang_String_GoogleAuthType_: - -.. _Credentials_google_java_lang_String__GoogleAuthType_: - -.. _Credentials_google_String_io_realm_mongodb_auth_GoogleAuthType_: - -.. _Credentials_google_String__io_realm_mongodb_auth_GoogleAuthType_: - -.. _Credentials_google_String_GoogleAuthType_: - -.. _Credentials_google_String__GoogleAuthType_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`google ` ( - | `String `__ token, - | :ref:`GoogleAuthType ` type - | ) - - - - - * - Creates credentials representing a login using a Google access token of a given :ref:`GoogleAuthType ` . - - This provider must be enabled on MongoDB Realm to work. - - - - - - - **Parameters** - - - ``token`` - the access token returned when logging in to Google. - - - - - ``type`` - the access token type - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - - - -.. _jwt: - -.. _jwt__: - -.. _Credentials_jwt: - -.. _Credentials_jwt__: - -.. _io_realm_mongodb_Credentials_jwt: - -.. _io_realm_mongodb_Credentials_jwt__: - - - -jwt ----- - -.. _io_realm_mongodb_Credentials_jwt_java_lang_String_: - -.. _io_realm_mongodb_Credentials_jwt_String_: - -.. _jwt_java_lang_String_: - -.. _jwt_String_: - -.. _Credentials_jwt_java_lang_String_: - -.. _Credentials_jwt_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials ` :ref:`jwt ` ( - | `String `__ jwtToken - | ) - - - - - * - Creates credentials representing a login using a JWT Token. This token is normally generated after a custom OAuth2 login flow.This provider must be enabled on MongoDB Realm to work. - - - - - - - **Parameters** - - - ``jwtToken`` - the jwt token returned after a custom login to a another service. - - - - - - - - **Returns** - - a set of credentials that can be used to log into MongoDB Realm using :ref:`App.loginAsync(Credentials, App.Callback) ` . - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/Credentials/Provider.txt b/source/sdk/temp/java/api/io/realm/mongodb/Credentials/Provider.txt deleted file mode 100644 index 4ab94e049e..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/Credentials/Provider.txt +++ /dev/null @@ -1,561 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum Credentials.Provider -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_Credentials_Provider: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.Credentials.Provider - - - - -**Enclosing class:** - -:ref:`Credentials ` - - - -This enum contains the list of identity providers supported by MongoDB Realm. All of these except :ref:`EMAIL_PASSWORD ` must be enabled manually on MongoDB Realm to work. - - - - -.. seealso:: - - - - - `Authentication Providers `__ - - - - - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`ANONYMOUS ` - - - - - - - * - :ref:`API_KEY ` - - - - - - - * - :ref:`APPLE ` - - - - - - - * - :ref:`CUSTOM_FUNCTION ` - - - - - - - * - :ref:`EMAIL_PASSWORD ` - - - - - - - * - :ref:`FACEBOOK ` - - - - - - - * - :ref:`GOOGLE ` - - - - - - - * - :ref:`JWT ` - - - - - - - * - :ref:`UNKNOWN ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`Credentials.Provider ` - - | :ref:`fromId ` ( - | `String `__ id - | ) - - - Create the identity provider from the ID string returned by MongoDB Realm. - - - - - * - public `String `__ - - | :ref:`getId ` () - | - - - Return the string presentation of this identity provider. - - - - - * - public static :ref:`Credentials.Provider ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`Credentials.Provider ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_Credentials_Provider_ANONYMOUS: - -.. _Credentials_Provider_ANONYMOUS: - - - -``ANONYMOUS`` --------------- - -public static final :ref:`Credentials.Provider ` - - - - - -.. _io_realm_mongodb_Credentials_Provider_API_KEY: - -.. _Credentials_Provider_API_KEY: - - - -``API_KEY`` ------------- - -public static final :ref:`Credentials.Provider ` - - - - - -.. _io_realm_mongodb_Credentials_Provider_APPLE: - -.. _Credentials_Provider_APPLE: - - - -``APPLE`` ----------- - -public static final :ref:`Credentials.Provider ` - - - - - -.. _io_realm_mongodb_Credentials_Provider_CUSTOM_FUNCTION: - -.. _Credentials_Provider_CUSTOM_FUNCTION: - - - -``CUSTOM_FUNCTION`` --------------------- - -public static final :ref:`Credentials.Provider ` - - - - - -.. _io_realm_mongodb_Credentials_Provider_EMAIL_PASSWORD: - -.. _Credentials_Provider_EMAIL_PASSWORD: - - - -``EMAIL_PASSWORD`` -------------------- - -public static final :ref:`Credentials.Provider ` - - - - - -.. _io_realm_mongodb_Credentials_Provider_FACEBOOK: - -.. _Credentials_Provider_FACEBOOK: - - - -``FACEBOOK`` -------------- - -public static final :ref:`Credentials.Provider ` - - - - - -.. _io_realm_mongodb_Credentials_Provider_GOOGLE: - -.. _Credentials_Provider_GOOGLE: - - - -``GOOGLE`` ------------ - -public static final :ref:`Credentials.Provider ` - - - - - -.. _io_realm_mongodb_Credentials_Provider_JWT: - -.. _Credentials_Provider_JWT: - - - -``JWT`` --------- - -public static final :ref:`Credentials.Provider ` - - - - - -.. _io_realm_mongodb_Credentials_Provider_UNKNOWN: - -.. _Credentials_Provider_UNKNOWN: - - - -``UNKNOWN`` ------------- - -public static final :ref:`Credentials.Provider ` - - - - - - -Method Detail -============= - -.. _fromId: - -.. _fromId__: - -.. _Provider_fromId: - -.. _Provider_fromId__: - -.. _Credentials_Provider_fromId: - -.. _Credentials_Provider_fromId__: - -.. _io_realm_mongodb_Credentials_Provider_fromId: - -.. _io_realm_mongodb_Credentials_Provider_fromId__: - - - -fromId ------- - -.. _io_realm_mongodb_Credentials_Provider_fromId_java_lang_String_: - -.. _io_realm_mongodb_Credentials_Provider_fromId_String_: - -.. _fromId_java_lang_String_: - -.. _fromId_String_: - -.. _Credentials_Provider_fromId_java_lang_String_: - -.. _Credentials_Provider_fromId_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials.Provider ` :ref:`fromId ` ( - | `String `__ id - | ) - - - - - * - Create the identity provider from the ID string returned by MongoDB Realm. - - - - - **Parameters** - - - ``id`` - the string identifier for the provider - - - - - - - - **Returns** - - the enum representing the provider or :ref:`UNKNOWN ` if no matching provider was found. - - - - - - - - - - - - - -.. _getId: - -.. _getId__: - -.. _Provider_getId: - -.. _Provider_getId__: - -.. _Credentials_Provider_getId: - -.. _Credentials_Provider_getId__: - -.. _io_realm_mongodb_Credentials_Provider_getId: - -.. _io_realm_mongodb_Credentials_Provider_getId__: - - - -getId ------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getId ` () - | - - - - - * - Return the string presentation of this identity provider. - - - - - - - - - - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _Provider_valueOf: - -.. _Provider_valueOf__: - -.. _Credentials_Provider_valueOf: - -.. _Credentials_Provider_valueOf__: - -.. _io_realm_mongodb_Credentials_Provider_valueOf: - -.. _io_realm_mongodb_Credentials_Provider_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_Credentials_Provider_valueOf_java_lang_String_: - -.. _io_realm_mongodb_Credentials_Provider_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _Credentials_Provider_valueOf_java_lang_String_: - -.. _Credentials_Provider_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials.Provider ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _Provider_values: - -.. _Provider_values__: - -.. _Credentials_Provider_values: - -.. _Credentials_Provider_values__: - -.. _io_realm_mongodb_Credentials_Provider_values: - -.. _io_realm_mongodb_Credentials_Provider_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Credentials.Provider ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode.txt b/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode.txt deleted file mode 100644 index 4076d15441..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode.txt +++ /dev/null @@ -1,4751 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum ErrorCode -^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_ErrorCode: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.ErrorCode - - -This class enumerate all potential errors related to using the Object Server or synchronizing data. - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static`` - - :ref:`ErrorCode.Type ` - - - * - ``public static final`` - - :ref:`ErrorCode.Category ` - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`ACCOUNT_NAME_IN_USE ` - - - - - - - * - :ref:`API_KEY_ALREADY_EXISTS ` - - - - - - - * - :ref:`API_KEY_NOT_FOUND ` - - - - - - - * - :ref:`ARGUMENTS_NOT_ALLOWED ` - - - - - - - * - :ref:`AUTH_ERROR ` - - - - - - - * - :ref:`AUTH_PROVIDER_ALREADY_EXISTS ` - - - - - - - * - :ref:`AUTH_PROVIDER_DUPLICATE_NAME ` - - - - - - - * - :ref:`AUTH_PROVIDER_NOT_FOUND ` - - - - - - - * - :ref:`AUTO_CLIENT_RESET_FAILURE ` - - - - - - - * - :ref:`AWS_ERROR ` - - - - - - - * - :ref:`BAD_AUTHENTICATION ` - - - - - - - * - :ref:`BAD_CHANGESET ` - - - - - - - * - :ref:`BAD_CHANGESETS ` - - - - - - - * - :ref:`BAD_CHANGESET_HEADER_SYNTAX ` - - - - - - - * - :ref:`BAD_CHANGESET_SIZE ` - - - - - - - * - :ref:`BAD_CLIENT_FILE ` - - - - - - - * - :ref:`BAD_CLIENT_FILE_IDENT ` - - - - - - - * - :ref:`BAD_CLIENT_VERSION ` - - - - - - - * - :ref:`BAD_DECOMPRESSION ` - - - - - - - * - :ref:`BAD_GATEWAY ` - - - - - - - * - :ref:`BAD_MESSAGE_ORDER ` - - - - - - - * - :ref:`BAD_ORIGIN_FILE_IDENT ` - - - - - - - * - :ref:`BAD_QUERY ` - - - - - - - * - :ref:`BAD_REQUEST ` - - - - - - - * - :ref:`BAD_SERVER_FILE_IDENT ` - - - - - - - * - :ref:`BAD_SERVER_VERSION ` - - - - - - - * - :ref:`BAD_SESSION_IDENT ` - - - - - - - * - :ref:`BAD_SYNTAX ` - - - - - - - * - :ref:`BOUND_IN_OTHER_SESSION ` - - - - - - - * - :ref:`BSON_CODEC_NOT_FOUND ` - - - - - - - * - :ref:`BSON_DECODING ` - - - - - - - * - :ref:`BSON_ENCODING ` - - - - - - - * - :ref:`CLIENT_BAD_CHANGESET ` - - - - - - - * - :ref:`CLIENT_BAD_CHANGESET_HEADER_SYNTAX ` - - - - - - - * - :ref:`CLIENT_BAD_CHANGESET_SIZE ` - - - - - - - * - :ref:`CLIENT_BAD_CLIENT_FILE_IDENT ` - - - - - - - * - :ref:`CLIENT_BAD_CLIENT_FILE_IDENT_SALT ` - - - - - - - * - :ref:`CLIENT_BAD_CLIENT_VERSION_DOWNLOAD ` - - - - - - - * - :ref:`CLIENT_BAD_COMPRESSION ` - - - - - - - * - :ref:`CLIENT_BAD_ERROR_CODE ` - - - - - - - * - :ref:`CLIENT_BAD_MESSAGE_ORDER ` - - - - - - - * - :ref:`CLIENT_BAD_OBJECT_ID_SUBSTITUTIONS ` - - - - - - - * - :ref:`CLIENT_BAD_ORIGIN_FILE_IDENT ` - - - - - - - * - :ref:`CLIENT_BAD_PROGRESS ` - - - - - - - * - :ref:`CLIENT_BAD_PROTOCOL_FROM_SERVER ` - - - - - - - * - :ref:`CLIENT_BAD_REQUEST_IDENT ` - - - - - - - * - :ref:`CLIENT_BAD_SERIAL_TRANSACT_STATUS ` - - - - - - - * - :ref:`CLIENT_BAD_SERVER_VERSION ` - - - - - - - * - :ref:`CLIENT_BAD_SESSION_IDENT ` - - - - - - - * - :ref:`CLIENT_BAD_STATE_MESSAGE ` - - - - - - - * - :ref:`CLIENT_BAD_TIMESTAMP ` - - - - - - - * - :ref:`CLIENT_CONNECTION_CLOSED ` - - - - - - - * - :ref:`CLIENT_CONNECT_TIMEOUT ` - - - - - - - * - :ref:`CLIENT_FILE_BLACKLISTED ` - - - - - - - * - :ref:`CLIENT_FILE_EXPIRED ` - - - - - - - * - :ref:`CLIENT_FILE_IDENT ` - - - - - - - * - :ref:`CLIENT_HTTP_TUNNEL_FAILED ` - - - - - - - * - :ref:`CLIENT_LIMITS_EXCEEDED ` - - - - - - - * - :ref:`CLIENT_MISSING_PROTOCOL_FEATURE ` - - - - - - - * - :ref:`CLIENT_PONG_TIMEOUT ` - - - - - - - * - :ref:`CLIENT_PROTOCOL_MISMATCH ` - - - - - - - * - :ref:`CLIENT_RESET ` - - - - - - - * - :ref:`CLIENT_SSL_SERVER_CERT_REJECTED ` - - - - - - - * - :ref:`CLIENT_TOO_NEW_FOR_SERVER ` - - - - - - - * - :ref:`CLIENT_TOO_OLD_FOR_SERVER ` - - - - - - - * - :ref:`CLIENT_UNKNOWN_MESSAGE ` - - - - - - - * - :ref:`CONFLICT ` - - - - - - - * - :ref:`CONNECTION_ADDRESS_IN_USE ` - - - - - - - * - :ref:`CONNECTION_CLOSED ` - - - - - - - * - :ref:`CONNECTION_CONNECTION_ABORTED ` - - - - - - - * - :ref:`CONNECTION_REFUSED ` - - - - - - - * - :ref:`CONNECTION_RESET_BY_PEER ` - - - - - - - * - :ref:`CONNECTION_SOCKET_SHUTDOWN ` - - - - - - - * - :ref:`DISABLED_SESSION ` - - - - - - - * - :ref:`DIVERGING_HISTORIES ` - - - - - - - * - :ref:`DOMAIN_NOT_ALLOWED ` - - - - - - - * - :ref:`EVENT_DESERIALIZING ` - - - - - - - * - :ref:`EXECUTION_TIME_LIMIT_EXCEEDED ` - - - - - - - * - :ref:`EXPECTATION_FAILED ` - - - - - - - * - :ref:`FAILED_DEPENDENCY ` - - - - - - - * - :ref:`FORBIDDEN ` - - - - - - - * - :ref:`FOUND ` - - - - - - - * - :ref:`FUNCTION_ALREADY_EXISTS ` - - - - - - - * - :ref:`FUNCTION_DUPLICATE_NAME ` - - - - - - - * - :ref:`FUNCTION_EXECUTION_ERROR ` - - - - - - - * - :ref:`FUNCTION_INVALID ` - - - - - - - * - :ref:`FUNCTION_NOT_FOUND ` - - - - - - - * - :ref:`FUNCTION_SYNTAX_ERROR ` - - - - - - - * - :ref:`GATEWAY_TIMEOUT ` - - - - - - - * - :ref:`GCM_ERROR ` - - - - - - - * - :ref:`GONE ` - - - - - - - * - :ref:`HTTP_BAD_REQUEST ` - - - - - - - * - :ref:`HTTP_ERROR ` - - - - - - - * - :ref:`HTTP_VERSION_NOT_SUPPORTED ` - - - - - - - * - :ref:`ILLEGAL_REALM_PATH ` - - - - - - - * - :ref:`INCOMING_WEBHOOK_ALREADY_EXISTS ` - - - - - - - * - :ref:`INCOMING_WEBHOOK_AUTH_FAILED ` - - - - - - - * - :ref:`INCOMING_WEBHOOK_DUPLICATE_NAME ` - - - - - - - * - :ref:`INCOMING_WEBHOOK_NOT_FOUND ` - - - - - - - * - :ref:`INITIAL_SYNC_NOT_COMPLETE ` - - - - - - - * - :ref:`INSUFFICIENT_STORAGE ` - - - - - - - * - :ref:`INTERNAL_SERVER_ERROR ` - - - - - - - * - :ref:`INVALID_EMAIL_PASSWORD ` - - - - - - - * - :ref:`INVALID_PARAMETER ` - - - - - - - * - :ref:`INVALID_SCHEMA_CHANGE ` - - - - - - - * - :ref:`INVALID_SESSION ` - - - - - - - * - :ref:`LENGTH_REQUIRED ` - - - - - - - * - :ref:`LIMITS_EXCEEDED ` - - - - - - - * - :ref:`LOCKED ` - - - - - - - * - :ref:`LOOP_DETECTED ` - - - - - - - * - :ref:`METHOD_NOT_ALLOWED ` - - - - - - - * - :ref:`MISC_DELIMITER_NOT_FOUND ` - - - - - - - * - :ref:`MISC_END_OF_INPUT ` - - - - - - - * - :ref:`MISC_PREMATURE_END_OF_INPUT ` - - - - - - - * - :ref:`MISDIRECTED_REQUEST ` - - - - - - - * - :ref:`MISSING_PARAMETER ` - - - - - - - * - :ref:`MONGODB_ERROR ` - - - - - - - * - :ref:`MOVED_PERMANENTLY ` - - - - - - - * - :ref:`MULTIPLE_CHOICES ` - - - - - - - * - :ref:`NETWORK_AUTHENTICATION_REQUIRED ` - - - - - - - * - :ref:`NETWORK_INTERRUPTED ` - - - - - - - * - :ref:`NETWORK_IO_EXCEPTION ` - - - - - - - * - :ref:`NETWORK_UNKNOWN ` - - - - - - - * - :ref:`NOT_ACCEPTABLE ` - - - - - - - * - :ref:`NOT_CALLABLE ` - - - - - - - * - :ref:`NOT_EXTENDED ` - - - - - - - * - :ref:`NOT_FOUND ` - - - - - - - * - :ref:`NOT_IMPLEMENTED ` - - - - - - - * - :ref:`NOT_MODIFIED ` - - - - - - - * - :ref:`NO_MATCHING_RULE_FOUND ` - - - - - - - * - :ref:`NO_SUCH_PATH ` - - - - - - - * - :ref:`OBJECT_ALREADY_EXISTS ` - - - - - - - * - :ref:`OTHER_ERROR ` - - - - - - - * - :ref:`OTHER_SESSION_ERROR ` - - - - - - - * - :ref:`PARTIAL_SYNC_DISABLED ` - - - - - - - * - :ref:`PAYLOAD_TOO_LARGE ` - - - - - - - * - :ref:`PAYMENT_REQUIRED ` - - - - - - - * - :ref:`PERMANENT_REDIRECT ` - - - - - - - * - :ref:`PERMISSION_DENIED ` - - - - - - - * - :ref:`PRECONDITION_FAILED ` - - - - - - - * - :ref:`PRECONDITION_REQUIRED ` - - - - - - - * - :ref:`PROXY_AUTHENTICATION_REQUIRED ` - - - - - - - * - :ref:`RANGE_NOT_SATISFIABLE ` - - - - - - - * - :ref:`READ_SIZE_LIMIT_EXCEEDED ` - - - - - - - * - :ref:`REQUEST_HEADER_FIELDS_TOO_LARGE ` - - - - - - - * - :ref:`REQUEST_TIMEOUT ` - - - - - - - * - :ref:`RESTRICTED_HOST ` - - - - - - - * - :ref:`REUSE_OF_SESSION_IDENT ` - - - - - - - * - :ref:`RULE_ALREADY_EXISTS ` - - - - - - - * - :ref:`RULE_DUPLICATE_NAME ` - - - - - - - * - :ref:`RULE_NOT_FOUND ` - - - - - - - * - :ref:`SEE_OTHER ` - - - - - - - * - :ref:`SERVER_FILE_DELETED ` - - - - - - - * - :ref:`SERVER_PERMISSIONS_CHANGED ` - - - - - - - * - :ref:`SERVICE_ALREADY_EXISTS ` - - - - - - - * - :ref:`SERVICE_COMMAND_NOT_FOUND ` - - - - - - - * - :ref:`SERVICE_INTERNAL_SERVER_ERROR ` - - - - - - - * - :ref:`SERVICE_NONE ` - - - - - - - * - :ref:`SERVICE_NOT_FOUND ` - - - - - - - * - :ref:`SERVICE_TYPE_NOT_FOUND ` - - - - - - - * - :ref:`SERVICE_UNAVAILABLE ` - - - - - - - * - :ref:`SERVICE_UNKNOWN ` - - - - - - - * - :ref:`SESSION_CLOSED ` - - - - - - - * - :ref:`TEMPORARY_REDIRECT ` - - - - - - - * - :ref:`TOKEN_EXPIRED ` - - - - - - - * - :ref:`TOO_MANY_REQUESTS ` - - - - - - - * - :ref:`TOO_MANY_SESSIONS ` - - - - - - - * - :ref:`TRANSACT_BEFORE_UPLOAD ` - - - - - - - * - :ref:`TWILIO_ERROR ` - - - - - - - * - :ref:`UNAUTHORIZED ` - - - - - - - * - :ref:`UNAVAILABLE_FOR_LEGAL_REASONS ` - - - - - - - * - :ref:`UNKNOWN ` - - - - - - - * - :ref:`UNKNOWN_MESSAGE ` - - - - - - - * - :ref:`UNPROCESSABLE_ENTITY ` - - - - - - - * - :ref:`UNSUPPORTED_MEDIA_TYPE ` - - - - - - - * - :ref:`UNSUPPORTED_SESSION_FEATURE ` - - - - - - - * - :ref:`UPGRADE_REQUIRED ` - - - - - - - * - :ref:`URI_TOO_LONG ` - - - - - - - * - :ref:`USER_ALREADY_CONFIRMED ` - - - - - - - * - :ref:`USER_APP_DOMAIN_MISMATCH ` - - - - - - - * - :ref:`USER_BLACKLISTED ` - - - - - - - * - :ref:`USER_DISABLED ` - - - - - - - * - :ref:`USER_MISMATCH ` - - - - - - - * - :ref:`USER_NOT_FOUND ` - - - - - - - * - :ref:`USE_PROXY ` - - - - - - - * - :ref:`VALUE_ALREADY_EXISTS ` - - - - - - - * - :ref:`VALUE_DUPLICATE_NAME ` - - - - - - - * - :ref:`VALUE_NOT_FOUND ` - - - - - - - * - :ref:`VARIANT_ALSO_NEGOTIATES ` - - - - - - - * - :ref:`WRITE_NOT_ALLOWED ` - - - - - - - * - :ref:`WRONG_PROTOCOL_VERSION ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`ErrorCode ` - - | :ref:`fromNativeError ` ( - | `String `__ type, - | **int** errorCode - | ) - - - Converts a native error to the appropriate Java equivalent - - - - - * - public :ref:`ErrorCode.Category ` - - | :ref:`getCategory ` () - | - - - Returns the getCategory of the error. - - - - - * - public `String `__ - - | :ref:`getType ` () - | - - - Returns the type of error. - - - - - * - public **int** - - | :ref:`intValue ` () - | - - - Returns the numerical value for this error code. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - * - public static :ref:`ErrorCode ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`ErrorCode ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_ErrorCode_ACCOUNT_NAME_IN_USE: - -.. _ErrorCode_ACCOUNT_NAME_IN_USE: - - - -``ACCOUNT_NAME_IN_USE`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_API_KEY_ALREADY_EXISTS: - -.. _ErrorCode_API_KEY_ALREADY_EXISTS: - - - -``API_KEY_ALREADY_EXISTS`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_API_KEY_NOT_FOUND: - -.. _ErrorCode_API_KEY_NOT_FOUND: - - - -``API_KEY_NOT_FOUND`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_ARGUMENTS_NOT_ALLOWED: - -.. _ErrorCode_ARGUMENTS_NOT_ALLOWED: - - - -``ARGUMENTS_NOT_ALLOWED`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_AUTH_ERROR: - -.. _ErrorCode_AUTH_ERROR: - - - -``AUTH_ERROR`` ---------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_AUTH_PROVIDER_ALREADY_EXISTS: - -.. _ErrorCode_AUTH_PROVIDER_ALREADY_EXISTS: - - - -``AUTH_PROVIDER_ALREADY_EXISTS`` ---------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_AUTH_PROVIDER_DUPLICATE_NAME: - -.. _ErrorCode_AUTH_PROVIDER_DUPLICATE_NAME: - - - -``AUTH_PROVIDER_DUPLICATE_NAME`` ---------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_AUTH_PROVIDER_NOT_FOUND: - -.. _ErrorCode_AUTH_PROVIDER_NOT_FOUND: - - - -``AUTH_PROVIDER_NOT_FOUND`` ----------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_AUTO_CLIENT_RESET_FAILURE: - -.. _ErrorCode_AUTO_CLIENT_RESET_FAILURE: - - - -``AUTO_CLIENT_RESET_FAILURE`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_AWS_ERROR: - -.. _ErrorCode_AWS_ERROR: - - - -``AWS_ERROR`` --------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_AUTHENTICATION: - -.. _ErrorCode_BAD_AUTHENTICATION: - - - -``BAD_AUTHENTICATION`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_CHANGESET: - -.. _ErrorCode_BAD_CHANGESET: - - - -``BAD_CHANGESET`` ------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_CHANGESETS: - -.. _ErrorCode_BAD_CHANGESETS: - - - -``BAD_CHANGESETS`` -------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_CHANGESET_HEADER_SYNTAX: - -.. _ErrorCode_BAD_CHANGESET_HEADER_SYNTAX: - - - -``BAD_CHANGESET_HEADER_SYNTAX`` --------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_CHANGESET_SIZE: - -.. _ErrorCode_BAD_CHANGESET_SIZE: - - - -``BAD_CHANGESET_SIZE`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_CLIENT_FILE: - -.. _ErrorCode_BAD_CLIENT_FILE: - - - -``BAD_CLIENT_FILE`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_CLIENT_FILE_IDENT: - -.. _ErrorCode_BAD_CLIENT_FILE_IDENT: - - - -``BAD_CLIENT_FILE_IDENT`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_CLIENT_VERSION: - -.. _ErrorCode_BAD_CLIENT_VERSION: - - - -``BAD_CLIENT_VERSION`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_DECOMPRESSION: - -.. _ErrorCode_BAD_DECOMPRESSION: - - - -``BAD_DECOMPRESSION`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_GATEWAY: - -.. _ErrorCode_BAD_GATEWAY: - - - -``BAD_GATEWAY`` ----------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_MESSAGE_ORDER: - -.. _ErrorCode_BAD_MESSAGE_ORDER: - - - -``BAD_MESSAGE_ORDER`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_ORIGIN_FILE_IDENT: - -.. _ErrorCode_BAD_ORIGIN_FILE_IDENT: - - - -``BAD_ORIGIN_FILE_IDENT`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_QUERY: - -.. _ErrorCode_BAD_QUERY: - - - -``BAD_QUERY`` --------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_REQUEST: - -.. _ErrorCode_BAD_REQUEST: - - - -``BAD_REQUEST`` ----------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_SERVER_FILE_IDENT: - -.. _ErrorCode_BAD_SERVER_FILE_IDENT: - - - -``BAD_SERVER_FILE_IDENT`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_SERVER_VERSION: - -.. _ErrorCode_BAD_SERVER_VERSION: - - - -``BAD_SERVER_VERSION`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_SESSION_IDENT: - -.. _ErrorCode_BAD_SESSION_IDENT: - - - -``BAD_SESSION_IDENT`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BAD_SYNTAX: - -.. _ErrorCode_BAD_SYNTAX: - - - -``BAD_SYNTAX`` ---------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BOUND_IN_OTHER_SESSION: - -.. _ErrorCode_BOUND_IN_OTHER_SESSION: - - - -``BOUND_IN_OTHER_SESSION`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BSON_CODEC_NOT_FOUND: - -.. _ErrorCode_BSON_CODEC_NOT_FOUND: - - - -``BSON_CODEC_NOT_FOUND`` -------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BSON_DECODING: - -.. _ErrorCode_BSON_DECODING: - - - -``BSON_DECODING`` ------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_BSON_ENCODING: - -.. _ErrorCode_BSON_ENCODING: - - - -``BSON_ENCODING`` ------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_CHANGESET: - -.. _ErrorCode_CLIENT_BAD_CHANGESET: - - - -``CLIENT_BAD_CHANGESET`` -------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_CHANGESET_HEADER_SYNTAX: - -.. _ErrorCode_CLIENT_BAD_CHANGESET_HEADER_SYNTAX: - - - -``CLIENT_BAD_CHANGESET_HEADER_SYNTAX`` ---------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_CHANGESET_SIZE: - -.. _ErrorCode_CLIENT_BAD_CHANGESET_SIZE: - - - -``CLIENT_BAD_CHANGESET_SIZE`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_CLIENT_FILE_IDENT: - -.. _ErrorCode_CLIENT_BAD_CLIENT_FILE_IDENT: - - - -``CLIENT_BAD_CLIENT_FILE_IDENT`` ---------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_CLIENT_FILE_IDENT_SALT: - -.. _ErrorCode_CLIENT_BAD_CLIENT_FILE_IDENT_SALT: - - - -``CLIENT_BAD_CLIENT_FILE_IDENT_SALT`` --------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_CLIENT_VERSION_DOWNLOAD: - -.. _ErrorCode_CLIENT_BAD_CLIENT_VERSION_DOWNLOAD: - - - -``CLIENT_BAD_CLIENT_VERSION_DOWNLOAD`` ---------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_COMPRESSION: - -.. _ErrorCode_CLIENT_BAD_COMPRESSION: - - - -``CLIENT_BAD_COMPRESSION`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_ERROR_CODE: - -.. _ErrorCode_CLIENT_BAD_ERROR_CODE: - - - -``CLIENT_BAD_ERROR_CODE`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_MESSAGE_ORDER: - -.. _ErrorCode_CLIENT_BAD_MESSAGE_ORDER: - - - -``CLIENT_BAD_MESSAGE_ORDER`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_OBJECT_ID_SUBSTITUTIONS: - -.. _ErrorCode_CLIENT_BAD_OBJECT_ID_SUBSTITUTIONS: - - - -``CLIENT_BAD_OBJECT_ID_SUBSTITUTIONS`` ---------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_ORIGIN_FILE_IDENT: - -.. _ErrorCode_CLIENT_BAD_ORIGIN_FILE_IDENT: - - - -``CLIENT_BAD_ORIGIN_FILE_IDENT`` ---------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_PROGRESS: - -.. _ErrorCode_CLIENT_BAD_PROGRESS: - - - -``CLIENT_BAD_PROGRESS`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_PROTOCOL_FROM_SERVER: - -.. _ErrorCode_CLIENT_BAD_PROTOCOL_FROM_SERVER: - - - -``CLIENT_BAD_PROTOCOL_FROM_SERVER`` ------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_REQUEST_IDENT: - -.. _ErrorCode_CLIENT_BAD_REQUEST_IDENT: - - - -``CLIENT_BAD_REQUEST_IDENT`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_SERIAL_TRANSACT_STATUS: - -.. _ErrorCode_CLIENT_BAD_SERIAL_TRANSACT_STATUS: - - - -``CLIENT_BAD_SERIAL_TRANSACT_STATUS`` --------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_SERVER_VERSION: - -.. _ErrorCode_CLIENT_BAD_SERVER_VERSION: - - - -``CLIENT_BAD_SERVER_VERSION`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_SESSION_IDENT: - -.. _ErrorCode_CLIENT_BAD_SESSION_IDENT: - - - -``CLIENT_BAD_SESSION_IDENT`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_STATE_MESSAGE: - -.. _ErrorCode_CLIENT_BAD_STATE_MESSAGE: - - - -``CLIENT_BAD_STATE_MESSAGE`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_BAD_TIMESTAMP: - -.. _ErrorCode_CLIENT_BAD_TIMESTAMP: - - - -``CLIENT_BAD_TIMESTAMP`` -------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_CONNECTION_CLOSED: - -.. _ErrorCode_CLIENT_CONNECTION_CLOSED: - - - -``CLIENT_CONNECTION_CLOSED`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_CONNECT_TIMEOUT: - -.. _ErrorCode_CLIENT_CONNECT_TIMEOUT: - - - -``CLIENT_CONNECT_TIMEOUT`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_FILE_BLACKLISTED: - -.. _ErrorCode_CLIENT_FILE_BLACKLISTED: - - - -``CLIENT_FILE_BLACKLISTED`` ----------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_FILE_EXPIRED: - -.. _ErrorCode_CLIENT_FILE_EXPIRED: - - - -``CLIENT_FILE_EXPIRED`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_FILE_IDENT: - -.. _ErrorCode_CLIENT_FILE_IDENT: - - - -``CLIENT_FILE_IDENT`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_HTTP_TUNNEL_FAILED: - -.. _ErrorCode_CLIENT_HTTP_TUNNEL_FAILED: - - - -``CLIENT_HTTP_TUNNEL_FAILED`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_LIMITS_EXCEEDED: - -.. _ErrorCode_CLIENT_LIMITS_EXCEEDED: - - - -``CLIENT_LIMITS_EXCEEDED`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_MISSING_PROTOCOL_FEATURE: - -.. _ErrorCode_CLIENT_MISSING_PROTOCOL_FEATURE: - - - -``CLIENT_MISSING_PROTOCOL_FEATURE`` ------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_PONG_TIMEOUT: - -.. _ErrorCode_CLIENT_PONG_TIMEOUT: - - - -``CLIENT_PONG_TIMEOUT`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_PROTOCOL_MISMATCH: - -.. _ErrorCode_CLIENT_PROTOCOL_MISMATCH: - - - -``CLIENT_PROTOCOL_MISMATCH`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_RESET: - -.. _ErrorCode_CLIENT_RESET: - - - -``CLIENT_RESET`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_SSL_SERVER_CERT_REJECTED: - -.. _ErrorCode_CLIENT_SSL_SERVER_CERT_REJECTED: - - - -``CLIENT_SSL_SERVER_CERT_REJECTED`` ------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_TOO_NEW_FOR_SERVER: - -.. _ErrorCode_CLIENT_TOO_NEW_FOR_SERVER: - - - -``CLIENT_TOO_NEW_FOR_SERVER`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_TOO_OLD_FOR_SERVER: - -.. _ErrorCode_CLIENT_TOO_OLD_FOR_SERVER: - - - -``CLIENT_TOO_OLD_FOR_SERVER`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CLIENT_UNKNOWN_MESSAGE: - -.. _ErrorCode_CLIENT_UNKNOWN_MESSAGE: - - - -``CLIENT_UNKNOWN_MESSAGE`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CONFLICT: - -.. _ErrorCode_CONFLICT: - - - -``CONFLICT`` -------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CONNECTION_ADDRESS_IN_USE: - -.. _ErrorCode_CONNECTION_ADDRESS_IN_USE: - - - -``CONNECTION_ADDRESS_IN_USE`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CONNECTION_CLOSED: - -.. _ErrorCode_CONNECTION_CLOSED: - - - -``CONNECTION_CLOSED`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CONNECTION_CONNECTION_ABORTED: - -.. _ErrorCode_CONNECTION_CONNECTION_ABORTED: - - - -``CONNECTION_CONNECTION_ABORTED`` ----------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CONNECTION_REFUSED: - -.. _ErrorCode_CONNECTION_REFUSED: - - - -``CONNECTION_REFUSED`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CONNECTION_RESET_BY_PEER: - -.. _ErrorCode_CONNECTION_RESET_BY_PEER: - - - -``CONNECTION_RESET_BY_PEER`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_CONNECTION_SOCKET_SHUTDOWN: - -.. _ErrorCode_CONNECTION_SOCKET_SHUTDOWN: - - - -``CONNECTION_SOCKET_SHUTDOWN`` -------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_DISABLED_SESSION: - -.. _ErrorCode_DISABLED_SESSION: - - - -``DISABLED_SESSION`` ---------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_DIVERGING_HISTORIES: - -.. _ErrorCode_DIVERGING_HISTORIES: - - - -``DIVERGING_HISTORIES`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_DOMAIN_NOT_ALLOWED: - -.. _ErrorCode_DOMAIN_NOT_ALLOWED: - - - -``DOMAIN_NOT_ALLOWED`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_EVENT_DESERIALIZING: - -.. _ErrorCode_EVENT_DESERIALIZING: - - - -``EVENT_DESERIALIZING`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_EXECUTION_TIME_LIMIT_EXCEEDED: - -.. _ErrorCode_EXECUTION_TIME_LIMIT_EXCEEDED: - - - -``EXECUTION_TIME_LIMIT_EXCEEDED`` ----------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_EXPECTATION_FAILED: - -.. _ErrorCode_EXPECTATION_FAILED: - - - -``EXPECTATION_FAILED`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FAILED_DEPENDENCY: - -.. _ErrorCode_FAILED_DEPENDENCY: - - - -``FAILED_DEPENDENCY`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FORBIDDEN: - -.. _ErrorCode_FORBIDDEN: - - - -``FORBIDDEN`` --------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FOUND: - -.. _ErrorCode_FOUND: - - - -``FOUND`` ----------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FUNCTION_ALREADY_EXISTS: - -.. _ErrorCode_FUNCTION_ALREADY_EXISTS: - - - -``FUNCTION_ALREADY_EXISTS`` ----------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FUNCTION_DUPLICATE_NAME: - -.. _ErrorCode_FUNCTION_DUPLICATE_NAME: - - - -``FUNCTION_DUPLICATE_NAME`` ----------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FUNCTION_EXECUTION_ERROR: - -.. _ErrorCode_FUNCTION_EXECUTION_ERROR: - - - -``FUNCTION_EXECUTION_ERROR`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FUNCTION_INVALID: - -.. _ErrorCode_FUNCTION_INVALID: - - - -``FUNCTION_INVALID`` ---------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FUNCTION_NOT_FOUND: - -.. _ErrorCode_FUNCTION_NOT_FOUND: - - - -``FUNCTION_NOT_FOUND`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_FUNCTION_SYNTAX_ERROR: - -.. _ErrorCode_FUNCTION_SYNTAX_ERROR: - - - -``FUNCTION_SYNTAX_ERROR`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_GATEWAY_TIMEOUT: - -.. _ErrorCode_GATEWAY_TIMEOUT: - - - -``GATEWAY_TIMEOUT`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_GCM_ERROR: - -.. _ErrorCode_GCM_ERROR: - - - -``GCM_ERROR`` --------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_GONE: - -.. _ErrorCode_GONE: - - - -``GONE`` ---------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_HTTP_BAD_REQUEST: - -.. _ErrorCode_HTTP_BAD_REQUEST: - - - -``HTTP_BAD_REQUEST`` ---------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_HTTP_ERROR: - -.. _ErrorCode_HTTP_ERROR: - - - -``HTTP_ERROR`` ---------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_HTTP_VERSION_NOT_SUPPORTED: - -.. _ErrorCode_HTTP_VERSION_NOT_SUPPORTED: - - - -``HTTP_VERSION_NOT_SUPPORTED`` -------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_ILLEGAL_REALM_PATH: - -.. _ErrorCode_ILLEGAL_REALM_PATH: - - - -``ILLEGAL_REALM_PATH`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INCOMING_WEBHOOK_ALREADY_EXISTS: - -.. _ErrorCode_INCOMING_WEBHOOK_ALREADY_EXISTS: - - - -``INCOMING_WEBHOOK_ALREADY_EXISTS`` ------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INCOMING_WEBHOOK_AUTH_FAILED: - -.. _ErrorCode_INCOMING_WEBHOOK_AUTH_FAILED: - - - -``INCOMING_WEBHOOK_AUTH_FAILED`` ---------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INCOMING_WEBHOOK_DUPLICATE_NAME: - -.. _ErrorCode_INCOMING_WEBHOOK_DUPLICATE_NAME: - - - -``INCOMING_WEBHOOK_DUPLICATE_NAME`` ------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INCOMING_WEBHOOK_NOT_FOUND: - -.. _ErrorCode_INCOMING_WEBHOOK_NOT_FOUND: - - - -``INCOMING_WEBHOOK_NOT_FOUND`` -------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INITIAL_SYNC_NOT_COMPLETE: - -.. _ErrorCode_INITIAL_SYNC_NOT_COMPLETE: - - - -``INITIAL_SYNC_NOT_COMPLETE`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INSUFFICIENT_STORAGE: - -.. _ErrorCode_INSUFFICIENT_STORAGE: - - - -``INSUFFICIENT_STORAGE`` -------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INTERNAL_SERVER_ERROR: - -.. _ErrorCode_INTERNAL_SERVER_ERROR: - - - -``INTERNAL_SERVER_ERROR`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INVALID_EMAIL_PASSWORD: - -.. _ErrorCode_INVALID_EMAIL_PASSWORD: - - - -``INVALID_EMAIL_PASSWORD`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INVALID_PARAMETER: - -.. _ErrorCode_INVALID_PARAMETER: - - - -``INVALID_PARAMETER`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INVALID_SCHEMA_CHANGE: - -.. _ErrorCode_INVALID_SCHEMA_CHANGE: - - - -``INVALID_SCHEMA_CHANGE`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_INVALID_SESSION: - -.. _ErrorCode_INVALID_SESSION: - - - -``INVALID_SESSION`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_LENGTH_REQUIRED: - -.. _ErrorCode_LENGTH_REQUIRED: - - - -``LENGTH_REQUIRED`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_LIMITS_EXCEEDED: - -.. _ErrorCode_LIMITS_EXCEEDED: - - - -``LIMITS_EXCEEDED`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_LOCKED: - -.. _ErrorCode_LOCKED: - - - -``LOCKED`` ------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_LOOP_DETECTED: - -.. _ErrorCode_LOOP_DETECTED: - - - -``LOOP_DETECTED`` ------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_METHOD_NOT_ALLOWED: - -.. _ErrorCode_METHOD_NOT_ALLOWED: - - - -``METHOD_NOT_ALLOWED`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_MISC_DELIMITER_NOT_FOUND: - -.. _ErrorCode_MISC_DELIMITER_NOT_FOUND: - - - -``MISC_DELIMITER_NOT_FOUND`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_MISC_END_OF_INPUT: - -.. _ErrorCode_MISC_END_OF_INPUT: - - - -``MISC_END_OF_INPUT`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_MISC_PREMATURE_END_OF_INPUT: - -.. _ErrorCode_MISC_PREMATURE_END_OF_INPUT: - - - -``MISC_PREMATURE_END_OF_INPUT`` --------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_MISDIRECTED_REQUEST: - -.. _ErrorCode_MISDIRECTED_REQUEST: - - - -``MISDIRECTED_REQUEST`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_MISSING_PARAMETER: - -.. _ErrorCode_MISSING_PARAMETER: - - - -``MISSING_PARAMETER`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_MONGODB_ERROR: - -.. _ErrorCode_MONGODB_ERROR: - - - -``MONGODB_ERROR`` ------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_MOVED_PERMANENTLY: - -.. _ErrorCode_MOVED_PERMANENTLY: - - - -``MOVED_PERMANENTLY`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_MULTIPLE_CHOICES: - -.. _ErrorCode_MULTIPLE_CHOICES: - - - -``MULTIPLE_CHOICES`` ---------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NETWORK_AUTHENTICATION_REQUIRED: - -.. _ErrorCode_NETWORK_AUTHENTICATION_REQUIRED: - - - -``NETWORK_AUTHENTICATION_REQUIRED`` ------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NETWORK_INTERRUPTED: - -.. _ErrorCode_NETWORK_INTERRUPTED: - - - -``NETWORK_INTERRUPTED`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NETWORK_IO_EXCEPTION: - -.. _ErrorCode_NETWORK_IO_EXCEPTION: - - - -``NETWORK_IO_EXCEPTION`` -------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NETWORK_UNKNOWN: - -.. _ErrorCode_NETWORK_UNKNOWN: - - - -``NETWORK_UNKNOWN`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NOT_ACCEPTABLE: - -.. _ErrorCode_NOT_ACCEPTABLE: - - - -``NOT_ACCEPTABLE`` -------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NOT_CALLABLE: - -.. _ErrorCode_NOT_CALLABLE: - - - -``NOT_CALLABLE`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NOT_EXTENDED: - -.. _ErrorCode_NOT_EXTENDED: - - - -``NOT_EXTENDED`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NOT_FOUND: - -.. _ErrorCode_NOT_FOUND: - - - -``NOT_FOUND`` --------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NOT_IMPLEMENTED: - -.. _ErrorCode_NOT_IMPLEMENTED: - - - -``NOT_IMPLEMENTED`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NOT_MODIFIED: - -.. _ErrorCode_NOT_MODIFIED: - - - -``NOT_MODIFIED`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NO_MATCHING_RULE_FOUND: - -.. _ErrorCode_NO_MATCHING_RULE_FOUND: - - - -``NO_MATCHING_RULE_FOUND`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_NO_SUCH_PATH: - -.. _ErrorCode_NO_SUCH_PATH: - - - -``NO_SUCH_PATH`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_OBJECT_ALREADY_EXISTS: - -.. _ErrorCode_OBJECT_ALREADY_EXISTS: - - - -``OBJECT_ALREADY_EXISTS`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_OTHER_ERROR: - -.. _ErrorCode_OTHER_ERROR: - - - -``OTHER_ERROR`` ----------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_OTHER_SESSION_ERROR: - -.. _ErrorCode_OTHER_SESSION_ERROR: - - - -``OTHER_SESSION_ERROR`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_PARTIAL_SYNC_DISABLED: - -.. _ErrorCode_PARTIAL_SYNC_DISABLED: - - - -``PARTIAL_SYNC_DISABLED`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_PAYLOAD_TOO_LARGE: - -.. _ErrorCode_PAYLOAD_TOO_LARGE: - - - -``PAYLOAD_TOO_LARGE`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_PAYMENT_REQUIRED: - -.. _ErrorCode_PAYMENT_REQUIRED: - - - -``PAYMENT_REQUIRED`` ---------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_PERMANENT_REDIRECT: - -.. _ErrorCode_PERMANENT_REDIRECT: - - - -``PERMANENT_REDIRECT`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_PERMISSION_DENIED: - -.. _ErrorCode_PERMISSION_DENIED: - - - -``PERMISSION_DENIED`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_PRECONDITION_FAILED: - -.. _ErrorCode_PRECONDITION_FAILED: - - - -``PRECONDITION_FAILED`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_PRECONDITION_REQUIRED: - -.. _ErrorCode_PRECONDITION_REQUIRED: - - - -``PRECONDITION_REQUIRED`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_PROXY_AUTHENTICATION_REQUIRED: - -.. _ErrorCode_PROXY_AUTHENTICATION_REQUIRED: - - - -``PROXY_AUTHENTICATION_REQUIRED`` ----------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_RANGE_NOT_SATISFIABLE: - -.. _ErrorCode_RANGE_NOT_SATISFIABLE: - - - -``RANGE_NOT_SATISFIABLE`` --------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_READ_SIZE_LIMIT_EXCEEDED: - -.. _ErrorCode_READ_SIZE_LIMIT_EXCEEDED: - - - -``READ_SIZE_LIMIT_EXCEEDED`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_REQUEST_HEADER_FIELDS_TOO_LARGE: - -.. _ErrorCode_REQUEST_HEADER_FIELDS_TOO_LARGE: - - - -``REQUEST_HEADER_FIELDS_TOO_LARGE`` ------------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_REQUEST_TIMEOUT: - -.. _ErrorCode_REQUEST_TIMEOUT: - - - -``REQUEST_TIMEOUT`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_RESTRICTED_HOST: - -.. _ErrorCode_RESTRICTED_HOST: - - - -``RESTRICTED_HOST`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_REUSE_OF_SESSION_IDENT: - -.. _ErrorCode_REUSE_OF_SESSION_IDENT: - - - -``REUSE_OF_SESSION_IDENT`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_RULE_ALREADY_EXISTS: - -.. _ErrorCode_RULE_ALREADY_EXISTS: - - - -``RULE_ALREADY_EXISTS`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_RULE_DUPLICATE_NAME: - -.. _ErrorCode_RULE_DUPLICATE_NAME: - - - -``RULE_DUPLICATE_NAME`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_RULE_NOT_FOUND: - -.. _ErrorCode_RULE_NOT_FOUND: - - - -``RULE_NOT_FOUND`` -------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SEE_OTHER: - -.. _ErrorCode_SEE_OTHER: - - - -``SEE_OTHER`` --------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVER_FILE_DELETED: - -.. _ErrorCode_SERVER_FILE_DELETED: - - - -``SERVER_FILE_DELETED`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVER_PERMISSIONS_CHANGED: - -.. _ErrorCode_SERVER_PERMISSIONS_CHANGED: - - - -``SERVER_PERMISSIONS_CHANGED`` -------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVICE_ALREADY_EXISTS: - -.. _ErrorCode_SERVICE_ALREADY_EXISTS: - - - -``SERVICE_ALREADY_EXISTS`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVICE_COMMAND_NOT_FOUND: - -.. _ErrorCode_SERVICE_COMMAND_NOT_FOUND: - - - -``SERVICE_COMMAND_NOT_FOUND`` ------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVICE_INTERNAL_SERVER_ERROR: - -.. _ErrorCode_SERVICE_INTERNAL_SERVER_ERROR: - - - -``SERVICE_INTERNAL_SERVER_ERROR`` ----------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVICE_NONE: - -.. _ErrorCode_SERVICE_NONE: - - - -``SERVICE_NONE`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVICE_NOT_FOUND: - -.. _ErrorCode_SERVICE_NOT_FOUND: - - - -``SERVICE_NOT_FOUND`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVICE_TYPE_NOT_FOUND: - -.. _ErrorCode_SERVICE_TYPE_NOT_FOUND: - - - -``SERVICE_TYPE_NOT_FOUND`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVICE_UNAVAILABLE: - -.. _ErrorCode_SERVICE_UNAVAILABLE: - - - -``SERVICE_UNAVAILABLE`` ------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SERVICE_UNKNOWN: - -.. _ErrorCode_SERVICE_UNKNOWN: - - - -``SERVICE_UNKNOWN`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_SESSION_CLOSED: - -.. _ErrorCode_SESSION_CLOSED: - - - -``SESSION_CLOSED`` -------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_TEMPORARY_REDIRECT: - -.. _ErrorCode_TEMPORARY_REDIRECT: - - - -``TEMPORARY_REDIRECT`` ------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_TOKEN_EXPIRED: - -.. _ErrorCode_TOKEN_EXPIRED: - - - -``TOKEN_EXPIRED`` ------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_TOO_MANY_REQUESTS: - -.. _ErrorCode_TOO_MANY_REQUESTS: - - - -``TOO_MANY_REQUESTS`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_TOO_MANY_SESSIONS: - -.. _ErrorCode_TOO_MANY_SESSIONS: - - - -``TOO_MANY_SESSIONS`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_TRANSACT_BEFORE_UPLOAD: - -.. _ErrorCode_TRANSACT_BEFORE_UPLOAD: - - - -``TRANSACT_BEFORE_UPLOAD`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_TWILIO_ERROR: - -.. _ErrorCode_TWILIO_ERROR: - - - -``TWILIO_ERROR`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_UNAUTHORIZED: - -.. _ErrorCode_UNAUTHORIZED: - - - -``UNAUTHORIZED`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_UNAVAILABLE_FOR_LEGAL_REASONS: - -.. _ErrorCode_UNAVAILABLE_FOR_LEGAL_REASONS: - - - -``UNAVAILABLE_FOR_LEGAL_REASONS`` ----------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_UNKNOWN: - -.. _ErrorCode_UNKNOWN: - - - -``UNKNOWN`` ------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_UNKNOWN_MESSAGE: - -.. _ErrorCode_UNKNOWN_MESSAGE: - - - -``UNKNOWN_MESSAGE`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_UNPROCESSABLE_ENTITY: - -.. _ErrorCode_UNPROCESSABLE_ENTITY: - - - -``UNPROCESSABLE_ENTITY`` -------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_UNSUPPORTED_MEDIA_TYPE: - -.. _ErrorCode_UNSUPPORTED_MEDIA_TYPE: - - - -``UNSUPPORTED_MEDIA_TYPE`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_UNSUPPORTED_SESSION_FEATURE: - -.. _ErrorCode_UNSUPPORTED_SESSION_FEATURE: - - - -``UNSUPPORTED_SESSION_FEATURE`` --------------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_UPGRADE_REQUIRED: - -.. _ErrorCode_UPGRADE_REQUIRED: - - - -``UPGRADE_REQUIRED`` ---------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_URI_TOO_LONG: - -.. _ErrorCode_URI_TOO_LONG: - - - -``URI_TOO_LONG`` ------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_USER_ALREADY_CONFIRMED: - -.. _ErrorCode_USER_ALREADY_CONFIRMED: - - - -``USER_ALREADY_CONFIRMED`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_USER_APP_DOMAIN_MISMATCH: - -.. _ErrorCode_USER_APP_DOMAIN_MISMATCH: - - - -``USER_APP_DOMAIN_MISMATCH`` ------------------------------ - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_USER_BLACKLISTED: - -.. _ErrorCode_USER_BLACKLISTED: - - - -``USER_BLACKLISTED`` ---------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_USER_DISABLED: - -.. _ErrorCode_USER_DISABLED: - - - -``USER_DISABLED`` ------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_USER_MISMATCH: - -.. _ErrorCode_USER_MISMATCH: - - - -``USER_MISMATCH`` ------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_USER_NOT_FOUND: - -.. _ErrorCode_USER_NOT_FOUND: - - - -``USER_NOT_FOUND`` -------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_USE_PROXY: - -.. _ErrorCode_USE_PROXY: - - - -``USE_PROXY`` --------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_VALUE_ALREADY_EXISTS: - -.. _ErrorCode_VALUE_ALREADY_EXISTS: - - - -``VALUE_ALREADY_EXISTS`` -------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_VALUE_DUPLICATE_NAME: - -.. _ErrorCode_VALUE_DUPLICATE_NAME: - - - -``VALUE_DUPLICATE_NAME`` -------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_VALUE_NOT_FOUND: - -.. _ErrorCode_VALUE_NOT_FOUND: - - - -``VALUE_NOT_FOUND`` --------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_VARIANT_ALSO_NEGOTIATES: - -.. _ErrorCode_VARIANT_ALSO_NEGOTIATES: - - - -``VARIANT_ALSO_NEGOTIATES`` ----------------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_WRITE_NOT_ALLOWED: - -.. _ErrorCode_WRITE_NOT_ALLOWED: - - - -``WRITE_NOT_ALLOWED`` ----------------------- - -public static final :ref:`ErrorCode ` - - - - - -.. _io_realm_mongodb_ErrorCode_WRONG_PROTOCOL_VERSION: - -.. _ErrorCode_WRONG_PROTOCOL_VERSION: - - - -``WRONG_PROTOCOL_VERSION`` ---------------------------- - -public static final :ref:`ErrorCode ` - - - - - - -Method Detail -============= - -.. _fromNativeError: - -.. _fromNativeError__: - -.. _ErrorCode_fromNativeError: - -.. _ErrorCode_fromNativeError__: - -.. _io_realm_mongodb_ErrorCode_fromNativeError: - -.. _io_realm_mongodb_ErrorCode_fromNativeError__: - - - -fromNativeError ---------------- - -.. _io_realm_mongodb_ErrorCode_fromNativeError_java_lang_String_int_: - -.. _io_realm_mongodb_ErrorCode_fromNativeError_java_lang_String__int_: - -.. _io_realm_mongodb_ErrorCode_fromNativeError_String_int_: - -.. _io_realm_mongodb_ErrorCode_fromNativeError_String__int_: - -.. _fromNativeError_java_lang_String_int_: - -.. _fromNativeError_java_lang_String__int_: - -.. _fromNativeError_String_int_: - -.. _fromNativeError_String__int_: - -.. _ErrorCode_fromNativeError_java_lang_String_int_: - -.. _ErrorCode_fromNativeError_java_lang_String__int_: - -.. _ErrorCode_fromNativeError_String_int_: - -.. _ErrorCode_fromNativeError_String__int_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ErrorCode ` :ref:`fromNativeError ` ( - | `String `__ type, - | **int** errorCode - | ) - - - - - * - Converts a native error to the appropriate Java equivalent - - - - - **Parameters** - - - ``type`` - type of error. This is normally the C++ category. - - - - - ``errorCode`` - specific code within the type - - - - - - - - **Returns** - - the Java error representing the native error. This method will never throw, so in case a Java error does not exists. :ref:`UNKNOWN ` will be returned. - - - - - - - - - - - - - -.. _getCategory: - -.. _getCategory__: - -.. _ErrorCode_getCategory: - -.. _ErrorCode_getCategory__: - -.. _io_realm_mongodb_ErrorCode_getCategory: - -.. _io_realm_mongodb_ErrorCode_getCategory__: - - - -getCategory ------------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ErrorCode.Category ` :ref:`getCategory ` () - | - - - - - * - Returns the getCategory of the error.Errors come in 2 categories: FATAL, RECOVERABLE - - FATAL: The session cannot be recovered and needs to be re-created. A likely cause is that the User does not have access to this Realm. Check that the :ref:`SyncConfiguration ` is correct. - - - - RECOVERABLE: Temporary error. The session will automatically try to recover as soon as possible. - - - - - - - - - **Returns** - - the severity of the error. - - - - - - - - - - - -.. _getType: - -.. _getType__: - -.. _ErrorCode_getType: - -.. _ErrorCode_getType__: - -.. _io_realm_mongodb_ErrorCode_getType: - -.. _io_realm_mongodb_ErrorCode_getType__: - - - -getType -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getType ` () - | - - - - - * - Returns the type of error. Note that an error is only uniquely identified by the ``(type:value)`` pair. - - - - - - - - - **Returns** - - the type of error. - - - - - - - - - - - -.. _intValue: - -.. _intValue__: - -.. _ErrorCode_intValue: - -.. _ErrorCode_intValue__: - -.. _io_realm_mongodb_ErrorCode_intValue: - -.. _io_realm_mongodb_ErrorCode_intValue__: - - - -intValue --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`intValue ` () - | - - - - - * - Returns the numerical value for this error code. Note that an error is only uniquely identified by the ``(type:value)`` pair. - - - - - - - - - **Returns** - - the error code as an unique ``int`` value. - - - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _ErrorCode_toString: - -.. _ErrorCode_toString__: - -.. _io_realm_mongodb_ErrorCode_toString: - -.. _io_realm_mongodb_ErrorCode_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Enum `__ - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _ErrorCode_valueOf: - -.. _ErrorCode_valueOf__: - -.. _io_realm_mongodb_ErrorCode_valueOf: - -.. _io_realm_mongodb_ErrorCode_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_ErrorCode_valueOf_java_lang_String_: - -.. _io_realm_mongodb_ErrorCode_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _ErrorCode_valueOf_java_lang_String_: - -.. _ErrorCode_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ErrorCode ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _ErrorCode_values: - -.. _ErrorCode_values__: - -.. _io_realm_mongodb_ErrorCode_values: - -.. _io_realm_mongodb_ErrorCode_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ErrorCode ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Category.txt b/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Category.txt deleted file mode 100644 index c5c6253c28..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Category.txt +++ /dev/null @@ -1,249 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum ErrorCode.Category -^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_ErrorCode_Category: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.ErrorCode.Category - - - - -**Enclosing class:** - -:ref:`ErrorCode ` - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`FATAL ` - - - - - - - * - :ref:`RECOVERABLE ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`ErrorCode.Category ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`ErrorCode.Category ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_ErrorCode_Category_FATAL: - -.. _ErrorCode_Category_FATAL: - - - -``FATAL`` ----------- - -public static final :ref:`ErrorCode.Category ` - - - - - -.. _io_realm_mongodb_ErrorCode_Category_RECOVERABLE: - -.. _ErrorCode_Category_RECOVERABLE: - - - -``RECOVERABLE`` ----------------- - -public static final :ref:`ErrorCode.Category ` - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _Category_valueOf: - -.. _Category_valueOf__: - -.. _ErrorCode_Category_valueOf: - -.. _ErrorCode_Category_valueOf__: - -.. _io_realm_mongodb_ErrorCode_Category_valueOf: - -.. _io_realm_mongodb_ErrorCode_Category_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_ErrorCode_Category_valueOf_java_lang_String_: - -.. _io_realm_mongodb_ErrorCode_Category_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _ErrorCode_Category_valueOf_java_lang_String_: - -.. _ErrorCode_Category_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ErrorCode.Category ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _Category_values: - -.. _Category_values__: - -.. _ErrorCode_Category_values: - -.. _ErrorCode_Category_values__: - -.. _io_realm_mongodb_ErrorCode_Category_values: - -.. _io_realm_mongodb_ErrorCode_Category_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ErrorCode.Category ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Type.txt b/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Type.txt deleted file mode 100644 index 9dd9a197e5..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/ErrorCode/Type.txt +++ /dev/null @@ -1,313 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class ErrorCode.Type -^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_ErrorCode_Type: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.ErrorCode.Type - - - - -**Enclosing class:** - -:ref:`ErrorCode ` - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Type ` () - | - - - - - - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static final `String `__ - - - - :ref:`AUTH ` - - - - - * - public static final `String `__ - - - - :ref:`CONNECTION ` - - - - - * - public static final `String `__ - - - - :ref:`DEPRECATED ` - - - - - * - public static final `String `__ - - - - :ref:`HTTP ` - - - - - * - public static final `String `__ - - - - :ref:`JAVA ` - - - - - * - public static final `String `__ - - - - :ref:`JSON ` - - - - - * - public static final `String `__ - - - - :ref:`MISC ` - - - - - * - public static final `String `__ - - - - :ref:`PROTOCOL ` - - - - - * - public static final `String `__ - - - - :ref:`SERVICE ` - - - - - * - public static final `String `__ - - - - :ref:`SESSION ` - - - - - * - public static final `String `__ - - - - :ref:`UNKNOWN ` - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_mongodb_ErrorCode_Type_AUTH: - - - -``AUTH`` ---------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_CONNECTION: - - - -``CONNECTION`` ---------------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_DEPRECATED: - - - -``DEPRECATED`` ---------------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_HTTP: - - - -``HTTP`` ---------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_JAVA: - - - -``JAVA`` ---------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_JSON: - - - -``JSON`` ---------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_MISC: - - - -``MISC`` ---------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_PROTOCOL: - - - -``PROTOCOL`` -------------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_SERVICE: - - - -``SERVICE`` ------------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_SESSION: - - - -``SESSION`` ------------- - - - - -.. _io_realm_mongodb_ErrorCode_Type_UNKNOWN: - - - -``UNKNOWN`` ------------- - - - - - - -Constructor Detail -================== - -.. _Type: - -.. _Type__: - -.. _io_realm_mongodb_ErrorCode_Type: - -.. _io_realm_mongodb_ErrorCode_Type__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Type ` () - | - - - - - * - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt b/source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt deleted file mode 100644 index 9c37fc2acb..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamAsyncTask.txt +++ /dev/null @@ -1,201 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmEventStreamAsyncTask -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_RealmEventStreamAsyncTask: - - - -io.realm.mongodb -================ - -**Implemented interfaces:** - - - -- :ref:`io.realm.RealmAsyncTask ` - - -The RealmEventStreamAsyncTask is a specific version of :ref:`RealmAsyncTask ` that provides a non-blocking mechanism to work with asynchronous operations carried out against MongoDB Realm that yield stream results. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`get ` ( - | :ref:`io.realm.mongodb.App.Callback\> ` callback - | ) - - - Provides a way to subscribe to asynchronous operations via a callback, which handles both results and errors. - - - - - * - public **boolean** - - | :ref:`isOpen ` () - | - - - Whether or not the stream is currently open. - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _get: - -.. _get__: - -.. _RealmEventStreamAsyncTask_get: - -.. _RealmEventStreamAsyncTask_get__: - -.. _io_realm_mongodb_RealmEventStreamAsyncTask_get: - -.. _io_realm_mongodb_RealmEventStreamAsyncTask_get__: - - - -get ----- - -.. _io_realm_mongodb_RealmEventStreamAsyncTask_get_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_RealmEventStreamAsyncTask_get_Callback_: - -.. _io_realm_mongodb_RealmEventStreamAsyncTask_get_App_Callback_: - -.. _get_io_realm_mongodb_App_Callback_: - -.. _get_Callback_: - -.. _get_App_Callback_: - -.. _RealmEventStreamAsyncTask_get_io_realm_mongodb_App_Callback_: - -.. _RealmEventStreamAsyncTask_get_Callback_: - -.. _RealmEventStreamAsyncTask_get_App_Callback_: - -.. _io_realm_mongodb_RealmEventStreamAsyncTask_get_App_Callback_BaseChangeEvent_T___: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`get ` ( - | :ref:`io.realm.mongodb.App.Callback\> ` callback - | ) - - - - - * - Provides a way to subscribe to asynchronous operations via a callback, which handles both results and errors. - - - - - **Parameters** - - - ``callback`` - the :ref:`App.Callback ` designed to receive event results. - - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if the stream is already open. - - - - - - - - - - - - -.. _isOpen: - -.. _isOpen__: - -.. _RealmEventStreamAsyncTask_isOpen: - -.. _RealmEventStreamAsyncTask_isOpen__: - -.. _io_realm_mongodb_RealmEventStreamAsyncTask_isOpen: - -.. _io_realm_mongodb_RealmEventStreamAsyncTask_isOpen__: - - - -isOpen ------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isOpen ` () - | - - - - - * - Whether or not the stream is currently open. - - - - - - - **Returns** - - true if open, false if not. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamTask.txt b/source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamTask.txt deleted file mode 100644 index 250aa9a82a..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/RealmEventStreamTask.txt +++ /dev/null @@ -1,178 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmEventStreamTask -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_RealmEventStreamTask: - - - -io.realm.mongodb -================ - -**Implemented interfaces:** - - - -- :ref:`io.realm.RealmAsyncTask ` - - -The RealmEventStreamTask is a specific version of :ref:`RealmAsyncTask ` that provides a blocking mechanism to work with asynchronous operations carried out against MongoDB Realm that yield stream results. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`BaseChangeEvent ` - - | :ref:`getNext ` () - | - - - Blocks the thread on which the call is made until the result of the operation arrives. - - - - - * - public **boolean** - - | :ref:`isOpen ` () - | - - - Whether or not the stream is currently open. - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _getNext: - -.. _getNext__: - -.. _RealmEventStreamTask_getNext: - -.. _RealmEventStreamTask_getNext__: - -.. _io_realm_mongodb_RealmEventStreamTask_getNext: - -.. _io_realm_mongodb_RealmEventStreamTask_getNext__: - - - -getNext -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`BaseChangeEvent ` :ref:`getNext ` () - | - - - - - * - Blocks the thread on which the call is made until the result of the operation arrives. - - - - - - - **Returns** - - the next event in the stream. - - - - - **Throws** - - - :ref:`AppException ` - if the server raises an error - - - - - `IOException `__ - if something is wrong with the input stream - - - - - - - - - - - - -.. _isOpen: - -.. _isOpen__: - -.. _RealmEventStreamTask_isOpen: - -.. _RealmEventStreamTask_isOpen__: - -.. _io_realm_mongodb_RealmEventStreamTask_isOpen: - -.. _io_realm_mongodb_RealmEventStreamTask_isOpen__: - - - -isOpen ------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isOpen ` () - | - - - - - * - Whether or not the stream is currently open. - - - - - - - **Returns** - - true if open, false if not. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/RealmResultTask.txt b/source/sdk/temp/java/api/io/realm/mongodb/RealmResultTask.txt deleted file mode 100644 index ef6d6daf61..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/RealmResultTask.txt +++ /dev/null @@ -1,207 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RealmResultTask -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_RealmResultTask: - - - -io.realm.mongodb -================ - -**Implemented interfaces:** - - - -- :ref:`io.realm.RealmAsyncTask ` - - -The RealmResultTask is a specific version of :ref:`RealmAsyncTask ` that provides a mechanism to work with asynchronous operations carried out against MongoDB Realm that yield a result. - -This class offers both blocking (``get`` ) and non-blocking (``getAsync`` ) method calls. - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **T** - - | :ref:`get ` () - | - - - Blocks the thread on which the call is made until the result of the operation arrives. - - - - - * - public **void** - - | :ref:`getAsync ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Provides a way to subscribe to asynchronous operations via a callback, which handles both results and errors. - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _get: - -.. _get__: - -.. _RealmResultTask_get: - -.. _RealmResultTask_get__: - -.. _io_realm_mongodb_RealmResultTask_get: - -.. _io_realm_mongodb_RealmResultTask_get__: - - - -get ----- - -.. list-table:: - :header-rows: 1 - - * - | public **T** :ref:`get ` () - | - - - - - * - Blocks the thread on which the call is made until the result of the operation arrives. - - - - - - - **Returns** - - the result of the operation executed by this task. - - - - - - - - - - - -.. _getAsync: - -.. _getAsync__: - -.. _RealmResultTask_getAsync: - -.. _RealmResultTask_getAsync__: - -.. _io_realm_mongodb_RealmResultTask_getAsync: - -.. _io_realm_mongodb_RealmResultTask_getAsync__: - - - -getAsync --------- - -.. _io_realm_mongodb_RealmResultTask_getAsync_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_RealmResultTask_getAsync_Callback_: - -.. _io_realm_mongodb_RealmResultTask_getAsync_App_Callback_: - -.. _getAsync_io_realm_mongodb_App_Callback_: - -.. _getAsync_Callback_: - -.. _getAsync_App_Callback_: - -.. _RealmResultTask_getAsync_io_realm_mongodb_App_Callback_: - -.. _RealmResultTask_getAsync_Callback_: - -.. _RealmResultTask_getAsync_App_Callback_: - -.. _io_realm_mongodb_RealmResultTask_getAsync_App_Callback_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`getAsync ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Provides a way to subscribe to asynchronous operations via a callback, which handles both results and errors. - - - - - **Parameters** - - - ``callback`` - the :ref:`App.Callback ` designed to receive results. - - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a thread without a `android.os.Looper `__ or from an `android.app.IntentService `__ thread. - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/User.txt b/source/sdk/temp/java/api/io/realm/mongodb/User.txt deleted file mode 100644 index ffe5c47fd6..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/User.txt +++ /dev/null @@ -1,1983 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class User -^^^^^^^^^^ - -.. _io_realm_mongodb_User: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.User - - -A *user* holds the user's meta data and tokens for accessing Realm App functionality.The user is used to configure Synchronized Realms and gives access to calling Realm App *Functions* through :ref:`Functions ` and accessing remote Realm App - -*Mongo Databases* through a :ref:`MongoClient ` . - - - - - - -.. seealso:: - - - - - :ref:`App.login(Credentials) ` - - - - - **io.realm.mongodb.sync.SyncConfiguration.Builder.Builder(User, String)** - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static final`` - - :ref:`User.State ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - Two Users are considered equal if they have the same user identity and are associated with the same app. - - - - - * - public `String `__ - - | :ref:`getAccessToken ` () - | - - - Returns the current access token for the user. - - - - - * - public synchronized :ref:`ApiKeyAuth ` - - | :ref:`getApiKeys ` () - | - - - Returns a wrapper for managing API keys controlled by the current user. - - - - - * - public :ref:`App ` - - | :ref:`getApp ` () - | - - - Returns the :ref:`App ` this user is associated with. - - - - - - - * - public **Document** - - | :ref:`getCustomData ` () - | - - - Return the custom user data associated with the user in the Realm App. - - - - - * - public `String `__ - - | :ref:`getDeviceId ` () - | - - - Returns a unique identifier for the device the user logged in to. - - - - - * - public :ref:`Functions ` - - | :ref:`getFunctions ` ( - | **CodecRegistry** codecRegistry - | ) - - - Returns a *functions* manager for invoking Realm Functions with custom codec registry for encoding and decoding arguments and results. - - - - - * - public synchronized :ref:`Functions ` - - | :ref:`getFunctions ` () - | - - - Returns a *functions* manager for invoking MongoDB Realm Functions. - - - - - * - public `String `__ - - | :ref:`getId ` () - | - - - Returns the server id of the user. - - - - - * - public `List `__ - - | :ref:`getIdentities ` () - | - - - Returns a new list of the user's identities. - - - - - * - public synchronized :ref:`MongoClient ` - - | :ref:`getMongoClient ` ( - | `String `__ serviceName - | ) - - - Returns a :ref:`MongoClient ` instance for accessing documents in the database. - - - - - - - * - public :ref:`UserProfile ` - - | :ref:`getProfile ` () - | - - - Returns the profile for this user. - - - - - * - public :ref:`Credentials.Provider ` - - | :ref:`getProviderType ` () - | - - - Returns the provider type used to log the user - - - - - * - public synchronized :ref:`Push ` - - | :ref:`getPush ` ( - | `String `__ serviceName - | ) - - - Returns the :ref:`Push ` instance for managing push notification registrations. - - - - - - - * - public `String `__ - - | :ref:`getRefreshToken ` () - | - - - Returns the current refresh token for the user. - - - - - * - public :ref:`User.State ` - - | :ref:`getState ` () - | - - - Returns the :ref:`State ` the user is in. - - - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isLoggedIn ` () - | - - - Returns true if the user is currently logged in. - - - - - * - public :ref:`User ` - - | :ref:`linkCredentials ` ( - | :ref:`Credentials ` credentials - | ) - - - Links the current user with a new user identity represented by the given credentials. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`linkCredentialsAsync ` ( - | :ref:`Credentials ` credentials, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Links the current user with a new user identity represented by the given credentials. - - - - - * - public **void** - - | :ref:`logOut ` () - | - - - Log the user out of the Realm App. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`logOutAsync ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Log the user out of the Realm App asynchronously. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`refreshCustomData ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Re-fetch custom user data from the Realm App asynchronously. - - - - - * - public **Document** - - | :ref:`refreshCustomData ` () - | - - - Re-fetch custom user data from the Realm App. - - - - - * - public :ref:`User ` - - | :ref:`remove ` () - | - - - Calling this will remove the user and any Realms the user has from the device. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`removeAsync ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Calling this will asynchronously remove the user and any Realms the user has from the device. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _User_equals: - -.. _User_equals__: - -.. _io_realm_mongodb_User_equals: - -.. _io_realm_mongodb_User_equals__: - - - -equals ------- - -.. _io_realm_mongodb_User_equals_java_lang_Object_: - -.. _io_realm_mongodb_User_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _User_equals_java_lang_Object_: - -.. _User_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - Two Users are considered equal if they have the same user identity and are associated with the same app. - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getAccessToken: - -.. _getAccessToken__: - -.. _User_getAccessToken: - -.. _User_getAccessToken__: - -.. _io_realm_mongodb_User_getAccessToken: - -.. _io_realm_mongodb_User_getAccessToken__: - - - -getAccessToken --------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getAccessToken ` () - | - - - - - * - Returns the current access token for the user. - - - - - - - **Returns** - - the current access token. - - - - - - - - - - - -.. _getApiKeys: - -.. _getApiKeys__: - -.. _User_getApiKeys: - -.. _User_getApiKeys__: - -.. _io_realm_mongodb_User_getApiKeys: - -.. _io_realm_mongodb_User_getApiKeys__: - - - -getApiKeys ----------- - -.. list-table:: - :header-rows: 1 - - * - | public synchronized :ref:`ApiKeyAuth ` :ref:`getApiKeys ` () - | - - - - - * - Returns a wrapper for managing API keys controlled by the current user. - - - - - - - **Returns** - - wrapper for managing API keys controlled by the current user. - - - - - **Throws** - - - `IllegalStateException `__ - if no user is currently logged in. - - - - - - - - - - - - -.. _getApp: - -.. _getApp__: - -.. _User_getApp: - -.. _User_getApp__: - -.. _io_realm_mongodb_User_getApp: - -.. _io_realm_mongodb_User_getApp__: - - - -getApp ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`App ` :ref:`getApp ` () - | - - - - - * - Returns the :ref:`App ` this user is associated with. - - - - - - - - - **Returns** - - the :ref:`App ` this user is associated with. - - - - - - - - - - - - - -.. _getCustomData: - -.. _getCustomData__: - -.. _User_getCustomData: - -.. _User_getCustomData__: - -.. _io_realm_mongodb_User_getCustomData: - -.. _io_realm_mongodb_User_getCustomData__: - - - -getCustomData -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **Document** :ref:`getCustomData ` () - | - - - - - * - Return the custom user data associated with the user in the Realm App.The data is only refreshed when the user's access token is refreshed or when explicitly calling :ref:`refreshCustomData() ` . - - - - - - - - - - - **Returns** - - The custom user data associated with the user. - - - - - - - - - - - -.. _getDeviceId: - -.. _getDeviceId__: - -.. _User_getDeviceId: - -.. _User_getDeviceId__: - -.. _io_realm_mongodb_User_getDeviceId: - -.. _io_realm_mongodb_User_getDeviceId__: - - - -getDeviceId ------------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getDeviceId ` () - | - - - - - * - Returns a unique identifier for the device the user logged in to. - - - - - - - **Returns** - - a unique device identifier for the user. - - - - - - - - - - - -.. _getFunctions: - -.. _getFunctions__: - -.. _User_getFunctions: - -.. _User_getFunctions__: - -.. _io_realm_mongodb_User_getFunctions: - -.. _io_realm_mongodb_User_getFunctions__: - - - -getFunctions ------------- - -.. _io_realm_mongodb_User_getFunctions_CodecRegistry_: - -.. _getFunctions_CodecRegistry_: - -.. _User_getFunctions_CodecRegistry_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Functions ` :ref:`getFunctions ` ( - | **CodecRegistry** codecRegistry - | ) - - - - - * - Returns a *functions* manager for invoking Realm Functions with custom codec registry for encoding and decoding arguments and results. - - - - - **Parameters** - - - ``codecRegistry`` - The codec registry to use for encoding and decoding arguments and results towards the remote Realm App. - - - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Functions ` - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public synchronized :ref:`Functions ` :ref:`getFunctions ` () - | - - - - - * - Returns a *functions* manager for invoking MongoDB Realm Functions.This will use the associated app's default codec registry to encode and decode arguments and results. - - - - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Functions ` - - - - - - - - - - - - -.. _getId: - -.. _getId__: - -.. _User_getId: - -.. _User_getId__: - -.. _io_realm_mongodb_User_getId: - -.. _io_realm_mongodb_User_getId__: - - - -getId ------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getId ` () - | - - - - - * - Returns the server id of the user. - - - - - - - **Returns** - - the server id of the user. - - - - - - - - - - - -.. _getIdentities: - -.. _getIdentities__: - -.. _User_getIdentities: - -.. _User_getIdentities__: - -.. _io_realm_mongodb_User_getIdentities: - -.. _io_realm_mongodb_User_getIdentities__: - - - -getIdentities -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `List `__ :ref:`getIdentities ` () - | - - - - - * - Returns a new list of the user's identities. - - - - - - - **Returns** - - the list of identities. - - - - - - - - - .. seealso:: - - - - - :ref:`UserIdentity ` - - - - - - - - - - - - -.. _getMongoClient: - -.. _getMongoClient__: - -.. _User_getMongoClient: - -.. _User_getMongoClient__: - -.. _io_realm_mongodb_User_getMongoClient: - -.. _io_realm_mongodb_User_getMongoClient__: - - - -getMongoClient --------------- - -.. _io_realm_mongodb_User_getMongoClient_java_lang_String_: - -.. _io_realm_mongodb_User_getMongoClient_String_: - -.. _getMongoClient_java_lang_String_: - -.. _getMongoClient_String_: - -.. _User_getMongoClient_java_lang_String_: - -.. _User_getMongoClient_String_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized :ref:`MongoClient ` :ref:`getMongoClient ` ( - | `String `__ serviceName - | ) - - - - - * - Returns a :ref:`MongoClient ` instance for accessing documents in the database. - - - - - - - **Parameters** - - - ``serviceName`` - the service name used to connect to the server. - - - - - - - - - - - - - - - - -.. _getProfile: - -.. _getProfile__: - -.. _User_getProfile: - -.. _User_getProfile__: - -.. _io_realm_mongodb_User_getProfile: - -.. _io_realm_mongodb_User_getProfile__: - - - -getProfile ----------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`UserProfile ` :ref:`getProfile ` () - | - - - - - * - Returns the profile for this user. - - - - - - - **Returns** - - the profile for this user - - - - - - - - - - - -.. _getProviderType: - -.. _getProviderType__: - -.. _User_getProviderType: - -.. _User_getProviderType__: - -.. _io_realm_mongodb_User_getProviderType: - -.. _io_realm_mongodb_User_getProviderType__: - - - -getProviderType ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Credentials.Provider ` :ref:`getProviderType ` () - | - - - - - * - Returns the provider type used to log the user - - - - - - - **Returns** - - the provider type of the user - - - - - - - - - - - -.. _getPush: - -.. _getPush__: - -.. _User_getPush: - -.. _User_getPush__: - -.. _io_realm_mongodb_User_getPush: - -.. _io_realm_mongodb_User_getPush__: - - - -getPush -------- - -.. _io_realm_mongodb_User_getPush_java_lang_String_: - -.. _io_realm_mongodb_User_getPush_String_: - -.. _getPush_java_lang_String_: - -.. _getPush_String_: - -.. _User_getPush_java_lang_String_: - -.. _User_getPush_String_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized :ref:`Push ` :ref:`getPush ` ( - | `String `__ serviceName - | ) - - - - - * - Returns the :ref:`Push ` instance for managing push notification registrations. - - - - - - - **Parameters** - - - ``serviceName`` - the service name used to connect to the server. - - - - - - - - - - - - - - - - -.. _getRefreshToken: - -.. _getRefreshToken__: - -.. _User_getRefreshToken: - -.. _User_getRefreshToken__: - -.. _io_realm_mongodb_User_getRefreshToken: - -.. _io_realm_mongodb_User_getRefreshToken__: - - - -getRefreshToken ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getRefreshToken ` () - | - - - - - * - Returns the current refresh token for the user. - - - - - - - **Returns** - - the current refresh token. - - - - - - - - - - - -.. _getState: - -.. _getState__: - -.. _User_getState: - -.. _User_getState__: - -.. _io_realm_mongodb_User_getState: - -.. _io_realm_mongodb_User_getState__: - - - -getState --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User.State ` :ref:`getState ` () - | - - - - - * - Returns the :ref:`State ` the user is in. - - - - - - - - - **Returns** - - the :ref:`State ` of the user. - - - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _User_hashCode: - -.. _User_hashCode__: - -.. _io_realm_mongodb_User_hashCode: - -.. _io_realm_mongodb_User_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _isLoggedIn: - -.. _isLoggedIn__: - -.. _User_isLoggedIn: - -.. _User_isLoggedIn__: - -.. _io_realm_mongodb_User_isLoggedIn: - -.. _io_realm_mongodb_User_isLoggedIn__: - - - -isLoggedIn ----------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isLoggedIn ` () - | - - - - - * - Returns true if the user is currently logged in. Returns whether or not this user is still logged into the MongoDB Realm App. - - - - - - - **Returns** - - ``true`` if still logged in, ``false`` if not. - - - - - - - - - - - - - -.. _linkCredentials: - -.. _linkCredentials__: - -.. _User_linkCredentials: - -.. _User_linkCredentials__: - -.. _io_realm_mongodb_User_linkCredentials: - -.. _io_realm_mongodb_User_linkCredentials__: - - - -linkCredentials ---------------- - -.. _io_realm_mongodb_User_linkCredentials_io_realm_mongodb_Credentials_: - -.. _io_realm_mongodb_User_linkCredentials_Credentials_: - -.. _linkCredentials_io_realm_mongodb_Credentials_: - -.. _linkCredentials_Credentials_: - -.. _User_linkCredentials_io_realm_mongodb_Credentials_: - -.. _User_linkCredentials_Credentials_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`linkCredentials ` ( - | :ref:`Credentials ` credentials - | ) - - - - - * - Links the current user with a new user identity represented by the given credentials.Linking a user with more credentials, mean the user can login either of these credentials. It also makes it possible to "upgrade" an anonymous user by linking it with e.g. Email/Password credentials. - - - - .. code-block:: java - - - // Example - App app = new App("app-id") - User user = app.login(Credentials.anonymous()); - user.linkCredentials(Credentials.emailPassword("email", "password")); - - - - - - Note: It is not possible to link two existing users of MongoDB Realm. The provided credentials must not have been used by another user. - - - - - - - **Parameters** - - - ``credentials`` - the credentials to link with the current user. - - - - - - - - **Returns** - - the :ref:`User ` the credentials were linked to. - - - - - - - **Throws** - - - `IllegalStateException `__ - if no user is currently logged in. - - - - - - - - - - - - -.. _linkCredentialsAsync: - -.. _linkCredentialsAsync__: - -.. _User_linkCredentialsAsync: - -.. _User_linkCredentialsAsync__: - -.. _io_realm_mongodb_User_linkCredentialsAsync: - -.. _io_realm_mongodb_User_linkCredentialsAsync__: - - - -linkCredentialsAsync --------------------- - -.. _io_realm_mongodb_User_linkCredentialsAsync_io_realm_mongodb_Credentials_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_io_realm_mongodb_Credentials__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_io_realm_mongodb_Credentials_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_io_realm_mongodb_Credentials__Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_io_realm_mongodb_Credentials_App_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_io_realm_mongodb_Credentials__App_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_Credentials_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_Credentials__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_Credentials_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_Credentials__Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_Credentials_App_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_Credentials__App_Callback_: - -.. _linkCredentialsAsync_io_realm_mongodb_Credentials_io_realm_mongodb_App_Callback_: - -.. _linkCredentialsAsync_io_realm_mongodb_Credentials__io_realm_mongodb_App_Callback_: - -.. _linkCredentialsAsync_io_realm_mongodb_Credentials_Callback_: - -.. _linkCredentialsAsync_io_realm_mongodb_Credentials__Callback_: - -.. _linkCredentialsAsync_io_realm_mongodb_Credentials_App_Callback_: - -.. _linkCredentialsAsync_io_realm_mongodb_Credentials__App_Callback_: - -.. _linkCredentialsAsync_Credentials_io_realm_mongodb_App_Callback_: - -.. _linkCredentialsAsync_Credentials__io_realm_mongodb_App_Callback_: - -.. _linkCredentialsAsync_Credentials_Callback_: - -.. _linkCredentialsAsync_Credentials__Callback_: - -.. _linkCredentialsAsync_Credentials_App_Callback_: - -.. _linkCredentialsAsync_Credentials__App_Callback_: - -.. _User_linkCredentialsAsync_io_realm_mongodb_Credentials_io_realm_mongodb_App_Callback_: - -.. _User_linkCredentialsAsync_io_realm_mongodb_Credentials__io_realm_mongodb_App_Callback_: - -.. _User_linkCredentialsAsync_io_realm_mongodb_Credentials_Callback_: - -.. _User_linkCredentialsAsync_io_realm_mongodb_Credentials__Callback_: - -.. _User_linkCredentialsAsync_io_realm_mongodb_Credentials_App_Callback_: - -.. _User_linkCredentialsAsync_io_realm_mongodb_Credentials__App_Callback_: - -.. _User_linkCredentialsAsync_Credentials_io_realm_mongodb_App_Callback_: - -.. _User_linkCredentialsAsync_Credentials__io_realm_mongodb_App_Callback_: - -.. _User_linkCredentialsAsync_Credentials_Callback_: - -.. _User_linkCredentialsAsync_Credentials__Callback_: - -.. _User_linkCredentialsAsync_Credentials_App_Callback_: - -.. _User_linkCredentialsAsync_Credentials__App_Callback_: - -.. _io_realm_mongodb_User_linkCredentialsAsync_Credentials__App_Callback_User__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`linkCredentialsAsync ` ( - | :ref:`Credentials ` credentials, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Links the current user with a new user identity represented by the given credentials.Linking a user with more credentials, mean the user can login either of these credentials. It also makes it possible to "upgrade" an anonymous user by linking it with e.g. Email/Password credentials. - - - - .. code-block:: java - - - // Example - App app = new App("app-id") - User user = app.login(Credentials.anonymous()); - user.linkCredentials(Credentials.emailPassword("email", "password")); - - - - - - Note: It is not possible to link two existing users of MongoDB Realm. The provided credentials must not have been used by another user. - - - - - - - **Parameters** - - - ``credentials`` - the credentials to link with the current user. - - - - - ``callback`` - callback when user identities has been linked or it failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _logOut: - -.. _logOut__: - -.. _User_logOut: - -.. _User_logOut__: - -.. _io_realm_mongodb_User_logOut: - -.. _io_realm_mongodb_User_logOut__: - - - -logOut ------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`logOut ` () - | - - - - - * - Log the user out of the Realm App. This will unregister them on the device and stop any synchronization to and from the users' Realms. Any Realms owned by the user will not be deleted from the device before :ref:`User.remove() ` is called. - - Once the Realm App has confirmed the logout any registered :ref:`AuthenticationListener ` will be notified and user credentials will be deleted from this device. - - - - Logging out anonymous users will remove them immediately instead of marking them as :ref:`User.State.LOGGED_OUT ` . - - - - All other users will be marked as :ref:`User.State.LOGGED_OUT ` and will still be returned by :ref:`App.allUsers() ` . They can be removed completely by calling :ref:`User.remove() ` . - - - - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if an error occurred while trying to log the user out of the Realm App. - - - - - - - - - - - - -.. _logOutAsync: - -.. _logOutAsync__: - -.. _User_logOutAsync: - -.. _User_logOutAsync__: - -.. _io_realm_mongodb_User_logOutAsync: - -.. _io_realm_mongodb_User_logOutAsync__: - - - -logOutAsync ------------ - -.. _io_realm_mongodb_User_logOutAsync_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_User_logOutAsync_Callback_: - -.. _io_realm_mongodb_User_logOutAsync_App_Callback_: - -.. _logOutAsync_io_realm_mongodb_App_Callback_: - -.. _logOutAsync_Callback_: - -.. _logOutAsync_App_Callback_: - -.. _User_logOutAsync_io_realm_mongodb_App_Callback_: - -.. _User_logOutAsync_Callback_: - -.. _User_logOutAsync_App_Callback_: - -.. _io_realm_mongodb_User_logOutAsync_App_Callback_User__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`logOutAsync ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Log the user out of the Realm App asynchronously. This will unregister them on the device and stop any synchronization to and from the users' Realms. Any Realms owned by the user will not be deleted from the device before :ref:`User.remove() ` is called. - - Once the Realm App has confirmed the logout any registered :ref:`AuthenticationListener ` will be notified and user credentials will be deleted from this device. - - - - Logging out anonymous users will remove them immediately instead of marking them as :ref:`User.State.LOGGED_OUT ` . - - - - All other users will be marked as :ref:`User.State.LOGGED_OUT ` and will still be returned by :ref:`App.allUsers() ` . They can be removed completely by calling :ref:`User.remove() ` . - - - - - - - - - **Parameters** - - - ``callback`` - callback when logging out has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _refreshCustomData: - -.. _refreshCustomData__: - -.. _User_refreshCustomData: - -.. _User_refreshCustomData__: - -.. _io_realm_mongodb_User_refreshCustomData: - -.. _io_realm_mongodb_User_refreshCustomData__: - - - -refreshCustomData ------------------ - -.. _io_realm_mongodb_User_refreshCustomData_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_User_refreshCustomData_Callback_: - -.. _io_realm_mongodb_User_refreshCustomData_App_Callback_: - -.. _refreshCustomData_io_realm_mongodb_App_Callback_: - -.. _refreshCustomData_Callback_: - -.. _refreshCustomData_App_Callback_: - -.. _User_refreshCustomData_io_realm_mongodb_App_Callback_: - -.. _User_refreshCustomData_Callback_: - -.. _User_refreshCustomData_App_Callback_: - -.. _io_realm_mongodb_User_refreshCustomData_App_Callback_Document__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`refreshCustomData ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Re-fetch custom user data from the Realm App asynchronously.This is the asynchronous variant of :ref:`refreshCustomData() ` . - - - - - - - - - **Parameters** - - - ``callback`` - The callback that will receive the result or any errors from the request. - - - - - - - - **Returns** - - The task representing the ongoing operation. - - - - - **Throws** - - - `IllegalStateException `__ - if not called on a looper thread. - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **Document** :ref:`refreshCustomData ` () - | - - - - - * - Re-fetch custom user data from the Realm App. - - - - - - - **Returns** - - The updated custom user data associated with the user. - - - - - **Throws** - - - :ref:`AppException ` - if the request failed in some way. - - - - - - - - - - - - -.. _remove: - -.. _remove__: - -.. _User_remove: - -.. _User_remove__: - -.. _io_realm_mongodb_User_remove: - -.. _io_realm_mongodb_User_remove__: - - - -remove ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`remove ` () - | - - - - - * - Calling this will remove the user and any Realms the user has from the device. No data is removed from the server. If the user is logged in when calling this method, the user is logged out before any data is deleted. - - - - - - - **Returns** - - the user that was removed. - - - - - **Throws** - - - :ref:`AppException ` - if an error occurred while trying to remove the user. - - - - - - - - - - - - -.. _removeAsync: - -.. _removeAsync__: - -.. _User_removeAsync: - -.. _User_removeAsync__: - -.. _io_realm_mongodb_User_removeAsync: - -.. _io_realm_mongodb_User_removeAsync__: - - - -removeAsync ------------ - -.. _io_realm_mongodb_User_removeAsync_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_User_removeAsync_Callback_: - -.. _io_realm_mongodb_User_removeAsync_App_Callback_: - -.. _removeAsync_io_realm_mongodb_App_Callback_: - -.. _removeAsync_Callback_: - -.. _removeAsync_App_Callback_: - -.. _User_removeAsync_io_realm_mongodb_App_Callback_: - -.. _User_removeAsync_Callback_: - -.. _User_removeAsync_App_Callback_: - -.. _io_realm_mongodb_User_removeAsync_App_Callback_User__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`removeAsync ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Calling this will asynchronously remove the user and any Realms the user has from the device. No data is removed from the server. If the user is logged in when calling this method, the user is logged out before any data is deleted. - - - - - **Parameters** - - - ``callback`` - callback when removing the user has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/User/State.txt b/source/sdk/temp/java/api/io/realm/mongodb/User/State.txt deleted file mode 100644 index f7d7c96d89..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/User/State.txt +++ /dev/null @@ -1,271 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum User.State -^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_User_State: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.User.State - - - - -**Enclosing class:** - -:ref:`User ` - - - -The user's potential states. - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`LOGGED_IN ` - - - - - - - * - :ref:`LOGGED_OUT ` - - - - - - - * - :ref:`REMOVED ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`User.State ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`User.State ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_User_State_LOGGED_IN: - -.. _User_State_LOGGED_IN: - - - -``LOGGED_IN`` --------------- - -public static final :ref:`User.State ` - - - - - -.. _io_realm_mongodb_User_State_LOGGED_OUT: - -.. _User_State_LOGGED_OUT: - - - -``LOGGED_OUT`` ---------------- - -public static final :ref:`User.State ` - - - - - -.. _io_realm_mongodb_User_State_REMOVED: - -.. _User_State_REMOVED: - - - -``REMOVED`` ------------- - -public static final :ref:`User.State ` - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _State_valueOf: - -.. _State_valueOf__: - -.. _User_State_valueOf: - -.. _User_State_valueOf__: - -.. _io_realm_mongodb_User_State_valueOf: - -.. _io_realm_mongodb_User_State_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_User_State_valueOf_java_lang_String_: - -.. _io_realm_mongodb_User_State_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _User_State_valueOf_java_lang_String_: - -.. _User_State_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`User.State ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _State_values: - -.. _State_values__: - -.. _User_State_values: - -.. _User_State_values__: - -.. _io_realm_mongodb_User_State_values: - -.. _io_realm_mongodb_User_State_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`User.State ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/UserIdentity.txt b/source/sdk/temp/java/api/io/realm/mongodb/UserIdentity.txt deleted file mode 100644 index 2df10d3faf..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/UserIdentity.txt +++ /dev/null @@ -1,351 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class UserIdentity -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_UserIdentity: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.UserIdentity - - -Each User is represented by 1 or more identities each defined by an :ref:`Credentials.Provider ` . This class represents the identity defined by a specific provider. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public `String `__ - - | :ref:`getId ` () - | - - - Returns a unique identifier for this identity. - - - - - * - public :ref:`Credentials.Provider ` - - | :ref:`getProvider ` () - | - - - Returns the provider defining this identity. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _UserIdentity_equals: - -.. _UserIdentity_equals__: - -.. _io_realm_mongodb_UserIdentity_equals: - -.. _io_realm_mongodb_UserIdentity_equals__: - - - -equals ------- - -.. _io_realm_mongodb_UserIdentity_equals_java_lang_Object_: - -.. _io_realm_mongodb_UserIdentity_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _UserIdentity_equals_java_lang_Object_: - -.. _UserIdentity_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getId: - -.. _getId__: - -.. _UserIdentity_getId: - -.. _UserIdentity_getId__: - -.. _io_realm_mongodb_UserIdentity_getId: - -.. _io_realm_mongodb_UserIdentity_getId__: - - - -getId ------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getId ` () - | - - - - - * - Returns a unique identifier for this identity. - - - - - - - **Returns** - - a unique identifier for this identifier. - - - - - - - - - - - -.. _getProvider: - -.. _getProvider__: - -.. _UserIdentity_getProvider: - -.. _UserIdentity_getProvider__: - -.. _io_realm_mongodb_UserIdentity_getProvider: - -.. _io_realm_mongodb_UserIdentity_getProvider__: - - - -getProvider ------------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Credentials.Provider ` :ref:`getProvider ` () - | - - - - - * - Returns the provider defining this identity. - - - - - - - **Returns** - - - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _UserIdentity_hashCode: - -.. _UserIdentity_hashCode__: - -.. _io_realm_mongodb_UserIdentity_hashCode: - -.. _io_realm_mongodb_UserIdentity_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _toString: - -.. _toString__: - -.. _UserIdentity_toString: - -.. _UserIdentity_toString__: - -.. _io_realm_mongodb_UserIdentity_toString: - -.. _io_realm_mongodb_UserIdentity_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/UserProfile.txt b/source/sdk/temp/java/api/io/realm/mongodb/UserProfile.txt deleted file mode 100644 index 241e5ffd8c..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/UserProfile.txt +++ /dev/null @@ -1,811 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class UserProfile -^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_UserProfile: - - - -io.realm.mongodb -================ - - - | `java.lang.Object `__ - | io.realm.mongodb.UserProfile - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public `String `__ - - | :ref:`getBirthday ` () - | - - - Returns the birthday of the user. - - - - - * - public `String `__ - - | :ref:`getEmail ` () - | - - - Returns the email address of the user. - - - - - * - public `String `__ - - | :ref:`getFirstName ` () - | - - - Return the first name of the user. - - - - - * - public `String `__ - - | :ref:`getGender ` () - | - - - Returns the gender of the user. - - - - - * - public `String `__ - - | :ref:`getLastName ` () - | - - - Return the last name of the user. - - - - - * - public `Long `__ - - | :ref:`getMaxAge ` () - | - - - Returns the maximum age of the user. - - - - - * - public `Long `__ - - | :ref:`getMinAge ` () - | - - - Returns the minimum age of the user. - - - - - * - public `String `__ - - | :ref:`getName ` () - | - - - Returns the name of the user. - - - - - * - public `String `__ - - | :ref:`getPictureUrl ` () - | - - - Returns the picture URL of the user. - - - - - * - public :ref:`User ` - - | :ref:`getUser ` () - | - - - Returns the :ref:`User ` that this instance in associated with. - - - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _UserProfile_equals: - -.. _UserProfile_equals__: - -.. _io_realm_mongodb_UserProfile_equals: - -.. _io_realm_mongodb_UserProfile_equals__: - - - -equals ------- - -.. _io_realm_mongodb_UserProfile_equals_java_lang_Object_: - -.. _io_realm_mongodb_UserProfile_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _UserProfile_equals_java_lang_Object_: - -.. _UserProfile_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getBirthday: - -.. _getBirthday__: - -.. _UserProfile_getBirthday: - -.. _UserProfile_getBirthday__: - -.. _io_realm_mongodb_UserProfile_getBirthday: - -.. _io_realm_mongodb_UserProfile_getBirthday__: - - - -getBirthday ------------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getBirthday ` () - | - - - - - * - Returns the birthday of the user. - - - - - - - **Returns** - - the birthday of the user or null if there is no birthday associated with the user. - - - - - - - - - - - -.. _getEmail: - -.. _getEmail__: - -.. _UserProfile_getEmail: - -.. _UserProfile_getEmail__: - -.. _io_realm_mongodb_UserProfile_getEmail: - -.. _io_realm_mongodb_UserProfile_getEmail__: - - - -getEmail --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getEmail ` () - | - - - - - * - Returns the email address of the user. - - - - - - - **Returns** - - the email address of the user or null if there is no email address associated with the user. address. - - - - - - - - - - - -.. _getFirstName: - -.. _getFirstName__: - -.. _UserProfile_getFirstName: - -.. _UserProfile_getFirstName__: - -.. _io_realm_mongodb_UserProfile_getFirstName: - -.. _io_realm_mongodb_UserProfile_getFirstName__: - - - -getFirstName ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getFirstName ` () - | - - - - - * - Return the first name of the user. - - - - - - - **Returns** - - the first name of the user or null if there is no first name associated with the user. - - - - - - - - - - - -.. _getGender: - -.. _getGender__: - -.. _UserProfile_getGender: - -.. _UserProfile_getGender__: - -.. _io_realm_mongodb_UserProfile_getGender: - -.. _io_realm_mongodb_UserProfile_getGender__: - - - -getGender ---------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getGender ` () - | - - - - - * - Returns the gender of the user. - - - - - - - **Returns** - - the gender of the user or null if there is no gender associated with the user. - - - - - - - - - - - -.. _getLastName: - -.. _getLastName__: - -.. _UserProfile_getLastName: - -.. _UserProfile_getLastName__: - -.. _io_realm_mongodb_UserProfile_getLastName: - -.. _io_realm_mongodb_UserProfile_getLastName__: - - - -getLastName ------------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getLastName ` () - | - - - - - * - Return the last name of the user. - - - - - - - **Returns** - - the last name of the user or null if there is no last name associated with the user. - - - - - - - - - - - -.. _getMaxAge: - -.. _getMaxAge__: - -.. _UserProfile_getMaxAge: - -.. _UserProfile_getMaxAge__: - -.. _io_realm_mongodb_UserProfile_getMaxAge: - -.. _io_realm_mongodb_UserProfile_getMaxAge__: - - - -getMaxAge ---------- - -.. list-table:: - :header-rows: 1 - - * - | public `Long `__ :ref:`getMaxAge ` () - | - - - - - * - Returns the maximum age of the user. - - - - - - - **Returns** - - the maximum age of the user or null if there is no maximum age associated with the user. - - - - - - - - - - - -.. _getMinAge: - -.. _getMinAge__: - -.. _UserProfile_getMinAge: - -.. _UserProfile_getMinAge__: - -.. _io_realm_mongodb_UserProfile_getMinAge: - -.. _io_realm_mongodb_UserProfile_getMinAge__: - - - -getMinAge ---------- - -.. list-table:: - :header-rows: 1 - - * - | public `Long `__ :ref:`getMinAge ` () - | - - - - - * - Returns the minimum age of the user. - - - - - - - **Returns** - - the minimum age of the user or null if there is no minimum age associated with the user. - - - - - - - - - - - -.. _getName: - -.. _getName__: - -.. _UserProfile_getName: - -.. _UserProfile_getName__: - -.. _io_realm_mongodb_UserProfile_getName: - -.. _io_realm_mongodb_UserProfile_getName__: - - - -getName -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getName ` () - | - - - - - * - Returns the name of the user. - - - - - - - **Returns** - - the name of the user. - - - - - - - - - - - -.. _getPictureUrl: - -.. _getPictureUrl__: - -.. _UserProfile_getPictureUrl: - -.. _UserProfile_getPictureUrl__: - -.. _io_realm_mongodb_UserProfile_getPictureUrl: - -.. _io_realm_mongodb_UserProfile_getPictureUrl__: - - - -getPictureUrl -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getPictureUrl ` () - | - - - - - * - Returns the picture URL of the user. - - - - - - - **Returns** - - the picture URL of the user or null if there is no picture URL associated with the user. - - - - - - - - - - - -.. _getUser: - -.. _getUser__: - -.. _UserProfile_getUser: - -.. _UserProfile_getUser__: - -.. _io_realm_mongodb_UserProfile_getUser: - -.. _io_realm_mongodb_UserProfile_getUser__: - - - -getUser -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`getUser ` () - | - - - - - * - Returns the :ref:`User ` that this instance in associated with. - - - - - - - - - **Returns** - - The :ref:`User ` that this instance in associated with. - - - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _UserProfile_hashCode: - -.. _UserProfile_hashCode__: - -.. _io_realm_mongodb_UserProfile_hashCode: - -.. _io_realm_mongodb_UserProfile_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _toString: - -.. _toString__: - -.. _UserProfile_toString: - -.. _UserProfile_toString__: - -.. _io_realm_mongodb_UserProfile_toString: - -.. _io_realm_mongodb_UserProfile_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/auth.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth.txt deleted file mode 100644 index ab67f7ad42..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/auth.txt +++ /dev/null @@ -1,33 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.auth -^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - ApiKey - ApiKeyAuth - EmailPasswordAuth - GoogleAuthType - - - -| - -- :ref:`io.realm.mongodb.auth.ApiKey ` -- :ref:`io.realm.mongodb.auth.ApiKeyAuth ` -- :ref:`io.realm.mongodb.auth.EmailPasswordAuth ` -- :ref:`io.realm.mongodb.auth.GoogleAuthType ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKey.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKey.txt deleted file mode 100644 index 85ad0f5f8b..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKey.txt +++ /dev/null @@ -1,473 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class ApiKey -^^^^^^^^^^^^ - -.. _io_realm_mongodb_auth_ApiKey: - - - -io.realm.mongodb.auth -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.auth.ApiKey - - -Class representing an API key for a :ref:`User ` . An API can be used to represent the user when logging instead of using email and password. - -These keys are created or fetched through :ref:`ApiKeyAuth.create(String) ` or the various ``fetch`` -methods. - - - -Note that a keys **value** is only available when the key is created, after that it is not visible. So anyone creating an API key is responsible for storing it safely after that. - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public **ObjectId** - - | :ref:`getId ` () - | - - - Returns the unique identifier for this key. - - - - - * - public `String `__ - - | :ref:`getName ` () - | - - - Returns the name of this key. - - - - - * - public `String `__ - - | :ref:`getValue ` () - | - - - Returns this keys value. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isEnabled ` () - | - - - Returns whether or not this key is currently enabled. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _ApiKey_equals: - -.. _ApiKey_equals__: - -.. _io_realm_mongodb_auth_ApiKey_equals: - -.. _io_realm_mongodb_auth_ApiKey_equals__: - - - -equals ------- - -.. _io_realm_mongodb_auth_ApiKey_equals_java_lang_Object_: - -.. _io_realm_mongodb_auth_ApiKey_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _ApiKey_equals_java_lang_Object_: - -.. _ApiKey_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getId: - -.. _getId__: - -.. _ApiKey_getId: - -.. _ApiKey_getId__: - -.. _io_realm_mongodb_auth_ApiKey_getId: - -.. _io_realm_mongodb_auth_ApiKey_getId__: - - - -getId ------ - -.. list-table:: - :header-rows: 1 - - * - | public **ObjectId** :ref:`getId ` () - | - - - - - * - Returns the unique identifier for this key. - - - - - - - **Returns** - - the id, uniquely identifying the key. - - - - - - - - - - - -.. _getName: - -.. _getName__: - -.. _ApiKey_getName: - -.. _ApiKey_getName__: - -.. _io_realm_mongodb_auth_ApiKey_getName: - -.. _io_realm_mongodb_auth_ApiKey_getName__: - - - -getName -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getName ` () - | - - - - - * - Returns the name of this key. - - - - - - - **Returns** - - the name of the key. - - - - - - - - - - - -.. _getValue: - -.. _getValue__: - -.. _ApiKey_getValue: - -.. _ApiKey_getValue__: - -.. _io_realm_mongodb_auth_ApiKey_getValue: - -.. _io_realm_mongodb_auth_ApiKey_getValue__: - - - -getValue --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getValue ` () - | - - - - - * - Returns this keys value. This value is only returned when the key is created. After that the value is no longer visible. - - - - - - - **Returns** - - the value of this key. Is only returned when the key is created. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _ApiKey_hashCode: - -.. _ApiKey_hashCode__: - -.. _io_realm_mongodb_auth_ApiKey_hashCode: - -.. _io_realm_mongodb_auth_ApiKey_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _isEnabled: - -.. _isEnabled__: - -.. _ApiKey_isEnabled: - -.. _ApiKey_isEnabled__: - -.. _io_realm_mongodb_auth_ApiKey_isEnabled: - -.. _io_realm_mongodb_auth_ApiKey_isEnabled__: - - - -isEnabled ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEnabled ` () - | - - - - - * - Returns whether or not this key is currently enabled. - - - - - - - **Returns** - - if the key is enabled or not. - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _ApiKey_toString: - -.. _ApiKey_toString__: - -.. _io_realm_mongodb_auth_ApiKey_toString: - -.. _io_realm_mongodb_auth_ApiKey_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt deleted file mode 100644 index c78a96b5e3..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/auth/ApiKeyAuth.txt +++ /dev/null @@ -1,1583 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class ApiKeyAuth -^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_auth_ApiKeyAuth: - - - -io.realm.mongodb.auth -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.auth.ApiKeyAuth - - -This class exposes functionality for a user to manage API keys under their control. - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - protected abstract **void** - - | :ref:`call ` ( - | **int** functionType, - | `String `__ arg, - | **OsJavaNetworkTransport.NetworkTransportJNIResultCallback** callback - | ) - - - - - - - - * - public :ref:`ApiKey ` - - | :ref:`create ` ( - | `String `__ name - | ) - - - Creates a user API key that can be used to authenticate as the user. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`createAsync ` ( - | `String `__ name, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Asynchronously creates a user API key that can be used to authenticate as the user. - - - - - * - public **void** - - | :ref:`delete ` ( - | **ObjectId** id - | ) - - - Deletes a specific API key created by the user. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`deleteAsync ` ( - | **ObjectId** id, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Deletes a specific API key created by the user. - - - - - * - public **void** - - | :ref:`disable ` ( - | **ObjectId** id - | ) - - - Disables a specific API key created by the user. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`disableAsync ` ( - | **ObjectId** id, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Disables a specific API key created by the user. - - - - - * - public **void** - - | :ref:`enable ` ( - | **ObjectId** id - | ) - - - Enables a specific API key created by the user. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`enableAsync ` ( - | **ObjectId** id, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Enables a specific API key created by the user. - - - - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public :ref:`ApiKey ` - - | :ref:`fetch ` ( - | **ObjectId** id - | ) - - - Fetches a specific user API key associated with the user. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`fetchAll ` ( - | :ref:`io.realm.mongodb.App.Callback\> ` callback - | ) - - - Fetches all API keys associated with the user. - - - - - * - public `List `__ - - | :ref:`fetchAll ` () - | - - - Fetches all API keys associated with the user. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`fetchAsync ` ( - | **ObjectId** id, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Fetches a specific user API key associated with the user. - - - - - * - public :ref:`App ` - - | :ref:`getApp ` () - | - - - Returns the :ref:`App ` that this instance in associated with. - - - - - - - * - public :ref:`User ` - - | :ref:`getUser ` () - | - - - Returns the :ref:`User ` that this instance in associated with. - - - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _call: - -.. _call__: - -.. _ApiKeyAuth_call: - -.. _ApiKeyAuth_call__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_call: - -.. _io_realm_mongodb_auth_ApiKeyAuth_call__: - - - -call ----- - -.. _io_realm_mongodb_auth_ApiKeyAuth_call_int_java_lang_String_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_call_int__java_lang_String__OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_call_int_String_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_call_int__String__OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _call_int_java_lang_String_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _call_int__java_lang_String__OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _call_int_String_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _call_int__String__OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _ApiKeyAuth_call_int_java_lang_String_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _ApiKeyAuth_call_int__java_lang_String__OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _ApiKeyAuth_call_int_String_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. _ApiKeyAuth_call_int__String__OsJavaNetworkTransport_NetworkTransportJNIResultCallback_: - -.. list-table:: - :header-rows: 1 - - * - | protected abstract **void** :ref:`call ` ( - | **int** functionType, - | `String `__ arg, - | **OsJavaNetworkTransport.NetworkTransportJNIResultCallback** callback - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _create: - -.. _create__: - -.. _ApiKeyAuth_create: - -.. _ApiKeyAuth_create__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_create: - -.. _io_realm_mongodb_auth_ApiKeyAuth_create__: - - - -create ------- - -.. _io_realm_mongodb_auth_ApiKeyAuth_create_java_lang_String_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_create_String_: - -.. _create_java_lang_String_: - -.. _create_String_: - -.. _ApiKeyAuth_create_java_lang_String_: - -.. _ApiKeyAuth_create_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ApiKey ` :ref:`create ` ( - | `String `__ name - | ) - - - - - * - Creates a user API key that can be used to authenticate as the user.The value of the key must be persisted at this time as this is the only time it is visible. - - The key is enabled when created. It can be disabled by calling :ref:`disable(ObjectId) ` . - - - - - - - - - **Parameters** - - - ``name`` - the name of the key - - - - - - - - **Returns** - - the new API key for the user. - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to create the API key. - - - - - - - - - - - - -.. _createAsync: - -.. _createAsync__: - -.. _ApiKeyAuth_createAsync: - -.. _ApiKeyAuth_createAsync__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync__: - - - -createAsync ------------ - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_String_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_String__Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_String_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_String__App_Callback_: - -.. _createAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _createAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _createAsync_java_lang_String_Callback_: - -.. _createAsync_java_lang_String__Callback_: - -.. _createAsync_java_lang_String_App_Callback_: - -.. _createAsync_java_lang_String__App_Callback_: - -.. _createAsync_String_io_realm_mongodb_App_Callback_: - -.. _createAsync_String__io_realm_mongodb_App_Callback_: - -.. _createAsync_String_Callback_: - -.. _createAsync_String__Callback_: - -.. _createAsync_String_App_Callback_: - -.. _createAsync_String__App_Callback_: - -.. _ApiKeyAuth_createAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_createAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_createAsync_java_lang_String_Callback_: - -.. _ApiKeyAuth_createAsync_java_lang_String__Callback_: - -.. _ApiKeyAuth_createAsync_java_lang_String_App_Callback_: - -.. _ApiKeyAuth_createAsync_java_lang_String__App_Callback_: - -.. _ApiKeyAuth_createAsync_String_io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_createAsync_String__io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_createAsync_String_Callback_: - -.. _ApiKeyAuth_createAsync_String__Callback_: - -.. _ApiKeyAuth_createAsync_String_App_Callback_: - -.. _ApiKeyAuth_createAsync_String__App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_createAsync_String__App_Callback_ApiKey__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`createAsync ` ( - | `String `__ name, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Asynchronously creates a user API key that can be used to authenticate as the user.The value of the key must be persisted at this time as this is the only time it is visible. - - The key is enabled when created. It can be disabled by calling :ref:`disable(ObjectId) ` . - - - - - - - - - **Parameters** - - - ``name`` - the name of the key - - - - - ``callback`` - callback when key creation has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _delete: - -.. _delete__: - -.. _ApiKeyAuth_delete: - -.. _ApiKeyAuth_delete__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_delete: - -.. _io_realm_mongodb_auth_ApiKeyAuth_delete__: - - - -delete ------- - -.. _io_realm_mongodb_auth_ApiKeyAuth_delete_ObjectId_: - -.. _delete_ObjectId_: - -.. _ApiKeyAuth_delete_ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`delete ` ( - | **ObjectId** id - | ) - - - - - * - Deletes a specific API key created by the user. - - - - - **Parameters** - - - ``id`` - the id of the key to delete. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to delete the API key. - - - - - - - - - - - - -.. _deleteAsync: - -.. _deleteAsync__: - -.. _ApiKeyAuth_deleteAsync: - -.. _ApiKeyAuth_deleteAsync__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync: - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync__: - - - -deleteAsync ------------ - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync_ObjectId_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync_ObjectId__Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync_ObjectId_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync_ObjectId__App_Callback_: - -.. _deleteAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _deleteAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _deleteAsync_ObjectId_Callback_: - -.. _deleteAsync_ObjectId__Callback_: - -.. _deleteAsync_ObjectId_App_Callback_: - -.. _deleteAsync_ObjectId__App_Callback_: - -.. _ApiKeyAuth_deleteAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_deleteAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_deleteAsync_ObjectId_Callback_: - -.. _ApiKeyAuth_deleteAsync_ObjectId__Callback_: - -.. _ApiKeyAuth_deleteAsync_ObjectId_App_Callback_: - -.. _ApiKeyAuth_deleteAsync_ObjectId__App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_deleteAsync_ObjectId__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`deleteAsync ` ( - | **ObjectId** id, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Deletes a specific API key created by the user. - - - - - **Parameters** - - - ``id`` - the id of the key to delete. - - - - - ``callback`` - callback used when the was deleted or the call failed. The callback will always happen on the same thread as this method was called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _disable: - -.. _disable__: - -.. _ApiKeyAuth_disable: - -.. _ApiKeyAuth_disable__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disable: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disable__: - - - -disable -------- - -.. _io_realm_mongodb_auth_ApiKeyAuth_disable_ObjectId_: - -.. _disable_ObjectId_: - -.. _ApiKeyAuth_disable_ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`disable ` ( - | **ObjectId** id - | ) - - - - - * - Disables a specific API key created by the user. - - - - - **Parameters** - - - ``id`` - the id of the key to disable. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to disable the API key. - - - - - - - - - - - - -.. _disableAsync: - -.. _disableAsync__: - -.. _ApiKeyAuth_disableAsync: - -.. _ApiKeyAuth_disableAsync__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync__: - - - -disableAsync ------------- - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync_ObjectId_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync_ObjectId__Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync_ObjectId_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync_ObjectId__App_Callback_: - -.. _disableAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _disableAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _disableAsync_ObjectId_Callback_: - -.. _disableAsync_ObjectId__Callback_: - -.. _disableAsync_ObjectId_App_Callback_: - -.. _disableAsync_ObjectId__App_Callback_: - -.. _ApiKeyAuth_disableAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_disableAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_disableAsync_ObjectId_Callback_: - -.. _ApiKeyAuth_disableAsync_ObjectId__Callback_: - -.. _ApiKeyAuth_disableAsync_ObjectId_App_Callback_: - -.. _ApiKeyAuth_disableAsync_ObjectId__App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_disableAsync_ObjectId__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`disableAsync ` ( - | **ObjectId** id, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Disables a specific API key created by the user. - - - - - **Parameters** - - - ``id`` - the id of the key to disable. - - - - - ``callback`` - callback used when the key was disabled or the call failed. The callback will always happen on the same thread as this method was called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _enable: - -.. _enable__: - -.. _ApiKeyAuth_enable: - -.. _ApiKeyAuth_enable__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enable: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enable__: - - - -enable ------- - -.. _io_realm_mongodb_auth_ApiKeyAuth_enable_ObjectId_: - -.. _enable_ObjectId_: - -.. _ApiKeyAuth_enable_ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`enable ` ( - | **ObjectId** id - | ) - - - - - * - Enables a specific API key created by the user. - - - - - **Parameters** - - - ``id`` - the id of the key to enable. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to enable the API key. - - - - - - - - - - - - -.. _enableAsync: - -.. _enableAsync__: - -.. _ApiKeyAuth_enableAsync: - -.. _ApiKeyAuth_enableAsync__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync__: - - - -enableAsync ------------ - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync_ObjectId_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync_ObjectId__Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync_ObjectId_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync_ObjectId__App_Callback_: - -.. _enableAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _enableAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _enableAsync_ObjectId_Callback_: - -.. _enableAsync_ObjectId__Callback_: - -.. _enableAsync_ObjectId_App_Callback_: - -.. _enableAsync_ObjectId__App_Callback_: - -.. _ApiKeyAuth_enableAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_enableAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_enableAsync_ObjectId_Callback_: - -.. _ApiKeyAuth_enableAsync_ObjectId__Callback_: - -.. _ApiKeyAuth_enableAsync_ObjectId_App_Callback_: - -.. _ApiKeyAuth_enableAsync_ObjectId__App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_enableAsync_ObjectId__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`enableAsync ` ( - | **ObjectId** id, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Enables a specific API key created by the user. - - - - - **Parameters** - - - ``id`` - the id of the key to enable. - - - - - ``callback`` - callback used when the key was enabled or the call failed. The callback will always happen on the same thread as this method was called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _ApiKeyAuth_equals: - -.. _ApiKeyAuth_equals__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_equals: - -.. _io_realm_mongodb_auth_ApiKeyAuth_equals__: - - - -equals ------- - -.. _io_realm_mongodb_auth_ApiKeyAuth_equals_java_lang_Object_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _ApiKeyAuth_equals_java_lang_Object_: - -.. _ApiKeyAuth_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _fetch: - -.. _fetch__: - -.. _ApiKeyAuth_fetch: - -.. _ApiKeyAuth_fetch__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetch: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetch__: - - - -fetch ------ - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetch_ObjectId_: - -.. _fetch_ObjectId_: - -.. _ApiKeyAuth_fetch_ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ApiKey ` :ref:`fetch ` ( - | **ObjectId** id - | ) - - - - - * - Fetches a specific user API key associated with the user. - - - - - **Parameters** - - - ``id`` - the id of the key to fetch. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to fetch the API key. - - - - - - - - - - - - -.. _fetchAll: - -.. _fetchAll__: - -.. _ApiKeyAuth_fetchAll: - -.. _ApiKeyAuth_fetchAll__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAll: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAll__: - - - -fetchAll --------- - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAll_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAll_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAll_App_Callback_: - -.. _fetchAll_io_realm_mongodb_App_Callback_: - -.. _fetchAll_Callback_: - -.. _fetchAll_App_Callback_: - -.. _ApiKeyAuth_fetchAll_io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_fetchAll_Callback_: - -.. _ApiKeyAuth_fetchAll_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAll_App_Callback_List_ApiKey___: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`fetchAll ` ( - | :ref:`io.realm.mongodb.App.Callback\> ` callback - | ) - - - - - * - Fetches all API keys associated with the user. - - - - - **Parameters** - - - ``callback`` - callback used when the keys were fetched or the call failed. The callback will always happen on the same thread as this method was called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public `List `__ :ref:`fetchAll ` () - | - - - - - * - Fetches all API keys associated with the user. - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to fetch the API keys. - - - - - - - - - - - - -.. _fetchAsync: - -.. _fetchAsync__: - -.. _ApiKeyAuth_fetchAsync: - -.. _ApiKeyAuth_fetchAsync__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync__: - - - -fetchAsync ----------- - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync_ObjectId_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync_ObjectId__Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync_ObjectId_App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync_ObjectId__App_Callback_: - -.. _fetchAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _fetchAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _fetchAsync_ObjectId_Callback_: - -.. _fetchAsync_ObjectId__Callback_: - -.. _fetchAsync_ObjectId_App_Callback_: - -.. _fetchAsync_ObjectId__App_Callback_: - -.. _ApiKeyAuth_fetchAsync_ObjectId_io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_fetchAsync_ObjectId__io_realm_mongodb_App_Callback_: - -.. _ApiKeyAuth_fetchAsync_ObjectId_Callback_: - -.. _ApiKeyAuth_fetchAsync_ObjectId__Callback_: - -.. _ApiKeyAuth_fetchAsync_ObjectId_App_Callback_: - -.. _ApiKeyAuth_fetchAsync_ObjectId__App_Callback_: - -.. _io_realm_mongodb_auth_ApiKeyAuth_fetchAsync_ObjectId__App_Callback_ApiKey__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`fetchAsync ` ( - | **ObjectId** id, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Fetches a specific user API key associated with the user. - - - - - **Parameters** - - - ``id`` - the id of the key to fetch. - - - - - ``callback`` - callback used when the key was fetched or the call failed. The callback will always happen on the same thread as this method was called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _getApp: - -.. _getApp__: - -.. _ApiKeyAuth_getApp: - -.. _ApiKeyAuth_getApp__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_getApp: - -.. _io_realm_mongodb_auth_ApiKeyAuth_getApp__: - - - -getApp ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`App ` :ref:`getApp ` () - | - - - - - * - Returns the :ref:`App ` that this instance in associated with. - - - - - - - - - **Returns** - - The :ref:`App ` that this instance in associated with. - - - - - - - - - - - - - -.. _getUser: - -.. _getUser__: - -.. _ApiKeyAuth_getUser: - -.. _ApiKeyAuth_getUser__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_getUser: - -.. _io_realm_mongodb_auth_ApiKeyAuth_getUser__: - - - -getUser -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`getUser ` () - | - - - - - * - Returns the :ref:`User ` that this instance in associated with. - - - - - - - - - **Returns** - - The :ref:`User ` that this instance in associated with. - - - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _ApiKeyAuth_hashCode: - -.. _ApiKeyAuth_hashCode__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_hashCode: - -.. _io_realm_mongodb_auth_ApiKeyAuth_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _toString: - -.. _toString__: - -.. _ApiKeyAuth_toString: - -.. _ApiKeyAuth_toString__: - -.. _io_realm_mongodb_auth_ApiKeyAuth_toString: - -.. _io_realm_mongodb_auth_ApiKeyAuth_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt deleted file mode 100644 index 451c4c1e08..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/auth/EmailPasswordAuth.txt +++ /dev/null @@ -1,2873 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class EmailPasswordAuth -^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_auth_EmailPasswordAuth: - - - -io.realm.mongodb.auth -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.auth.EmailPasswordAuth - - -Class encapsulating functionality provided when :ref:`User ` 's are logged in through the :ref:`Credentials.Provider.EMAIL_PASSWORD ` provider. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - protected abstract **void** - - | :ref:`call ` ( - | **int** functionType, - | **OsJavaNetworkTransport.NetworkTransportJNIResultCallback** callback, - | `java.lang.String[] `__ args - | ) - - - - - - - - * - public **void** - - | :ref:`callResetPasswordFunction ` ( - | `String `__ email, - | `String `__ newPassword, - | `java.lang.Object[] `__ args - | ) - - - Call the reset password function configured to the :ref:`Credentials.Provider.EMAIL_PASSWORD ` provider. - - - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`callResetPasswordFunctionAsync ` ( - | `String `__ email, - | `String `__ newPassword, - | `java.lang.Object[] `__ args, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Call the reset password function configured to the :ref:`Credentials.Provider.EMAIL_PASSWORD ` provider. - - - - - - - * - public **void** - - | :ref:`confirmUser ` ( - | `String `__ token, - | `String `__ tokenId - | ) - - - Confirms a user with the given token and token id. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`confirmUserAsync ` ( - | `String `__ token, - | `String `__ tokenId, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Confirms a user with the given token and token id. - - - - - * - public **void** - - | :ref:`registerUser ` ( - | `String `__ email, - | `String `__ password - | ) - - - Registers a new user with the given email and password. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`registerUserAsync ` ( - | `String `__ email, - | `String `__ password, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Registers a new user with the given email and password. - - - - - * - public **void** - - | :ref:`resendConfirmationEmail ` ( - | `String `__ email - | ) - - - Resend the confirmation for a user to the given email. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`resendConfirmationEmailAsync ` ( - | `String `__ email, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Resend the confirmation for a user to the given email. - - - - - * - public **void** - - | :ref:`resetPassword ` ( - | `String `__ token, - | `String `__ tokenId, - | `String `__ newPassword - | ) - - - Resets the password of a user with the given token, token id, and new password. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`resetPasswordAsync ` ( - | `String `__ token, - | `String `__ tokenId, - | `String `__ newPassword, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Resets the newPassword of a user with the given token, token id, and new password. - - - - - * - public **void** - - | :ref:`retryCustomConfirmation ` ( - | `String `__ email - | ) - - - Retries the custom confirmation on a user for a given email. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`retryCustomConfirmationAsync ` ( - | `String `__ email, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Retries the custom confirmation on a user for a given email. - - - - - * - public **void** - - | :ref:`sendResetPasswordEmail ` ( - | `String `__ email - | ) - - - Sends a user a password reset email for the given email. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`sendResetPasswordEmailAsync ` ( - | `String `__ email, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Sends a user a password reset email for the given email. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _call: - -.. _call__: - -.. _EmailPasswordAuth_call: - -.. _EmailPasswordAuth_call__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_call: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_call__: - - - -call ----- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_String____: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__String____: - -.. _call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_java_lang_String_: - -.. _call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__java_lang_String_: - -.. _call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_String_: - -.. _call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__String_: - -.. _call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_String____: - -.. _call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__String____: - -.. _EmailPasswordAuth_call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_java_lang_String_: - -.. _EmailPasswordAuth_call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__java_lang_String_: - -.. _EmailPasswordAuth_call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_String_: - -.. _EmailPasswordAuth_call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__String_: - -.. _EmailPasswordAuth_call_int_OsJavaNetworkTransport_NetworkTransportJNIResultCallback_String____: - -.. _EmailPasswordAuth_call_int__OsJavaNetworkTransport_NetworkTransportJNIResultCallback__String____: - -.. list-table:: - :header-rows: 1 - - * - | protected abstract **void** :ref:`call ` ( - | **int** functionType, - | **OsJavaNetworkTransport.NetworkTransportJNIResultCallback** callback, - | `java.lang.String[] `__ args - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _callResetPasswordFunction: - -.. _callResetPasswordFunction__: - -.. _EmailPasswordAuth_callResetPasswordFunction: - -.. _EmailPasswordAuth_callResetPasswordFunction__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction__: - - - -callResetPasswordFunction -------------------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String_java_lang_String_java_lang_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String__java_lang_String__java_lang_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String_java_lang_String_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String__java_lang_String__Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String_java_lang_String_Object____: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String__java_lang_String__Object____: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String_String_java_lang_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String__String__java_lang_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String_String_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String__String__Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String_String_Object____: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_java_lang_String__String__Object____: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String_java_lang_String_java_lang_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String__java_lang_String__java_lang_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String_java_lang_String_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String__java_lang_String__Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String_java_lang_String_Object____: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String__java_lang_String__Object____: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String_String_java_lang_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String__String__java_lang_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String_String_Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String__String__Object_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String_String_Object____: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunction_String__String__Object____: - -.. _callResetPasswordFunction_java_lang_String_java_lang_String_java_lang_Object_: - -.. _callResetPasswordFunction_java_lang_String__java_lang_String__java_lang_Object_: - -.. _callResetPasswordFunction_java_lang_String_java_lang_String_Object_: - -.. _callResetPasswordFunction_java_lang_String__java_lang_String__Object_: - -.. _callResetPasswordFunction_java_lang_String_java_lang_String_Object____: - -.. _callResetPasswordFunction_java_lang_String__java_lang_String__Object____: - -.. _callResetPasswordFunction_java_lang_String_String_java_lang_Object_: - -.. _callResetPasswordFunction_java_lang_String__String__java_lang_Object_: - -.. _callResetPasswordFunction_java_lang_String_String_Object_: - -.. _callResetPasswordFunction_java_lang_String__String__Object_: - -.. _callResetPasswordFunction_java_lang_String_String_Object____: - -.. _callResetPasswordFunction_java_lang_String__String__Object____: - -.. _callResetPasswordFunction_String_java_lang_String_java_lang_Object_: - -.. _callResetPasswordFunction_String__java_lang_String__java_lang_Object_: - -.. _callResetPasswordFunction_String_java_lang_String_Object_: - -.. _callResetPasswordFunction_String__java_lang_String__Object_: - -.. _callResetPasswordFunction_String_java_lang_String_Object____: - -.. _callResetPasswordFunction_String__java_lang_String__Object____: - -.. _callResetPasswordFunction_String_String_java_lang_Object_: - -.. _callResetPasswordFunction_String__String__java_lang_Object_: - -.. _callResetPasswordFunction_String_String_Object_: - -.. _callResetPasswordFunction_String__String__Object_: - -.. _callResetPasswordFunction_String_String_Object____: - -.. _callResetPasswordFunction_String__String__Object____: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String_java_lang_String_java_lang_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String__java_lang_String__java_lang_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String_java_lang_String_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String__java_lang_String__Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String_java_lang_String_Object____: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String__java_lang_String__Object____: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String_String_java_lang_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String__String__java_lang_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String_String_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String__String__Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String_String_Object____: - -.. _EmailPasswordAuth_callResetPasswordFunction_java_lang_String__String__Object____: - -.. _EmailPasswordAuth_callResetPasswordFunction_String_java_lang_String_java_lang_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_String__java_lang_String__java_lang_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_String_java_lang_String_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_String__java_lang_String__Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_String_java_lang_String_Object____: - -.. _EmailPasswordAuth_callResetPasswordFunction_String__java_lang_String__Object____: - -.. _EmailPasswordAuth_callResetPasswordFunction_String_String_java_lang_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_String__String__java_lang_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_String_String_Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_String__String__Object_: - -.. _EmailPasswordAuth_callResetPasswordFunction_String_String_Object____: - -.. _EmailPasswordAuth_callResetPasswordFunction_String__String__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`callResetPasswordFunction ` ( - | `String `__ email, - | `String `__ newPassword, - | `java.lang.Object[] `__ args - | ) - - - - - * - Call the reset password function configured to the :ref:`Credentials.Provider.EMAIL_PASSWORD ` provider. - - - - - - - **Parameters** - - - ``email`` - the email of the user. - - - - - ``newPassword`` - the new password of the user. - - - - - ``args`` - any additional arguments provided to the reset function. All arguments must be able to be converted to JSON compatible values using ``toString()`` . - - - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to confirm the user. - - - - - - - - - - - - -.. _callResetPasswordFunctionAsync: - -.. _callResetPasswordFunctionAsync__: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync__: - - - -callResetPasswordFunctionAsync ------------------------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object____io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object_____io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object____Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object_____Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object____App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object_____App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object____io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object_____io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object____Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object_____Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object____App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object_____App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_java_lang_Object_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__java_lang_Object__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_java_lang_Object_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__java_lang_Object__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object____io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object_____io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object____Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object_____Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object____App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object_____App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_Object_io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__Object__io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_Object_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__Object__Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_Object_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__Object__App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_Object____io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__Object_____io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_Object____Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__Object_____Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String_String_Object____App_Callback_: - -.. _callResetPasswordFunctionAsync_java_lang_String__String__Object_____App_Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__App_Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_Object_io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__Object__io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_Object_Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__Object__Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_Object_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__Object__App_Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_Object____io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__Object_____io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_Object____Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__Object_____Callback_: - -.. _callResetPasswordFunctionAsync_String_java_lang_String_Object____App_Callback_: - -.. _callResetPasswordFunctionAsync_String__java_lang_String__Object_____App_Callback_: - -.. _callResetPasswordFunctionAsync_String_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String_String_java_lang_Object_Callback_: - -.. _callResetPasswordFunctionAsync_String__String__java_lang_Object__Callback_: - -.. _callResetPasswordFunctionAsync_String_String_java_lang_Object_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__String__java_lang_Object__App_Callback_: - -.. _callResetPasswordFunctionAsync_String_String_Object_io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__String__Object__io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String_String_Object_Callback_: - -.. _callResetPasswordFunctionAsync_String__String__Object__Callback_: - -.. _callResetPasswordFunctionAsync_String_String_Object_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__String__Object__App_Callback_: - -.. _callResetPasswordFunctionAsync_String_String_Object____io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String__String__Object_____io_realm_mongodb_App_Callback_: - -.. _callResetPasswordFunctionAsync_String_String_Object____Callback_: - -.. _callResetPasswordFunctionAsync_String__String__Object_____Callback_: - -.. _callResetPasswordFunctionAsync_String_String_Object____App_Callback_: - -.. _callResetPasswordFunctionAsync_String__String__Object_____App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_java_lang_Object_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__java_lang_Object__App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object__App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_java_lang_String_Object____App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__java_lang_String__Object_____App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_java_lang_Object_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__java_lang_Object__App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object__Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object__App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object____io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object_____io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object____Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object_____Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String_String_Object____App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_java_lang_String__String__Object_____App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_java_lang_Object_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__java_lang_Object__App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object__Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object__App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object____io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object_____io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object____Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object_____Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_java_lang_String_Object____App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__java_lang_String__Object_____App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_java_lang_Object_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__java_lang_Object__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_java_lang_Object_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__java_lang_Object__Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_java_lang_Object_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__java_lang_Object__App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object__Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object__App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object____io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object_____io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object____Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object_____Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String_String_Object____App_Callback_: - -.. _EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object_____App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_callResetPasswordFunctionAsync_String__String__Object[]__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`callResetPasswordFunctionAsync ` ( - | `String `__ email, - | `String `__ newPassword, - | `java.lang.Object[] `__ args, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Call the reset password function configured to the :ref:`Credentials.Provider.EMAIL_PASSWORD ` provider. - - - - - - - **Parameters** - - - ``email`` - the email of the user. - - - - - ``newPassword`` - the new password of the user. - - - - - ``args`` - any additional arguments provided to the reset function. All arguments must be able to be converted to JSON compatible values using ``toString()`` . - - - - - - - ``callback`` - callback when the reset has completed or failed. The callback will always happen on the same thread as this this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _confirmUser: - -.. _confirmUser__: - -.. _EmailPasswordAuth_confirmUser: - -.. _EmailPasswordAuth_confirmUser__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser__: - - - -confirmUser ------------ - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser_java_lang_String_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser_java_lang_String__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser_java_lang_String_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser_java_lang_String__String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser_String_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser_String__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser_String_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUser_String__String_: - -.. _confirmUser_java_lang_String_java_lang_String_: - -.. _confirmUser_java_lang_String__java_lang_String_: - -.. _confirmUser_java_lang_String_String_: - -.. _confirmUser_java_lang_String__String_: - -.. _confirmUser_String_java_lang_String_: - -.. _confirmUser_String__java_lang_String_: - -.. _confirmUser_String_String_: - -.. _confirmUser_String__String_: - -.. _EmailPasswordAuth_confirmUser_java_lang_String_java_lang_String_: - -.. _EmailPasswordAuth_confirmUser_java_lang_String__java_lang_String_: - -.. _EmailPasswordAuth_confirmUser_java_lang_String_String_: - -.. _EmailPasswordAuth_confirmUser_java_lang_String__String_: - -.. _EmailPasswordAuth_confirmUser_String_java_lang_String_: - -.. _EmailPasswordAuth_confirmUser_String__java_lang_String_: - -.. _EmailPasswordAuth_confirmUser_String_String_: - -.. _EmailPasswordAuth_confirmUser_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`confirmUser ` ( - | `String `__ token, - | `String `__ tokenId - | ) - - - - - * - Confirms a user with the given token and token id. - - - - - **Parameters** - - - ``token`` - the confirmation token. - - - - - ``tokenId`` - the id of the confirmation token. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to confirm the user. - - - - - - - - - - - - -.. _confirmUserAsync: - -.. _confirmUserAsync__: - -.. _EmailPasswordAuth_confirmUserAsync: - -.. _EmailPasswordAuth_confirmUserAsync__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync__: - - - -confirmUserAsync ----------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String__java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String__java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String__String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_java_lang_String__String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String__java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String__java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String__String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String__String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String__String__App_Callback_: - -.. _confirmUserAsync_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _confirmUserAsync_java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _confirmUserAsync_java_lang_String_java_lang_String_Callback_: - -.. _confirmUserAsync_java_lang_String__java_lang_String__Callback_: - -.. _confirmUserAsync_java_lang_String_java_lang_String_App_Callback_: - -.. _confirmUserAsync_java_lang_String__java_lang_String__App_Callback_: - -.. _confirmUserAsync_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _confirmUserAsync_java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _confirmUserAsync_java_lang_String_String_Callback_: - -.. _confirmUserAsync_java_lang_String__String__Callback_: - -.. _confirmUserAsync_java_lang_String_String_App_Callback_: - -.. _confirmUserAsync_java_lang_String__String__App_Callback_: - -.. _confirmUserAsync_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _confirmUserAsync_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _confirmUserAsync_String_java_lang_String_Callback_: - -.. _confirmUserAsync_String__java_lang_String__Callback_: - -.. _confirmUserAsync_String_java_lang_String_App_Callback_: - -.. _confirmUserAsync_String__java_lang_String__App_Callback_: - -.. _confirmUserAsync_String_String_io_realm_mongodb_App_Callback_: - -.. _confirmUserAsync_String__String__io_realm_mongodb_App_Callback_: - -.. _confirmUserAsync_String_String_Callback_: - -.. _confirmUserAsync_String__String__Callback_: - -.. _confirmUserAsync_String_String_App_Callback_: - -.. _confirmUserAsync_String__String__App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String_java_lang_String_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String__java_lang_String__Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String__java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String_String_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String__String__Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String_String_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_java_lang_String__String__App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String_java_lang_String_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String__java_lang_String__Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String__java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String__String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String_String_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String__String__Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String_String_App_Callback_: - -.. _EmailPasswordAuth_confirmUserAsync_String__String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_confirmUserAsync_String__String__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`confirmUserAsync ` ( - | `String `__ token, - | `String `__ tokenId, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Confirms a user with the given token and token id. - - - - - **Parameters** - - - ``token`` - the confirmation token. - - - - - ``tokenId`` - the id of the confirmation token. - - - - - ``callback`` - callback when confirmation has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _registerUser: - -.. _registerUser__: - -.. _EmailPasswordAuth_registerUser: - -.. _EmailPasswordAuth_registerUser__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser__: - - - -registerUser ------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser_java_lang_String_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser_java_lang_String__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser_java_lang_String_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser_java_lang_String__String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser_String_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser_String__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser_String_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUser_String__String_: - -.. _registerUser_java_lang_String_java_lang_String_: - -.. _registerUser_java_lang_String__java_lang_String_: - -.. _registerUser_java_lang_String_String_: - -.. _registerUser_java_lang_String__String_: - -.. _registerUser_String_java_lang_String_: - -.. _registerUser_String__java_lang_String_: - -.. _registerUser_String_String_: - -.. _registerUser_String__String_: - -.. _EmailPasswordAuth_registerUser_java_lang_String_java_lang_String_: - -.. _EmailPasswordAuth_registerUser_java_lang_String__java_lang_String_: - -.. _EmailPasswordAuth_registerUser_java_lang_String_String_: - -.. _EmailPasswordAuth_registerUser_java_lang_String__String_: - -.. _EmailPasswordAuth_registerUser_String_java_lang_String_: - -.. _EmailPasswordAuth_registerUser_String__java_lang_String_: - -.. _EmailPasswordAuth_registerUser_String_String_: - -.. _EmailPasswordAuth_registerUser_String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`registerUser ` ( - | `String `__ email, - | `String `__ password - | ) - - - - - * - Registers a new user with the given email and password. - - - - - **Parameters** - - - ``email`` - the email to register with. This will be the username used during log in. - - - - - ``password`` - the password to associate with the email. The password must be between 6 and 128 characters long. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to register the user. - - - - - - - - - - - - -.. _registerUserAsync: - -.. _registerUserAsync__: - -.. _EmailPasswordAuth_registerUserAsync: - -.. _EmailPasswordAuth_registerUserAsync__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync__: - - - -registerUserAsync ------------------ - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String__java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String__java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String__String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_java_lang_String__String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String__java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String__java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String__String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String__String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String__String__App_Callback_: - -.. _registerUserAsync_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _registerUserAsync_java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _registerUserAsync_java_lang_String_java_lang_String_Callback_: - -.. _registerUserAsync_java_lang_String__java_lang_String__Callback_: - -.. _registerUserAsync_java_lang_String_java_lang_String_App_Callback_: - -.. _registerUserAsync_java_lang_String__java_lang_String__App_Callback_: - -.. _registerUserAsync_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _registerUserAsync_java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _registerUserAsync_java_lang_String_String_Callback_: - -.. _registerUserAsync_java_lang_String__String__Callback_: - -.. _registerUserAsync_java_lang_String_String_App_Callback_: - -.. _registerUserAsync_java_lang_String__String__App_Callback_: - -.. _registerUserAsync_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _registerUserAsync_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _registerUserAsync_String_java_lang_String_Callback_: - -.. _registerUserAsync_String__java_lang_String__Callback_: - -.. _registerUserAsync_String_java_lang_String_App_Callback_: - -.. _registerUserAsync_String__java_lang_String__App_Callback_: - -.. _registerUserAsync_String_String_io_realm_mongodb_App_Callback_: - -.. _registerUserAsync_String__String__io_realm_mongodb_App_Callback_: - -.. _registerUserAsync_String_String_Callback_: - -.. _registerUserAsync_String__String__Callback_: - -.. _registerUserAsync_String_String_App_Callback_: - -.. _registerUserAsync_String__String__App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String_java_lang_String_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String__java_lang_String__Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String__java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String_String_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String__String__Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String_String_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_java_lang_String__String__App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String_java_lang_String_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String__java_lang_String__Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String__java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String__String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String_String_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String__String__Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String_String_App_Callback_: - -.. _EmailPasswordAuth_registerUserAsync_String__String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_registerUserAsync_String__String__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`registerUserAsync ` ( - | `String `__ email, - | `String `__ password, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Registers a new user with the given email and password. - - - - - **Parameters** - - - ``email`` - the email to register with. This will be the username used during log in. - - - - - ``password`` - the password to associated with the email. The password must be between 6 and 128 characters long. - - - - - ``callback`` - callback when registration has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - :ref:`AppException ` - if the server failed to register the user. - - - - - - - - - - - - -.. _resendConfirmationEmail: - -.. _resendConfirmationEmail__: - -.. _EmailPasswordAuth_resendConfirmationEmail: - -.. _EmailPasswordAuth_resendConfirmationEmail__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmail: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmail__: - - - -resendConfirmationEmail ------------------------ - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmail_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmail_String_: - -.. _resendConfirmationEmail_java_lang_String_: - -.. _resendConfirmationEmail_String_: - -.. _EmailPasswordAuth_resendConfirmationEmail_java_lang_String_: - -.. _EmailPasswordAuth_resendConfirmationEmail_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`resendConfirmationEmail ` ( - | `String `__ email - | ) - - - - - * - Resend the confirmation for a user to the given email. - - - - - **Parameters** - - - ``email`` - the email of the user. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to confirm the user. - - - - - - - - - - - - -.. _resendConfirmationEmailAsync: - -.. _resendConfirmationEmailAsync__: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync__: - - - -resendConfirmationEmailAsync ----------------------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_String__App_Callback_: - -.. _resendConfirmationEmailAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _resendConfirmationEmailAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _resendConfirmationEmailAsync_java_lang_String_Callback_: - -.. _resendConfirmationEmailAsync_java_lang_String__Callback_: - -.. _resendConfirmationEmailAsync_java_lang_String_App_Callback_: - -.. _resendConfirmationEmailAsync_java_lang_String__App_Callback_: - -.. _resendConfirmationEmailAsync_String_io_realm_mongodb_App_Callback_: - -.. _resendConfirmationEmailAsync_String__io_realm_mongodb_App_Callback_: - -.. _resendConfirmationEmailAsync_String_Callback_: - -.. _resendConfirmationEmailAsync_String__Callback_: - -.. _resendConfirmationEmailAsync_String_App_Callback_: - -.. _resendConfirmationEmailAsync_String__App_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String__Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_String_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_String__Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_String_App_Callback_: - -.. _EmailPasswordAuth_resendConfirmationEmailAsync_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resendConfirmationEmailAsync_String__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`resendConfirmationEmailAsync ` ( - | `String `__ email, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Resend the confirmation for a user to the given email. - - - - - **Parameters** - - - ``email`` - the email of the user. - - - - - ``callback`` - callback when resending the email has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _resetPassword: - -.. _resetPassword__: - -.. _EmailPasswordAuth_resetPassword: - -.. _EmailPasswordAuth_resetPassword__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword__: - - - -resetPassword -------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_java_lang_String_java_lang_String_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_java_lang_String__java_lang_String__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_java_lang_String_java_lang_String_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_java_lang_String__java_lang_String__String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_java_lang_String_String_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_java_lang_String__String__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_java_lang_String_String_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_java_lang_String__String__String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_String_java_lang_String_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_String__java_lang_String__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_String_java_lang_String_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_String__java_lang_String__String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_String_String_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_String__String__java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_String_String_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPassword_String__String__String_: - -.. _resetPassword_java_lang_String_java_lang_String_java_lang_String_: - -.. _resetPassword_java_lang_String__java_lang_String__java_lang_String_: - -.. _resetPassword_java_lang_String_java_lang_String_String_: - -.. _resetPassword_java_lang_String__java_lang_String__String_: - -.. _resetPassword_java_lang_String_String_java_lang_String_: - -.. _resetPassword_java_lang_String__String__java_lang_String_: - -.. _resetPassword_java_lang_String_String_String_: - -.. _resetPassword_java_lang_String__String__String_: - -.. _resetPassword_String_java_lang_String_java_lang_String_: - -.. _resetPassword_String__java_lang_String__java_lang_String_: - -.. _resetPassword_String_java_lang_String_String_: - -.. _resetPassword_String__java_lang_String__String_: - -.. _resetPassword_String_String_java_lang_String_: - -.. _resetPassword_String__String__java_lang_String_: - -.. _resetPassword_String_String_String_: - -.. _resetPassword_String__String__String_: - -.. _EmailPasswordAuth_resetPassword_java_lang_String_java_lang_String_java_lang_String_: - -.. _EmailPasswordAuth_resetPassword_java_lang_String__java_lang_String__java_lang_String_: - -.. _EmailPasswordAuth_resetPassword_java_lang_String_java_lang_String_String_: - -.. _EmailPasswordAuth_resetPassword_java_lang_String__java_lang_String__String_: - -.. _EmailPasswordAuth_resetPassword_java_lang_String_String_java_lang_String_: - -.. _EmailPasswordAuth_resetPassword_java_lang_String__String__java_lang_String_: - -.. _EmailPasswordAuth_resetPassword_java_lang_String_String_String_: - -.. _EmailPasswordAuth_resetPassword_java_lang_String__String__String_: - -.. _EmailPasswordAuth_resetPassword_String_java_lang_String_java_lang_String_: - -.. _EmailPasswordAuth_resetPassword_String__java_lang_String__java_lang_String_: - -.. _EmailPasswordAuth_resetPassword_String_java_lang_String_String_: - -.. _EmailPasswordAuth_resetPassword_String__java_lang_String__String_: - -.. _EmailPasswordAuth_resetPassword_String_String_java_lang_String_: - -.. _EmailPasswordAuth_resetPassword_String__String__java_lang_String_: - -.. _EmailPasswordAuth_resetPassword_String_String_String_: - -.. _EmailPasswordAuth_resetPassword_String__String__String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`resetPassword ` ( - | `String `__ token, - | `String `__ tokenId, - | `String `__ newPassword - | ) - - - - - * - Resets the password of a user with the given token, token id, and new password. - - - - - **Parameters** - - - ``token`` - the reset password token. - - - - - ``tokenId`` - the id of the reset password token. - - - - - ``newPassword`` - the new password for the user identified by the ``token`` . The password must be between 6 and 128 characters long. - - - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to confirm the user. - - - - - - - - - - - - -.. _resetPasswordAsync: - -.. _resetPasswordAsync__: - -.. _EmailPasswordAuth_resetPasswordAsync: - -.. _EmailPasswordAuth_resetPasswordAsync__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync__: - - - -resetPasswordAsync ------------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_String_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__String__java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_String_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__String__java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_String_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__String__String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_String_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__String__String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String_String_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__String__String__App_Callback_: - -.. _resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_Callback_: - -.. _resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__Callback_: - -.. _resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_App_Callback_: - -.. _resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__App_Callback_: - -.. _resetPasswordAsync_java_lang_String_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_java_lang_String__java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_java_lang_String_java_lang_String_String_Callback_: - -.. _resetPasswordAsync_java_lang_String__java_lang_String__String__Callback_: - -.. _resetPasswordAsync_java_lang_String_java_lang_String_String_App_Callback_: - -.. _resetPasswordAsync_java_lang_String__java_lang_String__String__App_Callback_: - -.. _resetPasswordAsync_java_lang_String_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_java_lang_String__String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_java_lang_String_String_java_lang_String_Callback_: - -.. _resetPasswordAsync_java_lang_String__String__java_lang_String__Callback_: - -.. _resetPasswordAsync_java_lang_String_String_java_lang_String_App_Callback_: - -.. _resetPasswordAsync_java_lang_String__String__java_lang_String__App_Callback_: - -.. _resetPasswordAsync_java_lang_String_String_String_io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_java_lang_String__String__String__io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_java_lang_String_String_String_Callback_: - -.. _resetPasswordAsync_java_lang_String__String__String__Callback_: - -.. _resetPasswordAsync_java_lang_String_String_String_App_Callback_: - -.. _resetPasswordAsync_java_lang_String__String__String__App_Callback_: - -.. _resetPasswordAsync_String_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_String__java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_String_java_lang_String_java_lang_String_Callback_: - -.. _resetPasswordAsync_String__java_lang_String__java_lang_String__Callback_: - -.. _resetPasswordAsync_String_java_lang_String_java_lang_String_App_Callback_: - -.. _resetPasswordAsync_String__java_lang_String__java_lang_String__App_Callback_: - -.. _resetPasswordAsync_String_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_String__java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_String_java_lang_String_String_Callback_: - -.. _resetPasswordAsync_String__java_lang_String__String__Callback_: - -.. _resetPasswordAsync_String_java_lang_String_String_App_Callback_: - -.. _resetPasswordAsync_String__java_lang_String__String__App_Callback_: - -.. _resetPasswordAsync_String_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_String__String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_String_String_java_lang_String_Callback_: - -.. _resetPasswordAsync_String__String__java_lang_String__Callback_: - -.. _resetPasswordAsync_String_String_java_lang_String_App_Callback_: - -.. _resetPasswordAsync_String__String__java_lang_String__App_Callback_: - -.. _resetPasswordAsync_String_String_String_io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_String__String__String__io_realm_mongodb_App_Callback_: - -.. _resetPasswordAsync_String_String_String_Callback_: - -.. _resetPasswordAsync_String__String__String__Callback_: - -.. _resetPasswordAsync_String_String_String_App_Callback_: - -.. _resetPasswordAsync_String__String__String__App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_String_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__String__Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_java_lang_String_String_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__java_lang_String__String__App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_java_lang_String_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__java_lang_String__Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_String_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__String__Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String_String_String_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_java_lang_String__String__String__App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_java_lang_String_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__java_lang_String__Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_String_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__String__Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_java_lang_String_String_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__java_lang_String__String__App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_String_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__String__java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_String_java_lang_String_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__String__java_lang_String__Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_String_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__String__java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_String_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__String__String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_String_String_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__String__String__Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String_String_String_App_Callback_: - -.. _EmailPasswordAuth_resetPasswordAsync_String__String__String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_resetPasswordAsync_String__String__String__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`resetPasswordAsync ` ( - | `String `__ token, - | `String `__ tokenId, - | `String `__ newPassword, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Resets the newPassword of a user with the given token, token id, and new password. - - - - - **Parameters** - - - ``token`` - the reset password token. - - - - - ``tokenId`` - the id of the reset password token. - - - - - ``newPassword`` - the new password for the user identified by the ``token`` . The password must be between 6 and 128 characters long. - - - - - - - ``callback`` - callback when the reset has completed or failed. The callback will always happen on the same thread as this this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _retryCustomConfirmation: - -.. _retryCustomConfirmation__: - -.. _EmailPasswordAuth_retryCustomConfirmation: - -.. _EmailPasswordAuth_retryCustomConfirmation__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmation: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmation__: - - - -retryCustomConfirmation ------------------------ - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmation_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmation_String_: - -.. _retryCustomConfirmation_java_lang_String_: - -.. _retryCustomConfirmation_String_: - -.. _EmailPasswordAuth_retryCustomConfirmation_java_lang_String_: - -.. _EmailPasswordAuth_retryCustomConfirmation_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`retryCustomConfirmation ` ( - | `String `__ email - | ) - - - - - * - Retries the custom confirmation on a user for a given email. - - - - - **Parameters** - - - ``email`` - the email of the user. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to confirm the user. - - - - - - - - - - - - -.. _retryCustomConfirmationAsync: - -.. _retryCustomConfirmationAsync__: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync__: - - - -retryCustomConfirmationAsync ----------------------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_String__App_Callback_: - -.. _retryCustomConfirmationAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _retryCustomConfirmationAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _retryCustomConfirmationAsync_java_lang_String_Callback_: - -.. _retryCustomConfirmationAsync_java_lang_String__Callback_: - -.. _retryCustomConfirmationAsync_java_lang_String_App_Callback_: - -.. _retryCustomConfirmationAsync_java_lang_String__App_Callback_: - -.. _retryCustomConfirmationAsync_String_io_realm_mongodb_App_Callback_: - -.. _retryCustomConfirmationAsync_String__io_realm_mongodb_App_Callback_: - -.. _retryCustomConfirmationAsync_String_Callback_: - -.. _retryCustomConfirmationAsync_String__Callback_: - -.. _retryCustomConfirmationAsync_String_App_Callback_: - -.. _retryCustomConfirmationAsync_String__App_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String__Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_String_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_String__Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_String_App_Callback_: - -.. _EmailPasswordAuth_retryCustomConfirmationAsync_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_retryCustomConfirmationAsync_String__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`retryCustomConfirmationAsync ` ( - | `String `__ email, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Retries the custom confirmation on a user for a given email. - - - - - **Parameters** - - - ``email`` - the email of the user. - - - - - ``callback`` - callback when retrying the custom confirmation has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called from a non-looper thread. - - - - - - - - - - - - -.. _sendResetPasswordEmail: - -.. _sendResetPasswordEmail__: - -.. _EmailPasswordAuth_sendResetPasswordEmail: - -.. _EmailPasswordAuth_sendResetPasswordEmail__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmail: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmail__: - - - -sendResetPasswordEmail ----------------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmail_java_lang_String_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmail_String_: - -.. _sendResetPasswordEmail_java_lang_String_: - -.. _sendResetPasswordEmail_String_: - -.. _EmailPasswordAuth_sendResetPasswordEmail_java_lang_String_: - -.. _EmailPasswordAuth_sendResetPasswordEmail_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`sendResetPasswordEmail ` ( - | `String `__ email - | ) - - - - - * - Sends a user a password reset email for the given email. - - - - - **Parameters** - - - ``email`` - the email of the user. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to confirm the user. - - - - - - - - - - - - -.. _sendResetPasswordEmailAsync: - -.. _sendResetPasswordEmailAsync__: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync__: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync__: - - - -sendResetPasswordEmailAsync ---------------------------- - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_String_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_String__Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_String_App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_String__App_Callback_: - -.. _sendResetPasswordEmailAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _sendResetPasswordEmailAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _sendResetPasswordEmailAsync_java_lang_String_Callback_: - -.. _sendResetPasswordEmailAsync_java_lang_String__Callback_: - -.. _sendResetPasswordEmailAsync_java_lang_String_App_Callback_: - -.. _sendResetPasswordEmailAsync_java_lang_String__App_Callback_: - -.. _sendResetPasswordEmailAsync_String_io_realm_mongodb_App_Callback_: - -.. _sendResetPasswordEmailAsync_String__io_realm_mongodb_App_Callback_: - -.. _sendResetPasswordEmailAsync_String_Callback_: - -.. _sendResetPasswordEmailAsync_String__Callback_: - -.. _sendResetPasswordEmailAsync_String_App_Callback_: - -.. _sendResetPasswordEmailAsync_String__App_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String__Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String_App_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_java_lang_String__App_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_String_io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_String__io_realm_mongodb_App_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_String_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_String__Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_String_App_Callback_: - -.. _EmailPasswordAuth_sendResetPasswordEmailAsync_String__App_Callback_: - -.. _io_realm_mongodb_auth_EmailPasswordAuth_sendResetPasswordEmailAsync_String__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`sendResetPasswordEmailAsync ` ( - | `String `__ email, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Sends a user a password reset email for the given email. - - - - - **Parameters** - - - ``email`` - the email of the user. - - - - - ``callback`` - callback when sending the email has completed or failed. The callback will always happen on the same thread as this method is called on. - - - - - - - - - - **Throws** - - - :ref:`AppException ` - if the server failed to confirm the user. - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/auth/GoogleAuthType.txt b/source/sdk/temp/java/api/io/realm/mongodb/auth/GoogleAuthType.txt deleted file mode 100644 index c2c6bc0d0d..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/auth/GoogleAuthType.txt +++ /dev/null @@ -1,248 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum GoogleAuthType -^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_auth_GoogleAuthType: - - - -io.realm.mongodb.auth -===================== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.auth.GoogleAuthType - - -This enum contains the list of Google authentication types supported by MongoDB Realm. - - -.. seealso:: - - - - - `Google Authentication `__ - - - - - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`AUTH_CODE ` - - - - - - - * - :ref:`ID_TOKEN ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`GoogleAuthType ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`GoogleAuthType ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_auth_GoogleAuthType_AUTH_CODE: - -.. _GoogleAuthType_AUTH_CODE: - - - -``AUTH_CODE`` --------------- - -public static final :ref:`GoogleAuthType ` - - - - - -.. _io_realm_mongodb_auth_GoogleAuthType_ID_TOKEN: - -.. _GoogleAuthType_ID_TOKEN: - - - -``ID_TOKEN`` -------------- - -public static final :ref:`GoogleAuthType ` - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _GoogleAuthType_valueOf: - -.. _GoogleAuthType_valueOf__: - -.. _io_realm_mongodb_auth_GoogleAuthType_valueOf: - -.. _io_realm_mongodb_auth_GoogleAuthType_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_auth_GoogleAuthType_valueOf_java_lang_String_: - -.. _io_realm_mongodb_auth_GoogleAuthType_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _GoogleAuthType_valueOf_java_lang_String_: - -.. _GoogleAuthType_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`GoogleAuthType ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _GoogleAuthType_values: - -.. _GoogleAuthType_values__: - -.. _io_realm_mongodb_auth_GoogleAuthType_values: - -.. _io_realm_mongodb_auth_GoogleAuthType_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`GoogleAuthType ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/functions.txt b/source/sdk/temp/java/api/io/realm/mongodb/functions.txt deleted file mode 100644 index a735d2764d..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/functions.txt +++ /dev/null @@ -1,27 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.functions -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - Functions - - - -| - -- :ref:`io.realm.mongodb.functions.Functions ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/functions/Functions.txt b/source/sdk/temp/java/api/io/realm/mongodb/functions/Functions.txt deleted file mode 100644 index f5d25626a7..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/functions/Functions.txt +++ /dev/null @@ -1,2022 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Functions -^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_functions_Functions: - - - -io.realm.mongodb.functions -========================== - - - | `java.lang.Object `__ - | io.realm.mongodb.functions.Functions - - -A *Functions* manager to call remote Realm functions for the associated Realm App.Arguments and results are encoded/decoded with the *Functions'* codec registry either inherited from the :ref:`AppConfiguration.getDefaultCodecRegistry() ` or set explicitly when creating the - -*Functions*-instance through :ref:`User.getFunctions(CodecRegistry) ` or through the individual calls to :ref:`callFunction(String, List, Class, CodecRegistry) ` . - - - - - - -.. seealso:: - - - - - :ref:`User.getFunctions() ` - - - - - :ref:`User.getFunctions(CodecRegistry) ` - - - - - :ref:`App.getFunctions(User) ` - - - - - :ref:`App.getFunctions(User, CodecRegistry) ` - - - - - :ref:`AppConfiguration ` - - - - - **CodecRegistry** - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **ResultT** - - | :ref:`callFunction ` <**ResultT** >( - | `String `__ name, - | `java.util.List\ `__ args, - | **** resultDecoder - | ) - - - Call a MongoDB Realm function synchronously with custom result decoder. - - - - - * - public **ResultT** - - | :ref:`callFunction ` <**ResultT** >( - | `String `__ name, - | `java.util.List\ `__ args, - | `java.lang.Class\ `__ resultClass - | ) - - - Call a MongoDB Realm function synchronously with default codec registry encoding/decoding arguments/results. - - - - - * - public **ResultT** - - | :ref:`callFunction ` <**ResultT** >( - | `String `__ name, - | `java.util.List\ `__ args, - | `java.lang.Class\ `__ resultClass, - | **CodecRegistry** codecRegistry - | ) - - - Call a MongoDB Realm function synchronously with custom codec registry encoding/decoding arguments/results. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`callFunctionAsync ` <**T** >( - | `String `__ name, - | `java.util.List\ `__ args, - | **** resultDecoder, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Call a MongoDB Realm function asynchronously with custom result decoder. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`callFunctionAsync ` <**T** >( - | `String `__ name, - | `java.util.List\ `__ args, - | `java.lang.Class\ `__ resultClass, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Call a MongoDB Realm function asynchronously with custom codec registry for encoding/decoding arguments/results. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`callFunctionAsync ` <**T** >( - | `String `__ name, - | `java.util.List\ `__ args, - | `java.lang.Class\ `__ resultClass, - | **CodecRegistry** codecRegistry, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Call a MongoDB Realm function asynchronously with custom codec registry for encoding/decoding arguments/results. - - - - - * - public :ref:`App ` - - | :ref:`getApp ` () - | - - - Returns the :ref:`App ` that this instance in associated with. - - - - - - - * - public **CodecRegistry** - - | :ref:`getDefaultCodecRegistry ` () - | - - - Returns the default codec registry used for encoding arguments and decoding results for this *Realm functions* instance. - - - - - * - public :ref:`User ` - - | :ref:`getUser ` () - | - - - Returns the :ref:`User ` that this instance in associated with. - - - - - - - * - protected abstract **T** - - | :ref:`invoke ` <**T** >( - | `String `__ name, - | `java.util.List\ `__ args, - | **CodecRegistry** codecRegistry, - | **** resultDecoder - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _callFunction: - -.. _callFunction__: - -.. _Functions_callFunction: - -.. _Functions_callFunction__: - -.. _io_realm_mongodb_functions_Functions_callFunction: - -.. _io_realm_mongodb_functions_Functions_callFunction__: - - - -callFunction ------------- - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_java_util_List__any__: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__java_util_List___any__: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_List__any__: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__List___any__: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_java_util_List__any__: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__java_util_List___any__: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_List__any__: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__List___any__: - -.. _callFunction_java_lang_String_java_util_List__any__: - -.. _callFunction_java_lang_String__java_util_List___any__: - -.. _callFunction_java_lang_String_List__any__: - -.. _callFunction_java_lang_String__List___any__: - -.. _callFunction_String_java_util_List__any__: - -.. _callFunction_String__java_util_List___any__: - -.. _callFunction_String_List__any__: - -.. _callFunction_String__List___any__: - -.. _Functions_callFunction_java_lang_String_java_util_List__any__: - -.. _Functions_callFunction_java_lang_String__java_util_List___any__: - -.. _Functions_callFunction_java_lang_String_List__any__: - -.. _Functions_callFunction_java_lang_String__List___any__: - -.. _Functions_callFunction_String_java_util_List__any__: - -.. _Functions_callFunction_String__java_util_List___any__: - -.. _Functions_callFunction_String_List__any__: - -.. _Functions_callFunction_String__List___any__: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__List______any__: - -.. list-table:: - :header-rows: 1 - - * - | public **ResultT** :ref:`callFunction ` <**ResultT** >( - | `String `__ name, - | `java.util.List\ `__ args, - | **** resultDecoder - | ) - - - - - * - Call a MongoDB Realm function synchronously with custom result decoder.The arguments will be encoded with the default codec registry encoding. - - - - - **Type Parameters** - - - ``ResultT`` - The type that the response will be decoded as using the ``resultDecoder`` - - - - - - - - - - **Parameters** - - - ``name`` - Name of the Realm function to call. - - - - - ``args`` - Arguments to the Realm function. - - - - - ``resultDecoder`` - The decoder used to decode the result. - - - - - - - - **Returns** - - Result of the Realm function. - - - - - **Throws** - - - :ref:`AppException ` - if the request failed in some way. - - - - - - - - - - .. seealso:: - - - - - :ref:`callFunction(String, List, Class, CodecRegistry) ` - - - - - :ref:`AppConfiguration.getDefaultCodecRegistry() ` - - - - - - - - - - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_java_util_List_java_lang_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__java_util_List__java_lang_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_java_util_List_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__java_util_List__Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_List_java_lang_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__List__java_lang_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_List_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__List__Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_java_util_List_java_lang_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__java_util_List__java_lang_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_java_util_List_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__java_util_List__Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_List_java_lang_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__List__java_lang_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_List_Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__List__Class_: - -.. _callFunction_java_lang_String_java_util_List_java_lang_Class_: - -.. _callFunction_java_lang_String__java_util_List__java_lang_Class_: - -.. _callFunction_java_lang_String_java_util_List_Class_: - -.. _callFunction_java_lang_String__java_util_List__Class_: - -.. _callFunction_java_lang_String_List_java_lang_Class_: - -.. _callFunction_java_lang_String__List__java_lang_Class_: - -.. _callFunction_java_lang_String_List_Class_: - -.. _callFunction_java_lang_String__List__Class_: - -.. _callFunction_String_java_util_List_java_lang_Class_: - -.. _callFunction_String__java_util_List__java_lang_Class_: - -.. _callFunction_String_java_util_List_Class_: - -.. _callFunction_String__java_util_List__Class_: - -.. _callFunction_String_List_java_lang_Class_: - -.. _callFunction_String__List__java_lang_Class_: - -.. _callFunction_String_List_Class_: - -.. _callFunction_String__List__Class_: - -.. _Functions_callFunction_java_lang_String_java_util_List_java_lang_Class_: - -.. _Functions_callFunction_java_lang_String__java_util_List__java_lang_Class_: - -.. _Functions_callFunction_java_lang_String_java_util_List_Class_: - -.. _Functions_callFunction_java_lang_String__java_util_List__Class_: - -.. _Functions_callFunction_java_lang_String_List_java_lang_Class_: - -.. _Functions_callFunction_java_lang_String__List__java_lang_Class_: - -.. _Functions_callFunction_java_lang_String_List_Class_: - -.. _Functions_callFunction_java_lang_String__List__Class_: - -.. _Functions_callFunction_String_java_util_List_java_lang_Class_: - -.. _Functions_callFunction_String__java_util_List__java_lang_Class_: - -.. _Functions_callFunction_String_java_util_List_Class_: - -.. _Functions_callFunction_String__java_util_List__Class_: - -.. _Functions_callFunction_String_List_java_lang_Class_: - -.. _Functions_callFunction_String__List__java_lang_Class_: - -.. _Functions_callFunction_String_List_Class_: - -.. _Functions_callFunction_String__List__Class_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__List_____Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public **ResultT** :ref:`callFunction ` <**ResultT** >( - | `String `__ name, - | `java.util.List\ `__ args, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Call a MongoDB Realm function synchronously with default codec registry encoding/decoding arguments/results. - - - **Type Parameters** - - - ``ResultT`` - The type that the response will be decoded as using the default codec registry. - - - - - - - - **Parameters** - - - ``name`` - Name of the Realm function to call. - - - - - ``args`` - Arguments to the Realm function. - - - - - ``resultClass`` - The type that the functions result should be converted to. - - - - - - - - **Returns** - - Result of the Realm function. - - - - - **Throws** - - - :ref:`AppException ` - if the request failed in some way. - - - - - - - - - - .. seealso:: - - - - - :ref:`callFunction(String, List, Class, CodecRegistry) ` - - - - - :ref:`AppConfiguration.getDefaultCodecRegistry() ` - - - - - - - - - - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__java_util_List__java_lang_Class__CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_java_util_List_Class_CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__java_util_List__Class__CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_List_java_lang_Class_CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__List__java_lang_Class__CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String_List_Class_CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_java_lang_String__List__Class__CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_java_util_List_java_lang_Class_CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__java_util_List__java_lang_Class__CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_java_util_List_Class_CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__java_util_List__Class__CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_List_java_lang_Class_CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__List__java_lang_Class__CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String_List_Class_CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__List__Class__CodecRegistry_: - -.. _callFunction_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_: - -.. _callFunction_java_lang_String__java_util_List__java_lang_Class__CodecRegistry_: - -.. _callFunction_java_lang_String_java_util_List_Class_CodecRegistry_: - -.. _callFunction_java_lang_String__java_util_List__Class__CodecRegistry_: - -.. _callFunction_java_lang_String_List_java_lang_Class_CodecRegistry_: - -.. _callFunction_java_lang_String__List__java_lang_Class__CodecRegistry_: - -.. _callFunction_java_lang_String_List_Class_CodecRegistry_: - -.. _callFunction_java_lang_String__List__Class__CodecRegistry_: - -.. _callFunction_String_java_util_List_java_lang_Class_CodecRegistry_: - -.. _callFunction_String__java_util_List__java_lang_Class__CodecRegistry_: - -.. _callFunction_String_java_util_List_Class_CodecRegistry_: - -.. _callFunction_String__java_util_List__Class__CodecRegistry_: - -.. _callFunction_String_List_java_lang_Class_CodecRegistry_: - -.. _callFunction_String__List__java_lang_Class__CodecRegistry_: - -.. _callFunction_String_List_Class_CodecRegistry_: - -.. _callFunction_String__List__Class__CodecRegistry_: - -.. _Functions_callFunction_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_: - -.. _Functions_callFunction_java_lang_String__java_util_List__java_lang_Class__CodecRegistry_: - -.. _Functions_callFunction_java_lang_String_java_util_List_Class_CodecRegistry_: - -.. _Functions_callFunction_java_lang_String__java_util_List__Class__CodecRegistry_: - -.. _Functions_callFunction_java_lang_String_List_java_lang_Class_CodecRegistry_: - -.. _Functions_callFunction_java_lang_String__List__java_lang_Class__CodecRegistry_: - -.. _Functions_callFunction_java_lang_String_List_Class_CodecRegistry_: - -.. _Functions_callFunction_java_lang_String__List__Class__CodecRegistry_: - -.. _Functions_callFunction_String_java_util_List_java_lang_Class_CodecRegistry_: - -.. _Functions_callFunction_String__java_util_List__java_lang_Class__CodecRegistry_: - -.. _Functions_callFunction_String_java_util_List_Class_CodecRegistry_: - -.. _Functions_callFunction_String__java_util_List__Class__CodecRegistry_: - -.. _Functions_callFunction_String_List_java_lang_Class_CodecRegistry_: - -.. _Functions_callFunction_String__List__java_lang_Class__CodecRegistry_: - -.. _Functions_callFunction_String_List_Class_CodecRegistry_: - -.. _Functions_callFunction_String__List__Class__CodecRegistry_: - -.. _io_realm_mongodb_functions_Functions_callFunction_String__List_____Class_ResultT___CodecRegistry_: - -.. list-table:: - :header-rows: 1 - - * - | public **ResultT** :ref:`callFunction ` <**ResultT** >( - | `String `__ name, - | `java.util.List\ `__ args, - | `java.lang.Class\ `__ resultClass, - | **CodecRegistry** codecRegistry - | ) - - - - - * - Call a MongoDB Realm function synchronously with custom codec registry encoding/decoding arguments/results. - - - **Type Parameters** - - - ``ResultT`` - The type that the response will be decoded as using the ``codecRegistry`` . - - - - - - - - - - **Parameters** - - - ``name`` - Name of the Realm function to call. - - - - - ``args`` - Arguments to the Realm function. - - - - - ``resultClass`` - The type that the functions result should be converted to. - - - - - ``codecRegistry`` - Codec registry to use for argument encoding and result decoding. - - - - - - - - **Returns** - - Result of the Realm function. - - - - - **Throws** - - - :ref:`AppException ` - if the request failed in some way. - - - - - - - - - - .. seealso:: - - - - - :ref:`callFunctionAsync(String, List, Class, CodecRegistry, App.Callback) ` - - - - - :ref:`AppConfiguration.getDefaultCodecRegistry() ` - - - - - - - - - - - - -.. _callFunctionAsync: - -.. _callFunctionAsync__: - -.. _Functions_callFunctionAsync: - -.. _Functions_callFunctionAsync__: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync__: - - - -callFunctionAsync ------------------ - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List__any__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List___any___io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List__any__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List___any___Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List__any__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List___any___App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List__any__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List___any___io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List__any__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List___any___Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List__any__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List___any___App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List__any__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List___any___io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List__any__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List___any___Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List__any__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List___any___App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List__any__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List___any___io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List__any__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List___any___Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List__any__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List___any___App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List__any__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List___any___io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List__any__Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List___any___Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List__any__App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List___any___App_Callback_: - -.. _callFunctionAsync_java_lang_String_List__any__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List___any___io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_List__any__Callback_: - -.. _callFunctionAsync_java_lang_String__List___any___Callback_: - -.. _callFunctionAsync_java_lang_String_List__any__App_Callback_: - -.. _callFunctionAsync_java_lang_String__List___any___App_Callback_: - -.. _callFunctionAsync_String_java_util_List__any__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__java_util_List___any___io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_java_util_List__any__Callback_: - -.. _callFunctionAsync_String__java_util_List___any___Callback_: - -.. _callFunctionAsync_String_java_util_List__any__App_Callback_: - -.. _callFunctionAsync_String__java_util_List___any___App_Callback_: - -.. _callFunctionAsync_String_List__any__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__List___any___io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_List__any__Callback_: - -.. _callFunctionAsync_String__List___any___Callback_: - -.. _callFunctionAsync_String_List__any__App_Callback_: - -.. _callFunctionAsync_String__List___any___App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List__any__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List___any___io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List__any__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List___any___Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List__any__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List___any___App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List__any__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List___any___io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List__any__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List___any___Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List__any__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List___any___App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List__any__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List___any___io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List__any__Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List___any___Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List__any__App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List___any___App_Callback_: - -.. _Functions_callFunctionAsync_String_List__any__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__List___any___io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_List__any__Callback_: - -.. _Functions_callFunctionAsync_String__List___any___Callback_: - -.. _Functions_callFunctionAsync_String_List__any__App_Callback_: - -.. _Functions_callFunctionAsync_String__List___any___App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List______any___App_Callback_T__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`callFunctionAsync ` <**T** >( - | `String `__ name, - | `java.util.List\ `__ args, - | **** resultDecoder, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Call a MongoDB Realm function asynchronously with custom result decoder.This is the asynchronous equivalent of **callFunction(String, List, Decoder)**. - - - - - - - **Type Parameters** - - - ``T`` - The type that the response will be decoded as using the ``resultDecoder`` - - - - - - - - - - **Parameters** - - - ``name`` - Name of the Realm function to call. - - - - - ``args`` - Arguments to the Realm function. - - - - - ``resultDecoder`` - The decoder used to decode the result. - - - - - ``callback`` - The callback that will receive the result or any errors from the request. - - - - - - - - **Returns** - - The task representing the ongoing operation. - - - - - **Throws** - - - `IllegalStateException `__ - if not called on a looper thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`callFunction(String, List, Class) ` - - - - - :ref:`callFunctionAsync(String, List, Class, CodecRegistry, App.Callback) ` - - - - - :ref:`AppConfiguration.getDefaultCodecRegistry() ` - - - - - - - - - - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_Class_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__Class__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_Class_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__Class__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_Class_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__Class__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_Class_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__Class__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_Class_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__Class__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_Class_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__Class__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_java_lang_Class_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__java_lang_Class__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_java_lang_Class_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__java_lang_Class__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_Class_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__Class__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_Class_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__Class__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_Class_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__Class__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_java_lang_Class_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__java_lang_Class__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_java_lang_Class_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__java_lang_Class__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_Class_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__Class__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_Class_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__Class__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_Class_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__Class__App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_Class_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__Class__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_Class_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__Class__Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_Class_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__Class__App_Callback_: - -.. _callFunctionAsync_java_lang_String_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_List_java_lang_Class_Callback_: - -.. _callFunctionAsync_java_lang_String__List__java_lang_Class__Callback_: - -.. _callFunctionAsync_java_lang_String_List_java_lang_Class_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List__java_lang_Class__App_Callback_: - -.. _callFunctionAsync_java_lang_String_List_Class_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List__Class__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_List_Class_Callback_: - -.. _callFunctionAsync_java_lang_String__List__Class__Callback_: - -.. _callFunctionAsync_java_lang_String_List_Class_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List__Class__App_Callback_: - -.. _callFunctionAsync_String_java_util_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__java_util_List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_java_util_List_java_lang_Class_Callback_: - -.. _callFunctionAsync_String__java_util_List__java_lang_Class__Callback_: - -.. _callFunctionAsync_String_java_util_List_java_lang_Class_App_Callback_: - -.. _callFunctionAsync_String__java_util_List__java_lang_Class__App_Callback_: - -.. _callFunctionAsync_String_java_util_List_Class_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__java_util_List__Class__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_java_util_List_Class_Callback_: - -.. _callFunctionAsync_String__java_util_List__Class__Callback_: - -.. _callFunctionAsync_String_java_util_List_Class_App_Callback_: - -.. _callFunctionAsync_String__java_util_List__Class__App_Callback_: - -.. _callFunctionAsync_String_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_List_java_lang_Class_Callback_: - -.. _callFunctionAsync_String__List__java_lang_Class__Callback_: - -.. _callFunctionAsync_String_List_java_lang_Class_App_Callback_: - -.. _callFunctionAsync_String__List__java_lang_Class__App_Callback_: - -.. _callFunctionAsync_String_List_Class_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__List__Class__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_List_Class_Callback_: - -.. _callFunctionAsync_String__List__Class__Callback_: - -.. _callFunctionAsync_String_List_Class_App_Callback_: - -.. _callFunctionAsync_String__List__Class__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_Class_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__Class__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_Class_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__Class__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_Class_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__Class__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_Class_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__Class__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_Class_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__Class__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_Class_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__Class__App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_java_lang_Class_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__java_lang_Class__Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_java_lang_Class_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__java_lang_Class__App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_Class_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__Class__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_Class_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__Class__Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_Class_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__Class__App_Callback_: - -.. _Functions_callFunctionAsync_String_List_java_lang_Class_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__List__java_lang_Class__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_List_java_lang_Class_Callback_: - -.. _Functions_callFunctionAsync_String__List__java_lang_Class__Callback_: - -.. _Functions_callFunctionAsync_String_List_java_lang_Class_App_Callback_: - -.. _Functions_callFunctionAsync_String__List__java_lang_Class__App_Callback_: - -.. _Functions_callFunctionAsync_String_List_Class_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__List__Class__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_List_Class_Callback_: - -.. _Functions_callFunctionAsync_String__List__Class__Callback_: - -.. _Functions_callFunctionAsync_String_List_Class_App_Callback_: - -.. _Functions_callFunctionAsync_String__List__Class__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List_____Class_T___App_Callback_T__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`callFunctionAsync ` <**T** >( - | `String `__ name, - | `java.util.List\ `__ args, - | `java.lang.Class\ `__ resultClass, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Call a MongoDB Realm function asynchronously with custom codec registry for encoding/decoding arguments/results.This is the asynchronous equivalent of :ref:`callFunction(String, List, Class) ` . - - - - - - - **Type Parameters** - - - ``T`` - The type that the response will be decoded as using the default codec registry. - - - - - - - - **Parameters** - - - ``name`` - Name of the Realm function to call. - - - - - ``args`` - Arguments to the Realm function. - - - - - ``resultClass`` - The type that the functions result should be converted to. - - - - - ``callback`` - The callback that will receive the result or any errors from the request. - - - - - - - - **Returns** - - The task representing the ongoing operation. - - - - - **Throws** - - - `IllegalStateException `__ - if not called on a looper thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`callFunction(String, List, Class) ` - - - - - :ref:`callFunctionAsync(String, List, Class, CodecRegistry, App.Callback) ` - - - - - :ref:`AppConfiguration.getDefaultCodecRegistry() ` - - - - - - - - - - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_Class_CodecRegistry_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__Class__CodecRegistry__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String_List_Class_CodecRegistry_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_java_lang_String__List__Class__CodecRegistry__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_Class_CodecRegistry_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__Class__CodecRegistry__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_java_util_List_Class_CodecRegistry_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__java_util_List__Class__CodecRegistry__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_java_lang_Class_CodecRegistry_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__java_lang_Class__CodecRegistry__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_Class_CodecRegistry_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__Class__CodecRegistry__Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String_List_Class_CodecRegistry_App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List__Class__CodecRegistry__App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__Callback_: - -.. _callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_App_Callback_: - -.. _callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__App_Callback_: - -.. _callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_Callback_: - -.. _callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__Callback_: - -.. _callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _callFunctionAsync_java_lang_String_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_java_lang_String_List_Class_CodecRegistry_Callback_: - -.. _callFunctionAsync_java_lang_String__List__Class__CodecRegistry__Callback_: - -.. _callFunctionAsync_java_lang_String_List_Class_CodecRegistry_App_Callback_: - -.. _callFunctionAsync_java_lang_String__List__Class__CodecRegistry__App_Callback_: - -.. _callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_Callback_: - -.. _callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__Callback_: - -.. _callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _callFunctionAsync_String_java_util_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__java_util_List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_java_util_List_Class_CodecRegistry_Callback_: - -.. _callFunctionAsync_String__java_util_List__Class__CodecRegistry__Callback_: - -.. _callFunctionAsync_String_java_util_List_Class_CodecRegistry_App_Callback_: - -.. _callFunctionAsync_String__java_util_List__Class__CodecRegistry__App_Callback_: - -.. _callFunctionAsync_String_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_List_java_lang_Class_CodecRegistry_Callback_: - -.. _callFunctionAsync_String__List__java_lang_Class__CodecRegistry__Callback_: - -.. _callFunctionAsync_String_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _callFunctionAsync_String__List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _callFunctionAsync_String_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String__List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _callFunctionAsync_String_List_Class_CodecRegistry_Callback_: - -.. _callFunctionAsync_String__List__Class__CodecRegistry__Callback_: - -.. _callFunctionAsync_String_List_Class_CodecRegistry_App_Callback_: - -.. _callFunctionAsync_String__List__Class__CodecRegistry__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_java_util_List_Class_CodecRegistry_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__java_util_List__Class__CodecRegistry__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_Class_CodecRegistry_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__Class__CodecRegistry__Callback_: - -.. _Functions_callFunctionAsync_java_lang_String_List_Class_CodecRegistry_App_Callback_: - -.. _Functions_callFunctionAsync_java_lang_String__List__Class__CodecRegistry__App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_Class_CodecRegistry_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__Class__CodecRegistry__Callback_: - -.. _Functions_callFunctionAsync_String_java_util_List_Class_CodecRegistry_App_Callback_: - -.. _Functions_callFunctionAsync_String__java_util_List__Class__CodecRegistry__App_Callback_: - -.. _Functions_callFunctionAsync_String_List_java_lang_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__List__java_lang_Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_List_java_lang_Class_CodecRegistry_Callback_: - -.. _Functions_callFunctionAsync_String__List__java_lang_Class__CodecRegistry__Callback_: - -.. _Functions_callFunctionAsync_String_List_java_lang_Class_CodecRegistry_App_Callback_: - -.. _Functions_callFunctionAsync_String__List__java_lang_Class__CodecRegistry__App_Callback_: - -.. _Functions_callFunctionAsync_String_List_Class_CodecRegistry_io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String__List__Class__CodecRegistry__io_realm_mongodb_App_Callback_: - -.. _Functions_callFunctionAsync_String_List_Class_CodecRegistry_Callback_: - -.. _Functions_callFunctionAsync_String__List__Class__CodecRegistry__Callback_: - -.. _Functions_callFunctionAsync_String_List_Class_CodecRegistry_App_Callback_: - -.. _Functions_callFunctionAsync_String__List__Class__CodecRegistry__App_Callback_: - -.. _io_realm_mongodb_functions_Functions_callFunctionAsync_String__List_____Class_T___CodecRegistry__App_Callback_T__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`callFunctionAsync ` <**T** >( - | `String `__ name, - | `java.util.List\ `__ args, - | `java.lang.Class\ `__ resultClass, - | **CodecRegistry** codecRegistry, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Call a MongoDB Realm function asynchronously with custom codec registry for encoding/decoding arguments/results.This is the asynchronous equivalent of :ref:`callFunction(String, List, Class, CodecRegistry) ` . - - - - - - - **Type Parameters** - - - ``T`` - The type that the response will be decoded as using the default codec registry. - - - - - - - - **Parameters** - - - ``name`` - Name of the Realm function to call. - - - - - ``args`` - Arguments to the Realm function. - - - - - ``resultClass`` - The type that the functions result should be converted to. - - - - - ``codecRegistry`` - Codec registry to use for argument encoding and result decoding. - - - - - ``callback`` - The callback that will receive the result or any errors from the request. - - - - - - - - **Returns** - - The task representing the ongoing operation. - - - - - **Throws** - - - `IllegalStateException `__ - if not called on a looper thread. - - - - - - - - - - .. seealso:: - - - - - :ref:`callFunction(String, List, Class, CodecRegistry) ` - - - - - :ref:`callFunctionAsync(String, List, Class, CodecRegistry, App.Callback) ` - - - - - :ref:`AppConfiguration.getDefaultCodecRegistry() ` - - - - - - - - - - - - -.. _getApp: - -.. _getApp__: - -.. _Functions_getApp: - -.. _Functions_getApp__: - -.. _io_realm_mongodb_functions_Functions_getApp: - -.. _io_realm_mongodb_functions_Functions_getApp__: - - - -getApp ------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`App ` :ref:`getApp ` () - | - - - - - * - Returns the :ref:`App ` that this instance in associated with. - - - - - - - - - **Returns** - - The :ref:`App ` that this instance in associated with. - - - - - - - - - - - - - -.. _getDefaultCodecRegistry: - -.. _getDefaultCodecRegistry__: - -.. _Functions_getDefaultCodecRegistry: - -.. _Functions_getDefaultCodecRegistry__: - -.. _io_realm_mongodb_functions_Functions_getDefaultCodecRegistry: - -.. _io_realm_mongodb_functions_Functions_getDefaultCodecRegistry__: - - - -getDefaultCodecRegistry ------------------------ - -.. list-table:: - :header-rows: 1 - - * - | public **CodecRegistry** :ref:`getDefaultCodecRegistry ` () - | - - - - - * - Returns the default codec registry used for encoding arguments and decoding results for this *Realm functions* instance. - - - - - - - **Returns** - - The default codec registry. - - - - - - - - - - - -.. _getUser: - -.. _getUser__: - -.. _Functions_getUser: - -.. _Functions_getUser__: - -.. _io_realm_mongodb_functions_Functions_getUser: - -.. _io_realm_mongodb_functions_Functions_getUser__: - - - -getUser -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`getUser ` () - | - - - - - * - Returns the :ref:`User ` that this instance in associated with. - - - - - - - - - **Returns** - - The :ref:`User ` that this instance in associated with. - - - - - - - - - - - - - -.. _invoke: - -.. _invoke__: - -.. _Functions_invoke: - -.. _Functions_invoke__: - -.. _io_realm_mongodb_functions_Functions_invoke: - -.. _io_realm_mongodb_functions_Functions_invoke__: - - - -invoke ------- - -.. _io_realm_mongodb_functions_Functions_invoke_java_lang_String_java_util_List_CodecRegistry__any__: - -.. _io_realm_mongodb_functions_Functions_invoke_java_lang_String__java_util_List__CodecRegistry___any__: - -.. _io_realm_mongodb_functions_Functions_invoke_java_lang_String_List_CodecRegistry__any__: - -.. _io_realm_mongodb_functions_Functions_invoke_java_lang_String__List__CodecRegistry___any__: - -.. _io_realm_mongodb_functions_Functions_invoke_String_java_util_List_CodecRegistry__any__: - -.. _io_realm_mongodb_functions_Functions_invoke_String__java_util_List__CodecRegistry___any__: - -.. _io_realm_mongodb_functions_Functions_invoke_String_List_CodecRegistry__any__: - -.. _io_realm_mongodb_functions_Functions_invoke_String__List__CodecRegistry___any__: - -.. _invoke_java_lang_String_java_util_List_CodecRegistry__any__: - -.. _invoke_java_lang_String__java_util_List__CodecRegistry___any__: - -.. _invoke_java_lang_String_List_CodecRegistry__any__: - -.. _invoke_java_lang_String__List__CodecRegistry___any__: - -.. _invoke_String_java_util_List_CodecRegistry__any__: - -.. _invoke_String__java_util_List__CodecRegistry___any__: - -.. _invoke_String_List_CodecRegistry__any__: - -.. _invoke_String__List__CodecRegistry___any__: - -.. _Functions_invoke_java_lang_String_java_util_List_CodecRegistry__any__: - -.. _Functions_invoke_java_lang_String__java_util_List__CodecRegistry___any__: - -.. _Functions_invoke_java_lang_String_List_CodecRegistry__any__: - -.. _Functions_invoke_java_lang_String__List__CodecRegistry___any__: - -.. _Functions_invoke_String_java_util_List_CodecRegistry__any__: - -.. _Functions_invoke_String__java_util_List__CodecRegistry___any__: - -.. _Functions_invoke_String_List_CodecRegistry__any__: - -.. _Functions_invoke_String__List__CodecRegistry___any__: - -.. _io_realm_mongodb_functions_Functions_invoke_String__List_____CodecRegistry___any__: - -.. list-table:: - :header-rows: 1 - - * - | protected abstract **T** :ref:`invoke ` <**T** >( - | `String `__ name, - | `java.util.List\ `__ args, - | **CodecRegistry** codecRegistry, - | **** resultDecoder - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator.txt b/source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator.txt deleted file mode 100644 index a0ac792709..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator.txt +++ /dev/null @@ -1,27 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.log.obfuscator -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - HttpLogObfuscator - - - -| - -- :ref:`io.realm.mongodb.log.obfuscator.HttpLogObfuscator ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt b/source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt deleted file mode 100644 index e3ecf5f427..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/log/obfuscator/HttpLogObfuscator.txt +++ /dev/null @@ -1,376 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class HttpLogObfuscator -^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator: - - - -io.realm.mongodb.log.obfuscator -=============================== - - - | `java.lang.Object `__ - | io.realm.mongodb.log.obfuscator.HttpLogObfuscator - - -The HttpLogObfuscator keeps sensitive information from being displayed in Logcat. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`HttpLogObfuscator ` ( - | `String `__ feature, - | `java.util.Map\ `__ patternObfuscatorMap - | ) - - - Constructor for creating an HTTP log obfuscator. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public `String `__ - - | :ref:`obfuscate ` ( - | `java.util.List\ `__ urlSegments, - | `String `__ input - | ) - - - Obfuscates a logcat entry or not depending on whether the request being sent matches the specified feature. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _HttpLogObfuscator: - -.. _HttpLogObfuscator__: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`HttpLogObfuscator ` ( - | `String `__ feature, - | `java.util.Map\ `__ patternObfuscatorMap - | ) - - - - - * - Constructor for creating an HTTP log obfuscator. - - - - - **Parameters** - - - ``feature`` - the feature to obfuscate, e.g. "providers" for login requests - see **io.realm.internal.network.LoggingInterceptor**. - - - - - - - ``patternObfuscatorMap`` - `Map `__ of keys subject to being obfuscated and **RegexPatternObfuscator**s used to determine which obfuscator has to be used for the given feature. - - - - - - - - - - - - - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _HttpLogObfuscator_equals: - -.. _HttpLogObfuscator_equals__: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_equals: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_equals__: - - - -equals ------- - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_equals_java_lang_Object_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _HttpLogObfuscator_equals_java_lang_Object_: - -.. _HttpLogObfuscator_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _HttpLogObfuscator_hashCode: - -.. _HttpLogObfuscator_hashCode__: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_hashCode: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _obfuscate: - -.. _obfuscate__: - -.. _HttpLogObfuscator_obfuscate: - -.. _HttpLogObfuscator_obfuscate__: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate__: - - - -obfuscate ---------- - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_java_util_List_java_lang_String_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_java_util_List__java_lang_String_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_java_util_List_String_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_java_util_List__String_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_List_java_lang_String_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_List__java_lang_String_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_List_String_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_List__String_: - -.. _obfuscate_java_util_List_java_lang_String_: - -.. _obfuscate_java_util_List__java_lang_String_: - -.. _obfuscate_java_util_List_String_: - -.. _obfuscate_java_util_List__String_: - -.. _obfuscate_List_java_lang_String_: - -.. _obfuscate_List__java_lang_String_: - -.. _obfuscate_List_String_: - -.. _obfuscate_List__String_: - -.. _HttpLogObfuscator_obfuscate_java_util_List_java_lang_String_: - -.. _HttpLogObfuscator_obfuscate_java_util_List__java_lang_String_: - -.. _HttpLogObfuscator_obfuscate_java_util_List_String_: - -.. _HttpLogObfuscator_obfuscate_java_util_List__String_: - -.. _HttpLogObfuscator_obfuscate_List_java_lang_String_: - -.. _HttpLogObfuscator_obfuscate_List__java_lang_String_: - -.. _HttpLogObfuscator_obfuscate_List_String_: - -.. _HttpLogObfuscator_obfuscate_List__String_: - -.. _io_realm_mongodb_log_obfuscator_HttpLogObfuscator_obfuscate_List_String___String_: - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`obfuscate ` ( - | `java.util.List\ `__ urlSegments, - | `String `__ input - | ) - - - - - * - Obfuscates a logcat entry or not depending on whether the request being sent matches the specified feature. If it doesn't, the logcat entry will be returned unmodified. - - - - - **Parameters** - - - ``urlSegments`` - the URL segments of the request to be sent. - - - - - ``input`` - the original logcat entry. - - - - - - - - **Returns** - - the logcat entry to be shown in the logcat. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo.txt deleted file mode 100644 index 65912bca1a..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo.txt +++ /dev/null @@ -1,33 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.mongo -^^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - MongoClient - MongoCollection - MongoDatabase - MongoNamespace - - - -| - -- :ref:`io.realm.mongodb.mongo.MongoClient ` -- :ref:`io.realm.mongodb.mongo.MongoCollection ` -- :ref:`io.realm.mongodb.mongo.MongoDatabase ` -- :ref:`io.realm.mongodb.mongo.MongoNamespace ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoClient.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoClient.txt deleted file mode 100644 index 0c47efa7c8..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoClient.txt +++ /dev/null @@ -1,195 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class MongoClient -^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_MongoClient: - - - -io.realm.mongodb.mongo -====================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.MongoClient - - -The remote MongoClient used for working with data in MongoDB remotely via Realm. - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`MongoDatabase ` - - | :ref:`getDatabase ` ( - | `String `__ databaseName - | ) - - - Gets a :ref:`MongoDatabase ` instance for the given database name. - - - - - - - * - public `String `__ - - | :ref:`getServiceName ` () - | - - - Returns the service name for this client. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _getDatabase: - -.. _getDatabase__: - -.. _MongoClient_getDatabase: - -.. _MongoClient_getDatabase__: - -.. _io_realm_mongodb_mongo_MongoClient_getDatabase: - -.. _io_realm_mongodb_mongo_MongoClient_getDatabase__: - - - -getDatabase ------------ - -.. _io_realm_mongodb_mongo_MongoClient_getDatabase_java_lang_String_: - -.. _io_realm_mongodb_mongo_MongoClient_getDatabase_String_: - -.. _getDatabase_java_lang_String_: - -.. _getDatabase_String_: - -.. _MongoClient_getDatabase_java_lang_String_: - -.. _MongoClient_getDatabase_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`MongoDatabase ` :ref:`getDatabase ` ( - | `String `__ databaseName - | ) - - - - - * - Gets a :ref:`MongoDatabase ` instance for the given database name. - - - - - - - **Parameters** - - - ``databaseName`` - the name of the database to retrieve - - - - - - - - **Returns** - - a ``RemoteMongoDatabase`` representing the specified database - - - - - - - - - - - - - -.. _getServiceName: - -.. _getServiceName__: - -.. _MongoClient_getServiceName: - -.. _MongoClient_getServiceName__: - -.. _io_realm_mongodb_mongo_MongoClient_getServiceName: - -.. _io_realm_mongodb_mongo_MongoClient_getServiceName__: - - - -getServiceName --------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getServiceName ` () - | - - - - - * - Returns the service name for this client. - - - - - - - **Returns** - - the service name. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoCollection.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoCollection.txt deleted file mode 100644 index 51845b074f..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoCollection.txt +++ /dev/null @@ -1,4472 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class MongoCollection -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_MongoCollection: - - - -io.realm.mongodb.mongo -====================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.MongoCollection - - -The MongoCollection interface provides read and write access to documents.Use :ref:`MongoDatabase.getCollection ` to get a collection instance. - - - -Before any access is possible, there must be an active, logged-in user. - - - - -.. seealso:: - - - - - :ref:`MongoDatabase ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`AggregateIterable ` - - | :ref:`aggregate ` <**ResultT** >( - | `java.util.List\ `__ pipeline, - | `java.lang.Class\ `__ resultClass - | ) - - - Aggregates documents according to the specified aggregation pipeline specifying an output class. - - - - - * - public :ref:`AggregateIterable ` - - | :ref:`aggregate ` ( - | `java.util.List\ `__ pipeline - | ) - - - Aggregates documents according to the specified aggregation pipeline. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`count ` ( - | **Bson** filter, - | :ref:`CountOptions ` options - | ) - - - Counts the number of documents in the collection according to the given options. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`count ` ( - | **Bson** filter - | ) - - - Counts the number of documents in the collection according to the given options. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`count ` () - | - - - Counts the number of documents in the collection. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`deleteMany ` ( - | **Bson** filter - | ) - - - Removes all documents from the collection that match the given query filter. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`deleteOne ` ( - | **Bson** filter - | ) - - - Removes at most one document from the collection that matches the given filter. - - - - - * - public :ref:`FindIterable ` - - | :ref:`find ` <**ResultT** >( - | **Bson** filter, - | `java.lang.Class\ `__ resultClass, - | :ref:`FindOptions ` options - | ) - - - Finds all documents in the collection that match the given filter specifying an output class and also using :ref:`FindOptions ` to build the query. - - - - - - - * - public :ref:`FindIterable ` - - | :ref:`find ` <**ResultT** >( - | **Bson** filter, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds all documents in the collection that match the given filter specifying an output class. - - - - - * - public :ref:`FindIterable ` - - | :ref:`find ` ( - | **Bson** filter, - | :ref:`FindOptions ` options - | ) - - - Finds all documents in the collection that match the given filter using :ref:`FindOptions ` to build the query. - - - - - - - * - public :ref:`FindIterable ` - - | :ref:`find ` ( - | **Bson** filter - | ) - - - Finds all documents in the collection that match the given filter. - - - - - * - public :ref:`FindIterable ` - - | :ref:`find ` <**ResultT** >( - | `java.lang.Class\ `__ resultClass, - | :ref:`FindOptions ` options - | ) - - - Finds all documents in the collection specifying an output class and also using :ref:`FindOptions ` to build the query. - - - - - - - * - public :ref:`FindIterable ` - - | :ref:`find ` <**ResultT** >( - | `java.lang.Class\ `__ resultClass - | ) - - - Finds all documents in the collection specifying an output class. - - - - - * - public :ref:`FindIterable ` - - | :ref:`find ` ( - | :ref:`FindOptions ` options - | ) - - - Finds all documents in the collection using :ref:`FindOptions ` to build the query. - - - - - - - * - public :ref:`FindIterable ` - - | :ref:`find ` () - | - - - Finds all documents in the collection. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOne ` <**ResultT** >( - | **Bson** filter, - | :ref:`FindOptions ` options, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOne ` ( - | **Bson** filter, - | :ref:`FindOptions ` options - | ) - - - Finds a document in the collection. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOne ` <**ResultT** >( - | **Bson** filter, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOne ` ( - | **Bson** filter - | ) - - - Finds a document in the collection. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOne ` <**ResultT** >( - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOne ` () - | - - - Finds a document in the collection. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndDelete ` <**ResultT** >( - | **Bson** filter, - | :ref:`FindOneAndModifyOptions ` options, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection and delete it. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndDelete ` ( - | **Bson** filter, - | :ref:`FindOneAndModifyOptions ` options - | ) - - - Finds a document in the collection and delete it. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndDelete ` <**ResultT** >( - | **Bson** filter, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection and delete it. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndDelete ` ( - | **Bson** filter - | ) - - - Finds a document in the collection and delete it. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndReplace ` <**ResultT** >( - | **Bson** filter, - | **Bson** replacement, - | :ref:`FindOneAndModifyOptions ` options, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection and replaces it with the given document. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndReplace ` ( - | **Bson** filter, - | **Bson** replacement, - | :ref:`FindOneAndModifyOptions ` options - | ) - - - Finds a document in the collection and replaces it with the given document. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndReplace ` <**ResultT** >( - | **Bson** filter, - | **Bson** replacement, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection and replaces it with the given document. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndReplace ` ( - | **Bson** filter, - | **Bson** replacement - | ) - - - Finds a document in the collection and replaces it with the given document. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndUpdate ` <**ResultT** >( - | **Bson** filter, - | **Bson** update, - | :ref:`FindOneAndModifyOptions ` options, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection and performs the given update. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndUpdate ` ( - | **Bson** filter, - | **Bson** update, - | :ref:`FindOneAndModifyOptions ` options - | ) - - - Finds a document in the collection and performs the given update. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndUpdate ` <**ResultT** >( - | **Bson** filter, - | **Bson** update, - | `java.lang.Class\ `__ resultClass - | ) - - - Finds a document in the collection and performs the given update. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`findOneAndUpdate ` ( - | **Bson** filter, - | **Bson** update - | ) - - - Finds a document in the collection and performs the given update. - - - - - * - public **CodecRegistry** - - | :ref:`getCodecRegistry ` () - | - - - Gets the codec registry for the MongoCollection. - - - - - * - public `Class `__ - - | :ref:`getDocumentClass ` () - | - - - Gets the class of documents stored in this collection. - - - - - * - public `String `__ - - | :ref:`getName ` () - | - - - Gets the name of this collection - - - - - * - public :ref:`MongoNamespace ` - - | :ref:`getNamespace ` () - | - - - Gets the namespace of this collection, i.e. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`insertMany ` ( - | `java.util.List\ `__ documents - | ) - - - Inserts one or more documents. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`insertOne ` ( - | **DocumentT** document - | ) - - - Inserts the provided document. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`updateMany ` ( - | **Bson** filter, - | **Bson** update, - | :ref:`UpdateOptions ` updateOptions - | ) - - - Update all documents in the collection according to the specified arguments. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`updateMany ` ( - | **Bson** filter, - | **Bson** update - | ) - - - Update all documents in the collection according to the specified arguments. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`updateOne ` ( - | **Bson** filter, - | **Bson** update, - | :ref:`UpdateOptions ` updateOptions - | ) - - - Update a single document in the collection according to the specified arguments. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`updateOne ` ( - | **Bson** filter, - | **Bson** update - | ) - - - Update a single document in the collection according to the specified arguments. - - - - - * - public :ref:`RealmEventStreamTask ` - - | :ref:`watch ` ( - | **ObjectId[]** ids - | ) - - - Watches specified IDs in a collection. - - - - - * - public :ref:`RealmEventStreamTask ` - - | :ref:`watch ` ( - | **BsonValue[]** ids - | ) - - - Watches specified IDs in a collection. - - - - - * - public :ref:`RealmEventStreamTask ` - - | :ref:`watch ` () - | - - - Watches a collection. - - - - - * - public :ref:`RealmEventStreamAsyncTask ` - - | :ref:`watchAsync ` ( - | **ObjectId[]** ids - | ) - - - Watches specified IDs in a collection asynchronously. - - - - - * - public :ref:`RealmEventStreamAsyncTask ` - - | :ref:`watchAsync ` ( - | **BsonValue[]** ids - | ) - - - Watches specified IDs in a collection asynchronously. - - - - - * - public :ref:`RealmEventStreamAsyncTask ` - - | :ref:`watchAsync ` () - | - - - Watches a collection asynchronously. - - - - - * - public :ref:`RealmEventStreamTask ` - - | :ref:`watchWithFilter ` ( - | **BsonDocument** matchFilter - | ) - - - Watches a collection. - - - - - * - public :ref:`RealmEventStreamTask ` - - | :ref:`watchWithFilter ` ( - | **Document** matchFilter - | ) - - - Watches a collection. - - - - - * - public :ref:`RealmEventStreamAsyncTask ` - - | :ref:`watchWithFilterAsync ` ( - | **BsonDocument** matchFilter - | ) - - - Watches a collection asynchronously. - - - - - * - public :ref:`RealmEventStreamAsyncTask ` - - | :ref:`watchWithFilterAsync ` ( - | **Document** matchFilter - | ) - - - Watches a collection asynchronously. - - - - - * - public :ref:`MongoCollection ` - - | :ref:`withCodecRegistry ` ( - | **CodecRegistry** codecRegistry - | ) - - - Creates a new MongoCollection instance with a different codec registry. - - - - - * - public :ref:`MongoCollection ` - - | :ref:`withDocumentClass ` <**NewDocumentT** >( - | `java.lang.Class\ `__ clazz - | ) - - - Creates a new MongoCollection instance with a different default class to cast any documents returned from the database into. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _aggregate: - -.. _aggregate__: - -.. _MongoCollection_aggregate: - -.. _MongoCollection_aggregate__: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate__: - - - -aggregate ---------- - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_java_util_List_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_java_util_List__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_java_util_List_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_java_util_List__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List___extends_Bson__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List___extends_Bson___java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List___extends_Bson__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List___extends_Bson___Class_: - -.. _aggregate_java_util_List_java_lang_Class_: - -.. _aggregate_java_util_List__java_lang_Class_: - -.. _aggregate_java_util_List_Class_: - -.. _aggregate_java_util_List__Class_: - -.. _aggregate_List_java_lang_Class_: - -.. _aggregate_List__java_lang_Class_: - -.. _aggregate_List_Class_: - -.. _aggregate_List__Class_: - -.. _aggregate_List___extends_Bson__java_lang_Class_: - -.. _aggregate_List___extends_Bson___java_lang_Class_: - -.. _aggregate_List___extends_Bson__Class_: - -.. _aggregate_List___extends_Bson___Class_: - -.. _MongoCollection_aggregate_java_util_List_java_lang_Class_: - -.. _MongoCollection_aggregate_java_util_List__java_lang_Class_: - -.. _MongoCollection_aggregate_java_util_List_Class_: - -.. _MongoCollection_aggregate_java_util_List__Class_: - -.. _MongoCollection_aggregate_List_java_lang_Class_: - -.. _MongoCollection_aggregate_List__java_lang_Class_: - -.. _MongoCollection_aggregate_List_Class_: - -.. _MongoCollection_aggregate_List__Class_: - -.. _MongoCollection_aggregate_List___extends_Bson__java_lang_Class_: - -.. _MongoCollection_aggregate_List___extends_Bson___java_lang_Class_: - -.. _MongoCollection_aggregate_List___extends_Bson__Class_: - -.. _MongoCollection_aggregate_List___extends_Bson___Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List___extends_Bson___Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AggregateIterable ` :ref:`aggregate ` <**ResultT** >( - | `java.util.List\ `__ pipeline, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Aggregates documents according to the specified aggregation pipeline specifying an output class.All documents will be delivered in the form of an :ref:`AggregateIterable ` from which individual elements can be extracted. - - - - - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``pipeline`` - the aggregation pipeline - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - an :ref:`AggregateIterable ` from which the results can be extracted - - - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_java_util_List_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List_: - -.. _io_realm_mongodb_mongo_MongoCollection_aggregate_List___extends_Bson__: - -.. _aggregate_java_util_List_: - -.. _aggregate_List_: - -.. _aggregate_List___extends_Bson__: - -.. _MongoCollection_aggregate_java_util_List_: - -.. _MongoCollection_aggregate_List_: - -.. _MongoCollection_aggregate_List___extends_Bson__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AggregateIterable ` :ref:`aggregate ` ( - | `java.util.List\ `__ pipeline - | ) - - - - - * - Aggregates documents according to the specified aggregation pipeline.All documents will be delivered in the form of an :ref:`AggregateIterable ` from which individual elements can be extracted. - - - - - - - - - **Parameters** - - - ``pipeline`` - the aggregation pipeline - - - - - - - - **Returns** - - an :ref:`AggregateIterable ` from which the results can be extracted - - - - - - - - - - - - - -.. _count: - -.. _count__: - -.. _MongoCollection_count: - -.. _MongoCollection_count__: - -.. _io_realm_mongodb_mongo_MongoCollection_count: - -.. _io_realm_mongodb_mongo_MongoCollection_count__: - - - -count ------ - -.. _io_realm_mongodb_mongo_MongoCollection_count_Bson_io_realm_mongodb_mongo_options_CountOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_count_Bson__io_realm_mongodb_mongo_options_CountOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_count_Bson_CountOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_count_Bson__CountOptions_: - -.. _count_Bson_io_realm_mongodb_mongo_options_CountOptions_: - -.. _count_Bson__io_realm_mongodb_mongo_options_CountOptions_: - -.. _count_Bson_CountOptions_: - -.. _count_Bson__CountOptions_: - -.. _MongoCollection_count_Bson_io_realm_mongodb_mongo_options_CountOptions_: - -.. _MongoCollection_count_Bson__io_realm_mongodb_mongo_options_CountOptions_: - -.. _MongoCollection_count_Bson_CountOptions_: - -.. _MongoCollection_count_Bson__CountOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`count ` ( - | **Bson** filter, - | :ref:`CountOptions ` options - | ) - - - - - * - Counts the number of documents in the collection according to the given options. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``options`` - the options describing the count - - - - - - - - **Returns** - - a task containing the number of documents in the collection - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_count_Bson_: - -.. _count_Bson_: - -.. _MongoCollection_count_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`count ` ( - | **Bson** filter - | ) - - - - - * - Counts the number of documents in the collection according to the given options. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - - - - **Returns** - - a task containing the number of documents in the collection - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`count ` () - | - - - - - * - Counts the number of documents in the collection. - - - - - - - **Returns** - - a task containing the number of documents in the collection - - - - - - - - - - - -.. _deleteMany: - -.. _deleteMany__: - -.. _MongoCollection_deleteMany: - -.. _MongoCollection_deleteMany__: - -.. _io_realm_mongodb_mongo_MongoCollection_deleteMany: - -.. _io_realm_mongodb_mongo_MongoCollection_deleteMany__: - - - -deleteMany ----------- - -.. _io_realm_mongodb_mongo_MongoCollection_deleteMany_Bson_: - -.. _deleteMany_Bson_: - -.. _MongoCollection_deleteMany_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`deleteMany ` ( - | **Bson** filter - | ) - - - - - * - Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified. - - - - - **Parameters** - - - ``filter`` - the query filter to apply the the delete operation - - - - - - - - **Returns** - - a task containing the result of the remove many operation - - - - - - - - - - - -.. _deleteOne: - -.. _deleteOne__: - -.. _MongoCollection_deleteOne: - -.. _MongoCollection_deleteOne__: - -.. _io_realm_mongodb_mongo_MongoCollection_deleteOne: - -.. _io_realm_mongodb_mongo_MongoCollection_deleteOne__: - - - -deleteOne ---------- - -.. _io_realm_mongodb_mongo_MongoCollection_deleteOne_Bson_: - -.. _deleteOne_Bson_: - -.. _MongoCollection_deleteOne_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`deleteOne ` ( - | **Bson** filter - | ) - - - - - * - Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified. - - - - - **Parameters** - - - ``filter`` - the query filter to apply the the delete operation - - - - - - - - **Returns** - - a task containing the result of the remove one operation - - - - - - - - - - - -.. _find: - -.. _find__: - -.. _MongoCollection_find: - -.. _MongoCollection_find__: - -.. _io_realm_mongodb_mongo_MongoCollection_find: - -.. _io_realm_mongodb_mongo_MongoCollection_find__: - - - -find ----- - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_java_lang_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__java_lang_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_java_lang_Class_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__java_lang_Class__FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_Class_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__Class__FindOptions_: - -.. _find_Bson_java_lang_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_Bson__java_lang_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_Bson_java_lang_Class_FindOptions_: - -.. _find_Bson__java_lang_Class__FindOptions_: - -.. _find_Bson_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_Bson__Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_Bson_Class_FindOptions_: - -.. _find_Bson__Class__FindOptions_: - -.. _MongoCollection_find_Bson_java_lang_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_Bson__java_lang_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_Bson_java_lang_Class_FindOptions_: - -.. _MongoCollection_find_Bson__java_lang_Class__FindOptions_: - -.. _MongoCollection_find_Bson_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_Bson__Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_Bson_Class_FindOptions_: - -.. _MongoCollection_find_Bson__Class__FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__Class_ResultT___FindOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`find ` <**ResultT** >( - | **Bson** filter, - | `java.lang.Class\ `__ resultClass, - | :ref:`FindOptions ` options - | ) - - - - - * - Finds all documents in the collection that match the given filter specifying an output class and also using :ref:`FindOptions ` to build the query. - - All documents will be delivered in the form of a :ref:`FindIterable ` from which individual elements can be extracted. - - - - - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``resultClass`` - the class to decode each document into - - - - - ``options`` - a :ref:`FindOptions ` struct - - - - - - - - - - **Returns** - - an iterable containing the result of the find operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__Class_: - -.. _find_Bson_java_lang_Class_: - -.. _find_Bson__java_lang_Class_: - -.. _find_Bson_Class_: - -.. _find_Bson__Class_: - -.. _MongoCollection_find_Bson_java_lang_Class_: - -.. _MongoCollection_find_Bson__java_lang_Class_: - -.. _MongoCollection_find_Bson_Class_: - -.. _MongoCollection_find_Bson__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`find ` <**ResultT** >( - | **Bson** filter, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds all documents in the collection that match the given filter specifying an output class.All documents will be delivered in the form of a :ref:`FindIterable ` from which individual elements can be extracted. - - - - - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - an iterable containing the result of the find operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson__FindOptions_: - -.. _find_Bson_io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_Bson__io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_Bson_FindOptions_: - -.. _find_Bson__FindOptions_: - -.. _MongoCollection_find_Bson_io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_Bson__io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_Bson_FindOptions_: - -.. _MongoCollection_find_Bson__FindOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`find ` ( - | **Bson** filter, - | :ref:`FindOptions ` options - | ) - - - - - * - Finds all documents in the collection that match the given filter using :ref:`FindOptions ` to build the query. - - All documents will be delivered in the form of a :ref:`FindIterable ` from which individual elements can be extracted. - - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``options`` - a :ref:`FindOptions ` struct - - - - - - - - - - **Returns** - - an iterable containing the result of the find operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_find_Bson_: - -.. _find_Bson_: - -.. _MongoCollection_find_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`find ` ( - | **Bson** filter - | ) - - - - - * - Finds all documents in the collection that match the given filter.All documents will be delivered in the form of a :ref:`FindIterable ` from which individual elements can be extracted. - - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - - - - **Returns** - - an iterable containing the result of the find operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_find_java_lang_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_java_lang_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_java_lang_Class_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_java_lang_Class__FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Class_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Class__FindOptions_: - -.. _find_java_lang_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_java_lang_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_java_lang_Class_FindOptions_: - -.. _find_java_lang_Class__FindOptions_: - -.. _find_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_Class_FindOptions_: - -.. _find_Class__FindOptions_: - -.. _MongoCollection_find_java_lang_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_java_lang_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_java_lang_Class_FindOptions_: - -.. _MongoCollection_find_java_lang_Class__FindOptions_: - -.. _MongoCollection_find_Class_io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_Class__io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_Class_FindOptions_: - -.. _MongoCollection_find_Class__FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Class_ResultT___FindOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`find ` <**ResultT** >( - | `java.lang.Class\ `__ resultClass, - | :ref:`FindOptions ` options - | ) - - - - - * - Finds all documents in the collection specifying an output class and also using :ref:`FindOptions ` to build the query. - - All documents will be delivered in the form of a :ref:`FindIterable ` from which individual elements can be extracted. - - - - - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``resultClass`` - the class to decode each document into - - - - - ``options`` - a :ref:`FindOptions ` struct for building the query - - - - - - - - - - **Returns** - - an iterable containing the result of the find operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_find_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Class_: - -.. _find_java_lang_Class_: - -.. _find_Class_: - -.. _MongoCollection_find_java_lang_Class_: - -.. _MongoCollection_find_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`find ` <**ResultT** >( - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds all documents in the collection specifying an output class.All documents will be delivered in the form of a :ref:`FindIterable ` from which individual elements can be extracted. - - - - - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - an iterable containing the result of the find operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_find_io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_find_FindOptions_: - -.. _find_io_realm_mongodb_mongo_options_FindOptions_: - -.. _find_FindOptions_: - -.. _MongoCollection_find_io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_find_FindOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`find ` ( - | :ref:`FindOptions ` options - | ) - - - - - * - Finds all documents in the collection using :ref:`FindOptions ` to build the query. - - All documents will be delivered in the form of a :ref:`FindIterable ` from which individual elements can be extracted. - - - - - - - - - **Parameters** - - - ``options`` - a :ref:`FindOptions ` struct for building the query - - - - - - - - - - **Returns** - - an iterable containing the result of the find operation - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`find ` () - | - - - - - * - Finds all documents in the collection.All documents will be delivered in the form of a :ref:`FindIterable ` from which individual elements can be extracted. - - - - - - - - - - - **Returns** - - an iterable containing the result of the find operation - - - - - - - - - - - -.. _findOne: - -.. _findOne__: - -.. _MongoCollection_findOne: - -.. _MongoCollection_findOne__: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne__: - - - -findOne -------- - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__io_realm_mongodb_mongo_options_FindOptions__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__io_realm_mongodb_mongo_options_FindOptions__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_FindOptions_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__FindOptions__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_FindOptions_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__FindOptions__Class_: - -.. _findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_java_lang_Class_: - -.. _findOne_Bson__io_realm_mongodb_mongo_options_FindOptions__java_lang_Class_: - -.. _findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_Class_: - -.. _findOne_Bson__io_realm_mongodb_mongo_options_FindOptions__Class_: - -.. _findOne_Bson_FindOptions_java_lang_Class_: - -.. _findOne_Bson__FindOptions__java_lang_Class_: - -.. _findOne_Bson_FindOptions_Class_: - -.. _findOne_Bson__FindOptions__Class_: - -.. _MongoCollection_findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_java_lang_Class_: - -.. _MongoCollection_findOne_Bson__io_realm_mongodb_mongo_options_FindOptions__java_lang_Class_: - -.. _MongoCollection_findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_Class_: - -.. _MongoCollection_findOne_Bson__io_realm_mongodb_mongo_options_FindOptions__Class_: - -.. _MongoCollection_findOne_Bson_FindOptions_java_lang_Class_: - -.. _MongoCollection_findOne_Bson__FindOptions__java_lang_Class_: - -.. _MongoCollection_findOne_Bson_FindOptions_Class_: - -.. _MongoCollection_findOne_Bson__FindOptions__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__FindOptions__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOne ` <**ResultT** >( - | **Bson** filter, - | :ref:`FindOptions ` options, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection. - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``options`` - a :ref:`FindOptions ` struct - - - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the result of the find one operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__io_realm_mongodb_mongo_options_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_FindOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__FindOptions_: - -.. _findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_: - -.. _findOne_Bson__io_realm_mongodb_mongo_options_FindOptions_: - -.. _findOne_Bson_FindOptions_: - -.. _findOne_Bson__FindOptions_: - -.. _MongoCollection_findOne_Bson_io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_findOne_Bson__io_realm_mongodb_mongo_options_FindOptions_: - -.. _MongoCollection_findOne_Bson_FindOptions_: - -.. _MongoCollection_findOne_Bson__FindOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOne ` ( - | **Bson** filter, - | :ref:`FindOptions ` options - | ) - - - - - * - Finds a document in the collection. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``options`` - a :ref:`FindOptions ` struct - - - - - - - - - - **Returns** - - a task containing the result of the find one operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__Class_: - -.. _findOne_Bson_java_lang_Class_: - -.. _findOne_Bson__java_lang_Class_: - -.. _findOne_Bson_Class_: - -.. _findOne_Bson__Class_: - -.. _MongoCollection_findOne_Bson_java_lang_Class_: - -.. _MongoCollection_findOne_Bson__java_lang_Class_: - -.. _MongoCollection_findOne_Bson_Class_: - -.. _MongoCollection_findOne_Bson__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOne ` <**ResultT** >( - | **Bson** filter, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection. - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the result of the find one operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Bson_: - -.. _findOne_Bson_: - -.. _MongoCollection_findOne_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOne ` ( - | **Bson** filter - | ) - - - - - * - Finds a document in the collection. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - - - - **Returns** - - a task containing the result of the find one operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Class_: - -.. _findOne_java_lang_Class_: - -.. _findOne_Class_: - -.. _MongoCollection_findOne_java_lang_Class_: - -.. _MongoCollection_findOne_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOne_Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOne ` <**ResultT** >( - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection. - - - **Type Parameters** - - - ``ResultT`` - the target document type - - - - - - - - **Parameters** - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the result of the find one operation - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOne ` () - | - - - - - * - Finds a document in the collection. - - - - - - - **Returns** - - a task containing the result of the find one operation - - - - - - - - - - - -.. _findOneAndDelete: - -.. _findOneAndDelete__: - -.. _MongoCollection_findOneAndDelete: - -.. _MongoCollection_findOneAndDelete__: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete__: - - - -findOneAndDelete ----------------- - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_FindOneAndModifyOptions_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__FindOneAndModifyOptions__Class_: - -.. _findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _findOneAndDelete_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _findOneAndDelete_Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _findOneAndDelete_Bson_FindOneAndModifyOptions_Class_: - -.. _findOneAndDelete_Bson__FindOneAndModifyOptions__Class_: - -.. _MongoCollection_findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _MongoCollection_findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _MongoCollection_findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _MongoCollection_findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _MongoCollection_findOneAndDelete_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _MongoCollection_findOneAndDelete_Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _MongoCollection_findOneAndDelete_Bson_FindOneAndModifyOptions_Class_: - -.. _MongoCollection_findOneAndDelete_Bson__FindOneAndModifyOptions__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__FindOneAndModifyOptions__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndDelete ` <**ResultT** >( - | **Bson** filter, - | :ref:`FindOneAndModifyOptions ` options, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection and delete it. - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``options`` - a :ref:`FindOneAndModifyOptions ` struct - - - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__FindOneAndModifyOptions_: - -.. _findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _findOneAndDelete_Bson_FindOneAndModifyOptions_: - -.. _findOneAndDelete_Bson__FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndDelete_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndDelete_Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndDelete_Bson_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndDelete_Bson__FindOneAndModifyOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndDelete ` ( - | **Bson** filter, - | :ref:`FindOneAndModifyOptions ` options - | ) - - - - - * - Finds a document in the collection and delete it. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``options`` - a :ref:`FindOneAndModifyOptions ` struct - - - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__Class_: - -.. _findOneAndDelete_Bson_java_lang_Class_: - -.. _findOneAndDelete_Bson__java_lang_Class_: - -.. _findOneAndDelete_Bson_Class_: - -.. _findOneAndDelete_Bson__Class_: - -.. _MongoCollection_findOneAndDelete_Bson_java_lang_Class_: - -.. _MongoCollection_findOneAndDelete_Bson__java_lang_Class_: - -.. _MongoCollection_findOneAndDelete_Bson_Class_: - -.. _MongoCollection_findOneAndDelete_Bson__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndDelete ` <**ResultT** >( - | **Bson** filter, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection and delete it. - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndDelete_Bson_: - -.. _findOneAndDelete_Bson_: - -.. _MongoCollection_findOneAndDelete_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndDelete ` ( - | **Bson** filter - | ) - - - - - * - Finds a document in the collection and delete it. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - - - -.. _findOneAndReplace: - -.. _findOneAndReplace__: - -.. _MongoCollection_findOneAndReplace: - -.. _MongoCollection_findOneAndReplace__: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace__: - - - -findOneAndReplace ------------------ - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__FindOneAndModifyOptions__Class_: - -.. _findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _findOneAndReplace_Bson__Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_Class_: - -.. _findOneAndReplace_Bson__Bson__FindOneAndModifyOptions__Class_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_Class_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson__FindOneAndModifyOptions__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__FindOneAndModifyOptions__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndReplace ` <**ResultT** >( - | **Bson** filter, - | **Bson** replacement, - | :ref:`FindOneAndModifyOptions ` options, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection and replaces it with the given document. - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``replacement`` - the document to replace the matched document with - - - - - ``options`` - a :ref:`FindOneAndModifyOptions ` struct - - - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__FindOneAndModifyOptions_: - -.. _findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_: - -.. _findOneAndReplace_Bson__Bson__FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson__FindOneAndModifyOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndReplace ` ( - | **Bson** filter, - | **Bson** replacement, - | :ref:`FindOneAndModifyOptions ` options - | ) - - - - - * - Finds a document in the collection and replaces it with the given document. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``replacement`` - the document to replace the matched document with - - - - - ``options`` - a :ref:`FindOneAndModifyOptions ` struct - - - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__Class_: - -.. _findOneAndReplace_Bson_Bson_java_lang_Class_: - -.. _findOneAndReplace_Bson__Bson__java_lang_Class_: - -.. _findOneAndReplace_Bson_Bson_Class_: - -.. _findOneAndReplace_Bson__Bson__Class_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_java_lang_Class_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson__java_lang_Class_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_Class_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndReplace ` <**ResultT** >( - | **Bson** filter, - | **Bson** replacement, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection and replaces it with the given document. - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``replacement`` - the document to replace the matched document with - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson_Bson_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndReplace_Bson__Bson_: - -.. _findOneAndReplace_Bson_Bson_: - -.. _findOneAndReplace_Bson__Bson_: - -.. _MongoCollection_findOneAndReplace_Bson_Bson_: - -.. _MongoCollection_findOneAndReplace_Bson__Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndReplace ` ( - | **Bson** filter, - | **Bson** replacement - | ) - - - - - * - Finds a document in the collection and replaces it with the given document. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``replacement`` - the document to replace the matched document with - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - - - -.. _findOneAndUpdate: - -.. _findOneAndUpdate__: - -.. _MongoCollection_findOneAndUpdate: - -.. _MongoCollection_findOneAndUpdate__: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate__: - - - -findOneAndUpdate ----------------- - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions__Class_: - -.. _findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_Class_: - -.. _findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions__Class_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_java_lang_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__java_lang_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions__Class_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_java_lang_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions__java_lang_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndUpdate ` <**ResultT** >( - | **Bson** filter, - | **Bson** update, - | :ref:`FindOneAndModifyOptions ` options, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection and performs the given update. - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``update`` - the update document - - - - - ``options`` - a :ref:`FindOneAndModifyOptions ` struct - - - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions_: - -.. _findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_: - -.. _findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson__io_realm_mongodb_mongo_options_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_FindOneAndModifyOptions_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson__FindOneAndModifyOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndUpdate ` ( - | **Bson** filter, - | **Bson** update, - | :ref:`FindOneAndModifyOptions ` options - | ) - - - - - * - Finds a document in the collection and performs the given update. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``update`` - the update document - - - - - ``options`` - a :ref:`FindOneAndModifyOptions ` struct - - - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__Class_: - -.. _findOneAndUpdate_Bson_Bson_java_lang_Class_: - -.. _findOneAndUpdate_Bson__Bson__java_lang_Class_: - -.. _findOneAndUpdate_Bson_Bson_Class_: - -.. _findOneAndUpdate_Bson__Bson__Class_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_java_lang_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson__java_lang_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_Class_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson__Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson__Class_ResultT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndUpdate ` <**ResultT** >( - | **Bson** filter, - | **Bson** update, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - Finds a document in the collection and performs the given update. - - - **Type Parameters** - - - ``ResultT`` - the target document type of the iterable. - - - - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``update`` - the update document - - - - - ``resultClass`` - the class to decode each document into - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson_Bson_: - -.. _io_realm_mongodb_mongo_MongoCollection_findOneAndUpdate_Bson__Bson_: - -.. _findOneAndUpdate_Bson_Bson_: - -.. _findOneAndUpdate_Bson__Bson_: - -.. _MongoCollection_findOneAndUpdate_Bson_Bson_: - -.. _MongoCollection_findOneAndUpdate_Bson__Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`findOneAndUpdate ` ( - | **Bson** filter, - | **Bson** update - | ) - - - - - * - Finds a document in the collection and performs the given update. - - - - - **Parameters** - - - ``filter`` - the query filter - - - - - ``update`` - the update document - - - - - - - - **Returns** - - a task containing the resulting document - - - - - - - - - - - -.. _getCodecRegistry: - -.. _getCodecRegistry__: - -.. _MongoCollection_getCodecRegistry: - -.. _MongoCollection_getCodecRegistry__: - -.. _io_realm_mongodb_mongo_MongoCollection_getCodecRegistry: - -.. _io_realm_mongodb_mongo_MongoCollection_getCodecRegistry__: - - - -getCodecRegistry ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **CodecRegistry** :ref:`getCodecRegistry ` () - | - - - - - * - Gets the codec registry for the MongoCollection. - - - - - - - **Returns** - - the **CodecRegistry** for this collection - - - - - - - - - - - - - -.. _getDocumentClass: - -.. _getDocumentClass__: - -.. _MongoCollection_getDocumentClass: - -.. _MongoCollection_getDocumentClass__: - -.. _io_realm_mongodb_mongo_MongoCollection_getDocumentClass: - -.. _io_realm_mongodb_mongo_MongoCollection_getDocumentClass__: - - - -getDocumentClass ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Class `__ :ref:`getDocumentClass ` () - | - - - - - * - Gets the class of documents stored in this collection.If you used the simple :ref:`MongoDatabase.getCollection(String) ` to get this collection, this is `org.bson.Document `__ . - - - - - - - - - - - **Returns** - - the class of documents in this collection - - - - - - - - - - - -.. _getName: - -.. _getName__: - -.. _MongoCollection_getName: - -.. _MongoCollection_getName__: - -.. _io_realm_mongodb_mongo_MongoCollection_getName: - -.. _io_realm_mongodb_mongo_MongoCollection_getName__: - - - -getName -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getName ` () - | - - - - - * - Gets the name of this collection - - - - - - - **Returns** - - the name - - - - - - - - - - - -.. _getNamespace: - -.. _getNamespace__: - -.. _MongoCollection_getNamespace: - -.. _MongoCollection_getNamespace__: - -.. _io_realm_mongodb_mongo_MongoCollection_getNamespace: - -.. _io_realm_mongodb_mongo_MongoCollection_getNamespace__: - - - -getNamespace ------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`MongoNamespace ` :ref:`getNamespace ` () - | - - - - - * - Gets the namespace of this collection, i.e. the database and collection names together. - - - - - - - **Returns** - - the namespace - - - - - - - - - - - -.. _insertMany: - -.. _insertMany__: - -.. _MongoCollection_insertMany: - -.. _MongoCollection_insertMany__: - -.. _io_realm_mongodb_mongo_MongoCollection_insertMany: - -.. _io_realm_mongodb_mongo_MongoCollection_insertMany__: - - - -insertMany ----------- - -.. _io_realm_mongodb_mongo_MongoCollection_insertMany_java_util_List_: - -.. _io_realm_mongodb_mongo_MongoCollection_insertMany_List_: - -.. _io_realm_mongodb_mongo_MongoCollection_insertMany_List___extends_DocumentT__: - -.. _insertMany_java_util_List_: - -.. _insertMany_List_: - -.. _insertMany_List___extends_DocumentT__: - -.. _MongoCollection_insertMany_java_util_List_: - -.. _MongoCollection_insertMany_List_: - -.. _MongoCollection_insertMany_List___extends_DocumentT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`insertMany ` ( - | `java.util.List\ `__ documents - | ) - - - - - * - Inserts one or more documents. - - - - - **Parameters** - - - ``documents`` - the documents to insert - - - - - - - - **Returns** - - a task containing the result of the insert many operation - - - - - - - - - - - -.. _insertOne: - -.. _insertOne__: - -.. _MongoCollection_insertOne: - -.. _MongoCollection_insertOne__: - -.. _io_realm_mongodb_mongo_MongoCollection_insertOne: - -.. _io_realm_mongodb_mongo_MongoCollection_insertOne__: - - - -insertOne ---------- - -.. _io_realm_mongodb_mongo_MongoCollection_insertOne_DocumentT_: - -.. _insertOne_DocumentT_: - -.. _MongoCollection_insertOne_DocumentT_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`insertOne ` ( - | **DocumentT** document - | ) - - - - - * - Inserts the provided document. If the document is missing an identifier, the client should generate one. - - - - - **Parameters** - - - ``document`` - the document to insert - - - - - - - - **Returns** - - a task containing the result of the insert one operation - - - - - - - - - - - -.. _updateMany: - -.. _updateMany__: - -.. _MongoCollection_updateMany: - -.. _MongoCollection_updateMany__: - -.. _io_realm_mongodb_mongo_MongoCollection_updateMany: - -.. _io_realm_mongodb_mongo_MongoCollection_updateMany__: - - - -updateMany ----------- - -.. _io_realm_mongodb_mongo_MongoCollection_updateMany_Bson_Bson_io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_updateMany_Bson__Bson__io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_updateMany_Bson_Bson_UpdateOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_updateMany_Bson__Bson__UpdateOptions_: - -.. _updateMany_Bson_Bson_io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _updateMany_Bson__Bson__io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _updateMany_Bson_Bson_UpdateOptions_: - -.. _updateMany_Bson__Bson__UpdateOptions_: - -.. _MongoCollection_updateMany_Bson_Bson_io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _MongoCollection_updateMany_Bson__Bson__io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _MongoCollection_updateMany_Bson_Bson_UpdateOptions_: - -.. _MongoCollection_updateMany_Bson__Bson__UpdateOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`updateMany ` ( - | **Bson** filter, - | **Bson** update, - | :ref:`UpdateOptions ` updateOptions - | ) - - - - - * - Update all documents in the collection according to the specified arguments. - - - - - **Parameters** - - - ``filter`` - a document describing the query filter, which may not be null. - - - - - ``update`` - a document describing the update, which may not be null. The update to apply must include only update operators. - - - - - ``updateOptions`` - the options to apply to the update operation - - - - - - - - **Returns** - - a task containing the result of the update many operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_updateMany_Bson_Bson_: - -.. _io_realm_mongodb_mongo_MongoCollection_updateMany_Bson__Bson_: - -.. _updateMany_Bson_Bson_: - -.. _updateMany_Bson__Bson_: - -.. _MongoCollection_updateMany_Bson_Bson_: - -.. _MongoCollection_updateMany_Bson__Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`updateMany ` ( - | **Bson** filter, - | **Bson** update - | ) - - - - - * - Update all documents in the collection according to the specified arguments. - - - - - **Parameters** - - - ``filter`` - a document describing the query filter, which may not be null. - - - - - ``update`` - a document describing the update, which may not be null. The update to apply must include only update operators. - - - - - - - - **Returns** - - a task containing the result of the update many operation - - - - - - - - - - - -.. _updateOne: - -.. _updateOne__: - -.. _MongoCollection_updateOne: - -.. _MongoCollection_updateOne__: - -.. _io_realm_mongodb_mongo_MongoCollection_updateOne: - -.. _io_realm_mongodb_mongo_MongoCollection_updateOne__: - - - -updateOne ---------- - -.. _io_realm_mongodb_mongo_MongoCollection_updateOne_Bson_Bson_io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_updateOne_Bson__Bson__io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_updateOne_Bson_Bson_UpdateOptions_: - -.. _io_realm_mongodb_mongo_MongoCollection_updateOne_Bson__Bson__UpdateOptions_: - -.. _updateOne_Bson_Bson_io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _updateOne_Bson__Bson__io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _updateOne_Bson_Bson_UpdateOptions_: - -.. _updateOne_Bson__Bson__UpdateOptions_: - -.. _MongoCollection_updateOne_Bson_Bson_io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _MongoCollection_updateOne_Bson__Bson__io_realm_mongodb_mongo_options_UpdateOptions_: - -.. _MongoCollection_updateOne_Bson_Bson_UpdateOptions_: - -.. _MongoCollection_updateOne_Bson__Bson__UpdateOptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`updateOne ` ( - | **Bson** filter, - | **Bson** update, - | :ref:`UpdateOptions ` updateOptions - | ) - - - - - * - Update a single document in the collection according to the specified arguments. - - - - - **Parameters** - - - ``filter`` - a document describing the query filter, which may not be null. - - - - - ``update`` - a document describing the update, which may not be null. The update to apply must include only update operators. - - - - - ``updateOptions`` - the options to apply to the update operation - - - - - - - - **Returns** - - a task containing the result of the update one operation - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_updateOne_Bson_Bson_: - -.. _io_realm_mongodb_mongo_MongoCollection_updateOne_Bson__Bson_: - -.. _updateOne_Bson_Bson_: - -.. _updateOne_Bson__Bson_: - -.. _MongoCollection_updateOne_Bson_Bson_: - -.. _MongoCollection_updateOne_Bson__Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`updateOne ` ( - | **Bson** filter, - | **Bson** update - | ) - - - - - * - Update a single document in the collection according to the specified arguments. - - - - - **Parameters** - - - ``filter`` - a document describing the query filter, which may not be null. - - - - - ``update`` - a document describing the update, which may not be null. The update to apply must include only update operators. - - - - - - - - **Returns** - - a task containing the result of the update one operation - - - - - - - - - - - -.. _watch: - -.. _watch__: - -.. _MongoCollection_watch: - -.. _MongoCollection_watch__: - -.. _io_realm_mongodb_mongo_MongoCollection_watch: - -.. _io_realm_mongodb_mongo_MongoCollection_watch__: - - - -watch ------ - -.. _io_realm_mongodb_mongo_MongoCollection_watch_ObjectId_: - -.. _io_realm_mongodb_mongo_MongoCollection_watch_ObjectId____: - -.. _watch_ObjectId_: - -.. _watch_ObjectId____: - -.. _MongoCollection_watch_ObjectId_: - -.. _MongoCollection_watch_ObjectId____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamTask ` :ref:`watch ` ( - | **ObjectId[]** ids - | ) - - - - - * - Watches specified IDs in a collection. This convenience overload supports the use case of non-**BsonValue** instances of **ObjectId** by wrapping them in **BsonObjectId** instances for the user. - - - - - - - **Parameters** - - - ``ids`` - unique object identifiers of the IDs to watch. - - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_watch_BsonValue_: - -.. _io_realm_mongodb_mongo_MongoCollection_watch_BsonValue____: - -.. _watch_BsonValue_: - -.. _watch_BsonValue____: - -.. _MongoCollection_watch_BsonValue_: - -.. _MongoCollection_watch_BsonValue____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamTask ` :ref:`watch ` ( - | **BsonValue[]** ids - | ) - - - - - * - Watches specified IDs in a collection. - - - - - **Parameters** - - - ``ids`` - the ids to watch. - - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamTask ` :ref:`watch ` () - | - - - - - * - Watches a collection. The resulting stream will be notified of all events on this collection that the active user is authorized to see based on the configured MongoDB Realm rules. - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - - - -.. _watchAsync: - -.. _watchAsync__: - -.. _MongoCollection_watchAsync: - -.. _MongoCollection_watchAsync__: - -.. _io_realm_mongodb_mongo_MongoCollection_watchAsync: - -.. _io_realm_mongodb_mongo_MongoCollection_watchAsync__: - - - -watchAsync ----------- - -.. _io_realm_mongodb_mongo_MongoCollection_watchAsync_ObjectId_: - -.. _io_realm_mongodb_mongo_MongoCollection_watchAsync_ObjectId____: - -.. _watchAsync_ObjectId_: - -.. _watchAsync_ObjectId____: - -.. _MongoCollection_watchAsync_ObjectId_: - -.. _MongoCollection_watchAsync_ObjectId____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamAsyncTask ` :ref:`watchAsync ` ( - | **ObjectId[]** ids - | ) - - - - - * - Watches specified IDs in a collection asynchronously. This convenience overload supports the use case of non-**BsonValue** instances of **ObjectId** by wrapping them in **BsonObjectId** instances for the user. - - - - - - - **Parameters** - - - ``ids`` - unique object identifiers of the IDs to watch. - - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_watchAsync_BsonValue_: - -.. _io_realm_mongodb_mongo_MongoCollection_watchAsync_BsonValue____: - -.. _watchAsync_BsonValue_: - -.. _watchAsync_BsonValue____: - -.. _MongoCollection_watchAsync_BsonValue_: - -.. _MongoCollection_watchAsync_BsonValue____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamAsyncTask ` :ref:`watchAsync ` ( - | **BsonValue[]** ids - | ) - - - - - * - Watches specified IDs in a collection asynchronously. - - - - - **Parameters** - - - ``ids`` - the ids to watch. - - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamAsyncTask ` :ref:`watchAsync ` () - | - - - - - * - Watches a collection asynchronously. The resulting stream will be notified of all events on this collection that the active user is authorized to see based on the configured MongoDB Realm rules. - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - - - -.. _watchWithFilter: - -.. _watchWithFilter__: - -.. _MongoCollection_watchWithFilter: - -.. _MongoCollection_watchWithFilter__: - -.. _io_realm_mongodb_mongo_MongoCollection_watchWithFilter: - -.. _io_realm_mongodb_mongo_MongoCollection_watchWithFilter__: - - - -watchWithFilter ---------------- - -.. _io_realm_mongodb_mongo_MongoCollection_watchWithFilter_BsonDocument_: - -.. _watchWithFilter_BsonDocument_: - -.. _MongoCollection_watchWithFilter_BsonDocument_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamTask ` :ref:`watchWithFilter ` ( - | **BsonDocument** matchFilter - | ) - - - - - * - Watches a collection. The provided BSON document will be used as a match expression filter on the change events coming from the stream.See `how to define a match filter `__ . - - Defining the match expression to filter ChangeEvents is similar to `how to define the match expression for triggers `__ - - - - - - - **Parameters** - - - ``matchFilter`` - the $match filter to apply to incoming change events - - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_watchWithFilter_Document_: - -.. _watchWithFilter_Document_: - -.. _MongoCollection_watchWithFilter_Document_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamTask ` :ref:`watchWithFilter ` ( - | **Document** matchFilter - | ) - - - - - * - Watches a collection. The provided document will be used as a match expression filter on the change events coming from the stream. This convenience overload supports the use of non-**BsonDocument** instances for the user. - - See `how to define a match filter `__ . - - Defining the match expression to filter ChangeEvents is similar to `how to define the match expression for triggers `__ - - - - - - - **Parameters** - - - ``matchFilter`` - the $match filter to apply to incoming change events - - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - - - -.. _watchWithFilterAsync: - -.. _watchWithFilterAsync__: - -.. _MongoCollection_watchWithFilterAsync: - -.. _MongoCollection_watchWithFilterAsync__: - -.. _io_realm_mongodb_mongo_MongoCollection_watchWithFilterAsync: - -.. _io_realm_mongodb_mongo_MongoCollection_watchWithFilterAsync__: - - - -watchWithFilterAsync --------------------- - -.. _io_realm_mongodb_mongo_MongoCollection_watchWithFilterAsync_BsonDocument_: - -.. _watchWithFilterAsync_BsonDocument_: - -.. _MongoCollection_watchWithFilterAsync_BsonDocument_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamAsyncTask ` :ref:`watchWithFilterAsync ` ( - | **BsonDocument** matchFilter - | ) - - - - - * - Watches a collection asynchronously. The provided BSON document will be used as a match expression filter on the change events coming from the stream.See `how to define a match filter `__ . - - Defining the match expression to filter ChangeEvents is similar to `how to define the match expression for triggers `__ - - - - - - - **Parameters** - - - ``matchFilter`` - the $match filter to apply to incoming change events - - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoCollection_watchWithFilterAsync_Document_: - -.. _watchWithFilterAsync_Document_: - -.. _MongoCollection_watchWithFilterAsync_Document_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmEventStreamAsyncTask ` :ref:`watchWithFilterAsync ` ( - | **Document** matchFilter - | ) - - - - - * - Watches a collection asynchronously. The provided document will be used as a match expression filter on the change events coming from the stream. This convenience overload supports the use of non-**BsonDocument** instances for the user. - - See `how to define a match filter `__ . - - Defining the match expression to filter ChangeEvents is similar to `how to define the match expression for triggers `__ - - - - - - - **Parameters** - - - ``matchFilter`` - the $match filter to apply to incoming change events - - - - - - - - **Returns** - - a task that provides access to the stream of change events. - - - - - - - - - - - -.. _withCodecRegistry: - -.. _withCodecRegistry__: - -.. _MongoCollection_withCodecRegistry: - -.. _MongoCollection_withCodecRegistry__: - -.. _io_realm_mongodb_mongo_MongoCollection_withCodecRegistry: - -.. _io_realm_mongodb_mongo_MongoCollection_withCodecRegistry__: - - - -withCodecRegistry ------------------ - -.. _io_realm_mongodb_mongo_MongoCollection_withCodecRegistry_CodecRegistry_: - -.. _withCodecRegistry_CodecRegistry_: - -.. _MongoCollection_withCodecRegistry_CodecRegistry_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`MongoCollection ` :ref:`withCodecRegistry ` ( - | **CodecRegistry** codecRegistry - | ) - - - - - * - Creates a new MongoCollection instance with a different codec registry. - - - - - **Parameters** - - - ``codecRegistry`` - the new **CodecRegistry** for the collection. - - - - - - - - - - **Returns** - - a new MongoCollection instance with the different codec registry - - - - - - - - - - - -.. _withDocumentClass: - -.. _withDocumentClass__: - -.. _MongoCollection_withDocumentClass: - -.. _MongoCollection_withDocumentClass__: - -.. _io_realm_mongodb_mongo_MongoCollection_withDocumentClass: - -.. _io_realm_mongodb_mongo_MongoCollection_withDocumentClass__: - - - -withDocumentClass ------------------ - -.. _io_realm_mongodb_mongo_MongoCollection_withDocumentClass_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_withDocumentClass_Class_: - -.. _withDocumentClass_java_lang_Class_: - -.. _withDocumentClass_Class_: - -.. _MongoCollection_withDocumentClass_java_lang_Class_: - -.. _MongoCollection_withDocumentClass_Class_: - -.. _io_realm_mongodb_mongo_MongoCollection_withDocumentClass_Class_NewDocumentT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`MongoCollection ` :ref:`withDocumentClass ` <**NewDocumentT** >( - | `java.lang.Class\ `__ clazz - | ) - - - - - * - Creates a new MongoCollection instance with a different default class to cast any documents returned from the database into. - - - **Type Parameters** - - - ``NewDocumentT`` - The type that the new collection will encode documents from and decode documents to. - - - - - - - - **Parameters** - - - ``clazz`` - the default class to which any documents returned from the database will be cast. - - - - - - - - **Returns** - - a new MongoCollection instance with the different default class - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoDatabase.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoDatabase.txt deleted file mode 100644 index 80d4b31894..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoDatabase.txt +++ /dev/null @@ -1,305 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class MongoDatabase -^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_MongoDatabase: - - - -io.realm.mongodb.mongo -====================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.MongoDatabase - - -The RemoteMongoDatabase provides access to its **Document** :ref:`MongoCollection ` s. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`MongoCollection ` - - | :ref:`getCollection ` <**DocumentT** >( - | `String `__ collectionName, - | `java.lang.Class\ `__ documentClass - | ) - - - Gets a collection, with a specific default document class. - - - - - * - public :ref:`MongoCollection ` - - | :ref:`getCollection ` ( - | `String `__ collectionName - | ) - - - Gets a collection. - - - - - * - public `String `__ - - | :ref:`getName ` () - | - - - Gets the name of the database. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _getCollection: - -.. _getCollection__: - -.. _MongoDatabase_getCollection: - -.. _MongoDatabase_getCollection__: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection__: - - - -getCollection -------------- - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_java_lang_String_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_java_lang_String__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_java_lang_String_Class_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_java_lang_String__Class_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_String_java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_String__java_lang_Class_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_String_Class_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_String__Class_: - -.. _getCollection_java_lang_String_java_lang_Class_: - -.. _getCollection_java_lang_String__java_lang_Class_: - -.. _getCollection_java_lang_String_Class_: - -.. _getCollection_java_lang_String__Class_: - -.. _getCollection_String_java_lang_Class_: - -.. _getCollection_String__java_lang_Class_: - -.. _getCollection_String_Class_: - -.. _getCollection_String__Class_: - -.. _MongoDatabase_getCollection_java_lang_String_java_lang_Class_: - -.. _MongoDatabase_getCollection_java_lang_String__java_lang_Class_: - -.. _MongoDatabase_getCollection_java_lang_String_Class_: - -.. _MongoDatabase_getCollection_java_lang_String__Class_: - -.. _MongoDatabase_getCollection_String_java_lang_Class_: - -.. _MongoDatabase_getCollection_String__java_lang_Class_: - -.. _MongoDatabase_getCollection_String_Class_: - -.. _MongoDatabase_getCollection_String__Class_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_String__Class_DocumentT__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`MongoCollection ` :ref:`getCollection ` <**DocumentT** >( - | `String `__ collectionName, - | `java.lang.Class\ `__ documentClass - | ) - - - - - * - Gets a collection, with a specific default document class. - - - **Type Parameters** - - - ``DocumentT`` - the type of the class to use instead of ``Document`` . - - - - - - - - - - **Parameters** - - - ``collectionName`` - the name of the collection to return - - - - - ``documentClass`` - the default class to cast any documents returned from the database into. - - - - - - - - **Returns** - - the collection - - - - - - - - - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_java_lang_String_: - -.. _io_realm_mongodb_mongo_MongoDatabase_getCollection_String_: - -.. _getCollection_java_lang_String_: - -.. _getCollection_String_: - -.. _MongoDatabase_getCollection_java_lang_String_: - -.. _MongoDatabase_getCollection_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`MongoCollection ` :ref:`getCollection ` ( - | `String `__ collectionName - | ) - - - - - * - Gets a collection. - - - - - **Parameters** - - - ``collectionName`` - the name of the collection to return - - - - - - - - **Returns** - - the collection - - - - - - - - - - - -.. _getName: - -.. _getName__: - -.. _MongoDatabase_getName: - -.. _MongoDatabase_getName__: - -.. _io_realm_mongodb_mongo_MongoDatabase_getName: - -.. _io_realm_mongodb_mongo_MongoDatabase_getName__: - - - -getName -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getName ` () - | - - - - - * - Gets the name of the database. - - - - - - - **Returns** - - the database name - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoNamespace.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoNamespace.txt deleted file mode 100644 index 8a6f91ace1..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/MongoNamespace.txt +++ /dev/null @@ -1,772 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class MongoNamespace -^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_MongoNamespace: - - - -io.realm.mongodb.mongo -====================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.MongoNamespace - - -A MongoDB namespace, which includes a database name and collection name. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`MongoNamespace ` ( - | `String `__ fullName - | ) - - - Construct an instance for the given full name. - - - - - * - | :ref:`MongoNamespace ` ( - | `String `__ databaseName, - | `String `__ collectionName - | ) - - - Construct an instance from the given database name and collection name. - - - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static final `String `__ - - - - :ref:`COMMAND_COLLECTION_NAME ` - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static **void** - - | :ref:`checkCollectionNameValidity ` ( - | `String `__ collectionName - | ) - - - Check the validity of the given collection name. - - - - - * - public static **void** - - | :ref:`checkDatabaseNameValidity ` ( - | `String `__ databaseName - | ) - - - Check the validity of the given database name. - - - - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public `String `__ - - | :ref:`getCollectionName ` () - | - - - Gets the collection name. - - - - - * - public `String `__ - - | :ref:`getDatabaseName ` () - | - - - Gets the database name. - - - - - * - public `String `__ - - | :ref:`getFullName ` () - | - - - Gets the full name, which is the database name and the collection name, separated by a period. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - Returns the standard MongoDB representation of a namespace, which is ``.`` . - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_mongodb_mongo_MongoNamespace_COMMAND_COLLECTION_NAME: - - - -``COMMAND_COLLECTION_NAME`` ----------------------------- - - - - - - -Constructor Detail -================== - -.. _MongoNamespace: - -.. _MongoNamespace__: - -.. _io_realm_mongodb_mongo_MongoNamespace: - -.. _io_realm_mongodb_mongo_MongoNamespace__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`MongoNamespace ` ( - | `String `__ fullName - | ) - - - - - * - Construct an instance for the given full name. The database name is the string preceding the first ``"."`` character. - - - - - - - **Parameters** - - - ``fullName`` - the non-null full namespace - - - - - - - - - - .. seealso:: - - - - - :ref:`checkDatabaseNameValidity(String) ` - - - - - :ref:`checkCollectionNameValidity(String) ` - - - - - - - - - - - - -.. _MongoNamespace: - -.. _MongoNamespace__: - -.. _io_realm_mongodb_mongo_MongoNamespace: - -.. _io_realm_mongodb_mongo_MongoNamespace__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`MongoNamespace ` ( - | `String `__ databaseName, - | `String `__ collectionName - | ) - - - - - * - Construct an instance from the given database name and collection name. - - - - - **Parameters** - - - ``databaseName`` - the valid database name - - - - - ``collectionName`` - the valid collection name - - - - - - - - - - .. seealso:: - - - - - :ref:`checkDatabaseNameValidity(String) ` - - - - - :ref:`checkCollectionNameValidity(String) ` - - - - - - - - - - - - - - -Method Detail -============= - -.. _checkCollectionNameValidity: - -.. _checkCollectionNameValidity__: - -.. _MongoNamespace_checkCollectionNameValidity: - -.. _MongoNamespace_checkCollectionNameValidity__: - -.. _io_realm_mongodb_mongo_MongoNamespace_checkCollectionNameValidity: - -.. _io_realm_mongodb_mongo_MongoNamespace_checkCollectionNameValidity__: - - - -checkCollectionNameValidity ---------------------------- - -.. _io_realm_mongodb_mongo_MongoNamespace_checkCollectionNameValidity_java_lang_String_: - -.. _io_realm_mongodb_mongo_MongoNamespace_checkCollectionNameValidity_String_: - -.. _checkCollectionNameValidity_java_lang_String_: - -.. _checkCollectionNameValidity_String_: - -.. _MongoNamespace_checkCollectionNameValidity_java_lang_String_: - -.. _MongoNamespace_checkCollectionNameValidity_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`checkCollectionNameValidity ` ( - | `String `__ collectionName - | ) - - - - - * - Check the validity of the given collection name. A valid collection name is non-null and non-empty. The server may impose additional restrictions on collection names. - - - - - **Parameters** - - - ``collectionName`` - the collection name - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the collection name is invalid - - - - - - - - - - - - -.. _checkDatabaseNameValidity: - -.. _checkDatabaseNameValidity__: - -.. _MongoNamespace_checkDatabaseNameValidity: - -.. _MongoNamespace_checkDatabaseNameValidity__: - -.. _io_realm_mongodb_mongo_MongoNamespace_checkDatabaseNameValidity: - -.. _io_realm_mongodb_mongo_MongoNamespace_checkDatabaseNameValidity__: - - - -checkDatabaseNameValidity -------------------------- - -.. _io_realm_mongodb_mongo_MongoNamespace_checkDatabaseNameValidity_java_lang_String_: - -.. _io_realm_mongodb_mongo_MongoNamespace_checkDatabaseNameValidity_String_: - -.. _checkDatabaseNameValidity_java_lang_String_: - -.. _checkDatabaseNameValidity_String_: - -.. _MongoNamespace_checkDatabaseNameValidity_java_lang_String_: - -.. _MongoNamespace_checkDatabaseNameValidity_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static **void** :ref:`checkDatabaseNameValidity ` ( - | `String `__ databaseName - | ) - - - - - * - Check the validity of the given database name. A valid database name is non-null, non-empty, and does not contain any of the following characters: ``'\0', '/', '\\', ' ', '"', '.'`` . The server may impose additional restrictions on database names. - - - - - - - **Parameters** - - - ``databaseName`` - the database name - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the database name is invalid - - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _MongoNamespace_equals: - -.. _MongoNamespace_equals__: - -.. _io_realm_mongodb_mongo_MongoNamespace_equals: - -.. _io_realm_mongodb_mongo_MongoNamespace_equals__: - - - -equals ------- - -.. _io_realm_mongodb_mongo_MongoNamespace_equals_java_lang_Object_: - -.. _io_realm_mongodb_mongo_MongoNamespace_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _MongoNamespace_equals_java_lang_Object_: - -.. _MongoNamespace_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getCollectionName: - -.. _getCollectionName__: - -.. _MongoNamespace_getCollectionName: - -.. _MongoNamespace_getCollectionName__: - -.. _io_realm_mongodb_mongo_MongoNamespace_getCollectionName: - -.. _io_realm_mongodb_mongo_MongoNamespace_getCollectionName__: - - - -getCollectionName ------------------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getCollectionName ` () - | - - - - - * - Gets the collection name. - - - - - - - **Returns** - - the collection name - - - - - - - - - - - -.. _getDatabaseName: - -.. _getDatabaseName__: - -.. _MongoNamespace_getDatabaseName: - -.. _MongoNamespace_getDatabaseName__: - -.. _io_realm_mongodb_mongo_MongoNamespace_getDatabaseName: - -.. _io_realm_mongodb_mongo_MongoNamespace_getDatabaseName__: - - - -getDatabaseName ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getDatabaseName ` () - | - - - - - * - Gets the database name. - - - - - - - **Returns** - - the database name - - - - - - - - - - - -.. _getFullName: - -.. _getFullName__: - -.. _MongoNamespace_getFullName: - -.. _MongoNamespace_getFullName__: - -.. _io_realm_mongodb_mongo_MongoNamespace_getFullName: - -.. _io_realm_mongodb_mongo_MongoNamespace_getFullName__: - - - -getFullName ------------ - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getFullName ` () - | - - - - - * - Gets the full name, which is the database name and the collection name, separated by a period. - - - - - - - **Returns** - - the full name - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _MongoNamespace_hashCode: - -.. _MongoNamespace_hashCode__: - -.. _io_realm_mongodb_mongo_MongoNamespace_hashCode: - -.. _io_realm_mongodb_mongo_MongoNamespace_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _toString: - -.. _toString__: - -.. _MongoNamespace_toString: - -.. _MongoNamespace_toString__: - -.. _io_realm_mongodb_mongo_MongoNamespace_toString: - -.. _io_realm_mongodb_mongo_MongoNamespace_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - Returns the standard MongoDB representation of a namespace, which is ``.`` . - - - - - - - - - **Returns** - - string representation of the namespace. - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/events.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/events.txt deleted file mode 100644 index 3e89a211d5..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/events.txt +++ /dev/null @@ -1,31 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.mongo.events -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - BaseChangeEvent - BaseChangeEvent.OperationType - UpdateDescription - - - -| - -- :ref:`io.realm.mongodb.mongo.events.BaseChangeEvent ` -- :ref:`io.realm.mongodb.mongo.events.BaseChangeEvent.OperationType ` -- :ref:`io.realm.mongodb.mongo.events.UpdateDescription ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt deleted file mode 100644 index 7e7e12256f..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent.txt +++ /dev/null @@ -1,411 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class BaseChangeEvent -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent: - - - -io.realm.mongodb.mongo.events -============================= - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.events.BaseChangeEvent - - -Represents the set of properties that exist on all MongoDB realm change events produced by watch streams in this SDK. Other change event types inherit from this type. - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static final`` - - :ref:`BaseChangeEvent.OperationType ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **BsonDocument** - - | :ref:`getDocumentKey ` () - | - - - The unique identifier for the document that was actually changed. - - - - - * - public **DocumentT** - - | :ref:`getFullDocument ` () - | - - - The full document at some point after the change has been applied. - - - - - * - public :ref:`BaseChangeEvent.OperationType ` - - | :ref:`getOperationType ` () - | - - - Returns the operation type of the change that triggered the change event. - - - - - * - public :ref:`UpdateDescription ` - - | :ref:`getUpdateDescription ` () - | - - - In the case of an update, the description of which fields have been added, removed or updated. - - - - - * - public **boolean** - - | :ref:`hasUncommittedWrites ` () - | - - - Indicates a local change event that has not yet been synchronized with a remote data store. - - - - - * - public abstract **BsonDocument** - - | :ref:`toBsonDocument ` () - | - - - Converts the change event to a BSON representation, as it would look on a MongoDB realm change stream, or a Realm compact watch stream. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _getDocumentKey: - -.. _getDocumentKey__: - -.. _BaseChangeEvent_getDocumentKey: - -.. _BaseChangeEvent_getDocumentKey__: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_getDocumentKey: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_getDocumentKey__: - - - -getDocumentKey --------------- - -.. list-table:: - :header-rows: 1 - - * - | public **BsonDocument** :ref:`getDocumentKey ` () - | - - - - - * - The unique identifier for the document that was actually changed. - - - - - - - **Returns** - - the document key. - - - - - - - - - - - -.. _getFullDocument: - -.. _getFullDocument__: - -.. _BaseChangeEvent_getFullDocument: - -.. _BaseChangeEvent_getFullDocument__: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_getFullDocument: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_getFullDocument__: - - - -getFullDocument ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public **DocumentT** :ref:`getFullDocument ` () - | - - - - - * - The full document at some point after the change has been applied. - - - - - - - **Returns** - - the full document. - - - - - - - - - - - -.. _getOperationType: - -.. _getOperationType__: - -.. _BaseChangeEvent_getOperationType: - -.. _BaseChangeEvent_getOperationType__: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_getOperationType: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_getOperationType__: - - - -getOperationType ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`BaseChangeEvent.OperationType ` :ref:`getOperationType ` () - | - - - - - * - Returns the operation type of the change that triggered the change event. - - - - - - - **Returns** - - the operation type of this change event. - - - - - - - - - - - -.. _getUpdateDescription: - -.. _getUpdateDescription__: - -.. _BaseChangeEvent_getUpdateDescription: - -.. _BaseChangeEvent_getUpdateDescription__: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_getUpdateDescription: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_getUpdateDescription__: - - - -getUpdateDescription --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`UpdateDescription ` :ref:`getUpdateDescription ` () - | - - - - - * - In the case of an update, the description of which fields have been added, removed or updated. - - - - - - - **Returns** - - the update description. - - - - - - - - - - - -.. _hasUncommittedWrites: - -.. _hasUncommittedWrites__: - -.. _BaseChangeEvent_hasUncommittedWrites: - -.. _BaseChangeEvent_hasUncommittedWrites__: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_hasUncommittedWrites: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_hasUncommittedWrites__: - - - -hasUncommittedWrites --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`hasUncommittedWrites ` () - | - - - - - * - Indicates a local change event that has not yet been synchronized with a remote data store. Used only for the sync use case. - - - - - - - **Returns** - - whether or not this change event represents uncommitted writes. - - - - - - - - - - - -.. _toBsonDocument: - -.. _toBsonDocument__: - -.. _BaseChangeEvent_toBsonDocument: - -.. _BaseChangeEvent_toBsonDocument__: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_toBsonDocument: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_toBsonDocument__: - - - -toBsonDocument --------------- - -.. list-table:: - :header-rows: 1 - - * - | public abstract **BsonDocument** :ref:`toBsonDocument ` () - | - - - - - * - Converts the change event to a BSON representation, as it would look on a MongoDB realm change stream, or a Realm compact watch stream. - - - - - - - **Returns** - - The BSON document representation of the change event. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt deleted file mode 100644 index 96f73a06b4..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/BaseChangeEvent/OperationType.txt +++ /dev/null @@ -1,315 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum BaseChangeEvent.OperationType -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType: - - - -io.realm.mongodb.mongo.events -============================= - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.mongo.events.BaseChangeEvent.OperationType - - - - -**Enclosing class:** - -:ref:`BaseChangeEvent ` - - - -Represents the different MongoDB operations that can occur. - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`DELETE ` - - - - - - - * - :ref:`INSERT ` - - - - - - - * - :ref:`REPLACE ` - - - - - - - * - :ref:`UNKNOWN ` - - - - - - - * - :ref:`UPDATE ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`BaseChangeEvent.OperationType ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`BaseChangeEvent.OperationType ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_DELETE: - -.. _BaseChangeEvent_OperationType_DELETE: - - - -``DELETE`` ------------ - -public static final :ref:`BaseChangeEvent.OperationType ` - - - - - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_INSERT: - -.. _BaseChangeEvent_OperationType_INSERT: - - - -``INSERT`` ------------ - -public static final :ref:`BaseChangeEvent.OperationType ` - - - - - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_REPLACE: - -.. _BaseChangeEvent_OperationType_REPLACE: - - - -``REPLACE`` ------------- - -public static final :ref:`BaseChangeEvent.OperationType ` - - - - - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_UNKNOWN: - -.. _BaseChangeEvent_OperationType_UNKNOWN: - - - -``UNKNOWN`` ------------- - -public static final :ref:`BaseChangeEvent.OperationType ` - - - - - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_UPDATE: - -.. _BaseChangeEvent_OperationType_UPDATE: - - - -``UPDATE`` ------------ - -public static final :ref:`BaseChangeEvent.OperationType ` - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _OperationType_valueOf: - -.. _OperationType_valueOf__: - -.. _BaseChangeEvent_OperationType_valueOf: - -.. _BaseChangeEvent_OperationType_valueOf__: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_valueOf: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_valueOf_java_lang_String_: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _BaseChangeEvent_OperationType_valueOf_java_lang_String_: - -.. _BaseChangeEvent_OperationType_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`BaseChangeEvent.OperationType ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _OperationType_values: - -.. _OperationType_values__: - -.. _BaseChangeEvent_OperationType_values: - -.. _BaseChangeEvent_OperationType_values__: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_values: - -.. _io_realm_mongodb_mongo_events_BaseChangeEvent_OperationType_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`BaseChangeEvent.OperationType ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt deleted file mode 100644 index bcc90a86d9..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/events/UpdateDescription.txt +++ /dev/null @@ -1,711 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class UpdateDescription -^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_events_UpdateDescription: - - - -io.realm.mongodb.mongo.events -============================= - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.events.UpdateDescription - - -Indicates which fields have been modified in a given update operation. - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`UpdateDescription ` - - | :ref:`diff ` ( - | **BsonDocument** beforeDocument, - | **BsonDocument** afterDocument - | ) - - - Find the diff between two documents. - - - - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ obj - | ) - - - - - - - - * - public static :ref:`UpdateDescription ` - - | :ref:`fromBsonDocument ` ( - | **BsonDocument** document - | ) - - - Converts an update description BSON document from a MongoDB Change Event into an UpdateDescription object. - - - - - * - public `Collection `__ - - | :ref:`getRemovedFields ` () - | - - - Returns a `List `__ containing the field names that have been removed in the corresponding update. - - - - - - - * - public **BsonDocument** - - | :ref:`getUpdatedFields ` () - | - - - Returns a **BsonDocument** containing keys and values representing (respectively) the fields that have changed in the corresponding update and their new values. - - - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isEmpty ` () - | - - - Determines whether this update description is empty. - - - - - * - public :ref:`UpdateDescription ` - - | :ref:`merge ` ( - | :ref:`UpdateDescription ` otherDescription - | ) - - - Unilaterally merge an update description into this update description. - - - - - * - public **BsonDocument** - - | :ref:`toBsonDocument ` () - | - - - Converts this update description to its document representation as it would appear in a MongoDB Change Event. - - - - - * - public **BsonDocument** - - | :ref:`toUpdateDocument ` () - | - - - Convert this update description to an update document. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _diff: - -.. _diff__: - -.. _UpdateDescription_diff: - -.. _UpdateDescription_diff__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_diff: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_diff__: - - - -diff ----- - -.. _io_realm_mongodb_mongo_events_UpdateDescription_diff_BsonDocument_BsonDocument_: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_diff_BsonDocument__BsonDocument_: - -.. _diff_BsonDocument_BsonDocument_: - -.. _diff_BsonDocument__BsonDocument_: - -.. _UpdateDescription_diff_BsonDocument_BsonDocument_: - -.. _UpdateDescription_diff_BsonDocument__BsonDocument_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`UpdateDescription ` :ref:`diff ` ( - | **BsonDocument** beforeDocument, - | **BsonDocument** afterDocument - | ) - - - - - * - Find the diff between two documents.NOTE: This does not do a full diff on [BsonArray]. If there is an inequality between the old and new array, the old array will simply be replaced by the new one. - - - - - - - **Parameters** - - - ``beforeDocument`` - original document - - - - - ``afterDocument`` - document to diff on - - - - - - - - **Returns** - - a description of the updated fields and removed keys between the documents. - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _UpdateDescription_equals: - -.. _UpdateDescription_equals__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_equals: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_equals__: - - - -equals ------- - -.. _io_realm_mongodb_mongo_events_UpdateDescription_equals_java_lang_Object_: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _UpdateDescription_equals_java_lang_Object_: - -.. _UpdateDescription_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ obj - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _fromBsonDocument: - -.. _fromBsonDocument__: - -.. _UpdateDescription_fromBsonDocument: - -.. _UpdateDescription_fromBsonDocument__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_fromBsonDocument: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_fromBsonDocument__: - - - -fromBsonDocument ----------------- - -.. _io_realm_mongodb_mongo_events_UpdateDescription_fromBsonDocument_BsonDocument_: - -.. _fromBsonDocument_BsonDocument_: - -.. _UpdateDescription_fromBsonDocument_BsonDocument_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`UpdateDescription ` :ref:`fromBsonDocument ` ( - | **BsonDocument** document - | ) - - - - - * - Converts an update description BSON document from a MongoDB Change Event into an UpdateDescription object. - - - - - **Parameters** - - - ``document`` - the - - - - - - - - **Returns** - - the converted UpdateDescription - - - - - - - - - - - -.. _getRemovedFields: - -.. _getRemovedFields__: - -.. _UpdateDescription_getRemovedFields: - -.. _UpdateDescription_getRemovedFields__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_getRemovedFields: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_getRemovedFields__: - - - -getRemovedFields ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Collection `__ :ref:`getRemovedFields ` () - | - - - - - * - Returns a `List `__ containing the field names that have been removed in the corresponding update. - - - - - - - - - **Returns** - - the removed fields names. - - - - - - - - - - - -.. _getUpdatedFields: - -.. _getUpdatedFields__: - -.. _UpdateDescription_getUpdatedFields: - -.. _UpdateDescription_getUpdatedFields__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_getUpdatedFields: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_getUpdatedFields__: - - - -getUpdatedFields ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **BsonDocument** :ref:`getUpdatedFields ` () - | - - - - - * - Returns a **BsonDocument** containing keys and values representing (respectively) the fields that have changed in the corresponding update and their new values. - - - - - - - - - **Returns** - - the updated field names and their new values. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _UpdateDescription_hashCode: - -.. _UpdateDescription_hashCode__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_hashCode: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _isEmpty: - -.. _isEmpty__: - -.. _UpdateDescription_isEmpty: - -.. _UpdateDescription_isEmpty__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_isEmpty: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_isEmpty__: - - - -isEmpty -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isEmpty ` () - | - - - - - * - Determines whether this update description is empty. - - - - - - - **Returns** - - true if the update description is empty, false otherwise - - - - - - - - - - - -.. _merge: - -.. _merge__: - -.. _UpdateDescription_merge: - -.. _UpdateDescription_merge__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_merge: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_merge__: - - - -merge ------ - -.. _io_realm_mongodb_mongo_events_UpdateDescription_merge_io_realm_mongodb_mongo_events_UpdateDescription_: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_merge_UpdateDescription_: - -.. _merge_io_realm_mongodb_mongo_events_UpdateDescription_: - -.. _merge_UpdateDescription_: - -.. _UpdateDescription_merge_io_realm_mongodb_mongo_events_UpdateDescription_: - -.. _UpdateDescription_merge_UpdateDescription_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`UpdateDescription ` :ref:`merge ` ( - | :ref:`UpdateDescription ` otherDescription - | ) - - - - - * - Unilaterally merge an update description into this update description. - - - - - **Parameters** - - - ``otherDescription`` - the update description to merge into this - - - - - - - - **Returns** - - this merged update description - - - - - - - - - - - -.. _toBsonDocument: - -.. _toBsonDocument__: - -.. _UpdateDescription_toBsonDocument: - -.. _UpdateDescription_toBsonDocument__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_toBsonDocument: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_toBsonDocument__: - - - -toBsonDocument --------------- - -.. list-table:: - :header-rows: 1 - - * - | public **BsonDocument** :ref:`toBsonDocument ` () - | - - - - - * - Converts this update description to its document representation as it would appear in a MongoDB Change Event. - - - - - - - **Returns** - - the update description document as it would appear in a change event - - - - - - - - - - - -.. _toUpdateDocument: - -.. _toUpdateDocument__: - -.. _UpdateDescription_toUpdateDocument: - -.. _UpdateDescription_toUpdateDocument__: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_toUpdateDocument: - -.. _io_realm_mongodb_mongo_events_UpdateDescription_toUpdateDocument__: - - - -toUpdateDocument ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **BsonDocument** :ref:`toUpdateDocument ` () - | - - - - - * - Convert this update description to an update document. - - - - - - - **Returns** - - an update document with the appropriate $set and $unset documents. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable.txt deleted file mode 100644 index 3c34aeac79..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable.txt +++ /dev/null @@ -1,33 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.mongo.iterable -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - AggregateIterable - FindIterable - MongoCursor - MongoIterable - - - -| - -- :ref:`io.realm.mongodb.mongo.iterable.AggregateIterable ` -- :ref:`io.realm.mongodb.mongo.iterable.FindIterable ` -- :ref:`io.realm.mongodb.mongo.iterable.MongoCursor ` -- :ref:`io.realm.mongodb.mongo.iterable.MongoIterable ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt deleted file mode 100644 index cfdd90d6be..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/AggregateIterable.txt +++ /dev/null @@ -1,104 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class AggregateIterable -^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_iterable_AggregateIterable: - - - -io.realm.mongodb.mongo.iterable -=============================== - - - | `java.lang.Object `__ - | :ref:`io.realm.mongodb.mongo.iterable.MongoIterable ` - | io.realm.mongodb.mongo.iterable.AggregateIterable - - -Specific iterable for :ref:`io.realm.mongodb.mongo.MongoCollection.aggregate(List) ` operations. - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`AggregateIterable ` ( - | `ThreadPoolExecutor `__ threadPoolExecutor, - | **** osMongoCollection, - | **CodecRegistry** codecRegistry, - | `java.lang.Class\ `__ resultClass, - | `java.util.List\ `__ pipeline - | ) - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class :ref:`io.realm.mongodb.mongo.iterable.MongoIterable ` : ``iterator`` , ``first`` - - - - -Constructor Detail -================== - -.. _AggregateIterable: - -.. _AggregateIterable__: - -.. _io_realm_mongodb_mongo_iterable_AggregateIterable: - -.. _io_realm_mongodb_mongo_iterable_AggregateIterable__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`AggregateIterable ` ( - | `ThreadPoolExecutor `__ threadPoolExecutor, - | **** osMongoCollection, - | **CodecRegistry** codecRegistry, - | `java.lang.Class\ `__ resultClass, - | `java.util.List\ `__ pipeline - | ) - - - - - * - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt deleted file mode 100644 index 12f64d5250..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/FindIterable.txt +++ /dev/null @@ -1,411 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class FindIterable -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_iterable_FindIterable: - - - -io.realm.mongodb.mongo.iterable -=============================== - - - | `java.lang.Object `__ - | :ref:`io.realm.mongodb.mongo.iterable.MongoIterable ` - | io.realm.mongodb.mongo.iterable.FindIterable - - -Specific iterable for :ref:`io.realm.mongodb.mongo.MongoCollection.find() ` operations. - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`FindIterable ` ( - | `ThreadPoolExecutor `__ threadPoolExecutor, - | **** osMongoCollection, - | **CodecRegistry** codecRegistry, - | `java.lang.Class\ `__ resultClass - | ) - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`FindIterable ` - - | :ref:`filter ` ( - | **Bson** filter - | ) - - - Sets the query filter to apply to the query. - - - - - * - public :ref:`FindIterable ` - - | :ref:`limit ` ( - | **int** limit - | ) - - - Sets the limit to apply. - - - - - * - public :ref:`FindIterable ` - - | :ref:`projection ` ( - | **Bson** projection - | ) - - - Sets a document describing the fields to return for all matching documents. - - - - - * - public :ref:`FindIterable ` - - | :ref:`sort ` ( - | **Bson** sort - | ) - - - Sets the sort criteria to apply to the query. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class :ref:`io.realm.mongodb.mongo.iterable.MongoIterable ` : ``iterator`` , ``first`` - - - - -Constructor Detail -================== - -.. _FindIterable: - -.. _FindIterable__: - -.. _io_realm_mongodb_mongo_iterable_FindIterable: - -.. _io_realm_mongodb_mongo_iterable_FindIterable__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` ( - | `ThreadPoolExecutor `__ threadPoolExecutor, - | **** osMongoCollection, - | **CodecRegistry** codecRegistry, - | `java.lang.Class\ `__ resultClass - | ) - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _filter: - -.. _filter__: - -.. _FindIterable_filter: - -.. _FindIterable_filter__: - -.. _io_realm_mongodb_mongo_iterable_FindIterable_filter: - -.. _io_realm_mongodb_mongo_iterable_FindIterable_filter__: - - - -filter ------- - -.. _io_realm_mongodb_mongo_iterable_FindIterable_filter_Bson_: - -.. _filter_Bson_: - -.. _FindIterable_filter_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`filter ` ( - | **Bson** filter - | ) - - - - - * - Sets the query filter to apply to the query. - - - - - **Parameters** - - - ``filter`` - the filter, which may be null. - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _limit: - -.. _limit__: - -.. _FindIterable_limit: - -.. _FindIterable_limit__: - -.. _io_realm_mongodb_mongo_iterable_FindIterable_limit: - -.. _io_realm_mongodb_mongo_iterable_FindIterable_limit__: - - - -limit ------ - -.. _io_realm_mongodb_mongo_iterable_FindIterable_limit_int_: - -.. _limit_int_: - -.. _FindIterable_limit_int_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`limit ` ( - | **int** limit - | ) - - - - - * - Sets the limit to apply. - - - - - **Parameters** - - - ``limit`` - the limit, which may be 0 - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _projection: - -.. _projection__: - -.. _FindIterable_projection: - -.. _FindIterable_projection__: - -.. _io_realm_mongodb_mongo_iterable_FindIterable_projection: - -.. _io_realm_mongodb_mongo_iterable_FindIterable_projection__: - - - -projection ----------- - -.. _io_realm_mongodb_mongo_iterable_FindIterable_projection_Bson_: - -.. _projection_Bson_: - -.. _FindIterable_projection_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`projection ` ( - | **Bson** projection - | ) - - - - - * - Sets a document describing the fields to return for all matching documents. - - - - - **Parameters** - - - ``projection`` - the project document, which may be null. - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _sort: - -.. _sort__: - -.. _FindIterable_sort: - -.. _FindIterable_sort__: - -.. _io_realm_mongodb_mongo_iterable_FindIterable_sort: - -.. _io_realm_mongodb_mongo_iterable_FindIterable_sort__: - - - -sort ----- - -.. _io_realm_mongodb_mongo_iterable_FindIterable_sort_Bson_: - -.. _sort_Bson_: - -.. _FindIterable_sort_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindIterable ` :ref:`sort ` ( - | **Bson** sort - | ) - - - - - * - Sets the sort criteria to apply to the query. - - - - - **Parameters** - - - ``sort`` - the sort criteria, which may be null. - - - - - - - - **Returns** - - this - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt deleted file mode 100644 index 08280c0b41..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoCursor.txt +++ /dev/null @@ -1,285 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class MongoCursor -^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_iterable_MongoCursor: - - - -io.realm.mongodb.mongo.iterable -=============================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.iterable.MongoCursor - - -**Implemented interfaces:** - - - -- `java.util.Iterator `__ -- `java.io.Closeable `__ -- `java.lang.AutoCloseable `__ - - -The Mongo Cursor class is fundamentally an `Iterator `__ containing an additional ``tryNext()`` method for convenience. - -An application should ensure that a cursor is closed in all circumstances, e.g. using a try-with-resources statement. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`close ` () - | - - - - - - - - * - public **boolean** - - | :ref:`hasNext ` () - | - - - - - - - - * - public **ResultT** - - | :ref:`next ` () - | - - - - - - - - * - public **ResultT** - - | :ref:`tryNext ` () - | - - - A special ``next()`` case that returns the next document if available or null. - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _close: - -.. _close__: - -.. _MongoCursor_close: - -.. _MongoCursor_close__: - -.. _io_realm_mongodb_mongo_iterable_MongoCursor_close: - -.. _io_realm_mongodb_mongo_iterable_MongoCursor_close__: - - - -close ------ - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`close ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _hasNext: - -.. _hasNext__: - -.. _MongoCursor_hasNext: - -.. _MongoCursor_hasNext__: - -.. _io_realm_mongodb_mongo_iterable_MongoCursor_hasNext: - -.. _io_realm_mongodb_mongo_iterable_MongoCursor_hasNext__: - - - -hasNext -------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`hasNext ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _next: - -.. _next__: - -.. _MongoCursor_next: - -.. _MongoCursor_next__: - -.. _io_realm_mongodb_mongo_iterable_MongoCursor_next: - -.. _io_realm_mongodb_mongo_iterable_MongoCursor_next__: - - - -next ----- - -.. list-table:: - :header-rows: 1 - - * - | public **ResultT** :ref:`next ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _tryNext: - -.. _tryNext__: - -.. _MongoCursor_tryNext: - -.. _MongoCursor_tryNext__: - -.. _io_realm_mongodb_mongo_iterable_MongoCursor_tryNext: - -.. _io_realm_mongodb_mongo_iterable_MongoCursor_tryNext__: - - - -tryNext -------- - -.. list-table:: - :header-rows: 1 - - * - | public **ResultT** :ref:`tryNext ` () - | - - - - - * - A special ``next()`` case that returns the next document if available or null. - - - - - - - - - **Returns** - - A ``Task`` containing the next document if available or null. - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt deleted file mode 100644 index 19394569f3..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/iterable/MongoIterable.txt +++ /dev/null @@ -1,181 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class MongoIterable -^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_iterable_MongoIterable: - - - -io.realm.mongodb.mongo.iterable -=============================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.iterable.MongoIterable - - -The MongoIterable is the results from an operation, such as a ``find()`` or an ``aggregate()`` query. - -This class somewhat mimics the behavior of an `Iterable `__ but given its results are obtained asynchronously, its values are wrapped inside a ``Task`` . - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`RealmResultTask ` - - | :ref:`first ` () - | - - - Helper to return the first item in the iterator or null. - - - - - * - public :ref:`RealmResultTask ` - - | :ref:`iterator ` () - | - - - Returns a cursor of the operation represented by this iterable. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _first: - -.. _first__: - -.. _MongoIterable_first: - -.. _MongoIterable_first__: - -.. _io_realm_mongodb_mongo_iterable_MongoIterable_first: - -.. _io_realm_mongodb_mongo_iterable_MongoIterable_first__: - - - -first ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`first ` () - | - - - - - * - Helper to return the first item in the iterator or null.The result is wrapped in a ``Task`` since the iterator should be capable of asynchronously retrieve documents from the server. - - - - - - - - - - - **Returns** - - a task containing the first item or null. - - - - - - - - - - - -.. _iterator: - -.. _iterator__: - -.. _MongoIterable_iterator: - -.. _MongoIterable_iterator__: - -.. _io_realm_mongodb_mongo_iterable_MongoIterable_iterator: - -.. _io_realm_mongodb_mongo_iterable_MongoIterable_iterator__: - - - -iterator --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmResultTask ` :ref:`iterator ` () - | - - - - - * - Returns a cursor of the operation represented by this iterable.The result is wrapped in a ``Task`` since the iterator should be capable of asynchronously retrieve documents from the server. - - - - - - - - - - - **Returns** - - an asynchronous task with cursor of the operation represented by this iterable. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options.txt deleted file mode 100644 index ded6891150..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options.txt +++ /dev/null @@ -1,35 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.mongo.options -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - CountOptions - FindOneAndModifyOptions - FindOptions - InsertManyResult - UpdateOptions - - - -| - -- :ref:`io.realm.mongodb.mongo.options.CountOptions ` -- :ref:`io.realm.mongodb.mongo.options.FindOneAndModifyOptions ` -- :ref:`io.realm.mongodb.mongo.options.FindOptions ` -- :ref:`io.realm.mongodb.mongo.options.InsertManyResult ` -- :ref:`io.realm.mongodb.mongo.options.UpdateOptions ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/CountOptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/CountOptions.txt deleted file mode 100644 index c633e4533b..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/CountOptions.txt +++ /dev/null @@ -1,293 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class CountOptions -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_options_CountOptions: - - - -io.realm.mongodb.mongo.options -============================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.options.CountOptions - - -The options for a count operation. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`CountOptions ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **int** - - | :ref:`getLimit ` () - | - - - Gets the limit to apply. - - - - - * - public :ref:`CountOptions ` - - | :ref:`limit ` ( - | **int** limit - | ) - - - Sets the limit to apply. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _CountOptions: - -.. _CountOptions__: - -.. _io_realm_mongodb_mongo_options_CountOptions: - -.. _io_realm_mongodb_mongo_options_CountOptions__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`CountOptions ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _getLimit: - -.. _getLimit__: - -.. _CountOptions_getLimit: - -.. _CountOptions_getLimit__: - -.. _io_realm_mongodb_mongo_options_CountOptions_getLimit: - -.. _io_realm_mongodb_mongo_options_CountOptions_getLimit__: - - - -getLimit --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getLimit ` () - | - - - - - * - Gets the limit to apply. The default is 0, which means there is no limit. - - - - - - - **Returns** - - the limit - - - - - - - - - - - -.. _limit: - -.. _limit__: - -.. _CountOptions_limit: - -.. _CountOptions_limit__: - -.. _io_realm_mongodb_mongo_options_CountOptions_limit: - -.. _io_realm_mongodb_mongo_options_CountOptions_limit__: - - - -limit ------ - -.. _io_realm_mongodb_mongo_options_CountOptions_limit_int_: - -.. _limit_int_: - -.. _CountOptions_limit_int_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`CountOptions ` :ref:`limit ` ( - | **int** limit - | ) - - - - - * - Sets the limit to apply. - - - - - **Parameters** - - - ``limit`` - the limit - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _CountOptions_toString: - -.. _CountOptions_toString__: - -.. _io_realm_mongodb_mongo_options_CountOptions_toString: - -.. _io_realm_mongodb_mongo_options_CountOptions_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt deleted file mode 100644 index 5e04338f5f..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOneAndModifyOptions.txt +++ /dev/null @@ -1,683 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class FindOneAndModifyOptions -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions: - - - -io.realm.mongodb.mongo.options -============================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.options.FindOneAndModifyOptions - - -The options to apply to a findOneAndUpdate, findOneAndReplace, or findOneAndDelete operation (also commonly referred to as findOneAndModify operations). - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`FindOneAndModifyOptions ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **Bson** - - | :ref:`getProjection ` () - | - - - Gets a document describing the fields to return for all matching documents. - - - - - * - public **Bson** - - | :ref:`getSort ` () - | - - - Gets the sort criteria to apply to the query. - - - - - * - public **boolean** - - | :ref:`isReturnNewDocument ` () - | - - - Returns true if the findOneAndModify operation should return the new document. - - - - - * - public **boolean** - - | :ref:`isUpsert ` () - | - - - Returns true if a new document should be inserted if there are no matches to the query filter. - - - - - * - public :ref:`FindOneAndModifyOptions ` - - | :ref:`projection ` ( - | **Bson** projection - | ) - - - Sets a document describing the fields to return for all matching documents. - - - - - * - public :ref:`FindOneAndModifyOptions ` - - | :ref:`returnNewDocument ` ( - | **boolean** returnNewDocument - | ) - - - Set to true if findOneAndModify operations should return the new updated document. - - - - - * - public :ref:`FindOneAndModifyOptions ` - - | :ref:`sort ` ( - | **Bson** sort - | ) - - - Sets the sort criteria to apply to the query. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - * - public :ref:`FindOneAndModifyOptions ` - - | :ref:`upsert ` ( - | **boolean** upsert - | ) - - - Set to true if a new document should be inserted if there are no matches to the query filter. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _FindOneAndModifyOptions: - -.. _FindOneAndModifyOptions__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOneAndModifyOptions ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _getProjection: - -.. _getProjection__: - -.. _FindOneAndModifyOptions_getProjection: - -.. _FindOneAndModifyOptions_getProjection__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_getProjection: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_getProjection__: - - - -getProjection -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **Bson** :ref:`getProjection ` () - | - - - - - * - Gets a document describing the fields to return for all matching documents. - - - - - - - **Returns** - - the project document, which may be null - - - - - - - - - - - -.. _getSort: - -.. _getSort__: - -.. _FindOneAndModifyOptions_getSort: - -.. _FindOneAndModifyOptions_getSort__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_getSort: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_getSort__: - - - -getSort -------- - -.. list-table:: - :header-rows: 1 - - * - | public **Bson** :ref:`getSort ` () - | - - - - - * - Gets the sort criteria to apply to the query. The default is null, which means that the documents will be returned in an undefined order. - - - - - - - **Returns** - - a document describing the sort criteria - - - - - - - - - - - -.. _isReturnNewDocument: - -.. _isReturnNewDocument__: - -.. _FindOneAndModifyOptions_isReturnNewDocument: - -.. _FindOneAndModifyOptions_isReturnNewDocument__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_isReturnNewDocument: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_isReturnNewDocument__: - - - -isReturnNewDocument -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isReturnNewDocument ` () - | - - - - - * - Returns true if the findOneAndModify operation should return the new document. The default is false Note: Only findOneAndUpdate and findOneAndReplace take this options findOneAndDelete will always return the old document - - - - - - - **Returns** - - true if findOneAndModify operation should return the new document - - - - - - - - - - - -.. _isUpsert: - -.. _isUpsert__: - -.. _FindOneAndModifyOptions_isUpsert: - -.. _FindOneAndModifyOptions_isUpsert__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_isUpsert: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_isUpsert__: - - - -isUpsert --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isUpsert ` () - | - - - - - * - Returns true if a new document should be inserted if there are no matches to the query filter. The default is false. Note: Only findOneAndUpdate and findOneAndReplace take this option - - - - - - - **Returns** - - true if a new document should be inserted if there are no matches to the query filter - - - - - - - - - - - -.. _projection: - -.. _projection__: - -.. _FindOneAndModifyOptions_projection: - -.. _FindOneAndModifyOptions_projection__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_projection: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_projection__: - - - -projection ----------- - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_projection_Bson_: - -.. _projection_Bson_: - -.. _FindOneAndModifyOptions_projection_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOneAndModifyOptions ` :ref:`projection ` ( - | **Bson** projection - | ) - - - - - * - Sets a document describing the fields to return for all matching documents. - - - - - **Parameters** - - - ``projection`` - the project document, which may be null. - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _returnNewDocument: - -.. _returnNewDocument__: - -.. _FindOneAndModifyOptions_returnNewDocument: - -.. _FindOneAndModifyOptions_returnNewDocument__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_returnNewDocument: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_returnNewDocument__: - - - -returnNewDocument ------------------ - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_returnNewDocument_boolean_: - -.. _returnNewDocument_boolean_: - -.. _FindOneAndModifyOptions_returnNewDocument_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOneAndModifyOptions ` :ref:`returnNewDocument ` ( - | **boolean** returnNewDocument - | ) - - - - - * - Set to true if findOneAndModify operations should return the new updated document. Set to false / leave blank to have these operation return the document before the update. Note: Only findOneAndUpdate and findOneAndReplace take this options findOneAndDelete will always return the old document - - - - - **Parameters** - - - ``returnNewDocument`` - true if findOneAndModify operations should return the updated document - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _sort: - -.. _sort__: - -.. _FindOneAndModifyOptions_sort: - -.. _FindOneAndModifyOptions_sort__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_sort: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_sort__: - - - -sort ----- - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_sort_Bson_: - -.. _sort_Bson_: - -.. _FindOneAndModifyOptions_sort_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOneAndModifyOptions ` :ref:`sort ` ( - | **Bson** sort - | ) - - - - - * - Sets the sort criteria to apply to the query. - - - - - **Parameters** - - - ``sort`` - the sort criteria, which may be null. - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _FindOneAndModifyOptions_toString: - -.. _FindOneAndModifyOptions_toString__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_toString: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - -.. _upsert: - -.. _upsert__: - -.. _FindOneAndModifyOptions_upsert: - -.. _FindOneAndModifyOptions_upsert__: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_upsert: - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_upsert__: - - - -upsert ------- - -.. _io_realm_mongodb_mongo_options_FindOneAndModifyOptions_upsert_boolean_: - -.. _upsert_boolean_: - -.. _FindOneAndModifyOptions_upsert_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOneAndModifyOptions ` :ref:`upsert ` ( - | **boolean** upsert - | ) - - - - - * - Set to true if a new document should be inserted if there are no matches to the query filter. - - - - - **Parameters** - - - ``upsert`` - true if a new document should be inserted if there are no matches to the query filter. - - - - - - - - **Returns** - - this - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOptions.txt deleted file mode 100644 index c26893825b..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/FindOptions.txt +++ /dev/null @@ -1,553 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class FindOptions -^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_options_FindOptions: - - - -io.realm.mongodb.mongo.options -============================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.options.FindOptions - - -The options to apply to a find operation (also commonly referred to as a query). - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`FindOptions ` () - | - - - Construct a new instance. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **int** - - | :ref:`getLimit ` () - | - - - Gets the limit to apply. - - - - - * - public **Bson** - - | :ref:`getProjection ` () - | - - - Gets a document describing the fields to return for all matching documents. - - - - - * - public **Bson** - - | :ref:`getSort ` () - | - - - Gets the sort criteria to apply to the query. - - - - - * - public :ref:`FindOptions ` - - | :ref:`limit ` ( - | **int** limit - | ) - - - Sets the limit to apply. - - - - - * - public :ref:`FindOptions ` - - | :ref:`projection ` ( - | **Bson** projection - | ) - - - Sets a document describing the fields to return for all matching documents. - - - - - * - public :ref:`FindOptions ` - - | :ref:`sort ` ( - | **Bson** sort - | ) - - - Sets the sort criteria to apply to the query. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _FindOptions: - -.. _FindOptions__: - -.. _io_realm_mongodb_mongo_options_FindOptions: - -.. _io_realm_mongodb_mongo_options_FindOptions__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOptions ` () - | - - - - - * - Construct a new instance. - - - - - - - - - - - - - -Method Detail -============= - -.. _getLimit: - -.. _getLimit__: - -.. _FindOptions_getLimit: - -.. _FindOptions_getLimit__: - -.. _io_realm_mongodb_mongo_options_FindOptions_getLimit: - -.. _io_realm_mongodb_mongo_options_FindOptions_getLimit__: - - - -getLimit --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`getLimit ` () - | - - - - - * - Gets the limit to apply. The default is null. - - - - - - - **Returns** - - the limit - - - - - - - - - - - -.. _getProjection: - -.. _getProjection__: - -.. _FindOptions_getProjection: - -.. _FindOptions_getProjection__: - -.. _io_realm_mongodb_mongo_options_FindOptions_getProjection: - -.. _io_realm_mongodb_mongo_options_FindOptions_getProjection__: - - - -getProjection -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **Bson** :ref:`getProjection ` () - | - - - - - * - Gets a document describing the fields to return for all matching documents. - - - - - - - **Returns** - - the project document, which may be null - - - - - - - - - - - -.. _getSort: - -.. _getSort__: - -.. _FindOptions_getSort: - -.. _FindOptions_getSort__: - -.. _io_realm_mongodb_mongo_options_FindOptions_getSort: - -.. _io_realm_mongodb_mongo_options_FindOptions_getSort__: - - - -getSort -------- - -.. list-table:: - :header-rows: 1 - - * - | public **Bson** :ref:`getSort ` () - | - - - - - * - Gets the sort criteria to apply to the query. The default is null, which means that the documents will be returned in an undefined order. - - - - - - - **Returns** - - a document describing the sort criteria - - - - - - - - - - - -.. _limit: - -.. _limit__: - -.. _FindOptions_limit: - -.. _FindOptions_limit__: - -.. _io_realm_mongodb_mongo_options_FindOptions_limit: - -.. _io_realm_mongodb_mongo_options_FindOptions_limit__: - - - -limit ------ - -.. _io_realm_mongodb_mongo_options_FindOptions_limit_int_: - -.. _limit_int_: - -.. _FindOptions_limit_int_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOptions ` :ref:`limit ` ( - | **int** limit - | ) - - - - - * - Sets the limit to apply. - - - - - **Parameters** - - - ``limit`` - the limit, which may be null - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _projection: - -.. _projection__: - -.. _FindOptions_projection: - -.. _FindOptions_projection__: - -.. _io_realm_mongodb_mongo_options_FindOptions_projection: - -.. _io_realm_mongodb_mongo_options_FindOptions_projection__: - - - -projection ----------- - -.. _io_realm_mongodb_mongo_options_FindOptions_projection_Bson_: - -.. _projection_Bson_: - -.. _FindOptions_projection_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOptions ` :ref:`projection ` ( - | **Bson** projection - | ) - - - - - * - Sets a document describing the fields to return for all matching documents. - - - - - **Parameters** - - - ``projection`` - the project document, which may be null. - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _sort: - -.. _sort__: - -.. _FindOptions_sort: - -.. _FindOptions_sort__: - -.. _io_realm_mongodb_mongo_options_FindOptions_sort: - -.. _io_realm_mongodb_mongo_options_FindOptions_sort__: - - - -sort ----- - -.. _io_realm_mongodb_mongo_options_FindOptions_sort_Bson_: - -.. _sort_Bson_: - -.. _FindOptions_sort_Bson_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`FindOptions ` :ref:`sort ` ( - | **Bson** sort - | ) - - - - - * - Sets the sort criteria to apply to the query. - - - - - **Parameters** - - - ``sort`` - the sort criteria, which may be null. - - - - - - - - **Returns** - - this - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _FindOptions_toString: - -.. _FindOptions_toString__: - -.. _io_realm_mongodb_mongo_options_FindOptions_toString: - -.. _io_realm_mongodb_mongo_options_FindOptions_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt deleted file mode 100644 index 087be98e1e..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/InsertManyResult.txt +++ /dev/null @@ -1,174 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class InsertManyResult -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_options_InsertManyResult: - - - -io.realm.mongodb.mongo.options -============================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.options.InsertManyResult - - -The result of an insert many operation. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`InsertManyResult ` ( - | `java.util.Map\ `__ insertedIds - | ) - - - Constructs a result. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public `Map `__ - - | :ref:`getInsertedIds ` () - | - - - Returns the _ids of the inserted documents arranged by the index of the document from the operation and its corresponding id. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _InsertManyResult: - -.. _InsertManyResult__: - -.. _io_realm_mongodb_mongo_options_InsertManyResult: - -.. _io_realm_mongodb_mongo_options_InsertManyResult__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`InsertManyResult ` ( - | `java.util.Map\ `__ insertedIds - | ) - - - - - * - Constructs a result. - - - - - **Parameters** - - - ``insertedIds`` - the _ids of the inserted documents arranged by the index of the document from the operation and its corresponding id. - - - - - - - - - - - - - - -Method Detail -============= - -.. _getInsertedIds: - -.. _getInsertedIds__: - -.. _InsertManyResult_getInsertedIds: - -.. _InsertManyResult_getInsertedIds__: - -.. _io_realm_mongodb_mongo_options_InsertManyResult_getInsertedIds: - -.. _io_realm_mongodb_mongo_options_InsertManyResult_getInsertedIds__: - - - -getInsertedIds --------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Map `__ :ref:`getInsertedIds ` () - | - - - - - * - Returns the _ids of the inserted documents arranged by the index of the document from the operation and its corresponding id. - - - - - - - **Returns** - - the _ids of the inserted documents arranged by the index of the document from the operation and its corresponding id. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt deleted file mode 100644 index 08feb12d15..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/options/UpdateOptions.txt +++ /dev/null @@ -1,293 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class UpdateOptions -^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_options_UpdateOptions: - - - -io.realm.mongodb.mongo.options -============================== - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.options.UpdateOptions - - -The options to apply when updating documents. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`UpdateOptions ` () - | - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`isUpsert ` () - | - - - Returns true if a new document should be inserted if there are no matches to the query filter. - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - * - public :ref:`UpdateOptions ` - - | :ref:`upsert ` ( - | **boolean** upsert - | ) - - - Set to true if a new document should be inserted if there are no matches to the query filter. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _UpdateOptions: - -.. _UpdateOptions__: - -.. _io_realm_mongodb_mongo_options_UpdateOptions: - -.. _io_realm_mongodb_mongo_options_UpdateOptions__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`UpdateOptions ` () - | - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _isUpsert: - -.. _isUpsert__: - -.. _UpdateOptions_isUpsert: - -.. _UpdateOptions_isUpsert__: - -.. _io_realm_mongodb_mongo_options_UpdateOptions_isUpsert: - -.. _io_realm_mongodb_mongo_options_UpdateOptions_isUpsert__: - - - -isUpsert --------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isUpsert ` () - | - - - - - * - Returns true if a new document should be inserted if there are no matches to the query filter. The default is false. - - - - - - - **Returns** - - true if a new document should be inserted if there are no matches to the query filter - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _UpdateOptions_toString: - -.. _UpdateOptions_toString__: - -.. _io_realm_mongodb_mongo_options_UpdateOptions_toString: - -.. _io_realm_mongodb_mongo_options_UpdateOptions_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - -.. _upsert: - -.. _upsert__: - -.. _UpdateOptions_upsert: - -.. _UpdateOptions_upsert__: - -.. _io_realm_mongodb_mongo_options_UpdateOptions_upsert: - -.. _io_realm_mongodb_mongo_options_UpdateOptions_upsert__: - - - -upsert ------- - -.. _io_realm_mongodb_mongo_options_UpdateOptions_upsert_boolean_: - -.. _upsert_boolean_: - -.. _UpdateOptions_upsert_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`UpdateOptions ` :ref:`upsert ` ( - | **boolean** upsert - | ) - - - - - * - Set to true if a new document should be inserted if there are no matches to the query filter. - - - - - **Parameters** - - - ``upsert`` - true if a new document should be inserted if there are no matches to the query filter. - - - - - - - - **Returns** - - this - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/result.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/result.txt deleted file mode 100644 index f2c7632e04..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/result.txt +++ /dev/null @@ -1,31 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.mongo.result -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - DeleteResult - InsertOneResult - UpdateResult - - - -| - -- :ref:`io.realm.mongodb.mongo.result.DeleteResult ` -- :ref:`io.realm.mongodb.mongo.result.InsertOneResult ` -- :ref:`io.realm.mongodb.mongo.result.UpdateResult ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt deleted file mode 100644 index c321f29df4..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/DeleteResult.txt +++ /dev/null @@ -1,174 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class DeleteResult -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_result_DeleteResult: - - - -io.realm.mongodb.mongo.result -============================= - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.result.DeleteResult - - -The result of a delete operation. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`DeleteResult ` ( - | **long** deletedCount - | ) - - - Constructs a result. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **long** - - | :ref:`getDeletedCount ` () - | - - - Gets the number of documents deleted. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _DeleteResult: - -.. _DeleteResult__: - -.. _io_realm_mongodb_mongo_result_DeleteResult: - -.. _io_realm_mongodb_mongo_result_DeleteResult__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`DeleteResult ` ( - | **long** deletedCount - | ) - - - - - * - Constructs a result. - - - - - **Parameters** - - - ``deletedCount`` - the number of documents deleted. - - - - - - - - - - - - - - -Method Detail -============= - -.. _getDeletedCount: - -.. _getDeletedCount__: - -.. _DeleteResult_getDeletedCount: - -.. _DeleteResult_getDeletedCount__: - -.. _io_realm_mongodb_mongo_result_DeleteResult_getDeletedCount: - -.. _io_realm_mongodb_mongo_result_DeleteResult_getDeletedCount__: - - - -getDeletedCount ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getDeletedCount ` () - | - - - - - * - Gets the number of documents deleted. - - - - - - - **Returns** - - the number of documents deleted - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt deleted file mode 100644 index fa385a8713..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/InsertOneResult.txt +++ /dev/null @@ -1,174 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class InsertOneResult -^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_result_InsertOneResult: - - - -io.realm.mongodb.mongo.result -============================= - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.result.InsertOneResult - - -The result of an insert one operation. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`InsertOneResult ` ( - | **BsonValue** insertedId - | ) - - - Constructs a result. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **BsonValue** - - | :ref:`getInsertedId ` () - | - - - Returns the _id of the inserted document. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _InsertOneResult: - -.. _InsertOneResult__: - -.. _io_realm_mongodb_mongo_result_InsertOneResult: - -.. _io_realm_mongodb_mongo_result_InsertOneResult__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`InsertOneResult ` ( - | **BsonValue** insertedId - | ) - - - - - * - Constructs a result. - - - - - **Parameters** - - - ``insertedId`` - the _id of the inserted document. - - - - - - - - - - - - - - -Method Detail -============= - -.. _getInsertedId: - -.. _getInsertedId__: - -.. _InsertOneResult_getInsertedId: - -.. _InsertOneResult_getInsertedId__: - -.. _io_realm_mongodb_mongo_result_InsertOneResult_getInsertedId: - -.. _io_realm_mongodb_mongo_result_InsertOneResult_getInsertedId__: - - - -getInsertedId -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **BsonValue** :ref:`getInsertedId ` () - | - - - - - * - Returns the _id of the inserted document. - - - - - - - **Returns** - - the _id of the inserted document. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt b/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt deleted file mode 100644 index 7142e15de3..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/mongo/result/UpdateResult.txt +++ /dev/null @@ -1,300 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class UpdateResult -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_mongo_result_UpdateResult: - - - -io.realm.mongodb.mongo.result -============================= - - - | `java.lang.Object `__ - | io.realm.mongodb.mongo.result.UpdateResult - - -The result of an update operation. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`UpdateResult ` ( - | **long** matchedCount, - | **long** modifiedCount, - | **BsonValue** upsertedId - | ) - - - Constructs a result. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **long** - - | :ref:`getMatchedCount ` () - | - - - Returns the number of documents matched by the query. - - - - - * - public **long** - - | :ref:`getModifiedCount ` () - | - - - Returns the number of documents modified. - - - - - * - public **BsonValue** - - | :ref:`getUpsertedId ` () - | - - - If the replace resulted in an inserted document, gets the _id of the inserted document, otherwise null. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _UpdateResult: - -.. _UpdateResult__: - -.. _io_realm_mongodb_mongo_result_UpdateResult: - -.. _io_realm_mongodb_mongo_result_UpdateResult__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`UpdateResult ` ( - | **long** matchedCount, - | **long** modifiedCount, - | **BsonValue** upsertedId - | ) - - - - - * - Constructs a result. - - - - - **Parameters** - - - ``matchedCount`` - the number of documents matched by the query. - - - - - ``modifiedCount`` - the number of documents modified. - - - - - ``upsertedId`` - the _id of the inserted document if the replace resulted in an inserted document, otherwise null. - - - - - - - - - - - - - - -Method Detail -============= - -.. _getMatchedCount: - -.. _getMatchedCount__: - -.. _UpdateResult_getMatchedCount: - -.. _UpdateResult_getMatchedCount__: - -.. _io_realm_mongodb_mongo_result_UpdateResult_getMatchedCount: - -.. _io_realm_mongodb_mongo_result_UpdateResult_getMatchedCount__: - - - -getMatchedCount ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getMatchedCount ` () - | - - - - - * - Returns the number of documents matched by the query. - - - - - - - **Returns** - - the number of documents matched. - - - - - - - - - - - -.. _getModifiedCount: - -.. _getModifiedCount__: - -.. _UpdateResult_getModifiedCount: - -.. _UpdateResult_getModifiedCount__: - -.. _io_realm_mongodb_mongo_result_UpdateResult_getModifiedCount: - -.. _io_realm_mongodb_mongo_result_UpdateResult_getModifiedCount__: - - - -getModifiedCount ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getModifiedCount ` () - | - - - - - * - Returns the number of documents modified. - - - - - - - **Returns** - - the number of documents modified. - - - - - - - - - - - -.. _getUpsertedId: - -.. _getUpsertedId__: - -.. _UpdateResult_getUpsertedId: - -.. _UpdateResult_getUpsertedId__: - -.. _io_realm_mongodb_mongo_result_UpdateResult_getUpsertedId: - -.. _io_realm_mongodb_mongo_result_UpdateResult_getUpsertedId__: - - - -getUpsertedId -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **BsonValue** :ref:`getUpsertedId ` () - | - - - - - * - If the replace resulted in an inserted document, gets the _id of the inserted document, otherwise null. - - - - - - - **Returns** - - if the replace resulted in an inserted document, the _id of the inserted document, otherwise null. - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/push.txt b/source/sdk/temp/java/api/io/realm/mongodb/push.txt deleted file mode 100644 index b94c4263ac..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/push.txt +++ /dev/null @@ -1,27 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.push -^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - Push - - - -| - -- :ref:`io.realm.mongodb.push.Push ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/push/Push.txt b/source/sdk/temp/java/api/io/realm/mongodb/push/Push.txt deleted file mode 100644 index ac7aefc7b8..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/push/Push.txt +++ /dev/null @@ -1,459 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Push -^^^^^^^^^^ - -.. _io_realm_mongodb_push_Push: - - - -io.realm.mongodb.push -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.push.Push - - -The Push client allows to register/deregister for push notifications from a client app. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Push ` ( - | **OsPush** osPush - | ) - - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`deregisterDevice ` () - | - - - Deregisters the FCM registration token bound to the currently logged in user's device on MongoDB Realm. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`deregisterDeviceAsync ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Deregisters the FCM registration token bound to the currently logged in user's device on MongoDB Realm. - - - - - * - public **void** - - | :ref:`registerDevice ` ( - | `String `__ registrationToken - | ) - - - Registers the given FCM registration token with the currently logged in user's device on MongoDB Realm. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`registerDeviceAsync ` ( - | `String `__ registrationToken, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - Registers the given FCM registration token with the currently logged in user's device on MongoDB Realm. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _Push: - -.. _Push__: - -.. _io_realm_mongodb_push_Push: - -.. _io_realm_mongodb_push_Push__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Push ` ( - | **OsPush** osPush - | ) - - - - - * - - - - - - - - - - - - - - -Method Detail -============= - -.. _deregisterDevice: - -.. _deregisterDevice__: - -.. _Push_deregisterDevice: - -.. _Push_deregisterDevice__: - -.. _io_realm_mongodb_push_Push_deregisterDevice: - -.. _io_realm_mongodb_push_Push_deregisterDevice__: - - - -deregisterDevice ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`deregisterDevice ` () - | - - - - - * - Deregisters the FCM registration token bound to the currently logged in user's device on MongoDB Realm. - - - - - - - - - - - - - - - -.. _deregisterDeviceAsync: - -.. _deregisterDeviceAsync__: - -.. _Push_deregisterDeviceAsync: - -.. _Push_deregisterDeviceAsync__: - -.. _io_realm_mongodb_push_Push_deregisterDeviceAsync: - -.. _io_realm_mongodb_push_Push_deregisterDeviceAsync__: - - - -deregisterDeviceAsync ---------------------- - -.. _io_realm_mongodb_push_Push_deregisterDeviceAsync_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_push_Push_deregisterDeviceAsync_Callback_: - -.. _io_realm_mongodb_push_Push_deregisterDeviceAsync_App_Callback_: - -.. _deregisterDeviceAsync_io_realm_mongodb_App_Callback_: - -.. _deregisterDeviceAsync_Callback_: - -.. _deregisterDeviceAsync_App_Callback_: - -.. _Push_deregisterDeviceAsync_io_realm_mongodb_App_Callback_: - -.. _Push_deregisterDeviceAsync_Callback_: - -.. _Push_deregisterDeviceAsync_App_Callback_: - -.. _io_realm_mongodb_push_Push_deregisterDeviceAsync_App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`deregisterDeviceAsync ` ( - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Deregisters the FCM registration token bound to the currently logged in user's device on MongoDB Realm. - - - - - **Parameters** - - - ``callback`` - The callback used when the device has been registered or the call failed - it will always happen on the same thread as this method was called on. - - - - - - - - - - - - - - - - -.. _registerDevice: - -.. _registerDevice__: - -.. _Push_registerDevice: - -.. _Push_registerDevice__: - -.. _io_realm_mongodb_push_Push_registerDevice: - -.. _io_realm_mongodb_push_Push_registerDevice__: - - - -registerDevice --------------- - -.. _io_realm_mongodb_push_Push_registerDevice_java_lang_String_: - -.. _io_realm_mongodb_push_Push_registerDevice_String_: - -.. _registerDevice_java_lang_String_: - -.. _registerDevice_String_: - -.. _Push_registerDevice_java_lang_String_: - -.. _Push_registerDevice_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`registerDevice ` ( - | `String `__ registrationToken - | ) - - - - - * - Registers the given FCM registration token with the currently logged in user's device on MongoDB Realm. - - - - - **Parameters** - - - ``registrationToken`` - The registration token to register. - - - - - - - - - - - - - - - - -.. _registerDeviceAsync: - -.. _registerDeviceAsync__: - -.. _Push_registerDeviceAsync: - -.. _Push_registerDeviceAsync__: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync__: - - - -registerDeviceAsync -------------------- - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_java_lang_String_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_java_lang_String__Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_java_lang_String_App_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_java_lang_String__App_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_String_io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_String__io_realm_mongodb_App_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_String_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_String__Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_String_App_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_String__App_Callback_: - -.. _registerDeviceAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _registerDeviceAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _registerDeviceAsync_java_lang_String_Callback_: - -.. _registerDeviceAsync_java_lang_String__Callback_: - -.. _registerDeviceAsync_java_lang_String_App_Callback_: - -.. _registerDeviceAsync_java_lang_String__App_Callback_: - -.. _registerDeviceAsync_String_io_realm_mongodb_App_Callback_: - -.. _registerDeviceAsync_String__io_realm_mongodb_App_Callback_: - -.. _registerDeviceAsync_String_Callback_: - -.. _registerDeviceAsync_String__Callback_: - -.. _registerDeviceAsync_String_App_Callback_: - -.. _registerDeviceAsync_String__App_Callback_: - -.. _Push_registerDeviceAsync_java_lang_String_io_realm_mongodb_App_Callback_: - -.. _Push_registerDeviceAsync_java_lang_String__io_realm_mongodb_App_Callback_: - -.. _Push_registerDeviceAsync_java_lang_String_Callback_: - -.. _Push_registerDeviceAsync_java_lang_String__Callback_: - -.. _Push_registerDeviceAsync_java_lang_String_App_Callback_: - -.. _Push_registerDeviceAsync_java_lang_String__App_Callback_: - -.. _Push_registerDeviceAsync_String_io_realm_mongodb_App_Callback_: - -.. _Push_registerDeviceAsync_String__io_realm_mongodb_App_Callback_: - -.. _Push_registerDeviceAsync_String_Callback_: - -.. _Push_registerDeviceAsync_String__Callback_: - -.. _Push_registerDeviceAsync_String_App_Callback_: - -.. _Push_registerDeviceAsync_String__App_Callback_: - -.. _io_realm_mongodb_push_Push_registerDeviceAsync_String__App_Callback_Void__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`registerDeviceAsync ` ( - | `String `__ registrationToken, - | :ref:`io.realm.mongodb.App.Callback\ ` callback - | ) - - - - - * - Registers the given FCM registration token with the currently logged in user's device on MongoDB Realm. - - - - - **Parameters** - - - ``registrationToken`` - The registration token to register. - - - - - ``callback`` - The callback used when the device has been registered or the call failed - it will always happen on the same thread as this method was called on. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync.txt deleted file mode 100644 index 745f020509..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync.txt +++ /dev/null @@ -1,75 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.mongodb.sync -^^^^^^^^^^^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - ConnectionListener - ConnectionState - DiscardUnsyncedChangesStrategy - ManuallyRecoverUnsyncedChangesStrategy - MutableSubscriptionSet - Progress - ProgressListener - ProgressMode - Subscription - SubscriptionSet - SubscriptionSet.State - SubscriptionSet.StateChangeCallback - SubscriptionSet.UpdateAsyncCallback - SubscriptionSet.UpdateCallback - Sync - Sync.Debug - SyncClientResetStrategy - SyncConfiguration - SyncConfiguration.Builder - SyncConfiguration.InitialFlexibleSyncSubscriptions - SyncSession - SyncSession.ClientResetHandler - SyncSession.ErrorHandler - SyncSession.State - ClientResetRequiredError - - - -| - -- :ref:`io.realm.mongodb.sync.ConnectionListener ` -- :ref:`io.realm.mongodb.sync.ConnectionState ` -- :ref:`io.realm.mongodb.sync.DiscardUnsyncedChangesStrategy ` -- :ref:`io.realm.mongodb.sync.ManuallyRecoverUnsyncedChangesStrategy ` -- :ref:`io.realm.mongodb.sync.MutableSubscriptionSet ` -- :ref:`io.realm.mongodb.sync.Progress ` -- :ref:`io.realm.mongodb.sync.ProgressListener ` -- :ref:`io.realm.mongodb.sync.ProgressMode ` -- :ref:`io.realm.mongodb.sync.Subscription ` -- :ref:`io.realm.mongodb.sync.SubscriptionSet ` -- :ref:`io.realm.mongodb.sync.SubscriptionSet.State ` -- :ref:`io.realm.mongodb.sync.SubscriptionSet.StateChangeCallback ` -- :ref:`io.realm.mongodb.sync.SubscriptionSet.UpdateAsyncCallback ` -- :ref:`io.realm.mongodb.sync.SubscriptionSet.UpdateCallback ` -- :ref:`io.realm.mongodb.sync.Sync ` -- :ref:`io.realm.mongodb.sync.Sync.Debug ` -- :ref:`io.realm.mongodb.sync.SyncClientResetStrategy ` -- :ref:`io.realm.mongodb.sync.SyncConfiguration ` -- :ref:`io.realm.mongodb.sync.SyncConfiguration.Builder ` -- :ref:`io.realm.mongodb.sync.SyncConfiguration.InitialFlexibleSyncSubscriptions ` -- :ref:`io.realm.mongodb.sync.SyncSession ` -- :ref:`io.realm.mongodb.sync.SyncSession.ClientResetHandler ` -- :ref:`io.realm.mongodb.sync.SyncSession.ErrorHandler ` -- :ref:`io.realm.mongodb.sync.SyncSession.State ` -- :ref:`io.realm.mongodb.sync.ClientResetRequiredError ` - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt deleted file mode 100644 index 5c33a0403c..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/ClientResetRequiredError.txt +++ /dev/null @@ -1,316 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Exception ClientResetRequiredError -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_ClientResetRequiredError: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | `java.lang.Throwable `__ - | `java.lang.Exception `__ - | `java.lang.RuntimeException `__ - | :ref:`io.realm.mongodb.AppException ` - | io.realm.mongodb.sync.ClientResetRequiredError - - -Class encapsulating information needed for handling a Client Reset event. - - -.. seealso:: - - - - - :ref:`SyncSession.ErrorHandler.onError(SyncSession, AppException) for more information about when and why Client Reset occurs and how to deal with it. ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`executeClientReset ` () - | - - - Calling this method will execute the Client Reset manually instead of waiting until next app restart. - - - - - * - public `File `__ - - | :ref:`getBackupFile ` () - | - - - Returns the location of the backed up Realm file. - - - - - * - public :ref:`RealmConfiguration ` - - | :ref:`getBackupRealmConfiguration ` () - | - - - The configuration that can be used to open the backup Realm offline. - - - - - * - public `File `__ - - | :ref:`getOriginalFile ` () - | - - - Returns the location of the original Realm file. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Throwable `__ : ``getMessage`` , ``getLocalizedMessage`` , ``getCause`` , ``initCause`` , ``toString`` , ``printStackTrace`` , ``printStackTrace`` , ``printStackTrace`` , ``fillInStackTrace`` , ``getStackTrace`` , ``setStackTrace`` , ``addSuppressed`` , ``getSuppressed`` -- Methods inherited from class :ref:`io.realm.mongodb.AppException ` : ``getErrorCode`` , ``getErrorType`` , ``getErrorIntValue`` , ``getErrorMessage`` , ``getException`` , ``getCategory`` , ``toString`` - - - - -Method Detail -============= - -.. _executeClientReset: - -.. _executeClientReset__: - -.. _ClientResetRequiredError_executeClientReset: - -.. _ClientResetRequiredError_executeClientReset__: - -.. _io_realm_mongodb_sync_ClientResetRequiredError_executeClientReset: - -.. _io_realm_mongodb_sync_ClientResetRequiredError_executeClientReset__: - - - -executeClientReset ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`executeClientReset ` () - | - - - - - * - Calling this method will execute the Client Reset manually instead of waiting until next app restart. This will only be possible if all instances of that Realm have been closed, otherwise a `IllegalStateException `__ will be thrown. - - After this method returns, the backup file can be found in the location returned by :ref:`getBackupFile() ` . The file at :ref:`getOriginalFile() ` have been deleted, but will be recreated from scratch next time a Realm instance is opened. - - - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if not all instances have been closed. - - - - - - - - - - - - -.. _getBackupFile: - -.. _getBackupFile__: - -.. _ClientResetRequiredError_getBackupFile: - -.. _ClientResetRequiredError_getBackupFile__: - -.. _io_realm_mongodb_sync_ClientResetRequiredError_getBackupFile: - -.. _io_realm_mongodb_sync_ClientResetRequiredError_getBackupFile__: - - - -getBackupFile -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `File `__ :ref:`getBackupFile ` () - | - - - - - * - Returns the location of the backed up Realm file. The file will not be present until the Client Reset has been fully executed. - - - - - - - **Returns** - - a reference to the location of the backup file once Client Reset has been executed. Use ``file.exists()`` to check if the file exists or not. - - - - - - - - - - - - - -.. _getBackupRealmConfiguration: - -.. _getBackupRealmConfiguration__: - -.. _ClientResetRequiredError_getBackupRealmConfiguration: - -.. _ClientResetRequiredError_getBackupRealmConfiguration__: - -.. _io_realm_mongodb_sync_ClientResetRequiredError_getBackupRealmConfiguration: - -.. _io_realm_mongodb_sync_ClientResetRequiredError_getBackupRealmConfiguration__: - - - -getBackupRealmConfiguration ---------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmConfiguration ` :ref:`getBackupRealmConfiguration ` () - | - - - - - * - The configuration that can be used to open the backup Realm offline. This configuration can only be used in combination with a :ref:`DynamicRealm ` . - - - - - - - - - **Returns** - - the configuration that can be used to open the backup Realm offline. - - - - - - - - - - - -.. _getOriginalFile: - -.. _getOriginalFile__: - -.. _ClientResetRequiredError_getOriginalFile: - -.. _ClientResetRequiredError_getOriginalFile__: - -.. _io_realm_mongodb_sync_ClientResetRequiredError_getOriginalFile: - -.. _io_realm_mongodb_sync_ClientResetRequiredError_getOriginalFile__: - - - -getOriginalFile ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public `File `__ :ref:`getOriginalFile ` () - | - - - - - * - Returns the location of the original Realm file. After the Client Reset has completed, the file at this location will be deleted. - - - - - - - **Returns** - - a reference to the location of the original Realm file. After Client Reset has been executed this file will no longer exists. Use ``file.exists()`` to check this. - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionListener.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionListener.txt deleted file mode 100644 index 61b11b1fce..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionListener.txt +++ /dev/null @@ -1,178 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface ConnectionListener -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_ConnectionListener: - - - -io.realm.mongodb.sync -===================== - -Interface used when reporting changes that happened to the connection used by the session.Multiple sessions might re-use the same connection. In that case, any connection change will be reported to all sessions. - -If a disconnect happened due to an error, that error will be reported to the sessions :ref:`SyncSession.ErrorHandler ` . - - - - - - -.. seealso:: - - - - - :ref:`SyncSession.isConnected() ` - - - - - :ref:`SyncConfiguration.Builder.errorHandler(SyncSession.ErrorHandler) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onChange ` ( - | :ref:`ConnectionState ` oldState, - | :ref:`ConnectionState ` newState - | ) - - - A change in the connection to the server was detected. - - - - - - - -Method Detail -============= - -.. _onChange: - -.. _onChange__: - -.. _ConnectionListener_onChange: - -.. _ConnectionListener_onChange__: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange__: - - - -onChange --------- - -.. _io_realm_mongodb_sync_ConnectionListener_onChange_io_realm_mongodb_sync_ConnectionState_io_realm_mongodb_sync_ConnectionState_: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange_io_realm_mongodb_sync_ConnectionState__io_realm_mongodb_sync_ConnectionState_: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange_io_realm_mongodb_sync_ConnectionState_ConnectionState_: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange_io_realm_mongodb_sync_ConnectionState__ConnectionState_: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange_ConnectionState_io_realm_mongodb_sync_ConnectionState_: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange_ConnectionState__io_realm_mongodb_sync_ConnectionState_: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange_ConnectionState_ConnectionState_: - -.. _io_realm_mongodb_sync_ConnectionListener_onChange_ConnectionState__ConnectionState_: - -.. _onChange_io_realm_mongodb_sync_ConnectionState_io_realm_mongodb_sync_ConnectionState_: - -.. _onChange_io_realm_mongodb_sync_ConnectionState__io_realm_mongodb_sync_ConnectionState_: - -.. _onChange_io_realm_mongodb_sync_ConnectionState_ConnectionState_: - -.. _onChange_io_realm_mongodb_sync_ConnectionState__ConnectionState_: - -.. _onChange_ConnectionState_io_realm_mongodb_sync_ConnectionState_: - -.. _onChange_ConnectionState__io_realm_mongodb_sync_ConnectionState_: - -.. _onChange_ConnectionState_ConnectionState_: - -.. _onChange_ConnectionState__ConnectionState_: - -.. _ConnectionListener_onChange_io_realm_mongodb_sync_ConnectionState_io_realm_mongodb_sync_ConnectionState_: - -.. _ConnectionListener_onChange_io_realm_mongodb_sync_ConnectionState__io_realm_mongodb_sync_ConnectionState_: - -.. _ConnectionListener_onChange_io_realm_mongodb_sync_ConnectionState_ConnectionState_: - -.. _ConnectionListener_onChange_io_realm_mongodb_sync_ConnectionState__ConnectionState_: - -.. _ConnectionListener_onChange_ConnectionState_io_realm_mongodb_sync_ConnectionState_: - -.. _ConnectionListener_onChange_ConnectionState__io_realm_mongodb_sync_ConnectionState_: - -.. _ConnectionListener_onChange_ConnectionState_ConnectionState_: - -.. _ConnectionListener_onChange_ConnectionState__ConnectionState_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onChange ` ( - | :ref:`ConnectionState ` oldState, - | :ref:`ConnectionState ` newState - | ) - - - - - * - A change in the connection to the server was detected. - - - - - **Parameters** - - - ``oldState`` - the state the connection transitioned from. - - - - - ``newState`` - the state the connection transitioned to. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionState.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionState.txt deleted file mode 100644 index 4db226a9bf..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/ConnectionState.txt +++ /dev/null @@ -1,263 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum ConnectionState -^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_ConnectionState: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.sync.ConnectionState - - -Enum describing the states of the underlying connection used by a :ref:`SyncSession ` . - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`CONNECTED ` - - A connection was successfully established to the server. - - - - - * - :ref:`CONNECTING ` - - A connection is currently in progress of being established. - - - - - * - :ref:`DISCONNECTED ` - - No connection to the server exists. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`ConnectionState ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`ConnectionState ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_sync_ConnectionState_CONNECTED: - -.. _ConnectionState_CONNECTED: - - - -``CONNECTED`` --------------- - -public static final :ref:`ConnectionState ` - -A connection was successfully established to the server. If the SyncSession is :ref:`SyncSession.State.ACTIVE ` data will now be transferred between the device and the server. - - - - - -.. _io_realm_mongodb_sync_ConnectionState_CONNECTING: - -.. _ConnectionState_CONNECTING: - - - -``CONNECTING`` ---------------- - -public static final :ref:`ConnectionState ` - -A connection is currently in progress of being established. If successful the next state is :ref:`CONNECTED ` . If the connection fails it will be :ref:`DISCONNECTED ` . - - - - - -.. _io_realm_mongodb_sync_ConnectionState_DISCONNECTED: - -.. _ConnectionState_DISCONNECTED: - - - -``DISCONNECTED`` ------------------ - -public static final :ref:`ConnectionState ` - -No connection to the server exists. No data is being transferred even if the session is :ref:`SyncSession.State.ACTIVE ` . If the connection entered this state due to an error, this error will be reported to the :ref:`SyncSession.ErrorHandler ` . - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _ConnectionState_valueOf: - -.. _ConnectionState_valueOf__: - -.. _io_realm_mongodb_sync_ConnectionState_valueOf: - -.. _io_realm_mongodb_sync_ConnectionState_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_sync_ConnectionState_valueOf_java_lang_String_: - -.. _io_realm_mongodb_sync_ConnectionState_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _ConnectionState_valueOf_java_lang_String_: - -.. _ConnectionState_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ConnectionState ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _ConnectionState_values: - -.. _ConnectionState_values__: - -.. _io_realm_mongodb_sync_ConnectionState_values: - -.. _io_realm_mongodb_sync_ConnectionState_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ConnectionState ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt deleted file mode 100644 index 3d90fb96d5..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/DiscardUnsyncedChangesStrategy.txt +++ /dev/null @@ -1,380 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface DiscardUnsyncedChangesStrategy -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy: - - - -io.realm.mongodb.sync -===================== - -**Implemented interfaces:** - - - -- :ref:`io.realm.mongodb.sync.SyncClientResetStrategy ` - - -Strategy that automatically resolves a Client Reset by discarding any unsynced data, but otherwise keep the Realm open. Any changes will be reported through the normal collection and object notifications.A synced Realm may need to be reset because the MongoDB Realm Server encountered an error and had to be restored from a backup or because it has been too long since the client connected to the server so the server has rotated the logs. - -The Client Reset thus occurs because the server does not have the full information required to bring the Client fully up to date. - -The discard unsynced changes reset process is as follows: when a client reset is triggered the :ref:`onBeforeReset(Realm) ` callback is invoked, providing an instance of the Realm before the reset and another after the reset, both read-only. Once the reset has concluded the callback :ref:`onAfterReset(Realm, Realm) ` would be invoked with an instance of the final Realm. - - - -In the event that discarding the unsynced data is not enough to resolve the reset the :ref:`onError(SyncSession, ClientResetRequiredError) ` would be invoked, it allows to manually resolve the reset as it would be done in :ref:`ManuallyRecoverUnsyncedChangesStrategy.onClientReset(SyncSession, ClientResetRequiredError) ` . - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onAfterReset ` ( - | :ref:`Realm ` before, - | :ref:`Realm ` after - | ) - - - Callback invoked once the Client Reset happens. - - - - - * - public **void** - - | :ref:`onBeforeReset ` ( - | :ref:`Realm ` realm - | ) - - - Callback that indicates a Client Reset is about to happen. - - - - - * - public **void** - - | :ref:`onError ` ( - | :ref:`SyncSession ` session, - | :ref:`ClientResetRequiredError ` error - | ) - - - Callback that indicates the seamless Client reset couldn't complete. - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _onAfterReset: - -.. _onAfterReset__: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset__: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset__: - - - -onAfterReset ------------- - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset_io_realm_Realm_io_realm_Realm_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset_io_realm_Realm__io_realm_Realm_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset_io_realm_Realm_Realm_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset_io_realm_Realm__Realm_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset_Realm_io_realm_Realm_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset_Realm__io_realm_Realm_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset_Realm_Realm_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onAfterReset_Realm__Realm_: - -.. _onAfterReset_io_realm_Realm_io_realm_Realm_: - -.. _onAfterReset_io_realm_Realm__io_realm_Realm_: - -.. _onAfterReset_io_realm_Realm_Realm_: - -.. _onAfterReset_io_realm_Realm__Realm_: - -.. _onAfterReset_Realm_io_realm_Realm_: - -.. _onAfterReset_Realm__io_realm_Realm_: - -.. _onAfterReset_Realm_Realm_: - -.. _onAfterReset_Realm__Realm_: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset_io_realm_Realm_io_realm_Realm_: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset_io_realm_Realm__io_realm_Realm_: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset_io_realm_Realm_Realm_: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset_io_realm_Realm__Realm_: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset_Realm_io_realm_Realm_: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset_Realm__io_realm_Realm_: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset_Realm_Realm_: - -.. _DiscardUnsyncedChangesStrategy_onAfterReset_Realm__Realm_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onAfterReset ` ( - | :ref:`Realm ` before, - | :ref:`Realm ` after - | ) - - - - - * - Callback invoked once the Client Reset happens. It provides of two Realm instances, a frozen one displaying the state before the reset and a regular Realm with the current state, that can be used to recover objects from the reset. - - - - - **Parameters** - - - ``before`` - :ref:`Realm ` frozen Realm in the before after the reset. - - - - - - - ``after`` - :ref:`Realm ` Realm after the reset. - - - - - - - - - - - - - - - - - - -.. _onBeforeReset: - -.. _onBeforeReset__: - -.. _DiscardUnsyncedChangesStrategy_onBeforeReset: - -.. _DiscardUnsyncedChangesStrategy_onBeforeReset__: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onBeforeReset: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onBeforeReset__: - - - -onBeforeReset -------------- - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onBeforeReset_io_realm_Realm_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onBeforeReset_Realm_: - -.. _onBeforeReset_io_realm_Realm_: - -.. _onBeforeReset_Realm_: - -.. _DiscardUnsyncedChangesStrategy_onBeforeReset_io_realm_Realm_: - -.. _DiscardUnsyncedChangesStrategy_onBeforeReset_Realm_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onBeforeReset ` ( - | :ref:`Realm ` realm - | ) - - - - - * - Callback that indicates a Client Reset is about to happen. It provides with a frozen instance of the Realm that is will be reset. - - - - - **Parameters** - - - ``realm`` - frozen :ref:`Realm ` in its state before the reset. - - - - - - - - - - - - - - - - - - -.. _onError: - -.. _onError__: - -.. _DiscardUnsyncedChangesStrategy_onError: - -.. _DiscardUnsyncedChangesStrategy_onError__: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError__: - - - -onError -------- - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError_io_realm_mongodb_sync_SyncSession_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError_io_realm_mongodb_sync_SyncSession__ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError_SyncSession_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_onError_SyncSession__ClientResetRequiredError_: - -.. _onError_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _onError_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _onError_io_realm_mongodb_sync_SyncSession_ClientResetRequiredError_: - -.. _onError_io_realm_mongodb_sync_SyncSession__ClientResetRequiredError_: - -.. _onError_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _onError_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _onError_SyncSession_ClientResetRequiredError_: - -.. _onError_SyncSession__ClientResetRequiredError_: - -.. _DiscardUnsyncedChangesStrategy_onError_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _DiscardUnsyncedChangesStrategy_onError_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _DiscardUnsyncedChangesStrategy_onError_io_realm_mongodb_sync_SyncSession_ClientResetRequiredError_: - -.. _DiscardUnsyncedChangesStrategy_onError_io_realm_mongodb_sync_SyncSession__ClientResetRequiredError_: - -.. _DiscardUnsyncedChangesStrategy_onError_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _DiscardUnsyncedChangesStrategy_onError_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _DiscardUnsyncedChangesStrategy_onError_SyncSession_ClientResetRequiredError_: - -.. _DiscardUnsyncedChangesStrategy_onError_SyncSession__ClientResetRequiredError_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | :ref:`SyncSession ` session, - | :ref:`ClientResetRequiredError ` error - | ) - - - - - * - Callback that indicates the seamless Client reset couldn't complete. It should be handled as :ref:`ManuallyRecoverUnsyncedChangesStrategy.onClientReset(SyncSession, ClientResetRequiredError) ` . - - - - - - - **Parameters** - - - ``session`` - :ref:`SyncSession ` this error happened on. - - - - - - - ``error`` - :ref:`ClientResetRequiredError ` the specific Client Reset error. - - - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt deleted file mode 100644 index b3d007ca50..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/ManuallyRecoverUnsyncedChangesStrategy.txt +++ /dev/null @@ -1,194 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface ManuallyRecoverUnsyncedChangesStrategy -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy: - - - -io.realm.mongodb.sync -===================== - -**Implemented interfaces:** - - - -- :ref:`io.realm.mongodb.sync.SyncClientResetStrategy ` - - -Strategy to manually resolve a Client Reset, determined by the error code :ref:`ErrorCode.CLIENT_RESET ` . - -A synced Realm may need to be reset because the MongoDB Realm Server encountered an error and had to be restored from a backup or because it has been too long since the client connected to the server so the server has rotated the logs. - -The Client Reset thus occurs because the server does not have the full information required to bring the Client fully up to date. - -The manual reset process is as follows: the local copy of the Realm is copied into a recovery directory for safekeeping, and then deleted from the original location. The next time the Realm for that URL is opened, the Realm will automatically be re-downloaded from MongoDB Realm, and can be used as normal. - -Data written to the Realm after the local copy of the Realm diverged from the backup remote copy 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 backed up on the server. - -The client reset process can be initiated in one of two ways: - - - -1. Run :ref:`ClientResetRequiredError.executeClientReset() ` manually. All Realm instances must be closed before this method is called. - - - - -#. If Client Reset isn't executed manually, it will automatically be carried out the next time all Realm instances have been closed and re-opened. This will most likely be when the app is restarted. - - - - -**WARNING:** Any writes to the Realm file between this callback and Client Reset has been executed, will not be synchronized to MongoDB Realm. Those changes will only be present in the backed up file. It is therefore recommended to close all open Realm instances as soon as possible. - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onClientReset ` ( - | :ref:`SyncSession ` session, - | :ref:`ClientResetRequiredError ` error - | ) - - - Callback that indicates a Client Reset has happened. - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _onClientReset: - -.. _onClientReset__: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset__: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset__: - - - -onClientReset -------------- - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset_io_realm_mongodb_sync_SyncSession_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset_io_realm_mongodb_sync_SyncSession__ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset_SyncSession_ClientResetRequiredError_: - -.. _io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_onClientReset_SyncSession__ClientResetRequiredError_: - -.. _onClientReset_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _onClientReset_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _onClientReset_io_realm_mongodb_sync_SyncSession_ClientResetRequiredError_: - -.. _onClientReset_io_realm_mongodb_sync_SyncSession__ClientResetRequiredError_: - -.. _onClientReset_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _onClientReset_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _onClientReset_SyncSession_ClientResetRequiredError_: - -.. _onClientReset_SyncSession__ClientResetRequiredError_: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset_io_realm_mongodb_sync_SyncSession_ClientResetRequiredError_: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset_io_realm_mongodb_sync_SyncSession__ClientResetRequiredError_: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset_SyncSession_io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset_SyncSession__io_realm_mongodb_sync_ClientResetRequiredError_: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset_SyncSession_ClientResetRequiredError_: - -.. _ManuallyRecoverUnsyncedChangesStrategy_onClientReset_SyncSession__ClientResetRequiredError_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onClientReset ` ( - | :ref:`SyncSession ` session, - | :ref:`ClientResetRequiredError ` error - | ) - - - - - * - Callback that indicates a Client Reset has happened. This should be handled as quickly as possible as any further changes to the Realm will not be synchronized with the server and must be moved manually from the backup Realm to the new one. - - - - - **Parameters** - - - ``session`` - :ref:`SyncSession ` this error happened on. - - - - - - - ``error`` - :ref:`ClientResetRequiredError ` the specific Client Reset error. - - - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt deleted file mode 100644 index f2fae54572..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/MutableSubscriptionSet.txt +++ /dev/null @@ -1,577 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface MutableSubscriptionSet -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_MutableSubscriptionSet: - - - -io.realm.mongodb.sync -===================== - -**Implemented interfaces:** - - - -- :ref:`io.realm.mongodb.sync.SubscriptionSet ` -- `java.lang.Iterable `__ - - -A mutable subscription set is available when calling :ref:`SubscriptionSet.update(UpdateCallback) ` This is the only way to modify a :ref:`SubscriptionSet ` . :ref:`Subscription ` s can be either - -*managed* or *unmanaged*. Unmanaged subscriptions are those created by using :ref:`Subscription.create(RealmQuery) ` or :ref:`Subscription.create(String, RealmQuery) ` , while managed subscriptions are the ones being returned from the subscription set. - - - - -.. seealso:: - - - - - :ref:`SubscriptionSet for more information about subscription sets and flexible sync. ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`Subscription ` - - | :ref:`add ` ( - | :ref:`Subscription ` subscription - | ) - - - Adds a new unmanaged subscription to the subscription set. - - - - - * - public :ref:`Subscription ` - - | :ref:`addOrUpdate ` ( - | :ref:`Subscription ` subscription - | ) - - - Add a new subscription or update an existing named subscription. - - - - - * - public **boolean** - - | :ref:`remove ` ( - | `String `__ name - | ) - - - Remove a named subscription. - - - - - * - public **boolean** - - | :ref:`remove ` ( - | :ref:`Subscription ` subscription - | ) - - - Remove a managed subscription. - - - - - * - public **boolean** - - | :ref:`removeAll ` () - | - - - Remove all current managed subscriptions. - - - - - * - public **boolean** - - | :ref:`removeAll ` <**T** >( - | `java.lang.Class\ `__ clazz - | ) - - - Remove all subscriptions with queries on a given given model class. - - - - - * - public **boolean** - - | :ref:`removeAll ` ( - | `String `__ objectType - | ) - - - Remove all subscriptions on a given :ref:`Subscription.getObjectType() ` . - - - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _add: - -.. _add__: - -.. _MutableSubscriptionSet_add: - -.. _MutableSubscriptionSet_add__: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_add: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_add__: - - - -add ----- - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_add_io_realm_mongodb_sync_Subscription_: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_add_Subscription_: - -.. _add_io_realm_mongodb_sync_Subscription_: - -.. _add_Subscription_: - -.. _MutableSubscriptionSet_add_io_realm_mongodb_sync_Subscription_: - -.. _MutableSubscriptionSet_add_Subscription_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Subscription ` :ref:`add ` ( - | :ref:`Subscription ` subscription - | ) - - - - - * - Adds a new unmanaged subscription to the subscription set. - - - - - **Parameters** - - - ``subscription`` - unmanaged subscription to add. - - - - - - - - **Returns** - - the newly added managed subscription. - - - - - **Throws** - - - `IllegalArgumentException `__ - if a subscription matching the provided one already exists. - - - - - - - - - - - - -.. _addOrUpdate: - -.. _addOrUpdate__: - -.. _MutableSubscriptionSet_addOrUpdate: - -.. _MutableSubscriptionSet_addOrUpdate__: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_addOrUpdate: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_addOrUpdate__: - - - -addOrUpdate ------------ - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_addOrUpdate_io_realm_mongodb_sync_Subscription_: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_addOrUpdate_Subscription_: - -.. _addOrUpdate_io_realm_mongodb_sync_Subscription_: - -.. _addOrUpdate_Subscription_: - -.. _MutableSubscriptionSet_addOrUpdate_io_realm_mongodb_sync_Subscription_: - -.. _MutableSubscriptionSet_addOrUpdate_Subscription_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Subscription ` :ref:`addOrUpdate ` ( - | :ref:`Subscription ` subscription - | ) - - - - - * - Add a new subscription or update an existing named subscription. It isn't possible to update an anonymous subscription. These must removed and re-inserted. - - - - - **Parameters** - - - ``subscription`` - anonymous or named subscription created via ``Subscription.create(...)`` , used to update a matching one within a specific set. It creates a new one in case there is no match.. - - - - - - - - - - **Returns** - - the updated or inserted managed subscription. - - - - - - - - - - - -.. _remove: - -.. _remove__: - -.. _MutableSubscriptionSet_remove: - -.. _MutableSubscriptionSet_remove__: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_remove: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_remove__: - - - -remove ------- - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_remove_java_lang_String_: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_remove_String_: - -.. _remove_java_lang_String_: - -.. _remove_String_: - -.. _MutableSubscriptionSet_remove_java_lang_String_: - -.. _MutableSubscriptionSet_remove_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`remove ` ( - | `String `__ name - | ) - - - - - * - Remove a named subscription. - - - - - **Parameters** - - - ``name`` - name of managed subscription to remove. - - - - - - - - **Returns** - - ``true`` if the subscription was removed, ``false`` if not. - - - - - - - - - - - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_remove_io_realm_mongodb_sync_Subscription_: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_remove_Subscription_: - -.. _remove_io_realm_mongodb_sync_Subscription_: - -.. _remove_Subscription_: - -.. _MutableSubscriptionSet_remove_io_realm_mongodb_sync_Subscription_: - -.. _MutableSubscriptionSet_remove_Subscription_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`remove ` ( - | :ref:`Subscription ` subscription - | ) - - - - - * - Remove a managed subscription. - - - - - **Parameters** - - - ``subscription`` - managed subscription to remove - - - - - - - - **Returns** - - ``true`` if the subscription was removed, ``false`` if not. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the subscription provided is unmanaged. Only managed subscriptions can be used as input. - - - - - - - - - - - - -.. _removeAll: - -.. _removeAll__: - -.. _MutableSubscriptionSet_removeAll: - -.. _MutableSubscriptionSet_removeAll__: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_removeAll: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_removeAll__: - - - -removeAll ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`removeAll ` () - | - - - - - * - Remove all current managed subscriptions. - - - - - - - **Returns** - - ``true`` if 1 or more subscriptions were removed, ``false`` if no subscriptions were removed. - - - - - - - - - - - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_removeAll_java_lang_Class_: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_removeAll_Class_: - -.. _removeAll_java_lang_Class_: - -.. _removeAll_Class_: - -.. _MutableSubscriptionSet_removeAll_java_lang_Class_: - -.. _MutableSubscriptionSet_removeAll_Class_: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_removeAll_Class_T__: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`removeAll ` <**T** >( - | `java.lang.Class\ `__ clazz - | ) - - - - - * - Remove all subscriptions with queries on a given given model class. - - - - - **Parameters** - - - ``clazz`` - subscriptions on this type will be removed. - - - - - - - - **Returns** - - ``true`` if 1 or more subscriptions were removed, ``false`` if no subscriptions were removed. - - - - - - - - - - - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_removeAll_java_lang_String_: - -.. _io_realm_mongodb_sync_MutableSubscriptionSet_removeAll_String_: - -.. _removeAll_java_lang_String_: - -.. _removeAll_String_: - -.. _MutableSubscriptionSet_removeAll_java_lang_String_: - -.. _MutableSubscriptionSet_removeAll_String_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`removeAll ` ( - | `String `__ objectType - | ) - - - - - * - Remove all subscriptions on a given :ref:`Subscription.getObjectType() ` . - - - - - - - **Parameters** - - - ``objectType`` - subscriptions on this object type will be removed. - - - - - - - - **Returns** - - ``true`` if 1 or more subscriptions were removed, ``false`` if no subscriptions were removed. - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/Progress.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/Progress.txt deleted file mode 100644 index bb16bf5f3e..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/Progress.txt +++ /dev/null @@ -1,521 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Progress -^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_Progress: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.sync.Progress - - -Class used to encapsulate progress notifications when either downloading or uploading Realm data. Each instance of this class is an immutable snapshot of the current progress.If the :ref:`ProgressListener ` was registered with :ref:`ProgressMode.INDEFINITELY ` , the progress reported by :ref:`getFractionTransferred() ` can both increase and decrease since more changes might be added while the progres listener is registered. This means it is possible for one notification to report ``true`` for :ref:`isTransferComplete() ` , and then on the next event report ``false`` . - - - -If the :ref:`ProgressListener ` was registered with :ref:`ProgressMode.CURRENT_CHANGES ` , progress can only ever increase, and once :ref:`isTransferComplete() ` returns ``true`` , no further events will be generated. - - - - - - -.. seealso:: - - - - - :ref:`SyncSession.addDownloadProgressListener(ProgressMode, ProgressListener) ` - - - - - :ref:`SyncSession.addUploadProgressListener(ProgressMode, ProgressListener) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public **double** - - | :ref:`getFractionTransferred ` () - | - - - The fraction of bytes transferred out of all transferable bytes. - - - - - * - public **long** - - | :ref:`getTransferableBytes ` () - | - - - Returns the total number of transferable bytes (bytes that have been transferred + bytes pending transfer). - - - - - * - public **long** - - | :ref:`getTransferredBytes ` () - | - - - Returns the total number of bytes that has been transferred since the :ref:`ProgressListener ` was added. - - - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isTransferComplete ` () - | - - - Returns ``true`` when all pending bytes have been transferred. - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _Progress_equals: - -.. _Progress_equals__: - -.. _io_realm_mongodb_sync_Progress_equals: - -.. _io_realm_mongodb_sync_Progress_equals__: - - - -equals ------- - -.. _io_realm_mongodb_sync_Progress_equals_java_lang_Object_: - -.. _io_realm_mongodb_sync_Progress_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _Progress_equals_java_lang_Object_: - -.. _Progress_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getFractionTransferred: - -.. _getFractionTransferred__: - -.. _Progress_getFractionTransferred: - -.. _Progress_getFractionTransferred__: - -.. _io_realm_mongodb_sync_Progress_getFractionTransferred: - -.. _io_realm_mongodb_sync_Progress_getFractionTransferred__: - - - -getFractionTransferred ----------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **double** :ref:`getFractionTransferred ` () - | - - - - - * - The fraction of bytes transferred out of all transferable bytes. Counting from since the :ref:`ProgressListener ` was added. - - - - - - - - - **Returns** - - a number between ``0.0`` and ``1.0`` , where ``0.0`` represents that no data has been transferred yet, and ``1.0`` that all data has been transferred. - - - - - - - - - - - - - -.. _getTransferableBytes: - -.. _getTransferableBytes__: - -.. _Progress_getTransferableBytes: - -.. _Progress_getTransferableBytes__: - -.. _io_realm_mongodb_sync_Progress_getTransferableBytes: - -.. _io_realm_mongodb_sync_Progress_getTransferableBytes__: - - - -getTransferableBytes --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getTransferableBytes ` () - | - - - - - * - Returns the total number of transferable bytes (bytes that have been transferred + bytes pending transfer).If the :ref:`ProgressListener ` is tracking downloads, this number represents the size of the changesets generated by all other clients using the Realm. - - - - If the :ref:`ProgressListener ` is tracking uploads, this number represents the size of changesets created locally. - - - - - - - - - - - **Returns** - - the total number of bytes that has been transferred + number of bytes still pending transfer. - - - - - - - - - - - -.. _getTransferredBytes: - -.. _getTransferredBytes__: - -.. _Progress_getTransferredBytes: - -.. _Progress_getTransferredBytes__: - -.. _io_realm_mongodb_sync_Progress_getTransferredBytes: - -.. _io_realm_mongodb_sync_Progress_getTransferredBytes__: - - - -getTransferredBytes -------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getTransferredBytes ` () - | - - - - - * - Returns the total number of bytes that has been transferred since the :ref:`ProgressListener ` was added. - - - - - - - - - **Returns** - - the total number of bytes transferred since the :ref:`ProgressListener ` was added. - - - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _Progress_hashCode: - -.. _Progress_hashCode__: - -.. _io_realm_mongodb_sync_Progress_hashCode: - -.. _io_realm_mongodb_sync_Progress_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _isTransferComplete: - -.. _isTransferComplete__: - -.. _Progress_isTransferComplete: - -.. _Progress_isTransferComplete__: - -.. _io_realm_mongodb_sync_Progress_isTransferComplete: - -.. _io_realm_mongodb_sync_Progress_isTransferComplete__: - - - -isTransferComplete ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isTransferComplete ` () - | - - - - - * - Returns ``true`` when all pending bytes have been transferred. - - If the :ref:`ProgressListener ` was registered with :ref:`ProgressMode.INDEFINITELY ` , this method can return ``false`` for subsequent events after returning ``true`` . - - - - If the :ref:`ProgressListener ` was registered with :ref:`ProgressMode.CURRENT_CHANGES ` , when this method returns ``true`` , no more progress events will be sent. - - - - - - - - - - - **Returns** - - ``true`` if all changes have been transferred, ``false`` otherwise. - - - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _Progress_toString: - -.. _Progress_toString__: - -.. _io_realm_mongodb_sync_Progress_toString: - -.. _io_realm_mongodb_sync_Progress_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressListener.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressListener.txt deleted file mode 100644 index fccd49e723..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressListener.txt +++ /dev/null @@ -1,142 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface ProgressListener -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_ProgressListener: - - - -io.realm.mongodb.sync -===================== - -Interface used when interested in updates on data either being uploaded to or downloaded from a Realm Object Server. - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onChange ` ( - | :ref:`Progress ` progress - | ) - - - This method will be called periodically from the underlying Object Server Client responsible for uploading and downloading changes from the remote Object Server. - - - - - - - -Method Detail -============= - -.. _onChange: - -.. _onChange__: - -.. _ProgressListener_onChange: - -.. _ProgressListener_onChange__: - -.. _io_realm_mongodb_sync_ProgressListener_onChange: - -.. _io_realm_mongodb_sync_ProgressListener_onChange__: - - - -onChange --------- - -.. _io_realm_mongodb_sync_ProgressListener_onChange_io_realm_mongodb_sync_Progress_: - -.. _io_realm_mongodb_sync_ProgressListener_onChange_Progress_: - -.. _onChange_io_realm_mongodb_sync_Progress_: - -.. _onChange_Progress_: - -.. _ProgressListener_onChange_io_realm_mongodb_sync_Progress_: - -.. _ProgressListener_onChange_Progress_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onChange ` ( - | :ref:`Progress ` progress - | ) - - - - - * - This method will be called periodically from the underlying Object Server Client responsible for uploading and downloading changes from the remote Object Server.This callback will *not* happen on the UI thread, but on the worker thread controlling the Object Server Client. Use ``Activity.runOnUiThread(Runnable)`` or similar to update any UI elements. - - - - - - .. code-block:: java - - - // Adding an upload progress listener that completes when all known changes have been - // uploaded. - session.addUploadProgressListener(ProgressMode.CURRENT_CHANGES, new ProgressListener() { - @Override - public void onChange(Progress progress) { - activity.runOnUiThread(new Runnable() { - @Override - public void run() { - updateProgressBar(progress); - } - }); - if (progress.isTransferComplete() { - session.removeProgressListener(this); - } - } - }); - - - - - - - - - - - **Parameters** - - - ``progress`` - an immutable progress change event with information about current progress. This object is thread safe. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressMode.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressMode.txt deleted file mode 100644 index 71a5c9ef99..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/ProgressMode.txt +++ /dev/null @@ -1,251 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum ProgressMode -^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_ProgressMode: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.sync.ProgressMode - - -Enum describing how to listen to progress changes. - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`CURRENT_CHANGES ` - - When registering the :ref:`ProgressListener ` , it will record the current size of changes, and will only continue to report progress updates until those changes have been either downloaded or uploaded. - - - - - - - * - :ref:`INDEFINITELY ` - - A :ref:`ProgressListener ` registered in this mode, will continue to report progress changes, even if changes are being added after the listener was registered. - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`ProgressMode ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`ProgressMode ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_sync_ProgressMode_CURRENT_CHANGES: - -.. _ProgressMode_CURRENT_CHANGES: - - - -``CURRENT_CHANGES`` --------------------- - -public static final :ref:`ProgressMode ` - -When registering the :ref:`ProgressListener ` , it will record the current size of changes, and will only continue to report progress updates until those changes have been either downloaded or uploaded. After that the progress listener will not report any further changes. - -This means that listeners registered in this mode should be done *before* changes are written to the Realm. - -Progress reported in this mode will only ever increase. - -This is useful when e.g. reporting progress when downloading a Realm for the first time. - - - - - -.. _io_realm_mongodb_sync_ProgressMode_INDEFINITELY: - -.. _ProgressMode_INDEFINITELY: - - - -``INDEFINITELY`` ------------------ - -public static final :ref:`ProgressMode ` - -A :ref:`ProgressListener ` registered in this mode, will continue to report progress changes, even if changes are being added after the listener was registered. - -Progress reported in this mode can both increase and decrease, e.g. if large amounts of data is written after registering the listener. - -This is useful when you want to track if all changes have been uploaded to the server from the device. - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _ProgressMode_valueOf: - -.. _ProgressMode_valueOf__: - -.. _io_realm_mongodb_sync_ProgressMode_valueOf: - -.. _io_realm_mongodb_sync_ProgressMode_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_sync_ProgressMode_valueOf_java_lang_String_: - -.. _io_realm_mongodb_sync_ProgressMode_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _ProgressMode_valueOf_java_lang_String_: - -.. _ProgressMode_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ProgressMode ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _ProgressMode_values: - -.. _ProgressMode_values__: - -.. _io_realm_mongodb_sync_ProgressMode_values: - -.. _io_realm_mongodb_sync_ProgressMode_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`ProgressMode ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/Subscription.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/Subscription.txt deleted file mode 100644 index ceeefa0e4d..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/Subscription.txt +++ /dev/null @@ -1,526 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface Subscription -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_Subscription: - - - -io.realm.mongodb.sync -===================== - -A subscription defines a specific server query and its metadata. The result of this query is continuously being synchronized with the device as long as the subscription is part of a :ref:`SubscriptionSet ` with a state of :ref:`SubscriptionSet.State.COMPLETE ` . Subscriptions are immutable once created, but they can be updated by using a :ref:`MutableSubscriptionSet.addOrUpdate(Subscription) ` . - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`Subscription ` - - | :ref:`create ` ( - | :ref:`io.realm.RealmQuery ` query - | ) - - - Create an unmanaged anonymous subscription for a flexible sync enabled Realm. - - - - - * - public static :ref:`Subscription ` - - | :ref:`create ` ( - | `String `__ name, - | :ref:`io.realm.RealmQuery ` query - | ) - - - Create an unmanaged named subscription for a flexible sync enabled Realm. - - - - - * - public `Date `__ - - | :ref:`getCreatedAt ` () - | - - - Returns the timestamp for when this subscription was persisted. - - - - - * - public `String `__ - - | :ref:`getName ` () - | - - - Returns the name of subscription or ``null`` if no name was defined. - - - - - - - * - public `String `__ - - | :ref:`getObjectType ` () - | - - - Returns the type that is being queried. - - - - - * - public `String `__ - - | :ref:`getQuery ` () - | - - - Returns the subscription query that is running on objects of type :ref:`getObjectType() ` . - - - - - - - * - public `Date `__ - - | :ref:`getUpdatedAt ` () - | - - - Returns the timestamp for when a persisted subscription was updated. - - - - - - - -Method Detail -============= - -.. _create: - -.. _create__: - -.. _Subscription_create: - -.. _Subscription_create__: - -.. _io_realm_mongodb_sync_Subscription_create: - -.. _io_realm_mongodb_sync_Subscription_create__: - - - -create ------- - -.. _io_realm_mongodb_sync_Subscription_create_io_realm_RealmQuery_: - -.. _io_realm_mongodb_sync_Subscription_create_RealmQuery_: - -.. _create_io_realm_RealmQuery_: - -.. _create_RealmQuery_: - -.. _Subscription_create_io_realm_RealmQuery_: - -.. _Subscription_create_RealmQuery_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Subscription ` :ref:`create ` ( - | :ref:`io.realm.RealmQuery ` query - | ) - - - - - * - Create an unmanaged anonymous subscription for a flexible sync enabled Realm. The subscription will not take effect until it has been stored using either :ref:`MutableSubscriptionSet.add(Subscription) ` or :ref:`MutableSubscriptionSet.addOrUpdate(Subscription) ` . - - - - - - - **Parameters** - - - ``query`` - the query that is subscribed to. Note, subscription queries have restrictions compared to normal queries. - - - - - - - - **Returns** - - the unmanaged subscription. - - - - - - - - - -.. _io_realm_mongodb_sync_Subscription_create_java_lang_String_io_realm_RealmQuery_: - -.. _io_realm_mongodb_sync_Subscription_create_java_lang_String__io_realm_RealmQuery_: - -.. _io_realm_mongodb_sync_Subscription_create_java_lang_String_RealmQuery_: - -.. _io_realm_mongodb_sync_Subscription_create_java_lang_String__RealmQuery_: - -.. _io_realm_mongodb_sync_Subscription_create_String_io_realm_RealmQuery_: - -.. _io_realm_mongodb_sync_Subscription_create_String__io_realm_RealmQuery_: - -.. _io_realm_mongodb_sync_Subscription_create_String_RealmQuery_: - -.. _io_realm_mongodb_sync_Subscription_create_String__RealmQuery_: - -.. _create_java_lang_String_io_realm_RealmQuery_: - -.. _create_java_lang_String__io_realm_RealmQuery_: - -.. _create_java_lang_String_RealmQuery_: - -.. _create_java_lang_String__RealmQuery_: - -.. _create_String_io_realm_RealmQuery_: - -.. _create_String__io_realm_RealmQuery_: - -.. _create_String_RealmQuery_: - -.. _create_String__RealmQuery_: - -.. _Subscription_create_java_lang_String_io_realm_RealmQuery_: - -.. _Subscription_create_java_lang_String__io_realm_RealmQuery_: - -.. _Subscription_create_java_lang_String_RealmQuery_: - -.. _Subscription_create_java_lang_String__RealmQuery_: - -.. _Subscription_create_String_io_realm_RealmQuery_: - -.. _Subscription_create_String__io_realm_RealmQuery_: - -.. _Subscription_create_String_RealmQuery_: - -.. _Subscription_create_String__RealmQuery_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`Subscription ` :ref:`create ` ( - | `String `__ name, - | :ref:`io.realm.RealmQuery ` query - | ) - - - - - * - Create an unmanaged named subscription for a flexible sync enabled Realm. The subscription will not take effect until it has been stored using either :ref:`MutableSubscriptionSet.add(Subscription) ` or :ref:`MutableSubscriptionSet.addOrUpdate(Subscription) ` . - - - - - - - **Parameters** - - - ``name`` - the name of the subscription - - - - - ``query`` - the query that is subscribed to. Note, subscription queries have restrictions compared to normal queries. - - - - - - - - **Returns** - - the unmanaged subscription. - - - - - - - - - - - -.. _getCreatedAt: - -.. _getCreatedAt__: - -.. _Subscription_getCreatedAt: - -.. _Subscription_getCreatedAt__: - -.. _io_realm_mongodb_sync_Subscription_getCreatedAt: - -.. _io_realm_mongodb_sync_Subscription_getCreatedAt__: - - - -getCreatedAt ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`getCreatedAt ` () - | - - - - - * - Returns the timestamp for when this subscription was persisted. This will return ``null`` until the Subscription has been added using either :ref:`MutableSubscriptionSet.add(Subscription) ` or :ref:`MutableSubscriptionSet.addOrUpdate(Subscription) ` . - - - - - - - - - **Returns** - - the time this subscription was persisted, or ``null`` if the subscription hasn't been persisted yet. - - - - - - - - - - - - - -.. _getName: - -.. _getName__: - -.. _Subscription_getName: - -.. _Subscription_getName__: - -.. _io_realm_mongodb_sync_Subscription_getName: - -.. _io_realm_mongodb_sync_Subscription_getName__: - - - -getName -------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getName ` () - | - - - - - * - Returns the name of subscription or ``null`` if no name was defined. - - - - - - - - - **Returns** - - the name of the subscription. - - - - - - - - - - - -.. _getObjectType: - -.. _getObjectType__: - -.. _Subscription_getObjectType: - -.. _Subscription_getObjectType__: - -.. _io_realm_mongodb_sync_Subscription_getObjectType: - -.. _io_realm_mongodb_sync_Subscription_getObjectType__: - - - -getObjectType -------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getObjectType ` () - | - - - - - * - Returns the type that is being queried. - - - - - - - **Returns** - - the type that is being queried. - - - - - - - - - - - -.. _getQuery: - -.. _getQuery__: - -.. _Subscription_getQuery: - -.. _Subscription_getQuery__: - -.. _io_realm_mongodb_sync_Subscription_getQuery: - -.. _io_realm_mongodb_sync_Subscription_getQuery__: - - - -getQuery --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getQuery ` () - | - - - - - * - Returns the subscription query that is running on objects of type :ref:`getObjectType() ` . - - - - - - - - - **Returns** - - the query covered by this subscription. - - - - - - - - - - - -.. _getUpdatedAt: - -.. _getUpdatedAt__: - -.. _Subscription_getUpdatedAt: - -.. _Subscription_getUpdatedAt__: - -.. _io_realm_mongodb_sync_Subscription_getUpdatedAt: - -.. _io_realm_mongodb_sync_Subscription_getUpdatedAt__: - - - -getUpdatedAt ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `Date `__ :ref:`getUpdatedAt ` () - | - - - - - * - Returns the timestamp for when a persisted subscription was updated. This will return ``null`` until the Subscription has been added using either :ref:`MutableSubscriptionSet.add(Subscription) ` or :ref:`MutableSubscriptionSet.addOrUpdate(Subscription) ` . - - - - - - - - - **Returns** - - the time this subscription was updated, or ``null`` if the subscription hasn't been persisted yet. - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet.txt deleted file mode 100644 index eb33655fc5..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet.txt +++ /dev/null @@ -1,1070 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SubscriptionSet -^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SubscriptionSet: - - - -io.realm.mongodb.sync -===================== - -**Implemented interfaces:** - - - -- `java.lang.Iterable `__ - - -A subscription set is an immutable view of all current :ref:`Subscription ` s for a given Realm that has been configured for flexible sync. - -Flexible Sync is a way of defining which data gets synchronized to and from the device using :ref:`RealmQuery ` s. The query and its metadata are represented by a :ref:`Subscription ` . - - - -A subscription set thus defines all the data that is available to the device and being synchronized with the server. If the subscription set encounters an error, e.g. by containing an invalid query, the entire subscription set will enter an :ref:`SubscriptionSet.State.ERROR ` state, and no synchronization will happen until the error has been fixed. - - - -If a subscription is removed, so is the corresponding data, but it is only removed from the device. It isn't deleted on the server. - -It is possible to modify a subscription set while offline, but modification isn't accepted by the server before :ref:`getState() ` returns :ref:`SubscriptionSet.State.COMPLETE ` . - - - -It is possible to force the subscription set to be synchronized with the server by using :ref:`waitForSynchronization() ` and its variants. - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static final`` - - :ref:`SubscriptionSet.State ` - - - * - ``public static interface`` - - :ref:`SubscriptionSet.UpdateCallback ` - - - * - ``public static interface`` - - :ref:`SubscriptionSet.UpdateAsyncCallback ` - - - * - ``public static interface`` - - :ref:`SubscriptionSet.StateChangeCallback ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`Subscription ` - - | :ref:`find ` ( - | `String `__ name - | ) - - - Find the subscription with a given name. - - - - - * - public :ref:`Subscription ` - - | :ref:`find ` ( - | :ref:`io.realm.RealmQuery ` query - | ) - - - Find the first subscription that contains the given query. - - - - - * - public `String `__ - - | :ref:`getErrorMessage ` () - | - - - If :ref:`getState() ` returns :ref:`State.ERROR ` , this method will return the reason. - - - - - - - * - public :ref:`SubscriptionSet.State ` - - | :ref:`getState ` () - | - - - Returns the current state of the SubscriptionSet. - - - - - * - public **int** - - | :ref:`size ` () - | - - - Returns how many subscriptions are currently in this subscription set. - - - - - * - public :ref:`SubscriptionSet ` - - | :ref:`update ` ( - | :ref:`SubscriptionSet.UpdateCallback ` action - | ) - - - Modify the subscription set. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`updateAsync ` ( - | :ref:`SubscriptionSet.UpdateAsyncCallback ` callback - | ) - - - Asynchronously modify the subscription set. - - - - - * - public **boolean** - - | :ref:`waitForSynchronization ` ( - | `Long `__ timeOut, - | `TimeUnit `__ unit - | ) - - - Wait for the subscription set to synchronize with the server. - - - - - * - public **boolean** - - | :ref:`waitForSynchronization ` () - | - - - Wait for the subscription set to synchronize with the server. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`waitForSynchronizationAsync ` ( - | `Long `__ timeOut, - | `TimeUnit `__ unit, - | :ref:`SubscriptionSet.StateChangeCallback ` callback - | ) - - - Asynchronously wait for the subscription set to synchronize with the server. - - - - - * - public :ref:`RealmAsyncTask ` - - | :ref:`waitForSynchronizationAsync ` ( - | :ref:`SubscriptionSet.StateChangeCallback ` callback - | ) - - - Asynchronously wait for the subscription set to synchronize with the server. - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _find: - -.. _find__: - -.. _SubscriptionSet_find: - -.. _SubscriptionSet_find__: - -.. _io_realm_mongodb_sync_SubscriptionSet_find: - -.. _io_realm_mongodb_sync_SubscriptionSet_find__: - - - -find ----- - -.. _io_realm_mongodb_sync_SubscriptionSet_find_java_lang_String_: - -.. _io_realm_mongodb_sync_SubscriptionSet_find_String_: - -.. _find_java_lang_String_: - -.. _find_String_: - -.. _SubscriptionSet_find_java_lang_String_: - -.. _SubscriptionSet_find_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Subscription ` :ref:`find ` ( - | `String `__ name - | ) - - - - - * - Find the subscription with a given name. - - - - - **Parameters** - - - ``name`` - name of subscription to search for. - - - - - - - - **Returns** - - the matching subscription or ``null`` if no subscription with that name was found. - - - - - - - - - - - -.. _io_realm_mongodb_sync_SubscriptionSet_find_io_realm_RealmQuery_: - -.. _io_realm_mongodb_sync_SubscriptionSet_find_RealmQuery_: - -.. _find_io_realm_RealmQuery_: - -.. _find_RealmQuery_: - -.. _SubscriptionSet_find_io_realm_RealmQuery_: - -.. _SubscriptionSet_find_RealmQuery_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Subscription ` :ref:`find ` ( - | :ref:`io.realm.RealmQuery ` query - | ) - - - - - * - Find the first subscription that contains the given query. It is possible for multiple named subscriptions to contain the same query. - - - - - **Parameters** - - - ``query`` - query to search for. - - - - - - - - **Returns** - - the first subscription containing the query or ``null`` if no match was found. - - - - - - - - - - - - - -.. _getErrorMessage: - -.. _getErrorMessage__: - -.. _SubscriptionSet_getErrorMessage: - -.. _SubscriptionSet_getErrorMessage__: - -.. _io_realm_mongodb_sync_SubscriptionSet_getErrorMessage: - -.. _io_realm_mongodb_sync_SubscriptionSet_getErrorMessage__: - - - -getErrorMessage ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getErrorMessage ` () - | - - - - - * - If :ref:`getState() ` returns :ref:`State.ERROR ` , this method will return the reason. Errors can be fixed by modifying the subscription accordingly and then calling :ref:`waitForSynchronization() ` . - - - - - - - - - **Returns** - - the underlying error if the subscription set is in the :ref:`State.ERROR ` state. For all other states ``null`` will be returned. - - - - - - - - - - - - - -.. _getState: - -.. _getState__: - -.. _SubscriptionSet_getState: - -.. _SubscriptionSet_getState__: - -.. _io_realm_mongodb_sync_SubscriptionSet_getState: - -.. _io_realm_mongodb_sync_SubscriptionSet_getState__: - - - -getState --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SubscriptionSet.State ` :ref:`getState ` () - | - - - - - * - Returns the current state of the SubscriptionSet. See :ref:`SubscriptionSet.State ` for more details about each state. - - - - - - - - - **Returns** - - current state of the SubscriptionSet. - - - - - - - - - - - -.. _size: - -.. _size__: - -.. _SubscriptionSet_size: - -.. _SubscriptionSet_size__: - -.. _io_realm_mongodb_sync_SubscriptionSet_size: - -.. _io_realm_mongodb_sync_SubscriptionSet_size__: - - - -size ----- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`size ` () - | - - - - - * - Returns how many subscriptions are currently in this subscription set. - - - - - - - **Returns** - - the number of of subscriptions in the subscription set. - - - - - - - - - - - -.. _update: - -.. _update__: - -.. _SubscriptionSet_update: - -.. _SubscriptionSet_update__: - -.. _io_realm_mongodb_sync_SubscriptionSet_update: - -.. _io_realm_mongodb_sync_SubscriptionSet_update__: - - - -update ------- - -.. _io_realm_mongodb_sync_SubscriptionSet_update_io_realm_mongodb_sync_SubscriptionSet_UpdateCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_update_UpdateCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_update_SubscriptionSet_UpdateCallback_: - -.. _update_io_realm_mongodb_sync_SubscriptionSet_UpdateCallback_: - -.. _update_UpdateCallback_: - -.. _update_SubscriptionSet_UpdateCallback_: - -.. _SubscriptionSet_update_io_realm_mongodb_sync_SubscriptionSet_UpdateCallback_: - -.. _SubscriptionSet_update_UpdateCallback_: - -.. _SubscriptionSet_update_SubscriptionSet_UpdateCallback_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SubscriptionSet ` :ref:`update ` ( - | :ref:`SubscriptionSet.UpdateCallback ` action - | ) - - - - - * - Modify the subscription set. If an exception is thrown during the update, no changes will be applied. If the update succeeds, this subscription set is updated with the modified state. - - - - - **Parameters** - - - ``action`` - the block that modifies the subscription set. It will run on the caller thread. - - - - - - - - **Returns** - - this subscription set, that now has been updated. - - - - - **Throws** - - - `Exception `__ - any exception thrown during the update, will propagate back. - - - - - - - - - - - - -.. _updateAsync: - -.. _updateAsync__: - -.. _SubscriptionSet_updateAsync: - -.. _SubscriptionSet_updateAsync__: - -.. _io_realm_mongodb_sync_SubscriptionSet_updateAsync: - -.. _io_realm_mongodb_sync_SubscriptionSet_updateAsync__: - - - -updateAsync ------------ - -.. _io_realm_mongodb_sync_SubscriptionSet_updateAsync_io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_updateAsync_UpdateAsyncCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_updateAsync_SubscriptionSet_UpdateAsyncCallback_: - -.. _updateAsync_io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_: - -.. _updateAsync_UpdateAsyncCallback_: - -.. _updateAsync_SubscriptionSet_UpdateAsyncCallback_: - -.. _SubscriptionSet_updateAsync_io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_: - -.. _SubscriptionSet_updateAsync_UpdateAsyncCallback_: - -.. _SubscriptionSet_updateAsync_SubscriptionSet_UpdateAsyncCallback_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`updateAsync ` ( - | :ref:`SubscriptionSet.UpdateAsyncCallback ` callback - | ) - - - - - * - Asynchronously modify the subscription set. If an exception is thrown during the update, no changes will be applied. \* - - - - - **Parameters** - - - ``callback`` - callback that controls the asynct ask. Succces or failure will be reported here. - - - - - - - - **Returns** - - task controlling the async execution. - - - - - - - - - - - -.. _waitForSynchronization: - -.. _waitForSynchronization__: - -.. _SubscriptionSet_waitForSynchronization: - -.. _SubscriptionSet_waitForSynchronization__: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization__: - - - -waitForSynchronization ----------------------- - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization_java_lang_Long_java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization_java_lang_Long__java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization_java_lang_Long_TimeUnit_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization_java_lang_Long__TimeUnit_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization_Long_java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization_Long__java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization_Long_TimeUnit_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronization_Long__TimeUnit_: - -.. _waitForSynchronization_java_lang_Long_java_util_concurrent_TimeUnit_: - -.. _waitForSynchronization_java_lang_Long__java_util_concurrent_TimeUnit_: - -.. _waitForSynchronization_java_lang_Long_TimeUnit_: - -.. _waitForSynchronization_java_lang_Long__TimeUnit_: - -.. _waitForSynchronization_Long_java_util_concurrent_TimeUnit_: - -.. _waitForSynchronization_Long__java_util_concurrent_TimeUnit_: - -.. _waitForSynchronization_Long_TimeUnit_: - -.. _waitForSynchronization_Long__TimeUnit_: - -.. _SubscriptionSet_waitForSynchronization_java_lang_Long_java_util_concurrent_TimeUnit_: - -.. _SubscriptionSet_waitForSynchronization_java_lang_Long__java_util_concurrent_TimeUnit_: - -.. _SubscriptionSet_waitForSynchronization_java_lang_Long_TimeUnit_: - -.. _SubscriptionSet_waitForSynchronization_java_lang_Long__TimeUnit_: - -.. _SubscriptionSet_waitForSynchronization_Long_java_util_concurrent_TimeUnit_: - -.. _SubscriptionSet_waitForSynchronization_Long__java_util_concurrent_TimeUnit_: - -.. _SubscriptionSet_waitForSynchronization_Long_TimeUnit_: - -.. _SubscriptionSet_waitForSynchronization_Long__TimeUnit_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`waitForSynchronization ` ( - | `Long `__ timeOut, - | `TimeUnit `__ unit - | ) - - - - - * - Wait for the subscription set to synchronize with the server. It will return when the server either accepts the set of queries and has downloaded data for them, or if an error has occurred. Note, that you will either need to manually call **Realm.refresh()** or wait for change listeners to trigger to see the downloaded data. If an error occurred, the underlying reason can be found through :ref:`getErrorMessage() ` . - - - - - - - **Parameters** - - - ``timeOut`` - how long to wait for the synchronization to either succeed or fail. - - - - - ``unit`` - unit of time used for the timeout. - - - - - - - - **Returns** - - ``true`` if all current subscriptions were accepted by the server and data has been downloaded, or ``false`` if an error occurred. - - - - - - - **Throws** - - - `RuntimeException `__ - if the timeout is exceeded. - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`waitForSynchronization ` () - | - - - - - * - Wait for the subscription set to synchronize with the server. It will return when the server either accepts the set of queries and has downloaded data for them, or if an error has occurred. Note, that you will either need to manually call **Realm.refresh()** or wait for change listeners to trigger to see the downloaded data. If an error occurred, the underlying reason can be found through :ref:`getErrorMessage() ` . - - - - - - - - - **Returns** - - ``true`` if all current subscriptions were accepted by the server and data has been downloaded, or ``false`` if an error occurred. - - - - - - - - - - - - - -.. _waitForSynchronizationAsync: - -.. _waitForSynchronizationAsync__: - -.. _SubscriptionSet_waitForSynchronizationAsync: - -.. _SubscriptionSet_waitForSynchronizationAsync__: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync__: - - - -waitForSynchronizationAsync ---------------------------- - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_TimeUnit_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__TimeUnit__StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long__TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long_TimeUnit_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long__TimeUnit__StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_Long__TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long__TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long_TimeUnit_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long__TimeUnit__StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_java_lang_Long__TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long__TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long_TimeUnit_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long__TimeUnit__StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_Long__TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_java_util_concurrent_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__java_util_concurrent_TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_TimeUnit_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__TimeUnit__StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_java_lang_Long__TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long_java_util_concurrent_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long__java_util_concurrent_TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long_TimeUnit_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long__TimeUnit__io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long_TimeUnit_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long__TimeUnit__StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long_TimeUnit_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_Long__TimeUnit__SubscriptionSet_StateChangeCallback_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`waitForSynchronizationAsync ` ( - | `Long `__ timeOut, - | `TimeUnit `__ unit, - | :ref:`SubscriptionSet.StateChangeCallback ` callback - | ) - - - - - * - Asynchronously wait for the subscription set to synchronize with the server. The callback is invoked when the server either accepts the set of queries and has downloaded data for them, or if an error has occurred. Note, that you will either need to manually call **Realm.refresh()** or wait for change listeners to trigger to see the downloaded data. If an error occurred, the underlying reason can be found through :ref:`getErrorMessage() ` . - - - - - - - **Parameters** - - - ``timeOut`` - how long to wait for the synchronization to either succeed or fail. - - - - - ``unit`` - unit of time used for the timeout. - - - - - ``callback`` - callback to trigger when the synchronization either succeed or fail. Results will be reported on the UI thread. - - - - - - - - **Returns** - - ``true`` if all current subscriptions were accepted by the server and data has been downloaded, or ``false`` if an error occurred. - - - - - - - - - - - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_StateChangeCallback_: - -.. _io_realm_mongodb_sync_SubscriptionSet_waitForSynchronizationAsync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _waitForSynchronizationAsync_StateChangeCallback_: - -.. _waitForSynchronizationAsync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_StateChangeCallback_: - -.. _SubscriptionSet_waitForSynchronizationAsync_SubscriptionSet_StateChangeCallback_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmAsyncTask ` :ref:`waitForSynchronizationAsync ` ( - | :ref:`SubscriptionSet.StateChangeCallback ` callback - | ) - - - - - * - Asynchronously wait for the subscription set to synchronize with the server. It will invoke the callback when the server either accepts the set of queries and has downloaded data for them, or if an error has occurred. Note, that you will either need to manually call **Realm.refresh()** or wait for change listeners to trigger to see the downloaded data. If an error occurred, the underlying reason can be found through :ref:`getErrorMessage() ` . - - - - - - - **Parameters** - - - ``callback`` - callback to trigger when the synchronization either succeed or fail. Results will be reported on the UI thread. - - - - - - - - **Returns** - - ``true`` if all current subscriptions were accepted by the server and data has been downloaded, or ``false`` if an error occurred. - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt deleted file mode 100644 index 89ebbf2e3a..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/State.txt +++ /dev/null @@ -1,409 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum SubscriptionSet.State -^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SubscriptionSet_State: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.sync.SubscriptionSet.State - - - - -**Enclosing class:** - -:ref:`SubscriptionSet ` - - - -The possible states a subscription set can be in. - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`BOOTSTRAPPING ` - - A subscription set was accepted by the server and initial data is being sent to the device. - - - - - * - :ref:`COMPLETE ` - - A subscription set is actively synchronizing data between the server and the device. - - - - - * - :ref:`ERROR ` - - An error occurred in the subscription set or one of the subscriptions. - - - - - * - :ref:`PENDING ` - - A subscription set has been modified locally, but is still waiting to be sent to the server. - - - - - * - :ref:`SUPERSEDED ` - - Another subscription set was stored before this one, the changes made to this set are ignorde by the server. - - - - - * - :ref:`UNCOMMITTED ` - - The initial state of subscriptions when opening a new Realm or when entering a **update(UpdateCallback)**. - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`SubscriptionSet.State ` - - | :ref:`fromNativeValue ` ( - | **long** value - | ) - - - - - - - - * - public static :ref:`SubscriptionSet.State ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`SubscriptionSet.State ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_sync_SubscriptionSet_State_BOOTSTRAPPING: - -.. _SubscriptionSet_State_BOOTSTRAPPING: - - - -``BOOTSTRAPPING`` ------------------- - -public static final :ref:`SubscriptionSet.State ` - -A subscription set was accepted by the server and initial data is being sent to the device. - - - -.. _io_realm_mongodb_sync_SubscriptionSet_State_COMPLETE: - -.. _SubscriptionSet_State_COMPLETE: - - - -``COMPLETE`` -------------- - -public static final :ref:`SubscriptionSet.State ` - -A subscription set is actively synchronizing data between the server and the device. - - - -.. _io_realm_mongodb_sync_SubscriptionSet_State_ERROR: - -.. _SubscriptionSet_State_ERROR: - - - -``ERROR`` ----------- - -public static final :ref:`SubscriptionSet.State ` - -An error occurred in the subscription set or one of the subscriptions. The cause is found in **getErrorMessage()**. - - - - - -.. _io_realm_mongodb_sync_SubscriptionSet_State_PENDING: - -.. _SubscriptionSet_State_PENDING: - - - -``PENDING`` ------------- - -public static final :ref:`SubscriptionSet.State ` - -A subscription set has been modified locally, but is still waiting to be sent to the server. - - - -.. _io_realm_mongodb_sync_SubscriptionSet_State_SUPERSEDED: - -.. _SubscriptionSet_State_SUPERSEDED: - - - -``SUPERSEDED`` ---------------- - -public static final :ref:`SubscriptionSet.State ` - -Another subscription set was stored before this one, the changes made to this set are ignorde by the server. Get the latest subscription set by calling **Realm.getSubscriptions()**. - - - - - -.. _io_realm_mongodb_sync_SubscriptionSet_State_UNCOMMITTED: - -.. _SubscriptionSet_State_UNCOMMITTED: - - - -``UNCOMMITTED`` ----------------- - -public static final :ref:`SubscriptionSet.State ` - -The initial state of subscriptions when opening a new Realm or when entering a **update(UpdateCallback)**. - - - - - - -Method Detail -============= - -.. _fromNativeValue: - -.. _fromNativeValue__: - -.. _State_fromNativeValue: - -.. _State_fromNativeValue__: - -.. _SubscriptionSet_State_fromNativeValue: - -.. _SubscriptionSet_State_fromNativeValue__: - -.. _io_realm_mongodb_sync_SubscriptionSet_State_fromNativeValue: - -.. _io_realm_mongodb_sync_SubscriptionSet_State_fromNativeValue__: - - - -fromNativeValue ---------------- - -.. _io_realm_mongodb_sync_SubscriptionSet_State_fromNativeValue_long_: - -.. _fromNativeValue_long_: - -.. _SubscriptionSet_State_fromNativeValue_long_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SubscriptionSet.State ` :ref:`fromNativeValue ` ( - | **long** value - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _valueOf: - -.. _valueOf__: - -.. _State_valueOf: - -.. _State_valueOf__: - -.. _SubscriptionSet_State_valueOf: - -.. _SubscriptionSet_State_valueOf__: - -.. _io_realm_mongodb_sync_SubscriptionSet_State_valueOf: - -.. _io_realm_mongodb_sync_SubscriptionSet_State_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_sync_SubscriptionSet_State_valueOf_java_lang_String_: - -.. _io_realm_mongodb_sync_SubscriptionSet_State_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _SubscriptionSet_State_valueOf_java_lang_String_: - -.. _SubscriptionSet_State_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SubscriptionSet.State ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _State_values: - -.. _State_values__: - -.. _SubscriptionSet_State_values: - -.. _SubscriptionSet_State_values__: - -.. _io_realm_mongodb_sync_SubscriptionSet_State_values: - -.. _io_realm_mongodb_sync_SubscriptionSet_State_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SubscriptionSet.State ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt deleted file mode 100644 index 147ebbb9cf..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/StateChangeCallback.txt +++ /dev/null @@ -1,188 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SubscriptionSet.StateChangeCallback -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback: - - - -io.realm.mongodb.sync -===================== - - - -**Enclosing class:** - -:ref:`SubscriptionSet ` - - - -Callback used when asynchronously waiting for the server to process the subscription set. When the server either succeed or fail to apply the subscription set, the result is returned in ``onStateChange`` . This include errors from the server. If a local exception is thrown, it is reported through on ``onError()`` . - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | `Throwable `__ e - | ) - - - - - - - - * - public **void** - - | :ref:`onStateChange ` ( - | :ref:`SubscriptionSet ` subscriptions - | ) - - - - - - - - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _StateChangeCallback_onError: - -.. _StateChangeCallback_onError__: - -.. _SubscriptionSet_StateChangeCallback_onError: - -.. _SubscriptionSet_StateChangeCallback_onError__: - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_onError: - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_onError__: - - - -onError -------- - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_onError_java_lang_Throwable_: - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_onError_Throwable_: - -.. _onError_java_lang_Throwable_: - -.. _onError_Throwable_: - -.. _SubscriptionSet_StateChangeCallback_onError_java_lang_Throwable_: - -.. _SubscriptionSet_StateChangeCallback_onError_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | `Throwable `__ e - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _onStateChange: - -.. _onStateChange__: - -.. _StateChangeCallback_onStateChange: - -.. _StateChangeCallback_onStateChange__: - -.. _SubscriptionSet_StateChangeCallback_onStateChange: - -.. _SubscriptionSet_StateChangeCallback_onStateChange__: - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_onStateChange: - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_onStateChange__: - - - -onStateChange -------------- - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_onStateChange_io_realm_mongodb_sync_SubscriptionSet_: - -.. _io_realm_mongodb_sync_SubscriptionSet_StateChangeCallback_onStateChange_SubscriptionSet_: - -.. _onStateChange_io_realm_mongodb_sync_SubscriptionSet_: - -.. _onStateChange_SubscriptionSet_: - -.. _SubscriptionSet_StateChangeCallback_onStateChange_io_realm_mongodb_sync_SubscriptionSet_: - -.. _SubscriptionSet_StateChangeCallback_onStateChange_SubscriptionSet_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onStateChange ` ( - | :ref:`SubscriptionSet ` subscriptions - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt deleted file mode 100644 index 3891f02a93..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateAsyncCallback.txt +++ /dev/null @@ -1,200 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SubscriptionSet.UpdateAsyncCallback -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback: - - - -io.realm.mongodb.sync -===================== - -**Implemented interfaces:** - - - -- :ref:`io.realm.mongodb.sync.SubscriptionSet.UpdateCallback ` - - - - -**Enclosing class:** - -:ref:`SubscriptionSet ` - - - -Callback used when asynchronously updating a subscription set. If an exception is throwing during the update, all changes will be rolled back and the exception will be reported in ``onError()`` . - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | `Throwable `__ exception - | ) - - - - - - - - * - public **void** - - | :ref:`onSuccess ` ( - | :ref:`SubscriptionSet ` subscriptions - | ) - - - - - - - - - - -Inherited Methods -================= - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _UpdateAsyncCallback_onError: - -.. _UpdateAsyncCallback_onError__: - -.. _SubscriptionSet_UpdateAsyncCallback_onError: - -.. _SubscriptionSet_UpdateAsyncCallback_onError__: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_onError: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_onError__: - - - -onError -------- - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_onError_java_lang_Throwable_: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_onError_Throwable_: - -.. _onError_java_lang_Throwable_: - -.. _onError_Throwable_: - -.. _SubscriptionSet_UpdateAsyncCallback_onError_java_lang_Throwable_: - -.. _SubscriptionSet_UpdateAsyncCallback_onError_Throwable_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | `Throwable `__ exception - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _onSuccess: - -.. _onSuccess__: - -.. _UpdateAsyncCallback_onSuccess: - -.. _UpdateAsyncCallback_onSuccess__: - -.. _SubscriptionSet_UpdateAsyncCallback_onSuccess: - -.. _SubscriptionSet_UpdateAsyncCallback_onSuccess__: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_onSuccess: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_onSuccess__: - - - -onSuccess ---------- - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_onSuccess_io_realm_mongodb_sync_SubscriptionSet_: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateAsyncCallback_onSuccess_SubscriptionSet_: - -.. _onSuccess_io_realm_mongodb_sync_SubscriptionSet_: - -.. _onSuccess_SubscriptionSet_: - -.. _SubscriptionSet_UpdateAsyncCallback_onSuccess_io_realm_mongodb_sync_SubscriptionSet_: - -.. _SubscriptionSet_UpdateAsyncCallback_onSuccess_SubscriptionSet_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onSuccess ` ( - | :ref:`SubscriptionSet ` subscriptions - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt deleted file mode 100644 index ed35a96643..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SubscriptionSet/UpdateCallback.txt +++ /dev/null @@ -1,126 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SubscriptionSet.UpdateCallback -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateCallback: - - - -io.realm.mongodb.sync -===================== - - - -**Enclosing class:** - -:ref:`SubscriptionSet ` - - - -Interface used when modifying a subscription set. See **update(UpdateCallback)** and **updateAsync(UpdateAsyncCallback)**. - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`update ` ( - | :ref:`MutableSubscriptionSet ` subscriptions - | ) - - - Updates the current subscription set by passing in a version of it that can be modified. - - - - - - - -Method Detail -============= - -.. _update: - -.. _update__: - -.. _UpdateCallback_update: - -.. _UpdateCallback_update__: - -.. _SubscriptionSet_UpdateCallback_update: - -.. _SubscriptionSet_UpdateCallback_update__: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateCallback_update: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateCallback_update__: - - - -update ------- - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateCallback_update_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _io_realm_mongodb_sync_SubscriptionSet_UpdateCallback_update_MutableSubscriptionSet_: - -.. _update_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _update_MutableSubscriptionSet_: - -.. _SubscriptionSet_UpdateCallback_update_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _SubscriptionSet_UpdateCallback_update_MutableSubscriptionSet_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`update ` ( - | :ref:`MutableSubscriptionSet ` subscriptions - | ) - - - - - * - Updates the current subscription set by passing in a version of it that can be modified. If an exception is throwing during the update, all changes will be rolled back. - - - - - **Parameters** - - - ``subscriptions`` - a modifiable version of the subscription set. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/Sync.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/Sync.txt deleted file mode 100644 index c955378c98..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/Sync.txt +++ /dev/null @@ -1,424 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Sync -^^^^^^^^^^ - -.. _io_realm_mongodb_sync_Sync: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.sync.Sync - - -A *sync* manager handling synchronization of local Realms with remote Realm Apps.The primary role of this is to access the :ref:`SyncSession ` for a synchronized Realm. After opening the synchronized Realm you can access the :ref:`SyncSession ` and perform synchronization related operations as shown below: - - - - - -.. code-block:: java - - App app = new App("app-id"); - User user = app.login(Credentials.anonymous()); - SyncConfiguration syncConfiguration = new SyncConfiguration.Builder(user, "") - .build(); - Realm instance = Realm.getInstance(syncConfiguration); - SyncSession session = app.getSync().getSession(syncConfiguration); - - instance.executeTransaction(realm -> { - realm.insert(...); - }); - session.uploadAllLocalChanges(); - instance.close(); - - - - - -.. seealso:: - - - - - :ref:`App.getSync() ` - - - - - :ref:`Sync.getSession(SyncConfiguration) ` - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static`` - - :ref:`Sync.Debug ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public synchronized `Collection `__ - - | :ref:`getAllSessions ` () - | - - - Gets a collection of all the cached :ref:`SyncSession ` . - - - - - - - * - public synchronized :ref:`SyncSession ` - - | :ref:`getOrCreateSession ` ( - | :ref:`SyncConfiguration ` syncConfiguration - | ) - - - Gets any cached :ref:`SyncSession ` for the given :ref:`SyncConfiguration ` or create a new one if no one exists. - - - - - - - * - public synchronized :ref:`SyncSession ` - - | :ref:`getSession ` ( - | :ref:`SyncConfiguration ` syncConfiguration - | ) - - - Gets a cached :ref:`SyncSession ` for the given :ref:`SyncConfiguration ` or throw if no one exists yet. - - - - - - - * - public **void** - - | :ref:`reconnect ` () - | - - - Realm will automatically detect when a device gets connectivity after being offline and resume syncing. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _getAllSessions: - -.. _getAllSessions__: - -.. _Sync_getAllSessions: - -.. _Sync_getAllSessions__: - -.. _io_realm_mongodb_sync_Sync_getAllSessions: - -.. _io_realm_mongodb_sync_Sync_getAllSessions__: - - - -getAllSessions --------------- - -.. list-table:: - :header-rows: 1 - - * - | public synchronized `Collection `__ :ref:`getAllSessions ` () - | - - - - - * - Gets a collection of all the cached :ref:`SyncSession ` . - - - - - - - - - **Returns** - - a collection of :ref:`SyncSession ` . - - - - - - - - - - - - - -.. _getOrCreateSession: - -.. _getOrCreateSession__: - -.. _Sync_getOrCreateSession: - -.. _Sync_getOrCreateSession__: - -.. _io_realm_mongodb_sync_Sync_getOrCreateSession: - -.. _io_realm_mongodb_sync_Sync_getOrCreateSession__: - - - -getOrCreateSession ------------------- - -.. _io_realm_mongodb_sync_Sync_getOrCreateSession_io_realm_mongodb_sync_SyncConfiguration_: - -.. _io_realm_mongodb_sync_Sync_getOrCreateSession_SyncConfiguration_: - -.. _getOrCreateSession_io_realm_mongodb_sync_SyncConfiguration_: - -.. _getOrCreateSession_SyncConfiguration_: - -.. _Sync_getOrCreateSession_io_realm_mongodb_sync_SyncConfiguration_: - -.. _Sync_getOrCreateSession_SyncConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized :ref:`SyncSession ` :ref:`getOrCreateSession ` ( - | :ref:`SyncConfiguration ` syncConfiguration - | ) - - - - - * - Gets any cached :ref:`SyncSession ` for the given :ref:`SyncConfiguration ` or create a new one if no one exists. Note: This is mainly for internal usage, consider using :ref:`getSession(SyncConfiguration) ` instead. - - - - - - - **Parameters** - - - ``syncConfiguration`` - configuration object for the synchronized Realm. - - - - - - - - **Returns** - - the :ref:`SyncSession ` for the specified Realm. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if syncConfiguration is ``null`` . - - - - - - - - - - - - - - -.. _getSession: - -.. _getSession__: - -.. _Sync_getSession: - -.. _Sync_getSession__: - -.. _io_realm_mongodb_sync_Sync_getSession: - -.. _io_realm_mongodb_sync_Sync_getSession__: - - - -getSession ----------- - -.. _io_realm_mongodb_sync_Sync_getSession_io_realm_mongodb_sync_SyncConfiguration_: - -.. _io_realm_mongodb_sync_Sync_getSession_SyncConfiguration_: - -.. _getSession_io_realm_mongodb_sync_SyncConfiguration_: - -.. _getSession_SyncConfiguration_: - -.. _Sync_getSession_io_realm_mongodb_sync_SyncConfiguration_: - -.. _Sync_getSession_SyncConfiguration_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized :ref:`SyncSession ` :ref:`getSession ` ( - | :ref:`SyncConfiguration ` syncConfiguration - | ) - - - - - * - Gets a cached :ref:`SyncSession ` for the given :ref:`SyncConfiguration ` or throw if no one exists yet. A session should exist after you open a Realm with a :ref:`SyncConfiguration ` . - - - - - - - **Parameters** - - - ``syncConfiguration`` - configuration object for the synchronized Realm. - - - - - - - - **Returns** - - the :ref:`SyncSession ` for the specified Realm. - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if syncConfiguration is ``null`` . - - - - - - - `IllegalStateException `__ - if the session could not be found using the provided ``SyncConfiguration`` . - - - - - - - - - - - - - - -.. _reconnect: - -.. _reconnect__: - -.. _Sync_reconnect: - -.. _Sync_reconnect__: - -.. _io_realm_mongodb_sync_Sync_reconnect: - -.. _io_realm_mongodb_sync_Sync_reconnect__: - - - -reconnect ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`reconnect ` () - | - - - - - * - Realm will automatically detect when a device gets connectivity after being offline and resume syncing.However, as some of these checks are performed using incremental backoff, this will in some cases not happen immediately. - - In those cases it can be beneficial to call this method manually, which will force all sessions to attempt to reconnect immediately and reset any timers they are using for incremental backoff. - - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/Sync/Debug.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/Sync/Debug.txt deleted file mode 100644 index 347cd6a9b4..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/Sync/Debug.txt +++ /dev/null @@ -1,151 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class Sync.Debug -^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_Sync_Debug: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.sync.Sync.Debug - - - - -**Enclosing class:** - -:ref:`Sync ` - - - -Debugging related options. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Debug ` () - | - - - - - - - - - - -Field Summary -============= - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Field and Description - - * - public static **boolean** - - - - :ref:`separatedDirForSyncManager ` - - Set this to true to init a SyncManager with a directory named by the process ID. This is useful for integration tests which are emulating multiple sync client by using multiple processes. - - - * - public static **boolean** - - - - :ref:`skipOnlineChecking ` - - Set this to true to bypass checking if the device is offline before making HTTP requests. - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Field Detail -============ - -.. _io_realm_mongodb_sync_Sync_Debug_separatedDirForSyncManager: - - - -``separatedDirForSyncManager`` -------------------------------- - -Set this to true to init a SyncManager with a directory named by the process ID. This is useful for integration tests which are emulating multiple sync client by using multiple processes. - - -.. _io_realm_mongodb_sync_Sync_Debug_skipOnlineChecking: - - - -``skipOnlineChecking`` ------------------------ - -Set this to true to bypass checking if the device is offline before making HTTP requests. - - - - -Constructor Detail -================== - -.. _Debug: - -.. _Debug__: - -.. _io_realm_mongodb_sync_Sync_Debug: - -.. _io_realm_mongodb_sync_Sync_Debug__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Debug ` () - | - - - - - * - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt deleted file mode 100644 index 06a3044d47..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncClientResetStrategy.txt +++ /dev/null @@ -1,23 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SyncClientResetStrategy -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SyncClientResetStrategy: - - - -io.realm.mongodb.sync -===================== - -Interface that defines a generic sync client reset strategy, it could be either :ref:`ManuallyRecoverUnsyncedChangesStrategy ` or :ref:`DiscardUnsyncedChangesStrategy ` . - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration.txt deleted file mode 100644 index 33ad71a01b..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration.txt +++ /dev/null @@ -1,2119 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class SyncConfiguration -^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SyncConfiguration: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | :ref:`io.realm.RealmConfiguration ` - | io.realm.mongodb.sync.SyncConfiguration - - -A :ref:`SyncConfiguration ` is used to setup a realm that can be synchronized between devices using MongoDB Realm. - -A valid :ref:`User ` is required to create a :ref:`SyncConfiguration ` . See :ref:`Credentials ` and :ref:`App.loginAsync(Credentials, App.Callback) ` for more information on how to get a user object. - - - -A minimal :ref:`SyncConfiguration ` can be found below. - - - - - -.. code-block:: java - - - App app = new App("app-id"); - User user = app.login(Credentials.anonymous()); - SyncConfiguration config = SyncConfiguration.defaultConfiguration(user, "partition-value"); - Realm realm = Realm.getInstance(config); - - - - - -Synchronized Realms only support additive migrations which can be detected and performed automatically, so the following builder options are not accessible compared to a normal Realm: - - - -- ``deleteRealmIfMigrationNeeded()`` - - - - -- ``migration(Migration)`` - - - - - - -Synchronized Realms are created by using :ref:`Realm.getInstance(RealmConfiguration) ` and :ref:`Realm.getDefaultInstance() ` like ordinary unsynchronized Realms. - - - - -.. seealso:: - - - - - `The docs `__ for more information about synchronization. - - - - - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static interface`` - - :ref:`SyncConfiguration.InitialFlexibleSyncSubscriptions ` - - - * - ``public static final`` - - :ref:`SyncConfiguration.Builder ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`SyncConfiguration ` - - | :ref:`defaultConfig ` ( - | :ref:`User ` user, - | **ObjectId** partitionValue - | ) - - - Returns a default Partition-based Sync configuration for the given user and partition value. - - - - - * - public static :ref:`SyncConfiguration ` - - | :ref:`defaultConfig ` ( - | :ref:`User ` user, - | `Integer `__ partitionValue - | ) - - - Returns a default Partition-based Sync configuration for the given user and partition value. - - - - - * - public static :ref:`SyncConfiguration ` - - | :ref:`defaultConfig ` ( - | :ref:`User ` user, - | `Long `__ partitionValue - | ) - - - Returns a default Partition-based Sync configuration for the given user and partition value. - - - - - * - public static :ref:`SyncConfiguration ` - - | :ref:`defaultConfig ` ( - | :ref:`User ` user, - | `String `__ partitionValue - | ) - - - Returns a default Partition-based Sync configuration for the given user and partition value. - - - - - * - public static :ref:`SyncConfiguration ` - - | :ref:`defaultConfig ` ( - | :ref:`User ` user - | ) - - - Returns a default Flexible Sync configuration for the given user. - - - - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public static :ref:`RealmConfiguration ` - - | :ref:`forRecovery ` ( - | `String `__ canonicalPath - | ) - - - Returns a :ref:`RealmConfiguration ` appropriate to open a read-only, non-synced Realm to recover any pending changes. - - - - - - - * - public static :ref:`RealmConfiguration ` - - | :ref:`forRecovery ` ( - | `String `__ canonicalPath, - | **byte[]** encryptionKey, - | `java.lang.Object[] `__ modules - | ) - - - Returns a :ref:`RealmConfiguration ` appropriate to open a read-only, non-synced Realm to recover any pending changes. - - - - - - - * - public :ref:`SyncSession.ClientResetHandler ` - - | :ref:`getClientResetHandler ` () - | - - - Returns the Client Reset handler for this *SyncConfiguration*. - - - - - * - public :ref:`SyncSession.ErrorHandler ` - - | :ref:`getErrorHandler ` () - | - - - Returns the error handler for this *SyncConfiguration*. - - - - - * - protected :ref:`Realm.Transaction ` - - | :ref:`getInitialDataTransaction ` () - | - - - Returns the transaction instance with initial data. - - - - - * - public **long** - - | :ref:`getInitialRemoteDataTimeout ` ( - | `TimeUnit `__ unit - | ) - - - Returns the timeout defined when downloading any initial data the first time the Realm is opened. - - - - - * - public :ref:`SyncConfiguration.InitialFlexibleSyncSubscriptions ` - - | :ref:`getInitialSubscriptionsHandler ` () - | - - - Returns the configured initial subscription handler for this realm. - - - - - * - public **BsonValue** - - | :ref:`getPartitionValue ` () - | - - - Returns the value this Realm is partitioned on. - - - - - * - public `URI `__ - - | :ref:`getServerUrl ` () - | - - - Returns the server URI for the remote MongoDB Realm the local Realm is synchronizing with. - - - - - * - public **OsRealmConfig.SyncSessionStopPolicy** - - | :ref:`getSessionStopPolicy ` () - | - - - NOTE: Only for internal usage. - - - - - * - public :ref:`SyncClientResetStrategy ` - - | :ref:`getSyncClientResetStrategy ` () - | - - - Returns the sync client reset strategy for this *SyncConfiguration*. - - - - - * - public `String `__ - - | :ref:`getUrlPrefix ` () - | - - - Returns the url prefix used when establishing a sync connection to the Realm Object Server. - - - - - * - public :ref:`User ` - - | :ref:`getUser ` () - | - - - Returns the user. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public **boolean** - - | :ref:`isFlexibleSyncConfiguration ` () - | - - - Returns whether or not this configuration is for opening a Realm configured for Flexible Sync. - - - - - * - public **boolean** - - | :ref:`isPartitionBasedSyncConfiguration ` () - | - - - Returns whether or not this configuration is for opening a Realm configured for Partition-based Sync. - - - - - * - protected **boolean** - - | :ref:`isSyncConfiguration ` () - | - - - - - - - - * - protected **boolean** - - | :ref:`realmExists ` () - | - - - Checks if the Realm file defined by this configuration already exists. - - - - - * - public **boolean** - - | :ref:`shouldDeleteRealmOnLogout ` () - | - - - Returns ``true`` if the Realm file must be deleted once the :ref:`User ` owning it logs out. - - - - - - - * - public **boolean** - - | :ref:`shouldWaitForInitialRemoteData ` () - | - - - Returns ``true`` if the Realm will download all known changes from the remote server before being opened the first time. - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class :ref:`io.realm.RealmConfiguration ` : ``getRealmDirectory`` , ``getRealmFileName`` , ``getEncryptionKey`` , ``getSchemaVersion`` , ``getMigration`` , ``shouldDeleteRealmIfMigrationNeeded`` , ``getDurability`` , ``getSchemaMediator`` , ``getInitialDataTransaction`` , ``hasAssetFile`` , ``getAssetFilePath`` , ``getCompactOnLaunchCallback`` , ``getRealmObjectClasses`` , ``getPath`` , ``realmExists`` , ``getRxFactory`` , ``getFlowFactory`` , ``isReadOnly`` , ``isRecoveryConfiguration`` , ``getMaxNumberOfActiveVersions`` , ``isAllowWritesOnUiThread`` , ``isAllowQueriesOnUiThread`` , ``equals`` , ``getInstance`` , ``hashCode`` , ``createSchemaMediator`` , ``toString`` , ``isSyncConfiguration`` , ``forRecovery`` - - - - -Method Detail -============= - -.. _defaultConfig: - -.. _defaultConfig__: - -.. _SyncConfiguration_defaultConfig: - -.. _SyncConfiguration_defaultConfig__: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig__: - - - -defaultConfig -------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User_ObjectId_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User__ObjectId_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User_ObjectId_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User__ObjectId_: - -.. _defaultConfig_io_realm_mongodb_User_ObjectId_: - -.. _defaultConfig_io_realm_mongodb_User__ObjectId_: - -.. _defaultConfig_User_ObjectId_: - -.. _defaultConfig_User__ObjectId_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User_ObjectId_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User__ObjectId_: - -.. _SyncConfiguration_defaultConfig_User_ObjectId_: - -.. _SyncConfiguration_defaultConfig_User__ObjectId_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SyncConfiguration ` :ref:`defaultConfig ` ( - | :ref:`User ` user, - | **ObjectId** partitionValue - | ) - - - - - * - Returns a default Partition-based Sync configuration for the given user and partition value. - - - - - **Parameters** - - - ``user`` - The user that will be used for accessing the Realm App. - - - - - ``partitionValue`` - The partition value identifying the remote Realm that will be synchronized. - - - - - - - - **Returns** - - the default configuration for the given user and partition value. - - - - - - - - - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User_java_lang_Integer_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User__java_lang_Integer_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User_Integer_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User__Integer_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User_java_lang_Integer_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User__java_lang_Integer_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User_Integer_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User__Integer_: - -.. _defaultConfig_io_realm_mongodb_User_java_lang_Integer_: - -.. _defaultConfig_io_realm_mongodb_User__java_lang_Integer_: - -.. _defaultConfig_io_realm_mongodb_User_Integer_: - -.. _defaultConfig_io_realm_mongodb_User__Integer_: - -.. _defaultConfig_User_java_lang_Integer_: - -.. _defaultConfig_User__java_lang_Integer_: - -.. _defaultConfig_User_Integer_: - -.. _defaultConfig_User__Integer_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User_java_lang_Integer_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User__java_lang_Integer_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User_Integer_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User__Integer_: - -.. _SyncConfiguration_defaultConfig_User_java_lang_Integer_: - -.. _SyncConfiguration_defaultConfig_User__java_lang_Integer_: - -.. _SyncConfiguration_defaultConfig_User_Integer_: - -.. _SyncConfiguration_defaultConfig_User__Integer_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SyncConfiguration ` :ref:`defaultConfig ` ( - | :ref:`User ` user, - | `Integer `__ partitionValue - | ) - - - - - * - Returns a default Partition-based Sync configuration for the given user and partition value. - - - - - **Parameters** - - - ``user`` - The user that will be used for accessing the Realm App. - - - - - ``partitionValue`` - The partition value identifying the remote Realm that will be synchronized. - - - - - - - - **Returns** - - the default configuration for the given user and partition value. - - - - - - - - - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User_java_lang_Long_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User__java_lang_Long_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User_Long_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User__Long_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User_java_lang_Long_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User__java_lang_Long_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User_Long_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User__Long_: - -.. _defaultConfig_io_realm_mongodb_User_java_lang_Long_: - -.. _defaultConfig_io_realm_mongodb_User__java_lang_Long_: - -.. _defaultConfig_io_realm_mongodb_User_Long_: - -.. _defaultConfig_io_realm_mongodb_User__Long_: - -.. _defaultConfig_User_java_lang_Long_: - -.. _defaultConfig_User__java_lang_Long_: - -.. _defaultConfig_User_Long_: - -.. _defaultConfig_User__Long_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User_java_lang_Long_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User__java_lang_Long_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User_Long_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User__Long_: - -.. _SyncConfiguration_defaultConfig_User_java_lang_Long_: - -.. _SyncConfiguration_defaultConfig_User__java_lang_Long_: - -.. _SyncConfiguration_defaultConfig_User_Long_: - -.. _SyncConfiguration_defaultConfig_User__Long_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SyncConfiguration ` :ref:`defaultConfig ` ( - | :ref:`User ` user, - | `Long `__ partitionValue - | ) - - - - - * - Returns a default Partition-based Sync configuration for the given user and partition value. - - - - - **Parameters** - - - ``user`` - The user that will be used for accessing the Realm App. - - - - - ``partitionValue`` - The partition value identifying the remote Realm that will be synchronized. - - - - - - - - **Returns** - - the default configuration for the given user and partition value. - - - - - - - - - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User_java_lang_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User__java_lang_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User__String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User_java_lang_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User__java_lang_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User__String_: - -.. _defaultConfig_io_realm_mongodb_User_java_lang_String_: - -.. _defaultConfig_io_realm_mongodb_User__java_lang_String_: - -.. _defaultConfig_io_realm_mongodb_User_String_: - -.. _defaultConfig_io_realm_mongodb_User__String_: - -.. _defaultConfig_User_java_lang_String_: - -.. _defaultConfig_User__java_lang_String_: - -.. _defaultConfig_User_String_: - -.. _defaultConfig_User__String_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User_java_lang_String_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User__java_lang_String_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User_String_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User__String_: - -.. _SyncConfiguration_defaultConfig_User_java_lang_String_: - -.. _SyncConfiguration_defaultConfig_User__java_lang_String_: - -.. _SyncConfiguration_defaultConfig_User_String_: - -.. _SyncConfiguration_defaultConfig_User__String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SyncConfiguration ` :ref:`defaultConfig ` ( - | :ref:`User ` user, - | `String `__ partitionValue - | ) - - - - - * - Returns a default Partition-based Sync configuration for the given user and partition value. - - - - - **Parameters** - - - ``user`` - The user that will be used for accessing the Realm App. - - - - - ``partitionValue`` - The partition value identifying the remote Realm that will be synchronized. - - - - - - - - **Returns** - - the default configuration for the given user and partition value. - - - - - - - - - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_io_realm_mongodb_User_: - -.. _io_realm_mongodb_sync_SyncConfiguration_defaultConfig_User_: - -.. _defaultConfig_io_realm_mongodb_User_: - -.. _defaultConfig_User_: - -.. _SyncConfiguration_defaultConfig_io_realm_mongodb_User_: - -.. _SyncConfiguration_defaultConfig_User_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SyncConfiguration ` :ref:`defaultConfig ` ( - | :ref:`User ` user - | ) - - - - - * - Returns a default Flexible Sync configuration for the given user. - - - - - **Parameters** - - - ``user`` - The user that will be used for accessing the Realm App. - - - - - - - - **Returns** - - the default Flexible Sync configuration for the given user. - - - - - - - - - .. seealso:: - - - - - **{\@link SubscriptionSet} for more information about Flexible Sync.** - - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _SyncConfiguration_equals: - -.. _SyncConfiguration_equals__: - -.. _io_realm_mongodb_sync_SyncConfiguration_equals: - -.. _io_realm_mongodb_sync_SyncConfiguration_equals__: - - - -equals ------- - -.. _io_realm_mongodb_sync_SyncConfiguration_equals_java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _SyncConfiguration_equals_java_lang_Object_: - -.. _SyncConfiguration_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class :ref:`RealmConfiguration ` - - - - - - -.. _forRecovery: - -.. _forRecovery__: - -.. _SyncConfiguration_forRecovery: - -.. _SyncConfiguration_forRecovery__: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery__: - - - -forRecovery ------------ - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String_: - -.. _forRecovery_java_lang_String_: - -.. _forRecovery_String_: - -.. _SyncConfiguration_forRecovery_java_lang_String_: - -.. _SyncConfiguration_forRecovery_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmConfiguration ` :ref:`forRecovery ` ( - | `String `__ canonicalPath - | ) - - - - - * - Returns a :ref:`RealmConfiguration ` appropriate to open a read-only, non-synced Realm to recover any pending changes. This is useful when trying to open a backup/recovery Realm (after a client reset). Note: This will use the default Realm module (composed of all :ref:`RealmModel ` ), and assume no encryption should be used as well. - - - - - - - **Parameters** - - - ``canonicalPath`` - the absolute path to the Realm file defined by this configuration. - - - - - - - - **Returns** - - RealmConfiguration that can be used offline - - - - - - - - - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String_byte_java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String__byte__java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String_byte_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String__byte__Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String_byte_Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String__byte__Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String_byte____java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String__byte_____java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String_byte____Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String__byte_____Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String_byte____Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_java_lang_String__byte_____Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String_byte_java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String__byte__java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String_byte_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String__byte__Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String_byte_Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String__byte__Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String_byte____java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String__byte_____java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String_byte____Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String__byte_____Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String_byte____Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String__byte_____Object____: - -.. _forRecovery_java_lang_String_byte_java_lang_Object_: - -.. _forRecovery_java_lang_String__byte__java_lang_Object_: - -.. _forRecovery_java_lang_String_byte_Object_: - -.. _forRecovery_java_lang_String__byte__Object_: - -.. _forRecovery_java_lang_String_byte_Object____: - -.. _forRecovery_java_lang_String__byte__Object____: - -.. _forRecovery_java_lang_String_byte____java_lang_Object_: - -.. _forRecovery_java_lang_String__byte_____java_lang_Object_: - -.. _forRecovery_java_lang_String_byte____Object_: - -.. _forRecovery_java_lang_String__byte_____Object_: - -.. _forRecovery_java_lang_String_byte____Object____: - -.. _forRecovery_java_lang_String__byte_____Object____: - -.. _forRecovery_String_byte_java_lang_Object_: - -.. _forRecovery_String__byte__java_lang_Object_: - -.. _forRecovery_String_byte_Object_: - -.. _forRecovery_String__byte__Object_: - -.. _forRecovery_String_byte_Object____: - -.. _forRecovery_String__byte__Object____: - -.. _forRecovery_String_byte____java_lang_Object_: - -.. _forRecovery_String__byte_____java_lang_Object_: - -.. _forRecovery_String_byte____Object_: - -.. _forRecovery_String__byte_____Object_: - -.. _forRecovery_String_byte____Object____: - -.. _forRecovery_String__byte_____Object____: - -.. _SyncConfiguration_forRecovery_java_lang_String_byte_java_lang_Object_: - -.. _SyncConfiguration_forRecovery_java_lang_String__byte__java_lang_Object_: - -.. _SyncConfiguration_forRecovery_java_lang_String_byte_Object_: - -.. _SyncConfiguration_forRecovery_java_lang_String__byte__Object_: - -.. _SyncConfiguration_forRecovery_java_lang_String_byte_Object____: - -.. _SyncConfiguration_forRecovery_java_lang_String__byte__Object____: - -.. _SyncConfiguration_forRecovery_java_lang_String_byte____java_lang_Object_: - -.. _SyncConfiguration_forRecovery_java_lang_String__byte_____java_lang_Object_: - -.. _SyncConfiguration_forRecovery_java_lang_String_byte____Object_: - -.. _SyncConfiguration_forRecovery_java_lang_String__byte_____Object_: - -.. _SyncConfiguration_forRecovery_java_lang_String_byte____Object____: - -.. _SyncConfiguration_forRecovery_java_lang_String__byte_____Object____: - -.. _SyncConfiguration_forRecovery_String_byte_java_lang_Object_: - -.. _SyncConfiguration_forRecovery_String__byte__java_lang_Object_: - -.. _SyncConfiguration_forRecovery_String_byte_Object_: - -.. _SyncConfiguration_forRecovery_String__byte__Object_: - -.. _SyncConfiguration_forRecovery_String_byte_Object____: - -.. _SyncConfiguration_forRecovery_String__byte__Object____: - -.. _SyncConfiguration_forRecovery_String_byte____java_lang_Object_: - -.. _SyncConfiguration_forRecovery_String__byte_____java_lang_Object_: - -.. _SyncConfiguration_forRecovery_String_byte____Object_: - -.. _SyncConfiguration_forRecovery_String__byte_____Object_: - -.. _SyncConfiguration_forRecovery_String_byte____Object____: - -.. _SyncConfiguration_forRecovery_String__byte_____Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_forRecovery_String__byte[]__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`RealmConfiguration ` :ref:`forRecovery ` ( - | `String `__ canonicalPath, - | **byte[]** encryptionKey, - | `java.lang.Object[] `__ modules - | ) - - - - - * - Returns a :ref:`RealmConfiguration ` appropriate to open a read-only, non-synced Realm to recover any pending changes. This is useful when trying to open a backup/recovery Realm (after a client reset). - - - - - - - **Parameters** - - - ``canonicalPath`` - the absolute path to the Realm file defined by this configuration. - - - - - ``encryptionKey`` - the key used to encrypt/decrypt the Realm file. - - - - - ``modules`` - if specified it will restricts Realm schema to the provided module. - - - - - - - - **Returns** - - RealmConfiguration that can be used offline - - - - - - - - - - - -.. _getClientResetHandler: - -.. _getClientResetHandler__: - -.. _SyncConfiguration_getClientResetHandler: - -.. _SyncConfiguration_getClientResetHandler__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getClientResetHandler: - -.. _io_realm_mongodb_sync_SyncConfiguration_getClientResetHandler__: - - - -getClientResetHandler ---------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncSession.ClientResetHandler ` :ref:`getClientResetHandler ` () - | - - - - - * - Returns the Client Reset handler for this *SyncConfiguration*. - - - - - - - **Returns** - - the Client Reset handler. - - - - - - - - - - - -.. _getErrorHandler: - -.. _getErrorHandler__: - -.. _SyncConfiguration_getErrorHandler: - -.. _SyncConfiguration_getErrorHandler__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getErrorHandler: - -.. _io_realm_mongodb_sync_SyncConfiguration_getErrorHandler__: - - - -getErrorHandler ---------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncSession.ErrorHandler ` :ref:`getErrorHandler ` () - | - - - - - * - Returns the error handler for this *SyncConfiguration*. - - - - - - - **Returns** - - the error handler. - - - - - - - - - - - -.. _getInitialDataTransaction: - -.. _getInitialDataTransaction__: - -.. _SyncConfiguration_getInitialDataTransaction: - -.. _SyncConfiguration_getInitialDataTransaction__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getInitialDataTransaction: - -.. _io_realm_mongodb_sync_SyncConfiguration_getInitialDataTransaction__: - - - -getInitialDataTransaction -------------------------- - -.. list-table:: - :header-rows: 1 - - * - | protected :ref:`Realm.Transaction ` :ref:`getInitialDataTransaction ` () - | - - - - - * - Returns the transaction instance with initial data. - - - - - - - **Returns** - - the initial data transaction. - - - - - - - **Overrides** - - ``getInitialDataTransaction`` in class :ref:`RealmConfiguration ` - - - - - - -.. _getInitialRemoteDataTimeout: - -.. _getInitialRemoteDataTimeout__: - -.. _SyncConfiguration_getInitialRemoteDataTimeout: - -.. _SyncConfiguration_getInitialRemoteDataTimeout__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getInitialRemoteDataTimeout: - -.. _io_realm_mongodb_sync_SyncConfiguration_getInitialRemoteDataTimeout__: - - - -getInitialRemoteDataTimeout ---------------------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_getInitialRemoteDataTimeout_java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncConfiguration_getInitialRemoteDataTimeout_TimeUnit_: - -.. _getInitialRemoteDataTimeout_java_util_concurrent_TimeUnit_: - -.. _getInitialRemoteDataTimeout_TimeUnit_: - -.. _SyncConfiguration_getInitialRemoteDataTimeout_java_util_concurrent_TimeUnit_: - -.. _SyncConfiguration_getInitialRemoteDataTimeout_TimeUnit_: - -.. list-table:: - :header-rows: 1 - - * - | public **long** :ref:`getInitialRemoteDataTimeout ` ( - | `TimeUnit `__ unit - | ) - - - - - * - Returns the timeout defined when downloading any initial data the first time the Realm is opened.This value is only applicable if :ref:`shouldWaitForInitialRemoteData() ` returns ``true`` . - - - - - - - - - - - **Returns** - - the time Realm will wait for all changes to be downloaded before it is aborted and an exception is thrown. - - - - - - - - - .. seealso:: - - - - - :ref:`SyncConfiguration.Builder.waitForInitialRemoteData(long, TimeUnit) ` - - - - - - - - - - - - -.. _getInitialSubscriptionsHandler: - -.. _getInitialSubscriptionsHandler__: - -.. _SyncConfiguration_getInitialSubscriptionsHandler: - -.. _SyncConfiguration_getInitialSubscriptionsHandler__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getInitialSubscriptionsHandler: - -.. _io_realm_mongodb_sync_SyncConfiguration_getInitialSubscriptionsHandler__: - - - -getInitialSubscriptionsHandler ------------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.InitialFlexibleSyncSubscriptions ` :ref:`getInitialSubscriptionsHandler ` () - | - - - - - * - Returns the configured initial subscription handler for this realm. - - - - - - - **Returns** - - the handler used to configure initial subscriptions for this realm. - - - - - - - - - - - -.. _getPartitionValue: - -.. _getPartitionValue__: - -.. _SyncConfiguration_getPartitionValue: - -.. _SyncConfiguration_getPartitionValue__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getPartitionValue: - -.. _io_realm_mongodb_sync_SyncConfiguration_getPartitionValue__: - - - -getPartitionValue ------------------ - -.. list-table:: - :header-rows: 1 - - * - | public **BsonValue** :ref:`getPartitionValue ` () - | - - - - - * - Returns the value this Realm is partitioned on. The partition key is a property defined in MongoDB Realm. All classes with a property with this value will be synchronized to the Realm. - - - - - - - **Returns** - - the value being used by MongoDB Realm to partition the server side MongoDB Database into Realms that can be synchronized independently. - - - - - **Throws** - - - `IllegalStateException `__ - if this configuration is for a realm configured for flexible sync. You can use :ref:`isPartitionBasedSyncConfiguration() ` before calling this method to check. - - - - - - - - - - - - - - -.. _getServerUrl: - -.. _getServerUrl__: - -.. _SyncConfiguration_getServerUrl: - -.. _SyncConfiguration_getServerUrl__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getServerUrl: - -.. _io_realm_mongodb_sync_SyncConfiguration_getServerUrl__: - - - -getServerUrl ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `URI `__ :ref:`getServerUrl ` () - | - - - - - * - Returns the server URI for the remote MongoDB Realm the local Realm is synchronizing with. - - - - - - - **Returns** - - `URI `__ identifying the MongoDB Realm this local Realm is synchronized with. - - - - - - - - - - - - - -.. _getSessionStopPolicy: - -.. _getSessionStopPolicy__: - -.. _SyncConfiguration_getSessionStopPolicy: - -.. _SyncConfiguration_getSessionStopPolicy__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getSessionStopPolicy: - -.. _io_realm_mongodb_sync_SyncConfiguration_getSessionStopPolicy__: - - - -getSessionStopPolicy --------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **OsRealmConfig.SyncSessionStopPolicy** :ref:`getSessionStopPolicy ` () - | - - - - - * - NOTE: Only for internal usage. May change without warning. Returns the stop policy for the session for this Realm once the Realm has been closed. - - - - - - - **Returns** - - the stop policy used by the session once the Realm is closed. - - - - - - - - - - - -.. _getSyncClientResetStrategy: - -.. _getSyncClientResetStrategy__: - -.. _SyncConfiguration_getSyncClientResetStrategy: - -.. _SyncConfiguration_getSyncClientResetStrategy__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getSyncClientResetStrategy: - -.. _io_realm_mongodb_sync_SyncConfiguration_getSyncClientResetStrategy__: - - - -getSyncClientResetStrategy --------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncClientResetStrategy ` :ref:`getSyncClientResetStrategy ` () - | - - - - - * - Returns the sync client reset strategy for this *SyncConfiguration*. - - - - - - - **Returns** - - the sync client reset strategy. - - - - - - - - - - - -.. _getUrlPrefix: - -.. _getUrlPrefix__: - -.. _SyncConfiguration_getUrlPrefix: - -.. _SyncConfiguration_getUrlPrefix__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getUrlPrefix: - -.. _io_realm_mongodb_sync_SyncConfiguration_getUrlPrefix__: - - - -getUrlPrefix ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`getUrlPrefix ` () - | - - - - - * - Returns the url prefix used when establishing a sync connection to the Realm Object Server. - - - - - - - - - - - - - - - -.. _getUser: - -.. _getUser__: - -.. _SyncConfiguration_getUser: - -.. _SyncConfiguration_getUser__: - -.. _io_realm_mongodb_sync_SyncConfiguration_getUser: - -.. _io_realm_mongodb_sync_SyncConfiguration_getUser__: - - - -getUser -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`getUser ` () - | - - - - - * - Returns the user. - - - - - - - **Returns** - - the user. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _SyncConfiguration_hashCode: - -.. _SyncConfiguration_hashCode__: - -.. _io_realm_mongodb_sync_SyncConfiguration_hashCode: - -.. _io_realm_mongodb_sync_SyncConfiguration_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class :ref:`RealmConfiguration ` - - - - - - -.. _isFlexibleSyncConfiguration: - -.. _isFlexibleSyncConfiguration__: - -.. _SyncConfiguration_isFlexibleSyncConfiguration: - -.. _SyncConfiguration_isFlexibleSyncConfiguration__: - -.. _io_realm_mongodb_sync_SyncConfiguration_isFlexibleSyncConfiguration: - -.. _io_realm_mongodb_sync_SyncConfiguration_isFlexibleSyncConfiguration__: - - - -isFlexibleSyncConfiguration ---------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isFlexibleSyncConfiguration ` () - | - - - - - * - Returns whether or not this configuration is for opening a Realm configured for Flexible Sync. - - - - - - - **Returns** - - ``true`` if this configuration is for a Flexible Sync Realm, ``false`` if not. - - - - - - - - - - - - - -.. _isPartitionBasedSyncConfiguration: - -.. _isPartitionBasedSyncConfiguration__: - -.. _SyncConfiguration_isPartitionBasedSyncConfiguration: - -.. _SyncConfiguration_isPartitionBasedSyncConfiguration__: - -.. _io_realm_mongodb_sync_SyncConfiguration_isPartitionBasedSyncConfiguration: - -.. _io_realm_mongodb_sync_SyncConfiguration_isPartitionBasedSyncConfiguration__: - - - -isPartitionBasedSyncConfiguration ---------------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isPartitionBasedSyncConfiguration ` () - | - - - - - * - Returns whether or not this configuration is for opening a Realm configured for Partition-based Sync. - - - - - - - **Returns** - - ``true`` if this configuration is for a Partition-based Sync Realm, ``false`` if not. - - - - - - - - - - - - - -.. _isSyncConfiguration: - -.. _isSyncConfiguration__: - -.. _SyncConfiguration_isSyncConfiguration: - -.. _SyncConfiguration_isSyncConfiguration__: - -.. _io_realm_mongodb_sync_SyncConfiguration_isSyncConfiguration: - -.. _io_realm_mongodb_sync_SyncConfiguration_isSyncConfiguration__: - - - -isSyncConfiguration -------------------- - -.. list-table:: - :header-rows: 1 - - * - | protected **boolean** :ref:`isSyncConfiguration ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``isSyncConfiguration`` in class :ref:`RealmConfiguration ` - - - - - - -.. _realmExists: - -.. _realmExists__: - -.. _SyncConfiguration_realmExists: - -.. _SyncConfiguration_realmExists__: - -.. _io_realm_mongodb_sync_SyncConfiguration_realmExists: - -.. _io_realm_mongodb_sync_SyncConfiguration_realmExists__: - - - -realmExists ------------ - -.. list-table:: - :header-rows: 1 - - * - | protected **boolean** :ref:`realmExists ` () - | - - - - - * - Checks if the Realm file defined by this configuration already exists.WARNING: This method is just a point-in-time check. Unless protected by external synchronization another thread or process might have created or deleted the Realm file right after this method has returned. - - - - - - - - - **Returns** - - ``true`` if the Realm file exists, ``false`` otherwise. - - - - - - - - - **Overrides** - - ``realmExists`` in class :ref:`RealmConfiguration ` - - - - - - -.. _shouldDeleteRealmOnLogout: - -.. _shouldDeleteRealmOnLogout__: - -.. _SyncConfiguration_shouldDeleteRealmOnLogout: - -.. _SyncConfiguration_shouldDeleteRealmOnLogout__: - -.. _io_realm_mongodb_sync_SyncConfiguration_shouldDeleteRealmOnLogout: - -.. _io_realm_mongodb_sync_SyncConfiguration_shouldDeleteRealmOnLogout__: - - - -shouldDeleteRealmOnLogout -------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`shouldDeleteRealmOnLogout ` () - | - - - - - * - Returns ``true`` if the Realm file must be deleted once the :ref:`User ` owning it logs out. - - - - - - - - - **Returns** - - ``true`` if the Realm file must be deleted if the :ref:`User ` logs out. ``false`` if the file is allowed to remain behind. - - - - - - - - - - - - - -.. _shouldWaitForInitialRemoteData: - -.. _shouldWaitForInitialRemoteData__: - -.. _SyncConfiguration_shouldWaitForInitialRemoteData: - -.. _SyncConfiguration_shouldWaitForInitialRemoteData__: - -.. _io_realm_mongodb_sync_SyncConfiguration_shouldWaitForInitialRemoteData: - -.. _io_realm_mongodb_sync_SyncConfiguration_shouldWaitForInitialRemoteData__: - - - -shouldWaitForInitialRemoteData ------------------------------- - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`shouldWaitForInitialRemoteData ` () - | - - - - - * - Returns ``true`` if the Realm will download all known changes from the remote server before being opened the first time. - - - - - - - - - **Returns** - - ``true`` if all remote changes will be downloaded before the Realm can be opened. ``false`` if the Realm can be opened immediately. - - - - - - - - - - - - - -.. _toString: - -.. _toString__: - -.. _SyncConfiguration_toString: - -.. _SyncConfiguration_toString__: - -.. _io_realm_mongodb_sync_SyncConfiguration_toString: - -.. _io_realm_mongodb_sync_SyncConfiguration_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class :ref:`RealmConfiguration ` - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt deleted file mode 100644 index 26d874fbb9..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/Builder.txt +++ /dev/null @@ -1,2385 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class SyncConfiguration.Builder -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.sync.SyncConfiguration.Builder - - - - -**Enclosing class:** - -:ref:`SyncConfiguration ` - - - -Builder used to construct instances of a SyncConfiguration in a fluent manner. - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`Builder ` ( - | :ref:`User ` user - | ) - - - Creates an instance of the builder for a Flexible Sync *SyncConfiguration* with the given user. - - - - - * - | :ref:`Builder ` ( - | :ref:`User ` user, - | `String `__ partitionValue - | ) - - - Creates an instance of the builder for a Partition-based Sync *SyncConfiguration* with the given user and partition value. - - - - - * - | :ref:`Builder ` ( - | :ref:`User ` user, - | **ObjectId** partitionValue - | ) - - - Creates an instance of the builder for a Partition-based Sync *SyncConfiguration* with the given user and partition value. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`addModule ` ( - | `Object `__ module - | ) - - - Adds a module to the already defined modules. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`allowQueriesOnUiThread ` ( - | **boolean** allowQueriesOnUiThread - | ) - - - Sets whether or not ``RealmQueries`` are allowed from the UI thread. - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`allowWritesOnUiThread ` ( - | **boolean** allowWritesOnUiThread - | ) - - - Sets whether or not calls to :ref:`Realm.executeTransaction ` are allowed from the UI thread. - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`assetFile ` ( - | `String `__ assetFile - | ) - - - When opening the Realm for the first time, instead of creating an empty file, the Realm file will be copied from the provided asset file and used instead. - - - - - * - public :ref:`SyncConfiguration ` - - | :ref:`build ` () - | - - - Creates the RealmConfiguration based on the builder parameters. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`clientResetHandler ` ( - | :ref:`SyncSession.ClientResetHandler ` handler - | ) - - - Sets the handler for when a Client Reset occurs. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`compactOnLaunch ` ( - | :ref:`CompactOnLaunchCallback ` compactOnLaunch - | ) - - - Sets this to determine if the Realm file should be compacted before returned to the user. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`compactOnLaunch ` () - | - - - Setting this will cause Realm to compact the Realm file if the Realm file has grown too large and a significant amount of space can be recovered. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`encryptionKey ` ( - | **byte[]** key - | ) - - - Sets the io.realm.Realm#ENCRYPTION_KEY_LENGTH bytes key used to encrypt and decrypt the Realm file. - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`errorHandler ` ( - | :ref:`SyncSession.ErrorHandler ` errorHandler - | ) - - - Sets the error handler used by this configuration. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`flowFactory ` ( - | :ref:`FlowFactory ` factory - | ) - - - Sets the :ref:`FlowFactory ` used to create coroutines Flows from Realm objects. - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`inMemory ` () - | - - - Setting this will create an in-memory Realm instead of saving it to disk. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`initialData ` ( - | :ref:`Realm.Transaction ` transaction - | ) - - - Sets the initial data in :ref:`io.realm.Realm ` . - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`initialSubscriptions ` ( - | :ref:`SyncConfiguration.InitialFlexibleSyncSubscriptions ` action - | ) - - - Sets the initial :ref:`Subscription ` s for the :ref:`io.realm.Realm ` . - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`maxNumberOfActiveVersions ` ( - | **long** number - | ) - - - Sets the maximum number of live versions in the Realm file before an `IllegalStateException `__ is thrown when attempting to write more data. - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`modules ` ( - | `java.lang.Iterable\ `__ modules - | ) - - - Replaces the existing module(s) with one or more :ref:`RealmModule ` s. - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`modules ` ( - | `Object `__ baseModule, - | `java.lang.Object[] `__ additionalModules - | ) - - - Replaces the existing module(s) with one or more :ref:`RealmModule ` s. - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`name ` ( - | `String `__ filename - | ) - - - Sets the filename for the Realm file on this device. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`readOnly ` () - | - - - Setting this will cause the Realm to become read only and all write transactions made against this Realm will fail with an `IllegalStateException `__ . - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`rxFactory ` ( - | :ref:`RxObservableFactory ` factory - | ) - - - Sets the :ref:`RxObservableFactory ` used to create Rx Observables from Realm objects. - - - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`schemaVersion ` ( - | **long** schemaVersion - | ) - - - Sets the schema version of the Realm. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`syncClientResetStrategy ` ( - | :ref:`DiscardUnsyncedChangesStrategy ` handler - | ) - - - Sets the handler for when a Client Reset occurs. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`syncClientResetStrategy ` ( - | :ref:`ManuallyRecoverUnsyncedChangesStrategy ` handler - | ) - - - Sets the handler for when a Client Reset occurs. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`urlPrefix ` ( - | `String `__ urlPrefix - | ) - - - The prefix that is prepended to the path in the WebSocket request that initiates a sync connection to MongoDB Realm. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`waitForInitialRemoteData ` ( - | **long** timeout, - | `TimeUnit `__ unit - | ) - - - Setting this will cause the Realm to download all known changes from the server the first time a Realm is opened. - - - - - * - public :ref:`SyncConfiguration.Builder ` - - | :ref:`waitForInitialRemoteData ` () - | - - - Setting this will cause the Realm to download all known changes from the server the first time a Realm is opened. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _Builder: - -.. _Builder__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Builder ` ( - | :ref:`User ` user - | ) - - - - - * - Creates an instance of the builder for a Flexible Sync *SyncConfiguration* with the given user. - - - - - **Parameters** - - - ``user`` - The user that will be used for accessing the Realm App. - - - - - - - - - - .. seealso:: - - - - - **{\@link SubscriptionSet} for more information about Flexible Sync.** - - - - - - - - - - - - -.. _Builder: - -.. _Builder__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Builder ` ( - | :ref:`User ` user, - | `String `__ partitionValue - | ) - - - - - * - Creates an instance of the builder for a Partition-based Sync *SyncConfiguration* with the given user and partition value. - - - - - **Parameters** - - - ``user`` - The user that will be used for accessing the Realm App. - - - - - ``partitionValue`` - The partition value identifying the remote Realm that will be synchronized. - - - - - - - - - - - - -.. _Builder: - -.. _Builder__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`Builder ` ( - | :ref:`User ` user, - | **ObjectId** partitionValue - | ) - - - - - * - Creates an instance of the builder for a Partition-based Sync *SyncConfiguration* with the given user and partition value. - - - - - **Parameters** - - - ``user`` - The user that will be used for accessing the Realm App. - - - - - ``partitionValue`` - The partition value identifying the remote Realm that will be synchronized. - - - - - - - - - - - - - - -Method Detail -============= - -.. _addModule: - -.. _addModule__: - -.. _Builder_addModule: - -.. _Builder_addModule__: - -.. _SyncConfiguration_Builder_addModule: - -.. _SyncConfiguration_Builder_addModule__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_addModule: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_addModule__: - - - -addModule ---------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_addModule_java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_addModule_Object_: - -.. _addModule_java_lang_Object_: - -.. _addModule_Object_: - -.. _SyncConfiguration_Builder_addModule_java_lang_Object_: - -.. _SyncConfiguration_Builder_addModule_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`addModule ` ( - | `Object `__ module - | ) - - - - - * - Adds a module to the already defined modules. - - - - - - - - - - - - - - - -.. _allowQueriesOnUiThread: - -.. _allowQueriesOnUiThread__: - -.. _Builder_allowQueriesOnUiThread: - -.. _Builder_allowQueriesOnUiThread__: - -.. _SyncConfiguration_Builder_allowQueriesOnUiThread: - -.. _SyncConfiguration_Builder_allowQueriesOnUiThread__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_allowQueriesOnUiThread: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_allowQueriesOnUiThread__: - - - -allowQueriesOnUiThread ----------------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_allowQueriesOnUiThread_boolean_: - -.. _allowQueriesOnUiThread_boolean_: - -.. _SyncConfiguration_Builder_allowQueriesOnUiThread_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`allowQueriesOnUiThread ` ( - | **boolean** allowQueriesOnUiThread - | ) - - - - - * - Sets whether or not ``RealmQueries`` are allowed from the UI thread. - - By default Realm allows queries on the main thread. However, by doing so your application may experience a drop of frames or even ANRs. We recommend diverting queries to non-UI threads or, alternatively, using :ref:`RealmQuery.findAllAsync() ` or :ref:`RealmQuery.findFirstAsync() ` . - - - - - - - - - - - - - - - - - - - -.. _allowWritesOnUiThread: - -.. _allowWritesOnUiThread__: - -.. _Builder_allowWritesOnUiThread: - -.. _Builder_allowWritesOnUiThread__: - -.. _SyncConfiguration_Builder_allowWritesOnUiThread: - -.. _SyncConfiguration_Builder_allowWritesOnUiThread__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_allowWritesOnUiThread: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_allowWritesOnUiThread__: - - - -allowWritesOnUiThread ---------------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_allowWritesOnUiThread_boolean_: - -.. _allowWritesOnUiThread_boolean_: - -.. _SyncConfiguration_Builder_allowWritesOnUiThread_boolean_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`allowWritesOnUiThread ` ( - | **boolean** allowWritesOnUiThread - | ) - - - - - * - Sets whether or not calls to :ref:`Realm.executeTransaction ` are allowed from the UI thread. - - **WARNING: Realm does not allow synchronous transactions to be run on the main thread unless users explicitly opt in with this method.** We recommend diverting calls to ``executeTransaction`` to non-UI threads or, alternatively, using :ref:`Realm.executeTransactionAsync ` . - - - - - - - - - - - - - - - - - - - -.. _assetFile: - -.. _assetFile__: - -.. _Builder_assetFile: - -.. _Builder_assetFile__: - -.. _SyncConfiguration_Builder_assetFile: - -.. _SyncConfiguration_Builder_assetFile__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_assetFile: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_assetFile__: - - - -assetFile ---------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_assetFile_java_lang_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_assetFile_String_: - -.. _assetFile_java_lang_String_: - -.. _assetFile_String_: - -.. _SyncConfiguration_Builder_assetFile_java_lang_String_: - -.. _SyncConfiguration_Builder_assetFile_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`assetFile ` ( - | `String `__ assetFile - | ) - - - - - * - When opening the Realm for the first time, instead of creating an empty file, the Realm file will be copied from the provided asset file and used instead.This can be used to pre-populate the Realm with data, so it doesn't have to be downloaded from the server. - - The provided Realm file must be a valid synced Realm for the given user, and it must have been created using the **Realm.writeCopyTo(File)** API. - - - - WARNING: This could potentially be a lengthy operation and should ideally be done on a background thread. - - - - - - - **Parameters** - - - ``assetFile`` - path to the asset database file. - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if this Realm is also marked as :ref:`inMemory() ` . - - - - - - - - - - - - - - -.. _build: - -.. _build__: - -.. _Builder_build: - -.. _Builder_build__: - -.. _SyncConfiguration_Builder_build: - -.. _SyncConfiguration_Builder_build__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_build: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_build__: - - - -build ------ - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration ` :ref:`build ` () - | - - - - - * - Creates the RealmConfiguration based on the builder parameters. - - - - - - - **Returns** - - the created :ref:`SyncConfiguration ` . - - - - - - - **Throws** - - - `IllegalStateException `__ - if the configuration parameters are invalid or inconsistent. - - - - - - - - - - - - -.. _clientResetHandler: - -.. _clientResetHandler__: - -.. _Builder_clientResetHandler: - -.. _Builder_clientResetHandler__: - -.. _SyncConfiguration_Builder_clientResetHandler: - -.. _SyncConfiguration_Builder_clientResetHandler__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_clientResetHandler: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_clientResetHandler__: - - - -clientResetHandler ------------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_clientResetHandler_io_realm_mongodb_sync_SyncSession_ClientResetHandler_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_clientResetHandler_ClientResetHandler_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_clientResetHandler_SyncSession_ClientResetHandler_: - -.. _clientResetHandler_io_realm_mongodb_sync_SyncSession_ClientResetHandler_: - -.. _clientResetHandler_ClientResetHandler_: - -.. _clientResetHandler_SyncSession_ClientResetHandler_: - -.. _SyncConfiguration_Builder_clientResetHandler_io_realm_mongodb_sync_SyncSession_ClientResetHandler_: - -.. _SyncConfiguration_Builder_clientResetHandler_ClientResetHandler_: - -.. _SyncConfiguration_Builder_clientResetHandler_SyncSession_ClientResetHandler_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`clientResetHandler ` ( - | :ref:`SyncSession.ClientResetHandler ` handler - | ) - - - - - * - Sets the handler for when a Client Reset occurs. If no handler is set, and error is logged when a Client Reset occurs. - - - - - **Parameters** - - - ``handler`` - custom handler in case of a Client Reset. - - - - - - - - - - - - - - - - -.. _compactOnLaunch: - -.. _compactOnLaunch__: - -.. _Builder_compactOnLaunch: - -.. _Builder_compactOnLaunch__: - -.. _SyncConfiguration_Builder_compactOnLaunch: - -.. _SyncConfiguration_Builder_compactOnLaunch__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_compactOnLaunch: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_compactOnLaunch__: - - - -compactOnLaunch ---------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_compactOnLaunch_io_realm_CompactOnLaunchCallback_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_compactOnLaunch_CompactOnLaunchCallback_: - -.. _compactOnLaunch_io_realm_CompactOnLaunchCallback_: - -.. _compactOnLaunch_CompactOnLaunchCallback_: - -.. _SyncConfiguration_Builder_compactOnLaunch_io_realm_CompactOnLaunchCallback_: - -.. _SyncConfiguration_Builder_compactOnLaunch_CompactOnLaunchCallback_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`compactOnLaunch ` ( - | :ref:`CompactOnLaunchCallback ` compactOnLaunch - | ) - - - - - * - Sets this to determine if the Realm file should be compacted before returned to the user. It is passed the total file size (data + free space) and the bytes used by data in the file. - - - - - **Parameters** - - - ``compactOnLaunch`` - a callback called when opening a Realm for the first time during the life of a process to determine if it should be compacted before being returned to the user. It is passed the total file size (data + free space) and the bytes used by data in the file. - - - - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`compactOnLaunch ` () - | - - - - - * - Setting this will cause Realm to compact the Realm file if the Realm file has grown too large and a significant amount of space can be recovered. See :ref:`DefaultCompactOnLaunchCallback ` for details. - - - - - - - - - - - - - - - - - -.. _encryptionKey: - -.. _encryptionKey__: - -.. _Builder_encryptionKey: - -.. _Builder_encryptionKey__: - -.. _SyncConfiguration_Builder_encryptionKey: - -.. _SyncConfiguration_Builder_encryptionKey__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_encryptionKey: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_encryptionKey__: - - - -encryptionKey -------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_encryptionKey_byte_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_encryptionKey_byte____: - -.. _encryptionKey_byte_: - -.. _encryptionKey_byte____: - -.. _SyncConfiguration_Builder_encryptionKey_byte_: - -.. _SyncConfiguration_Builder_encryptionKey_byte____: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_encryptionKey_byte[]_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`encryptionKey ` ( - | **byte[]** key - | ) - - - - - * - Sets the io.realm.Realm#ENCRYPTION_KEY_LENGTH bytes key used to encrypt and decrypt the Realm file. - - - - - - - **Parameters** - - - ``key`` - the encryption key. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if key is invalid. - - - - - - - - - - - - -.. _errorHandler: - -.. _errorHandler__: - -.. _Builder_errorHandler: - -.. _Builder_errorHandler__: - -.. _SyncConfiguration_Builder_errorHandler: - -.. _SyncConfiguration_Builder_errorHandler__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_errorHandler: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_errorHandler__: - - - -errorHandler ------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_errorHandler_io_realm_mongodb_sync_SyncSession_ErrorHandler_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_errorHandler_ErrorHandler_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_errorHandler_SyncSession_ErrorHandler_: - -.. _errorHandler_io_realm_mongodb_sync_SyncSession_ErrorHandler_: - -.. _errorHandler_ErrorHandler_: - -.. _errorHandler_SyncSession_ErrorHandler_: - -.. _SyncConfiguration_Builder_errorHandler_io_realm_mongodb_sync_SyncSession_ErrorHandler_: - -.. _SyncConfiguration_Builder_errorHandler_ErrorHandler_: - -.. _SyncConfiguration_Builder_errorHandler_SyncSession_ErrorHandler_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`errorHandler ` ( - | :ref:`SyncSession.ErrorHandler ` errorHandler - | ) - - - - - * - Sets the error handler used by this configuration.Only errors not handled by the defined ``SyncPolicy`` will be reported to this error handler. - - - - - - - - - **Parameters** - - - ``errorHandler`` - error handler used to report back errors when communicating with the Realm Object Server. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if ``null`` is given as an error handler. - - - - - - - - - - - - - - -.. _flowFactory: - -.. _flowFactory__: - -.. _Builder_flowFactory: - -.. _Builder_flowFactory__: - -.. _SyncConfiguration_Builder_flowFactory: - -.. _SyncConfiguration_Builder_flowFactory__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_flowFactory: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_flowFactory__: - - - -flowFactory ------------ - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_flowFactory_io_realm_coroutines_FlowFactory_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_flowFactory_FlowFactory_: - -.. _flowFactory_io_realm_coroutines_FlowFactory_: - -.. _flowFactory_FlowFactory_: - -.. _SyncConfiguration_Builder_flowFactory_io_realm_coroutines_FlowFactory_: - -.. _SyncConfiguration_Builder_flowFactory_FlowFactory_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`flowFactory ` ( - | :ref:`FlowFactory ` factory - | ) - - - - - * - Sets the :ref:`FlowFactory ` used to create coroutines Flows from Realm objects. The default factory is :ref:`RealmFlowFactory ` . - - - - - - - **Parameters** - - - ``factory`` - factory to use. - - - - - - - - - - - - - - - - -.. _inMemory: - -.. _inMemory__: - -.. _Builder_inMemory: - -.. _Builder_inMemory__: - -.. _SyncConfiguration_Builder_inMemory: - -.. _SyncConfiguration_Builder_inMemory__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_inMemory: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_inMemory__: - - - -inMemory --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`inMemory ` () - | - - - - - * - Setting this will create an in-memory Realm instead of saving it to disk. In-memory Realms might still use disk space if memory is running low, but all files created by an in-memory Realm will be deleted when the Realm is closed.Note that because in-memory Realms are not persisted, you must be sure to hold on to at least one non-closed reference to the in-memory Realm object with the specific name as long as you want the data to last. - - - - - - - - - - - - - - - - - -.. _initialData: - -.. _initialData__: - -.. _Builder_initialData: - -.. _Builder_initialData__: - -.. _SyncConfiguration_Builder_initialData: - -.. _SyncConfiguration_Builder_initialData__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialData: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialData__: - - - -initialData ------------ - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialData_io_realm_Realm_Transaction_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialData_Transaction_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialData_Realm_Transaction_: - -.. _initialData_io_realm_Realm_Transaction_: - -.. _initialData_Transaction_: - -.. _initialData_Realm_Transaction_: - -.. _SyncConfiguration_Builder_initialData_io_realm_Realm_Transaction_: - -.. _SyncConfiguration_Builder_initialData_Transaction_: - -.. _SyncConfiguration_Builder_initialData_Realm_Transaction_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`initialData ` ( - | :ref:`Realm.Transaction ` transaction - | ) - - - - - * - Sets the initial data in :ref:`io.realm.Realm ` . This transaction will be executed only the first time the Realm file is opened (created) or while migrating the data if :ref:`RealmConfiguration.Builder.deleteRealmIfMigrationNeeded() ` is set. - - - - - - - **Parameters** - - - ``transaction`` - transaction to execute. - - - - - - - - - - - - - - - - -.. _initialSubscriptions: - -.. _initialSubscriptions__: - -.. _Builder_initialSubscriptions: - -.. _Builder_initialSubscriptions__: - -.. _SyncConfiguration_Builder_initialSubscriptions: - -.. _SyncConfiguration_Builder_initialSubscriptions__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialSubscriptions: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialSubscriptions__: - - - -initialSubscriptions --------------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialSubscriptions_io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialSubscriptions_InitialFlexibleSyncSubscriptions_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_initialSubscriptions_SyncConfiguration_InitialFlexibleSyncSubscriptions_: - -.. _initialSubscriptions_io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_: - -.. _initialSubscriptions_InitialFlexibleSyncSubscriptions_: - -.. _initialSubscriptions_SyncConfiguration_InitialFlexibleSyncSubscriptions_: - -.. _SyncConfiguration_Builder_initialSubscriptions_io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_: - -.. _SyncConfiguration_Builder_initialSubscriptions_InitialFlexibleSyncSubscriptions_: - -.. _SyncConfiguration_Builder_initialSubscriptions_SyncConfiguration_InitialFlexibleSyncSubscriptions_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`initialSubscriptions ` ( - | :ref:`SyncConfiguration.InitialFlexibleSyncSubscriptions ` action - | ) - - - - - * - Sets the initial :ref:`Subscription ` s for the :ref:`io.realm.Realm ` . This will only be executed the first time the Realm file is opened (and the file created). If :ref:`waitForInitialRemoteData() ` is configured as well, the realm file isn't fully opened until all subscription data also has been uploaded. - - - - - - - **Parameters** - - - ``action`` - :ref:`MutableSubscriptionSet ` where subscriptions can be added. - - - - - - - - - - - - - - - - - - -.. _maxNumberOfActiveVersions: - -.. _maxNumberOfActiveVersions__: - -.. _Builder_maxNumberOfActiveVersions: - -.. _Builder_maxNumberOfActiveVersions__: - -.. _SyncConfiguration_Builder_maxNumberOfActiveVersions: - -.. _SyncConfiguration_Builder_maxNumberOfActiveVersions__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_maxNumberOfActiveVersions: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_maxNumberOfActiveVersions__: - - - -maxNumberOfActiveVersions -------------------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_maxNumberOfActiveVersions_long_: - -.. _maxNumberOfActiveVersions_long_: - -.. _SyncConfiguration_Builder_maxNumberOfActiveVersions_long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`maxNumberOfActiveVersions ` ( - | **long** number - | ) - - - - - * - Sets the maximum number of live versions in the Realm file before an `IllegalStateException `__ is thrown when attempting to write more data. - - Realm is capable of concurrently handling many different versions of Realm objects. This can happen if you have a Realm open on many different threads or are freezing objects while data is being written to the file. - - Under normal circumstances this is not a problem, but if the number of active versions grow too large, it will have a negative effect on the filesize on disk. Setting this parameters can therefore be used to prevent uses of Realm that can result in very large Realms. - - Note, the version number will also increase when changes from other devices are integrated on this device, so the number of active versions will also depend on what other devices writing to the same Realm are doing. - - - - - - - **Parameters** - - - ``number`` - the maximum number of active versions before an exception is thrown. - - - - - - - - - - - - - - .. seealso:: - - - - - `FAQ `__ - - - - - - - - - - - - - -.. _modules: - -.. _modules__: - -.. _Builder_modules: - -.. _Builder_modules__: - -.. _SyncConfiguration_Builder_modules: - -.. _SyncConfiguration_Builder_modules__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules__: - - - -modules -------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_java_lang_Iterable_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_Iterable_: - -.. _modules_java_lang_Iterable_: - -.. _modules_Iterable_: - -.. _SyncConfiguration_Builder_modules_java_lang_Iterable_: - -.. _SyncConfiguration_Builder_modules_Iterable_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_Iterable_Object__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`modules ` ( - | `java.lang.Iterable\ `__ modules - | ) - - - - - * - Replaces the existing module(s) with one or more :ref:`RealmModule ` s. Using this method will replace the current schema for this Realm with the schema defined by the provided modules. - - A reference to the default Realm module containing all Realm classes in the project (but not dependencies), can be found using :ref:`Realm.getDefaultModule() ` . Combining the schema from the app project and a library dependency is thus done using the following code: - - - - ``builder.modules(Realm.getDefaultMode(), new MyLibraryModule());`` - - - - - - - - - **Parameters** - - - ``modules`` - list of modules tthe first Realm module (required). - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if any of the modules don't have the :ref:`RealmModule ` annotation. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Realm.getDefaultModule() ` - - - - - - - - - - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_java_lang_Object_java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_java_lang_Object__java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_java_lang_Object_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_java_lang_Object__Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_java_lang_Object_Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_java_lang_Object__Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_Object_java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_Object__java_lang_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_Object_Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_Object__Object_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_Object_Object____: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_modules_Object__Object____: - -.. _modules_java_lang_Object_java_lang_Object_: - -.. _modules_java_lang_Object__java_lang_Object_: - -.. _modules_java_lang_Object_Object_: - -.. _modules_java_lang_Object__Object_: - -.. _modules_java_lang_Object_Object____: - -.. _modules_java_lang_Object__Object____: - -.. _modules_Object_java_lang_Object_: - -.. _modules_Object__java_lang_Object_: - -.. _modules_Object_Object_: - -.. _modules_Object__Object_: - -.. _modules_Object_Object____: - -.. _modules_Object__Object____: - -.. _SyncConfiguration_Builder_modules_java_lang_Object_java_lang_Object_: - -.. _SyncConfiguration_Builder_modules_java_lang_Object__java_lang_Object_: - -.. _SyncConfiguration_Builder_modules_java_lang_Object_Object_: - -.. _SyncConfiguration_Builder_modules_java_lang_Object__Object_: - -.. _SyncConfiguration_Builder_modules_java_lang_Object_Object____: - -.. _SyncConfiguration_Builder_modules_java_lang_Object__Object____: - -.. _SyncConfiguration_Builder_modules_Object_java_lang_Object_: - -.. _SyncConfiguration_Builder_modules_Object__java_lang_Object_: - -.. _SyncConfiguration_Builder_modules_Object_Object_: - -.. _SyncConfiguration_Builder_modules_Object__Object_: - -.. _SyncConfiguration_Builder_modules_Object_Object____: - -.. _SyncConfiguration_Builder_modules_Object__Object____: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`modules ` ( - | `Object `__ baseModule, - | `java.lang.Object[] `__ additionalModules - | ) - - - - - * - Replaces the existing module(s) with one or more :ref:`RealmModule ` s. Using this method will replace the current schema for this Realm with the schema defined by the provided modules. - - A reference to the default Realm module containing all Realm classes in the project (but not dependencies), can be found using :ref:`Realm.getDefaultModule() ` . Combining the schema from the app project and a library dependency is thus done using the following code: - - - - ``builder.modules(Realm.getDefaultMode(), new MyLibraryModule());`` - - - - - - - - - **Parameters** - - - ``baseModule`` - the first Realm module (required). - - - - - ``additionalModules`` - the additional Realm modules - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if any of the modules don't have the :ref:`RealmModule ` annotation. - - - - - - - - - - - - .. seealso:: - - - - - :ref:`Realm.getDefaultModule() ` - - - - - - - - - - - - -.. _name: - -.. _name__: - -.. _Builder_name: - -.. _Builder_name__: - -.. _SyncConfiguration_Builder_name: - -.. _SyncConfiguration_Builder_name__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_name: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_name__: - - - -name ----- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_name_java_lang_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_name_String_: - -.. _name_java_lang_String_: - -.. _name_String_: - -.. _SyncConfiguration_Builder_name_java_lang_String_: - -.. _SyncConfiguration_Builder_name_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`name ` ( - | `String `__ filename - | ) - - - - - * - Sets the filename for the Realm file on this device. - - - - - **Parameters** - - - ``filename`` - name for the Realm file. - - - - - - - - - - - - - - - - -.. _readOnly: - -.. _readOnly__: - -.. _Builder_readOnly: - -.. _Builder_readOnly__: - -.. _SyncConfiguration_Builder_readOnly: - -.. _SyncConfiguration_Builder_readOnly__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_readOnly: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_readOnly__: - - - -readOnly --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`readOnly ` () - | - - - - - * - Setting this will cause the Realm to become read only and all write transactions made against this Realm will fail with an `IllegalStateException `__ . - - This in particular mean that :ref:`initialData(Realm.Transaction) ` will not work in combination with a read only Realm and setting this will result in a `IllegalStateException `__ being thrown. - - - - Marking a Realm as read only only applies to the Realm in this process. Other processes and devices can still write to the Realm. - - - - - - - - - - - - - - - -.. _rxFactory: - -.. _rxFactory__: - -.. _Builder_rxFactory: - -.. _Builder_rxFactory__: - -.. _SyncConfiguration_Builder_rxFactory: - -.. _SyncConfiguration_Builder_rxFactory__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_rxFactory: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_rxFactory__: - - - -rxFactory ---------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_rxFactory_io_realm_rx_RxObservableFactory_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_rxFactory_RxObservableFactory_: - -.. _rxFactory_io_realm_rx_RxObservableFactory_: - -.. _rxFactory_RxObservableFactory_: - -.. _SyncConfiguration_Builder_rxFactory_io_realm_rx_RxObservableFactory_: - -.. _SyncConfiguration_Builder_rxFactory_RxObservableFactory_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`rxFactory ` ( - | :ref:`RxObservableFactory ` factory - | ) - - - - - * - Sets the :ref:`RxObservableFactory ` used to create Rx Observables from Realm objects. The default factory is :ref:`RealmObservableFactory ` . - - - - - - - **Parameters** - - - ``factory`` - factory to use. - - - - - - - - - - - - - - - - -.. _schemaVersion: - -.. _schemaVersion__: - -.. _Builder_schemaVersion: - -.. _Builder_schemaVersion__: - -.. _SyncConfiguration_Builder_schemaVersion: - -.. _SyncConfiguration_Builder_schemaVersion__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_schemaVersion: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_schemaVersion__: - - - -schemaVersion -------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_schemaVersion_long_: - -.. _schemaVersion_long_: - -.. _SyncConfiguration_Builder_schemaVersion_long_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`schemaVersion ` ( - | **long** schemaVersion - | ) - - - - - * - Sets the schema version of the Realm.Synced Realms only support additive schema changes which can be applied without requiring a manual migration. The schema version will only be used as an indication to the underlying storage layer to remove or add indexes. These will be recalculated if the provided schema version differ from the version in the Realm file. **WARNING:** There is no guarantee that the value inserted here is the same returned by **Realm.getVersion()**. Due to the nature of synced Realms, the value can both be higher and lower. - - - - - - - It will be lower if another client with a lesser ``schemaVersion`` connected to the server for the first time after this schemaVersion was used. - - - - - - It will be higher if another client with a higher ``schemaVersion`` connected to the server after this Realm was created. - - - - - - - - - - - - **Parameters** - - - ``schemaVersion`` - the schema version. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if schema version is invalid. - - - - - - - - - - - - -.. _syncClientResetStrategy: - -.. _syncClientResetStrategy__: - -.. _Builder_syncClientResetStrategy: - -.. _Builder_syncClientResetStrategy__: - -.. _SyncConfiguration_Builder_syncClientResetStrategy: - -.. _SyncConfiguration_Builder_syncClientResetStrategy__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_syncClientResetStrategy: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_syncClientResetStrategy__: - - - -syncClientResetStrategy ------------------------ - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_syncClientResetStrategy_io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_syncClientResetStrategy_DiscardUnsyncedChangesStrategy_: - -.. _syncClientResetStrategy_io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_: - -.. _syncClientResetStrategy_DiscardUnsyncedChangesStrategy_: - -.. _SyncConfiguration_Builder_syncClientResetStrategy_io_realm_mongodb_sync_DiscardUnsyncedChangesStrategy_: - -.. _SyncConfiguration_Builder_syncClientResetStrategy_DiscardUnsyncedChangesStrategy_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`syncClientResetStrategy ` ( - | :ref:`DiscardUnsyncedChangesStrategy ` handler - | ) - - - - - * - Sets the handler for when a Client Reset occurs. If no handler is set, and error is logged when a Client Reset occurs. This strategy is only available for synced realms using partition based sync. Realms using flexible sync currently only support :ref:`syncClientResetStrategy(ManuallyRecoverUnsyncedChangesStrategy) ` . - - - - - - - **Parameters** - - - ``handler`` - custom seamless loss handler in case of a Client Reset. - - - - - - - - - - - - - - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_syncClientResetStrategy_io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_syncClientResetStrategy_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _syncClientResetStrategy_io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _syncClientResetStrategy_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _SyncConfiguration_Builder_syncClientResetStrategy_io_realm_mongodb_sync_ManuallyRecoverUnsyncedChangesStrategy_: - -.. _SyncConfiguration_Builder_syncClientResetStrategy_ManuallyRecoverUnsyncedChangesStrategy_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`syncClientResetStrategy ` ( - | :ref:`ManuallyRecoverUnsyncedChangesStrategy ` handler - | ) - - - - - * - Sets the handler for when a Client Reset occurs. If no handler is set, and error is logged when a Client Reset occurs. - - - - - **Parameters** - - - ``handler`` - custom manual handler in case of a Client Reset. - - - - - - - - - - - - - - - - -.. _urlPrefix: - -.. _urlPrefix__: - -.. _Builder_urlPrefix: - -.. _Builder_urlPrefix__: - -.. _SyncConfiguration_Builder_urlPrefix: - -.. _SyncConfiguration_Builder_urlPrefix__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_urlPrefix: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_urlPrefix__: - - - -urlPrefix ---------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_urlPrefix_java_lang_String_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_urlPrefix_String_: - -.. _urlPrefix_java_lang_String_: - -.. _urlPrefix_String_: - -.. _SyncConfiguration_Builder_urlPrefix_java_lang_String_: - -.. _SyncConfiguration_Builder_urlPrefix_String_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`urlPrefix ` ( - | `String `__ urlPrefix - | ) - - - - - * - The prefix that is prepended to the path in the WebSocket request that initiates a sync connection to MongoDB Realm. The value specified must match the server’s configuration otherwise the device will not be able to create a connection. This value is optional and should only be set if a specific firewall rule requires it. - - - - - **Parameters** - - - ``urlPrefix`` - The prefix to append to the sync connection url. - - - - - - - - - - - - - - - - -.. _waitForInitialRemoteData: - -.. _waitForInitialRemoteData__: - -.. _Builder_waitForInitialRemoteData: - -.. _Builder_waitForInitialRemoteData__: - -.. _SyncConfiguration_Builder_waitForInitialRemoteData: - -.. _SyncConfiguration_Builder_waitForInitialRemoteData__: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_waitForInitialRemoteData: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_waitForInitialRemoteData__: - - - -waitForInitialRemoteData ------------------------- - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_waitForInitialRemoteData_long_java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_waitForInitialRemoteData_long__java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_waitForInitialRemoteData_long_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncConfiguration_Builder_waitForInitialRemoteData_long__TimeUnit_: - -.. _waitForInitialRemoteData_long_java_util_concurrent_TimeUnit_: - -.. _waitForInitialRemoteData_long__java_util_concurrent_TimeUnit_: - -.. _waitForInitialRemoteData_long_TimeUnit_: - -.. _waitForInitialRemoteData_long__TimeUnit_: - -.. _SyncConfiguration_Builder_waitForInitialRemoteData_long_java_util_concurrent_TimeUnit_: - -.. _SyncConfiguration_Builder_waitForInitialRemoteData_long__java_util_concurrent_TimeUnit_: - -.. _SyncConfiguration_Builder_waitForInitialRemoteData_long_TimeUnit_: - -.. _SyncConfiguration_Builder_waitForInitialRemoteData_long__TimeUnit_: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`waitForInitialRemoteData ` ( - | **long** timeout, - | `TimeUnit `__ unit - | ) - - - - - * - Setting this will cause the Realm to download all known changes from the server the first time a Realm is opened. The Realm will not open until all the data has been downloaded. This means that if a device is offline the Realm will not open.Since downloading all changes can be an lengthy operation that might block the UI thread, Realms with this setting enabled should only be opened on background threads or with :ref:`Realm.getInstanceAsync(RealmConfiguration, Realm.Callback) ` on the UI thread. - - - - This check is only enforced the first time a Realm is created. If you otherwise want to make sure a Realm has the latest changes, use :ref:`SyncSession.downloadAllServerChanges() ` . - - - - - - - - - **Parameters** - - - ``timeout`` - how long to wait for the download to complete before an :ref:`io.realm.exceptions.DownloadingRealmInterruptedException ` is thrown. - - - - - - - ``unit`` - the unit of time used to define the timeout. - - - - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration.Builder ` :ref:`waitForInitialRemoteData ` () - | - - - - - * - Setting this will cause the Realm to download all known changes from the server the first time a Realm is opened. The Realm will not open until all the data has been downloaded. This means that if a device is offline the Realm will not open.Since downloading all changes can be an lengthy operation that might block the UI thread, Realms with this setting enabled should only be opened on background threads or with :ref:`Realm.getInstanceAsync(RealmConfiguration, Realm.Callback) ` on the UI thread. - - - - This check is only enforced the first time a Realm is created. If you otherwise want to make sure a Realm has the latest changes, use :ref:`SyncSession.downloadAllServerChanges() ` . - - - - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt deleted file mode 100644 index 11aa52c3d6..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncConfiguration/InitialFlexibleSyncSubscriptions.txt +++ /dev/null @@ -1,168 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SyncConfiguration.InitialFlexibleSyncSubscriptions -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions: - - - -io.realm.mongodb.sync -===================== - - - -**Enclosing class:** - -:ref:`SyncConfiguration ` - - - -Interface for configuring the initial set of of subscriptions. This should only be used for synced realms configured for flexible sync. - - -.. seealso:: - - - - - :ref:`Builder.initialSubscriptions(SyncConfiguration.InitialFlexibleSyncSubscriptions) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`configure ` ( - | :ref:`Realm ` realm, - | :ref:`MutableSubscriptionSet ` subscriptions - | ) - - - - - - - - - - -Method Detail -============= - -.. _configure: - -.. _configure__: - -.. _InitialFlexibleSyncSubscriptions_configure: - -.. _InitialFlexibleSyncSubscriptions_configure__: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure__: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure__: - - - -configure ---------- - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_io_realm_Realm_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_io_realm_Realm__io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_io_realm_Realm_MutableSubscriptionSet_: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_io_realm_Realm__MutableSubscriptionSet_: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_Realm_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_Realm__io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_Realm_MutableSubscriptionSet_: - -.. _io_realm_mongodb_sync_SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_Realm__MutableSubscriptionSet_: - -.. _configure_io_realm_Realm_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _configure_io_realm_Realm__io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _configure_io_realm_Realm_MutableSubscriptionSet_: - -.. _configure_io_realm_Realm__MutableSubscriptionSet_: - -.. _configure_Realm_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _configure_Realm__io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _configure_Realm_MutableSubscriptionSet_: - -.. _configure_Realm__MutableSubscriptionSet_: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_io_realm_Realm_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_io_realm_Realm__io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_io_realm_Realm_MutableSubscriptionSet_: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_io_realm_Realm__MutableSubscriptionSet_: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_Realm_io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_Realm__io_realm_mongodb_sync_MutableSubscriptionSet_: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_Realm_MutableSubscriptionSet_: - -.. _SyncConfiguration_InitialFlexibleSyncSubscriptions_configure_Realm__MutableSubscriptionSet_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`configure ` ( - | :ref:`Realm ` realm, - | :ref:`MutableSubscriptionSet ` subscriptions - | ) - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession.txt deleted file mode 100644 index b1df900f3d..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession.txt +++ /dev/null @@ -1,1453 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class SyncSession -^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SyncSession: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | io.realm.mongodb.sync.SyncSession - - -A session controls how data is synchronized between a single Realm on the device and the server Realm on the Realm Object Server.A Session is created by opening a Realm instance using a :ref:`SyncConfiguration ` . Once a session has been created, it will continue to exist until the app is closed or all threads using this :ref:`SyncConfiguration ` closes their respective :ref:`Realm ` s. - - - -A session is controlled by Realm, but can provide additional information in case of errors. These errors are passed along in the :ref:`SyncSession.ErrorHandler ` . - - - -When creating a session, Realm will establish a connection to the server. This connection is controlled by Realm and might be shared between multiple sessions. It is possible to get insight into the connection using :ref:`addConnectionChangeListener(ConnectionListener) ` and :ref:`isConnected() ` . - - - -The session itself has a different lifecycle than the underlying connection. The state of the session can be found using :ref:`getState() ` . - - - -The :ref:`SyncSession ` object is thread safe. - - - - - - -Nested Class Summary -==================== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Class and Description - - * - ``public static final`` - - :ref:`SyncSession.State ` - - - * - ``public static interface`` - - :ref:`SyncSession.ErrorHandler ` - - - * - ``public static interface`` - - :ref:`SyncSession.ClientResetHandler ` - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public synchronized **void** - - | :ref:`addConnectionChangeListener ` ( - | :ref:`ConnectionListener ` listener - | ) - - - Adds a listener tracking changes to the connection backing this session. - - - - - * - public synchronized **void** - - | :ref:`addDownloadProgressListener ` ( - | :ref:`ProgressMode ` mode, - | :ref:`ProgressListener ` listener - | ) - - - Adds a progress listener tracking changes that need to be downloaded from the Realm Object Server. - - - - - * - public synchronized **void** - - | :ref:`addUploadProgressListener ` ( - | :ref:`ProgressMode ` mode, - | :ref:`ProgressListener ` listener - | ) - - - Adds a progress listener tracking changes that need to be uploaded from the device to the Realm Object Server. - - - - - * - public **boolean** - - | :ref:`downloadAllServerChanges ` ( - | **long** timeout, - | `TimeUnit `__ unit - | ) - - - Calling this method will block until all known remote changes have been downloaded and applied to the Realm or the specified timeout is hit. - - - - - * - public **void** - - | :ref:`downloadAllServerChanges ` () - | - - - Calling this method will block until all known remote changes have been downloaded and applied to the Realm. - - - - - * - public :ref:`SyncConfiguration ` - - | :ref:`getConfiguration ` () - | - - - Returns the :ref:`SyncConfiguration ` that is responsible for controlling the session. - - - - - - - * - public :ref:`ConnectionState ` - - | :ref:`getConnectionState ` () - | - - - Get the current state of the connection used by the session as defined in :ref:`ConnectionState ` . - - - - - - - * - public `URI `__ - - | :ref:`getServerUrl ` () - | - - - Returns the `URI `__ describing the remote Realm which this session connects to and synchronizes changes with. - - - - - - - * - public :ref:`SyncSession.State ` - - | :ref:`getState ` () - | - - - Get the current session's state, as defined in :ref:`SyncSession.State ` . - - - - - - - * - public :ref:`User ` - - | :ref:`getUser ` () - | - - - Returns the :ref:`User ` defined by the :ref:`SyncConfiguration ` that is used to connect to MongoDB Realm. - - - - - - - * - public **boolean** - - | :ref:`isConnected ` () - | - - - Checks if the session is connected to the server and can synchronize data. - - - - - * - public synchronized **void** - - | :ref:`removeConnectionChangeListener ` ( - | :ref:`ConnectionListener ` listener - | ) - - - Removes a previously registered :ref:`ConnectionListener ` . - - - - - - - * - public synchronized **void** - - | :ref:`removeProgressListener ` ( - | :ref:`ProgressListener ` listener - | ) - - - Removes a progress listener. - - - - - * - public synchronized **void** - - | :ref:`start ` () - | - - - Attempts to start the session and enable synchronization with the Realm Object Server. - - - - - * - public synchronized **void** - - | :ref:`stop ` () - | - - - Stops any synchronization with the Realm Object Server until the Realm is re-opened again after fully closing it. - - - - - * - public **boolean** - - | :ref:`uploadAllLocalChanges ` ( - | **long** timeout, - | `TimeUnit `__ unit - | ) - - - Calling this method will block until all known local changes have been uploaded to the server or the specified timeout is hit. - - - - - * - public **void** - - | :ref:`uploadAllLocalChanges ` () - | - - - Calling this method will block until all known local changes have been uploaded to the server. - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Method Detail -============= - -.. _addConnectionChangeListener: - -.. _addConnectionChangeListener__: - -.. _SyncSession_addConnectionChangeListener: - -.. _SyncSession_addConnectionChangeListener__: - -.. _io_realm_mongodb_sync_SyncSession_addConnectionChangeListener: - -.. _io_realm_mongodb_sync_SyncSession_addConnectionChangeListener__: - - - -addConnectionChangeListener ---------------------------- - -.. _io_realm_mongodb_sync_SyncSession_addConnectionChangeListener_io_realm_mongodb_sync_ConnectionListener_: - -.. _io_realm_mongodb_sync_SyncSession_addConnectionChangeListener_ConnectionListener_: - -.. _addConnectionChangeListener_io_realm_mongodb_sync_ConnectionListener_: - -.. _addConnectionChangeListener_ConnectionListener_: - -.. _SyncSession_addConnectionChangeListener_io_realm_mongodb_sync_ConnectionListener_: - -.. _SyncSession_addConnectionChangeListener_ConnectionListener_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized **void** :ref:`addConnectionChangeListener ` ( - | :ref:`ConnectionListener ` listener - | ) - - - - - * - Adds a listener tracking changes to the connection backing this session. See :ref:`ConnectionState ` for further details. - - - - - - - **Parameters** - - - ``listener`` - the listener to register. - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the listener is ``null`` . - - - - - - - - - - - - .. seealso:: - - - - - :ref:`ConnectionState ` - - - - - - - - - - - - -.. _addDownloadProgressListener: - -.. _addDownloadProgressListener__: - -.. _SyncSession_addDownloadProgressListener: - -.. _SyncSession_addDownloadProgressListener__: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener__: - - - -addDownloadProgressListener ---------------------------- - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode__ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener_ProgressMode_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addDownloadProgressListener_ProgressMode__ProgressListener_: - -.. _addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode_ProgressListener_: - -.. _addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode__ProgressListener_: - -.. _addDownloadProgressListener_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _addDownloadProgressListener_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _addDownloadProgressListener_ProgressMode_ProgressListener_: - -.. _addDownloadProgressListener_ProgressMode__ProgressListener_: - -.. _SyncSession_addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode_ProgressListener_: - -.. _SyncSession_addDownloadProgressListener_io_realm_mongodb_sync_ProgressMode__ProgressListener_: - -.. _SyncSession_addDownloadProgressListener_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_addDownloadProgressListener_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_addDownloadProgressListener_ProgressMode_ProgressListener_: - -.. _SyncSession_addDownloadProgressListener_ProgressMode__ProgressListener_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized **void** :ref:`addDownloadProgressListener ` ( - | :ref:`ProgressMode ` mode, - | :ref:`ProgressListener ` listener - | ) - - - - - * - Adds a progress listener tracking changes that need to be downloaded from the Realm Object Server.The :ref:`ProgressListener ` will be triggered immediately when registered, and periodically afterwards. - - - - - - - - - **Parameters** - - - ``mode`` - type of mode used. See :ref:`ProgressMode ` for more information. - - - - - - - ``listener`` - the listener to register. - - - - - - - - - - - - - - - - -.. _addUploadProgressListener: - -.. _addUploadProgressListener__: - -.. _SyncSession_addUploadProgressListener: - -.. _SyncSession_addUploadProgressListener__: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener__: - - - -addUploadProgressListener -------------------------- - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener_io_realm_mongodb_sync_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener_io_realm_mongodb_sync_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener_io_realm_mongodb_sync_ProgressMode_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener_io_realm_mongodb_sync_ProgressMode__ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener_ProgressMode_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_addUploadProgressListener_ProgressMode__ProgressListener_: - -.. _addUploadProgressListener_io_realm_mongodb_sync_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _addUploadProgressListener_io_realm_mongodb_sync_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _addUploadProgressListener_io_realm_mongodb_sync_ProgressMode_ProgressListener_: - -.. _addUploadProgressListener_io_realm_mongodb_sync_ProgressMode__ProgressListener_: - -.. _addUploadProgressListener_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _addUploadProgressListener_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _addUploadProgressListener_ProgressMode_ProgressListener_: - -.. _addUploadProgressListener_ProgressMode__ProgressListener_: - -.. _SyncSession_addUploadProgressListener_io_realm_mongodb_sync_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_addUploadProgressListener_io_realm_mongodb_sync_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_addUploadProgressListener_io_realm_mongodb_sync_ProgressMode_ProgressListener_: - -.. _SyncSession_addUploadProgressListener_io_realm_mongodb_sync_ProgressMode__ProgressListener_: - -.. _SyncSession_addUploadProgressListener_ProgressMode_io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_addUploadProgressListener_ProgressMode__io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_addUploadProgressListener_ProgressMode_ProgressListener_: - -.. _SyncSession_addUploadProgressListener_ProgressMode__ProgressListener_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized **void** :ref:`addUploadProgressListener ` ( - | :ref:`ProgressMode ` mode, - | :ref:`ProgressListener ` listener - | ) - - - - - * - Adds a progress listener tracking changes that need to be uploaded from the device to the Realm Object Server.The :ref:`ProgressListener ` will be triggered immediately when registered, and periodically afterwards. - - - - - - - - - **Parameters** - - - ``mode`` - type of mode used. See :ref:`ProgressMode ` for more information. - - - - - - - ``listener`` - the listener to register. - - - - - - - - - - - - - - - - -.. _downloadAllServerChanges: - -.. _downloadAllServerChanges__: - -.. _SyncSession_downloadAllServerChanges: - -.. _SyncSession_downloadAllServerChanges__: - -.. _io_realm_mongodb_sync_SyncSession_downloadAllServerChanges: - -.. _io_realm_mongodb_sync_SyncSession_downloadAllServerChanges__: - - - -downloadAllServerChanges ------------------------- - -.. _io_realm_mongodb_sync_SyncSession_downloadAllServerChanges_long_java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncSession_downloadAllServerChanges_long__java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncSession_downloadAllServerChanges_long_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncSession_downloadAllServerChanges_long__TimeUnit_: - -.. _downloadAllServerChanges_long_java_util_concurrent_TimeUnit_: - -.. _downloadAllServerChanges_long__java_util_concurrent_TimeUnit_: - -.. _downloadAllServerChanges_long_TimeUnit_: - -.. _downloadAllServerChanges_long__TimeUnit_: - -.. _SyncSession_downloadAllServerChanges_long_java_util_concurrent_TimeUnit_: - -.. _SyncSession_downloadAllServerChanges_long__java_util_concurrent_TimeUnit_: - -.. _SyncSession_downloadAllServerChanges_long_TimeUnit_: - -.. _SyncSession_downloadAllServerChanges_long__TimeUnit_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`downloadAllServerChanges ` ( - | **long** timeout, - | `TimeUnit `__ unit - | ) - - - - - * - Calling this method will block until all known remote changes have been downloaded and applied to the Realm or the specified timeout is hit. This will involve network access, so calling this method should only be done from a non-UI thread.This method cannot be called before the Realm has been opened. - - - - - - - - - **Returns** - - ``true`` if the data was downloaded before the timeout. ``false`` if the operation timed out or otherwise failed. - - - - - - - **Throws** - - - `IllegalStateException `__ - if called on the Android main thread. - - - - - `InterruptedException `__ - if the download took longer than the specified timeout or the thread was interrupted while downloading was in progress. The download will continue in the background even after this exception is thrown. - - - - - `IllegalArgumentException `__ - if ``timeout`` is less than or equal to ``0`` or ``unit`` is ``null`` . - - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`downloadAllServerChanges ` () - | - - - - - * - Calling this method will block until all known remote changes have been downloaded and applied to the Realm. This will involve network access, so calling this method should only be done from a non-UI thread.If the device is offline, this method might never return. - - This method cannot be called before the session has been started. - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called on the Android main thread. - - - - - `InterruptedException `__ - if the thread was interrupted while downloading was in progress. - - - - - - - - - - - - -.. _getConfiguration: - -.. _getConfiguration__: - -.. _SyncSession_getConfiguration: - -.. _SyncSession_getConfiguration__: - -.. _io_realm_mongodb_sync_SyncSession_getConfiguration: - -.. _io_realm_mongodb_sync_SyncSession_getConfiguration__: - - - -getConfiguration ----------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncConfiguration ` :ref:`getConfiguration ` () - | - - - - - * - Returns the :ref:`SyncConfiguration ` that is responsible for controlling the session. - - - - - - - - - **Returns** - - SyncConfiguration that defines and controls this session. - - - - - - - - - - - -.. _getConnectionState: - -.. _getConnectionState__: - -.. _SyncSession_getConnectionState: - -.. _SyncSession_getConnectionState__: - -.. _io_realm_mongodb_sync_SyncSession_getConnectionState: - -.. _io_realm_mongodb_sync_SyncSession_getConnectionState__: - - - -getConnectionState ------------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ConnectionState ` :ref:`getConnectionState ` () - | - - - - - * - Get the current state of the connection used by the session as defined in :ref:`ConnectionState ` . - - - - - - - - - **Returns** - - the state of connection used by the session. - - - - - - - - - .. seealso:: - - - - - :ref:`ConnectionState ` - - - - - - - - - - - - -.. _getServerUrl: - -.. _getServerUrl__: - -.. _SyncSession_getServerUrl: - -.. _SyncSession_getServerUrl__: - -.. _io_realm_mongodb_sync_SyncSession_getServerUrl: - -.. _io_realm_mongodb_sync_SyncSession_getServerUrl__: - - - -getServerUrl ------------- - -.. list-table:: - :header-rows: 1 - - * - | public `URI `__ :ref:`getServerUrl ` () - | - - - - - * - Returns the `URI `__ describing the remote Realm which this session connects to and synchronizes changes with. - - - - - - - - - **Returns** - - `URI `__ describing the remote Realm. - - - - - - - - - - - - - -.. _getState: - -.. _getState__: - -.. _SyncSession_getState: - -.. _SyncSession_getState__: - -.. _io_realm_mongodb_sync_SyncSession_getState: - -.. _io_realm_mongodb_sync_SyncSession_getState__: - - - -getState --------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`SyncSession.State ` :ref:`getState ` () - | - - - - - * - Get the current session's state, as defined in :ref:`SyncSession.State ` . - - Note that the state may change after this method returns. - - - - - - - - - **Returns** - - the state of the session. - - - - - - - - - .. seealso:: - - - - - :ref:`SyncSession.State ` - - - - - - - - - - - - -.. _getUser: - -.. _getUser__: - -.. _SyncSession_getUser: - -.. _SyncSession_getUser__: - -.. _io_realm_mongodb_sync_SyncSession_getUser: - -.. _io_realm_mongodb_sync_SyncSession_getUser__: - - - -getUser -------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`User ` :ref:`getUser ` () - | - - - - - * - Returns the :ref:`User ` defined by the :ref:`SyncConfiguration ` that is used to connect to MongoDB Realm. - - - - - - - - - **Returns** - - :ref:`User ` used to authenticate the session on MongoDB Realm. - - - - - - - - - - - - - -.. _isConnected: - -.. _isConnected__: - -.. _SyncSession_isConnected: - -.. _SyncSession_isConnected__: - -.. _io_realm_mongodb_sync_SyncSession_isConnected: - -.. _io_realm_mongodb_sync_SyncSession_isConnected__: - - - -isConnected ------------ - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`isConnected ` () - | - - - - - * - Checks if the session is connected to the server and can synchronize data. This is a best guess effort. To conserve battery the underlying implementation uses heartbeats to detect if the connection is still available. So if no data is actively being synced and some time has elapsed since the last heartbeat, the connection could have been dropped but this method will still return ``true`` . - - - - - - - - - **Returns** - - ``true`` if the session is connected and ready to synchronize data, ``false`` if not or if it is in the process of connecting. - - - - - - - - - - - - - -.. _removeConnectionChangeListener: - -.. _removeConnectionChangeListener__: - -.. _SyncSession_removeConnectionChangeListener: - -.. _SyncSession_removeConnectionChangeListener__: - -.. _io_realm_mongodb_sync_SyncSession_removeConnectionChangeListener: - -.. _io_realm_mongodb_sync_SyncSession_removeConnectionChangeListener__: - - - -removeConnectionChangeListener ------------------------------- - -.. _io_realm_mongodb_sync_SyncSession_removeConnectionChangeListener_io_realm_mongodb_sync_ConnectionListener_: - -.. _io_realm_mongodb_sync_SyncSession_removeConnectionChangeListener_ConnectionListener_: - -.. _removeConnectionChangeListener_io_realm_mongodb_sync_ConnectionListener_: - -.. _removeConnectionChangeListener_ConnectionListener_: - -.. _SyncSession_removeConnectionChangeListener_io_realm_mongodb_sync_ConnectionListener_: - -.. _SyncSession_removeConnectionChangeListener_ConnectionListener_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized **void** :ref:`removeConnectionChangeListener ` ( - | :ref:`ConnectionListener ` listener - | ) - - - - - * - Removes a previously registered :ref:`ConnectionListener ` . - - - - - - - **Parameters** - - - ``listener`` - listener to remove - - - - - - - - - - **Throws** - - - `IllegalArgumentException `__ - if the listener is ``null`` . - - - - - - - - - - - - - - -.. _removeProgressListener: - -.. _removeProgressListener__: - -.. _SyncSession_removeProgressListener: - -.. _SyncSession_removeProgressListener__: - -.. _io_realm_mongodb_sync_SyncSession_removeProgressListener: - -.. _io_realm_mongodb_sync_SyncSession_removeProgressListener__: - - - -removeProgressListener ----------------------- - -.. _io_realm_mongodb_sync_SyncSession_removeProgressListener_io_realm_mongodb_sync_ProgressListener_: - -.. _io_realm_mongodb_sync_SyncSession_removeProgressListener_ProgressListener_: - -.. _removeProgressListener_io_realm_mongodb_sync_ProgressListener_: - -.. _removeProgressListener_ProgressListener_: - -.. _SyncSession_removeProgressListener_io_realm_mongodb_sync_ProgressListener_: - -.. _SyncSession_removeProgressListener_ProgressListener_: - -.. list-table:: - :header-rows: 1 - - * - | public synchronized **void** :ref:`removeProgressListener ` ( - | :ref:`ProgressListener ` listener - | ) - - - - - * - Removes a progress listener. If the listener wasn't registered, this method will do nothing. - - - - - **Parameters** - - - ``listener`` - listener to remove. - - - - - - - - - - - - - - - - -.. _start: - -.. _start__: - -.. _SyncSession_start: - -.. _SyncSession_start__: - -.. _io_realm_mongodb_sync_SyncSession_start: - -.. _io_realm_mongodb_sync_SyncSession_start__: - - - -start ------ - -.. list-table:: - :header-rows: 1 - - * - | public synchronized **void** :ref:`start ` () - | - - - - - * - Attempts to start the session and enable synchronization with the Realm Object Server.This happens automatically when opening the Realm instance, so doing it manually should only be needed if the session was stopped using :ref:`stop() ` . - - - - If the session was already started, calling this method will do nothing. - - A session is considered started if :ref:`getState() ` returns :ref:`State.ACTIVE ` . If the session is :ref:`State.DYING ` , the session will be moved back to :ref:`State.ACTIVE ` . - - - - - - - - - - - - - - - - - .. seealso:: - - - - - :ref:`getState() ` - - - - - :ref:`stop() ` - - - - - - - - - - - - -.. _stop: - -.. _stop__: - -.. _SyncSession_stop: - -.. _SyncSession_stop__: - -.. _io_realm_mongodb_sync_SyncSession_stop: - -.. _io_realm_mongodb_sync_SyncSession_stop__: - - - -stop ----- - -.. list-table:: - :header-rows: 1 - - * - | public synchronized **void** :ref:`stop ` () - | - - - - - * - Stops any synchronization with the Realm Object Server until the Realm is re-opened again after fully closing it.Synchronization can be re-enabled by calling :ref:`start() ` again. - - - - If the session is already stopped, calling this method will do nothing. - - - - - - - - - - - - - - - - - -.. _uploadAllLocalChanges: - -.. _uploadAllLocalChanges__: - -.. _SyncSession_uploadAllLocalChanges: - -.. _SyncSession_uploadAllLocalChanges__: - -.. _io_realm_mongodb_sync_SyncSession_uploadAllLocalChanges: - -.. _io_realm_mongodb_sync_SyncSession_uploadAllLocalChanges__: - - - -uploadAllLocalChanges ---------------------- - -.. _io_realm_mongodb_sync_SyncSession_uploadAllLocalChanges_long_java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncSession_uploadAllLocalChanges_long__java_util_concurrent_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncSession_uploadAllLocalChanges_long_TimeUnit_: - -.. _io_realm_mongodb_sync_SyncSession_uploadAllLocalChanges_long__TimeUnit_: - -.. _uploadAllLocalChanges_long_java_util_concurrent_TimeUnit_: - -.. _uploadAllLocalChanges_long__java_util_concurrent_TimeUnit_: - -.. _uploadAllLocalChanges_long_TimeUnit_: - -.. _uploadAllLocalChanges_long__TimeUnit_: - -.. _SyncSession_uploadAllLocalChanges_long_java_util_concurrent_TimeUnit_: - -.. _SyncSession_uploadAllLocalChanges_long__java_util_concurrent_TimeUnit_: - -.. _SyncSession_uploadAllLocalChanges_long_TimeUnit_: - -.. _SyncSession_uploadAllLocalChanges_long__TimeUnit_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`uploadAllLocalChanges ` ( - | **long** timeout, - | `TimeUnit `__ unit - | ) - - - - - * - Calling this method will block until all known local changes have been uploaded to the server or the specified timeout is hit. This will involve network access, so calling this method should only be done from a non-UI thread.This method cannot be called before the Realm has been opened. - - - - - - - - - **Returns** - - ``true`` if the data was uploaded before the timeout. ``false`` if the operation timed out or otherwise failed. - - - - - - - **Throws** - - - `IllegalStateException `__ - if called on the Android main thread. - - - - - `InterruptedException `__ - if the upload took longer than the specified timeout or the thread was interrupted while uploading was in progress. The upload will continue in the background even after this exception is thrown. - - - - - `IllegalArgumentException `__ - if ``timeout`` is less than or equal to ``0`` or ``unit`` is ``null`` . - - - - - - - - - - - - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`uploadAllLocalChanges ` () - | - - - - - * - Calling this method will block until all known local changes have been uploaded to the server. This will involve network access, so calling this method should only be done from a non-UI thread.If the device is offline, this method might never return. - - This method cannot be called before the Realm has been opened. - - - - - - - - - - - **Throws** - - - `IllegalStateException `__ - if called on the Android main thread. - - - - - `InterruptedException `__ - if the thread was interrupted while downloading was in progress. - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt deleted file mode 100644 index b3ba88702b..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ClientResetHandler.txt +++ /dev/null @@ -1,66 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SyncSession.ClientResetHandler -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SyncSession_ClientResetHandler: - - - -io.realm.mongodb.sync -===================== - -**Implemented interfaces:** - - - -- :ref:`io.realm.mongodb.sync.ManuallyRecoverUnsyncedChangesStrategy ` -- :ref:`io.realm.mongodb.sync.SyncClientResetStrategy ` - - - - -**Enclosing class:** - -:ref:`SyncSession ` - - - -Callback for the specific error event known as a Client Reset, determined by the error code :ref:`ErrorCode.CLIENT_RESET ` . - -A synced Realm may need to be reset because the MongoDB Realm Server encountered an error and had to be restored from a backup or because it has been too long since the client connected to the server so the server has rotated the logs. - -The Client Reset thus occurs because the server does not have the full information required to bring the Client fully up to date. - -The reset process is as follows: the local copy of the Realm is copied into a recovery directory for safekeeping, and then deleted from the original location. The next time the Realm for that URL is opened, the Realm will automatically be re-downloaded from MongoDB Realm, and can be used as normal. - -Data written to the Realm after the local copy of the Realm diverged from the backup remote copy 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 backed up on the server. - -The client reset process can be initiated in one of two ways: - - - -1. Run :ref:`ClientResetRequiredError.executeClientReset() ` manually. All Realm instances must be closed before this method is called. - - - - -#. If Client Reset isn't executed manually, it will automatically be carried out the next time all Realm instances have been closed and re-opened. This will most likely be when the app is restarted. - - - - -**WARNING:** Any writes to the Realm file between this callback and Client Reset has been executed, will not be synchronized to MongoDB Realm. Those changes will only be present in the backed up file. It is therefore recommended to close all open Realm instances as soon as possible. - - -Inherited Methods -================= - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt deleted file mode 100644 index 1e63e58062..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/ErrorHandler.txt +++ /dev/null @@ -1,182 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface SyncSession.ErrorHandler -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler: - - - -io.realm.mongodb.sync -===================== - - - -**Enclosing class:** - -:ref:`SyncSession ` - - - -Interface used to report any session errors. - - -.. seealso:: - - - - - :ref:`SyncConfiguration.Builder.errorHandler(ErrorHandler) ` - - - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **void** - - | :ref:`onError ` ( - | :ref:`SyncSession ` session, - | :ref:`AppException ` error - | ) - - - Callback for errors on a session object. - - - - - - - -Method Detail -============= - -.. _onError: - -.. _onError__: - -.. _ErrorHandler_onError: - -.. _ErrorHandler_onError__: - -.. _SyncSession_ErrorHandler_onError: - -.. _SyncSession_ErrorHandler_onError__: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError__: - - - -onError -------- - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_AppException_: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_AppException_: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError_io_realm_mongodb_sync_SyncSession_AppException_: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError_io_realm_mongodb_sync_SyncSession__AppException_: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError_SyncSession_io_realm_mongodb_AppException_: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError_SyncSession__io_realm_mongodb_AppException_: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError_SyncSession_AppException_: - -.. _io_realm_mongodb_sync_SyncSession_ErrorHandler_onError_SyncSession__AppException_: - -.. _onError_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_AppException_: - -.. _onError_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_AppException_: - -.. _onError_io_realm_mongodb_sync_SyncSession_AppException_: - -.. _onError_io_realm_mongodb_sync_SyncSession__AppException_: - -.. _onError_SyncSession_io_realm_mongodb_AppException_: - -.. _onError_SyncSession__io_realm_mongodb_AppException_: - -.. _onError_SyncSession_AppException_: - -.. _onError_SyncSession__AppException_: - -.. _SyncSession_ErrorHandler_onError_io_realm_mongodb_sync_SyncSession_io_realm_mongodb_AppException_: - -.. _SyncSession_ErrorHandler_onError_io_realm_mongodb_sync_SyncSession__io_realm_mongodb_AppException_: - -.. _SyncSession_ErrorHandler_onError_io_realm_mongodb_sync_SyncSession_AppException_: - -.. _SyncSession_ErrorHandler_onError_io_realm_mongodb_sync_SyncSession__AppException_: - -.. _SyncSession_ErrorHandler_onError_SyncSession_io_realm_mongodb_AppException_: - -.. _SyncSession_ErrorHandler_onError_SyncSession__io_realm_mongodb_AppException_: - -.. _SyncSession_ErrorHandler_onError_SyncSession_AppException_: - -.. _SyncSession_ErrorHandler_onError_SyncSession__AppException_: - -.. list-table:: - :header-rows: 1 - - * - | public **void** :ref:`onError ` ( - | :ref:`SyncSession ` session, - | :ref:`AppException ` error - | ) - - - - - * - Callback for errors on a session object. It is not allowed to throw an exception inside an error handler. If the operations in an error handler can throw, it is safer to catch any exception in the error handler. When an exception is thrown in the error handler, the occurrence will be logged and the exception will be ignored. - - - - - **Parameters** - - - ``session`` - :ref:`SyncSession ` this error happened on. - - - - - - - ``error`` - type of error. - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/State.txt b/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/State.txt deleted file mode 100644 index c8b08e14d7..0000000000 --- a/source/sdk/temp/java/api/io/realm/mongodb/sync/SyncSession/State.txt +++ /dev/null @@ -1,317 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Enum SyncSession.State -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_mongodb_sync_SyncSession_State: - - - -io.realm.mongodb.sync -===================== - - - | `java.lang.Object `__ - | `java.lang.Enum `__ - | io.realm.mongodb.sync.SyncSession.State - - - - -**Enclosing class:** - -:ref:`SyncSession ` - - - -Enum describing the states a SyncSession can be in. The initial state is :ref:`State.INACTIVE ` . - -A Realm will automatically synchronize data with the server if the session is either :ref:`State.ACTIVE ` or :ref:`State.DYING ` and **isConnected()** returns ``true`` . - - - - - - -Enum Constant Summary -===================== - -.. list-table:: - :header-rows: 1 - - * - Enum Constant and Description - - * - :ref:`ACTIVE ` - - The Realm is open and data will be synchronized between the device and the server if the underlying connection is :ref:`ConnectionState.CONNECTED ` . - - - - - - - * - :ref:`DYING ` - - The Realm was closed, but still contains data that needs to be synchronized to the server. - - - - - * - :ref:`INACTIVE ` - - This is the initial state. - - - - - * - :ref:`WAITING_FOR_ACCESS_TOKEN ` - - The user is attempting to synchronize data but needs a valid access token to do so. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public static :ref:`SyncSession.State ` - - | :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - - - - * - public static :ref:`SyncSession.State ` - - | :ref:`values ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` -- Methods inherited from class `java.lang.Enum `__ : ``name`` , ``ordinal`` , ``toString`` , ``equals`` , ``hashCode`` , ``clone`` , ``compareTo`` , ``getDeclaringClass`` , ``valueOf`` , ``finalize`` - - - - -Enum Constant Detail -==================== - - -.. _io_realm_mongodb_sync_SyncSession_State_ACTIVE: - -.. _SyncSession_State_ACTIVE: - - - -``ACTIVE`` ------------ - -public static final :ref:`SyncSession.State ` - -The Realm is open and data will be synchronized between the device and the server if the underlying connection is :ref:`ConnectionState.CONNECTED ` . - -The session will remain in this state until the Realm is closed. In which case it will become :ref:`DYING ` . - - - - - - - -.. _io_realm_mongodb_sync_SyncSession_State_DYING: - -.. _SyncSession_State_DYING: - - - -``DYING`` ----------- - -public static final :ref:`SyncSession.State ` - -The Realm was closed, but still contains data that needs to be synchronized to the server. The session will attempt to upload all local data before going :ref:`INACTIVE ` . - - - - - -.. _io_realm_mongodb_sync_SyncSession_State_INACTIVE: - -.. _SyncSession_State_INACTIVE: - - - -``INACTIVE`` -------------- - -public static final :ref:`SyncSession.State ` - -This is the initial state. The session is closed. No data is being synchronized. The session will automatically transition to :ref:`ACTIVE ` when a Realm is opened. - - - - - -.. _io_realm_mongodb_sync_SyncSession_State_WAITING_FOR_ACCESS_TOKEN: - -.. _SyncSession_State_WAITING_FOR_ACCESS_TOKEN: - - - -``WAITING_FOR_ACCESS_TOKEN`` ------------------------------ - -public static final :ref:`SyncSession.State ` - -The user is attempting to synchronize data but needs a valid access token to do so. Realm will either use a cached token or automatically try to acquire one based on the current users login. This requires a network connection.Data cannot be synchronized in this state. - -Once a valid token is acquired, the session will transition to :ref:`ACTIVE ` . - - - - - - - - -Method Detail -============= - -.. _valueOf: - -.. _valueOf__: - -.. _State_valueOf: - -.. _State_valueOf__: - -.. _SyncSession_State_valueOf: - -.. _SyncSession_State_valueOf__: - -.. _io_realm_mongodb_sync_SyncSession_State_valueOf: - -.. _io_realm_mongodb_sync_SyncSession_State_valueOf__: - - - -valueOf -------- - -.. _io_realm_mongodb_sync_SyncSession_State_valueOf_java_lang_String_: - -.. _io_realm_mongodb_sync_SyncSession_State_valueOf_String_: - -.. _valueOf_java_lang_String_: - -.. _valueOf_String_: - -.. _SyncSession_State_valueOf_java_lang_String_: - -.. _SyncSession_State_valueOf_String_: - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SyncSession.State ` :ref:`valueOf ` ( - | `String `__ name - | ) - - - - - * - - - - - - - - - - - - - - - - -.. _values: - -.. _values__: - -.. _State_values: - -.. _State_values__: - -.. _SyncSession_State_values: - -.. _SyncSession_State_values__: - -.. _io_realm_mongodb_sync_SyncSession_State_values: - -.. _io_realm_mongodb_sync_SyncSession_State_values__: - - - -values ------- - -.. list-table:: - :header-rows: 1 - - * - | public static :ref:`SyncSession.State ` :ref:`values ` () - | - - - - - * - - - - - - - - - - - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/rx.txt b/source/sdk/temp/java/api/io/realm/rx.txt deleted file mode 100644 index fe17e536db..0000000000 --- a/source/sdk/temp/java/api/io/realm/rx.txt +++ /dev/null @@ -1,33 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -io.realm.rx -^^^^^^^^^^^ - -.. toctree:: - :titlesonly: - :hidden: - - - CollectionChange - ObjectChange - RealmObservableFactory - RxObservableFactory - - - -| - -- :ref:`io.realm.rx.CollectionChange ` -- :ref:`io.realm.rx.ObjectChange ` -- :ref:`io.realm.rx.RealmObservableFactory ` -- :ref:`io.realm.rx.RxObservableFactory ` - - - diff --git a/source/sdk/temp/java/api/io/realm/rx/CollectionChange.txt b/source/sdk/temp/java/api/io/realm/rx/CollectionChange.txt deleted file mode 100644 index 9be6d6b05a..0000000000 --- a/source/sdk/temp/java/api/io/realm/rx/CollectionChange.txt +++ /dev/null @@ -1,391 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class CollectionChange -^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_rx_CollectionChange: - - - -io.realm.rx -=========== - - - | `java.lang.Object `__ - | io.realm.rx.CollectionChange - - -Container wrapping the result of a :ref:`io.realm.OrderedRealmCollectionChangeListener ` being triggered. - -This is used by :ref:`RealmResults.asChangesetObservable() ` } and :ref:`RealmList.asChangesetObservable() ` as RxJava is only capable of emitting one item, not multiple. - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`CollectionChange ` ( - | **E** collection, - | :ref:`OrderedCollectionChangeSet ` changeset - | ) - - - Constructor for a CollectionChange. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public :ref:`OrderedCollectionChangeSet ` - - | :ref:`getChangeset ` () - | - - - Returns the changeset describing the update. - - - - - * - public **E** - - | :ref:`getCollection ` () - | - - - Returns the collection that was updated. - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _CollectionChange: - -.. _CollectionChange__: - -.. _io_realm_rx_CollectionChange: - -.. _io_realm_rx_CollectionChange__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`CollectionChange ` ( - | **E** collection, - | :ref:`OrderedCollectionChangeSet ` changeset - | ) - - - - - * - Constructor for a CollectionChange. - - - - - **Parameters** - - - ``collection`` - the collection that changed. - - - - - ``changeset`` - the changeset describing the change. - - - - - - - - - - - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _CollectionChange_equals: - -.. _CollectionChange_equals__: - -.. _io_realm_rx_CollectionChange_equals: - -.. _io_realm_rx_CollectionChange_equals__: - - - -equals ------- - -.. _io_realm_rx_CollectionChange_equals_java_lang_Object_: - -.. _io_realm_rx_CollectionChange_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _CollectionChange_equals_java_lang_Object_: - -.. _CollectionChange_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getChangeset: - -.. _getChangeset__: - -.. _CollectionChange_getChangeset: - -.. _CollectionChange_getChangeset__: - -.. _io_realm_rx_CollectionChange_getChangeset: - -.. _io_realm_rx_CollectionChange_getChangeset__: - - - -getChangeset ------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`OrderedCollectionChangeSet ` :ref:`getChangeset ` () - | - - - - - * - Returns the changeset describing the update.This will be ``null`` the first time the stream emits the collection as well as when a asynchronous query is loaded for the first time. - - - - - - .. code-block:: java - - - // Example - realm.where(Person.class).findAllAsync().asChangesetObservable() - .subscribe(new Consumer() { - @Override - public void accept(CollectionChange item) throws Exception { - item.getChangeset(); // Will return null the first two times - } - }); - - - - - - - - - - - - - **Returns** - - the changeset describing how the collection was updated. - - - - - - - - - - - -.. _getCollection: - -.. _getCollection__: - -.. _CollectionChange_getCollection: - -.. _CollectionChange_getCollection__: - -.. _io_realm_rx_CollectionChange_getCollection: - -.. _io_realm_rx_CollectionChange_getCollection__: - - - -getCollection -------------- - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`getCollection ` () - | - - - - - * - Returns the collection that was updated. - - - - - - - **Returns** - - collection that was updated. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _CollectionChange_hashCode: - -.. _CollectionChange_hashCode__: - -.. _io_realm_rx_CollectionChange_hashCode: - -.. _io_realm_rx_CollectionChange_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/rx/ObjectChange.txt b/source/sdk/temp/java/api/io/realm/rx/ObjectChange.txt deleted file mode 100644 index 82dc98ad5f..0000000000 --- a/source/sdk/temp/java/api/io/realm/rx/ObjectChange.txt +++ /dev/null @@ -1,442 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class ObjectChange -^^^^^^^^^^^^^^^^^^ - -.. _io_realm_rx_ObjectChange: - - - -io.realm.rx -=========== - - - | `java.lang.Object `__ - | io.realm.rx.ObjectChange - - -Container wrapping the result of a :ref:`io.realm.RealmObjectChangeListener ` being triggered. - -This is used by :ref:`RealmObject.asChangesetObservable() ` and :ref:`RealmObject.asChangesetObservable(RealmModel) ` as RxJava is only capable of emitting one item, not multiple. - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`ObjectChange ` ( - | **E** object, - | :ref:`ObjectChangeSet ` changeset - | ) - - - Constructor for a ObjectChange. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public :ref:`ObjectChangeSet ` - - | :ref:`getChangeset ` () - | - - - Returns the changeset describing the update. - - - - - * - public **E** - - | :ref:`getObject ` () - | - - - - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - * - public `String `__ - - | :ref:`toString ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _ObjectChange: - -.. _ObjectChange__: - -.. _io_realm_rx_ObjectChange: - -.. _io_realm_rx_ObjectChange__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ObjectChange ` ( - | **E** object, - | :ref:`ObjectChangeSet ` changeset - | ) - - - - - * - Constructor for a ObjectChange. - - - - - **Parameters** - - - ``object`` - the object that was updated. - - - - - ``changeset`` - the changeset describing the update. - - - - - - - - - - - - - - -Method Detail -============= - -.. _equals: - -.. _equals__: - -.. _ObjectChange_equals: - -.. _ObjectChange_equals__: - -.. _io_realm_rx_ObjectChange_equals: - -.. _io_realm_rx_ObjectChange_equals__: - - - -equals ------- - -.. _io_realm_rx_ObjectChange_equals_java_lang_Object_: - -.. _io_realm_rx_ObjectChange_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _ObjectChange_equals_java_lang_Object_: - -.. _ObjectChange_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _getChangeset: - -.. _getChangeset__: - -.. _ObjectChange_getChangeset: - -.. _ObjectChange_getChangeset__: - -.. _io_realm_rx_ObjectChange_getChangeset: - -.. _io_realm_rx_ObjectChange_getChangeset__: - - - -getChangeset ------------- - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`ObjectChangeSet ` :ref:`getChangeset ` () - | - - - - - * - Returns the changeset describing the update.This will be ``null`` the first time the stream emits the object as well as when a asynchronous query is loaded for the first time. - - - - - - .. code-block:: java - - - // Example - realm.where(Person.class).findFirstAsync().asChangesetObservable() - .subscribe(new Consumer() { - @Override - public void accept(ObjectChange item) throws Exception { - item.getChangeset(); // Will return null the first two times - } - }); - - - - - - - - - - - - - **Returns** - - the changeset describing how the object was updated. - - - - - - - - - - - -.. _getObject: - -.. _getObject__: - -.. _ObjectChange_getObject: - -.. _ObjectChange_getObject__: - -.. _io_realm_rx_ObjectChange_getObject: - -.. _io_realm_rx_ObjectChange_getObject__: - - - -getObject ---------- - -.. list-table:: - :header-rows: 1 - - * - | public **E** :ref:`getObject ` () - | - - - - - * - - - - - - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _ObjectChange_hashCode: - -.. _ObjectChange_hashCode__: - -.. _io_realm_rx_ObjectChange_hashCode: - -.. _io_realm_rx_ObjectChange_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - -.. _toString: - -.. _toString__: - -.. _ObjectChange_toString: - -.. _ObjectChange_toString__: - -.. _io_realm_rx_ObjectChange_toString: - -.. _io_realm_rx_ObjectChange_toString__: - - - -toString --------- - -.. list-table:: - :header-rows: 1 - - * - | public `String `__ :ref:`toString ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``toString`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/rx/RealmObservableFactory.txt b/source/sdk/temp/java/api/io/realm/rx/RealmObservableFactory.txt deleted file mode 100644 index e94c95bf79..0000000000 --- a/source/sdk/temp/java/api/io/realm/rx/RealmObservableFactory.txt +++ /dev/null @@ -1,1768 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Class RealmObservableFactory -^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_rx_RealmObservableFactory: - - - -io.realm.rx -=========== - - - | `java.lang.Object `__ - | io.realm.rx.RealmObservableFactory - - -**Implemented interfaces:** - - - -- :ref:`io.realm.rx.RxObservableFactory ` - - -Factory class for creating Observables for RxJava (<=2.0.\*). - - -.. seealso:: - - - - - :ref:`Realm.asFlowable() () ` - - - - - :ref:`RealmObject.asFlowable() ` - - - - - :ref:`RealmResults.asFlowable() ` - - - - - :ref:`DynamicRealm.asFlowable() ` - - - - - **DynamicRealmObject.asFlowable()** - - - - - - - - - -Constructors -============ - -.. list-table:: - :header-rows: 1 - - * - Constructor and Description - - * - | :ref:`RealmObservableFactory ` ( - | **boolean** emitFrozenObjects - | ) - - - Constructs the factory for creating Realm observables for RxJava. - - - - - - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **** - - | :ref:`changesetsFrom ` ( - | :ref:`DynamicRealm ` realm, - | :ref:`DynamicRealmObject ` object - | ) - - - Creates an Observable for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | **E** object - | ) - - - Creates an Observable for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates an Observable for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates an Observable for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates an Observable for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates an Observable for a :ref:`RealmResults ` . - - - - - - - * - public **boolean** - - | :ref:`equals ` ( - | `Object `__ o - | ) - - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmQuery\ ` query - | ) - - - Creates a Single from a :ref:`RealmQuery ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmQuery\ ` query - | ) - - - Creates a Single from a :ref:`RealmQuery ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`DynamicRealm ` realm, - | :ref:`DynamicRealmObject ` object - | ) - - - Creates a Flowable for a :ref:`DynamicRealmObject ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | **E** object - | ) - - - Creates a Flowable for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates a Flowable for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates an Observable for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a Flowable for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a Flowable for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`DynamicRealm ` realm - | ) - - - Creates a Flowable for a :ref:`DynamicRealm ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`Realm ` realm - | ) - - - Creates a Flowable for a :ref:`Realm ` . - - - - - - - * - public **int** - - | :ref:`hashCode ` () - | - - - - - - - - - - -Inherited Methods -================= - - - -- Methods inherited from class `java.lang.Object `__ : ``getClass`` , ``hashCode`` , ``equals`` , ``clone`` , ``toString`` , ``notify`` , ``notifyAll`` , ``wait`` , ``wait`` , ``wait`` , ``finalize`` - - - - -Constructor Detail -================== - -.. _RealmObservableFactory: - -.. _RealmObservableFactory__: - -.. _io_realm_rx_RealmObservableFactory: - -.. _io_realm_rx_RealmObservableFactory__: - -.. list-table:: - :header-rows: 1 - - * - | public :ref:`RealmObservableFactory ` ( - | **boolean** emitFrozenObjects - | ) - - - - - * - Constructs the factory for creating Realm observables for RxJava. - - - - - **Parameters** - - - ``emitFrozenObjects`` - ``true`` if all objects should be frozen before being returned to the user. ``false`` if they should be live objects. - - - - - - - - - - - - - - - - -Method Detail -============= - -.. _changesetsFrom: - -.. _changesetsFrom__: - -.. _RealmObservableFactory_changesetsFrom: - -.. _RealmObservableFactory_changesetsFrom__: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom__: - - - -changesetsFrom --------------- - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm__DynamicRealmObject_: - -.. _changesetsFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _changesetsFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _changesetsFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _changesetsFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _changesetsFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _changesetsFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _changesetsFrom_DynamicRealm_DynamicRealmObject_: - -.. _changesetsFrom_DynamicRealm__DynamicRealmObject_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm_DynamicRealmObject_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` ( - | :ref:`DynamicRealm ` realm, - | :ref:`DynamicRealmObject ` object - | ) - - - - - * - Creates an Observable for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object + the :ref:`io.realm.ObjectChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm_E_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm__E_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm_RealmModel_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm__RealmModel_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm_E_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm__E_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm_RealmModel_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm__RealmModel_: - -.. _changesetsFrom_io_realm_Realm_E_: - -.. _changesetsFrom_io_realm_Realm__E_: - -.. _changesetsFrom_io_realm_Realm_RealmModel_: - -.. _changesetsFrom_io_realm_Realm__RealmModel_: - -.. _changesetsFrom_Realm_E_: - -.. _changesetsFrom_Realm__E_: - -.. _changesetsFrom_Realm_RealmModel_: - -.. _changesetsFrom_Realm__RealmModel_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm_E_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm__E_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm_RealmModel_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm__RealmModel_: - -.. _RealmObservableFactory_changesetsFrom_Realm_E_: - -.. _RealmObservableFactory_changesetsFrom_Realm__E_: - -.. _RealmObservableFactory_changesetsFrom_Realm_RealmModel_: - -.. _RealmObservableFactory_changesetsFrom_Realm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | **E** object - | ) - - - - - * - Creates an Observable for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object + the :ref:`io.realm.ObjectChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm__RealmList_: - -.. _changesetsFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _changesetsFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _changesetsFrom_io_realm_DynamicRealm_RealmList_: - -.. _changesetsFrom_io_realm_DynamicRealm__RealmList_: - -.. _changesetsFrom_DynamicRealm_io_realm_RealmList_: - -.. _changesetsFrom_DynamicRealm__io_realm_RealmList_: - -.. _changesetsFrom_DynamicRealm_RealmList_: - -.. _changesetsFrom_DynamicRealm__RealmList_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__RealmList_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm_io_realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm__io_realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm__RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates an Observable for a :ref:`RealmList ` . It should emit the initial RealmList when subscribed to and on each subsequent update of the RealmList it should emit the RealmList + the :ref:`OrderedCollectionChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users. - - - - - - - - - **Returns** - - Rx observable that emit all updates + their changeset. - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm_io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm__io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm__RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm_io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm__io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm__RealmList_: - -.. _changesetsFrom_io_realm_Realm_io_realm_RealmList_: - -.. _changesetsFrom_io_realm_Realm__io_realm_RealmList_: - -.. _changesetsFrom_io_realm_Realm_RealmList_: - -.. _changesetsFrom_io_realm_Realm__RealmList_: - -.. _changesetsFrom_Realm_io_realm_RealmList_: - -.. _changesetsFrom_Realm__io_realm_RealmList_: - -.. _changesetsFrom_Realm_RealmList_: - -.. _changesetsFrom_Realm__RealmList_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm_io_realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm__io_realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm__RealmList_: - -.. _RealmObservableFactory_changesetsFrom_Realm_io_realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_Realm__io_realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_Realm_RealmList_: - -.. _RealmObservableFactory_changesetsFrom_Realm__RealmList_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates an Observable for a :ref:`RealmList ` . It should emit the initial RealmList when subscribed to and on each subsequent update of the RealmIst it should emit the RealmList + the :ref:`OrderedCollectionChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users. - - - - - - - - - **Returns** - - Rx observable that emit all updates + their changeset. - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm__RealmResults_: - -.. _changesetsFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _changesetsFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _changesetsFrom_io_realm_DynamicRealm_RealmResults_: - -.. _changesetsFrom_io_realm_DynamicRealm__RealmResults_: - -.. _changesetsFrom_DynamicRealm_io_realm_RealmResults_: - -.. _changesetsFrom_DynamicRealm__io_realm_RealmResults_: - -.. _changesetsFrom_DynamicRealm_RealmResults_: - -.. _changesetsFrom_DynamicRealm__RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_DynamicRealm__RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm_io_realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm__io_realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_DynamicRealm__RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_DynamicRealm__RealmResults_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates an Observable for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults it should emit the RealmResults + the :ref:`OrderedCollectionChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users. - - - - - - - - - **Returns** - - Rx observable that emit all updates + their changeset. - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_io_realm_Realm__RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm_io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm__io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm__RealmResults_: - -.. _changesetsFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _changesetsFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _changesetsFrom_io_realm_Realm_RealmResults_: - -.. _changesetsFrom_io_realm_Realm__RealmResults_: - -.. _changesetsFrom_Realm_io_realm_RealmResults_: - -.. _changesetsFrom_Realm__io_realm_RealmResults_: - -.. _changesetsFrom_Realm_RealmResults_: - -.. _changesetsFrom_Realm__RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_io_realm_Realm__RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_Realm_io_realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_Realm__io_realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_Realm_RealmResults_: - -.. _RealmObservableFactory_changesetsFrom_Realm__RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_changesetsFrom_Realm__RealmResults_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates an Observable for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults it should emit the RealmResults + the :ref:`OrderedCollectionChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users. - - - - - - - - - **Returns** - - Rx observable that emit all updates + their changeset. - - - - - - - - - - - -.. _equals: - -.. _equals__: - -.. _RealmObservableFactory_equals: - -.. _RealmObservableFactory_equals__: - -.. _io_realm_rx_RealmObservableFactory_equals: - -.. _io_realm_rx_RealmObservableFactory_equals__: - - - -equals ------- - -.. _io_realm_rx_RealmObservableFactory_equals_java_lang_Object_: - -.. _io_realm_rx_RealmObservableFactory_equals_Object_: - -.. _equals_java_lang_Object_: - -.. _equals_Object_: - -.. _RealmObservableFactory_equals_java_lang_Object_: - -.. _RealmObservableFactory_equals_Object_: - -.. list-table:: - :header-rows: 1 - - * - | public **boolean** :ref:`equals ` ( - | `Object `__ o - | ) - - - - - * - - - - - - - - - - - - **Overrides** - - ``equals`` in class `Object `__ - - - - - - -.. _from: - -.. _from__: - -.. _RealmObservableFactory_from: - -.. _RealmObservableFactory_from__: - -.. _io_realm_rx_RealmObservableFactory_from: - -.. _io_realm_rx_RealmObservableFactory_from__: - - - -from ----- - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm__RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_io_realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__io_realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__RealmQuery_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmQuery_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmQuery_: - -.. _from_io_realm_DynamicRealm_RealmQuery_: - -.. _from_io_realm_DynamicRealm__RealmQuery_: - -.. _from_DynamicRealm_io_realm_RealmQuery_: - -.. _from_DynamicRealm__io_realm_RealmQuery_: - -.. _from_DynamicRealm_RealmQuery_: - -.. _from_DynamicRealm__RealmQuery_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmQuery_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmQuery_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_RealmQuery_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm__RealmQuery_: - -.. _RealmObservableFactory_from_DynamicRealm_io_realm_RealmQuery_: - -.. _RealmObservableFactory_from_DynamicRealm__io_realm_RealmQuery_: - -.. _RealmObservableFactory_from_DynamicRealm_RealmQuery_: - -.. _RealmObservableFactory_from_DynamicRealm__RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__RealmQuery_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmQuery\ ` query - | ) - - - - - * - Creates a Single from a :ref:`RealmQuery ` . It should emit the query and then complete. - - A RealmQuery observable is cold. - - - - - - - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_io_realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm__io_realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm__RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_io_realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__io_realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__RealmQuery_: - -.. _from_io_realm_Realm_io_realm_RealmQuery_: - -.. _from_io_realm_Realm__io_realm_RealmQuery_: - -.. _from_io_realm_Realm_RealmQuery_: - -.. _from_io_realm_Realm__RealmQuery_: - -.. _from_Realm_io_realm_RealmQuery_: - -.. _from_Realm__io_realm_RealmQuery_: - -.. _from_Realm_RealmQuery_: - -.. _from_Realm__RealmQuery_: - -.. _RealmObservableFactory_from_io_realm_Realm_io_realm_RealmQuery_: - -.. _RealmObservableFactory_from_io_realm_Realm__io_realm_RealmQuery_: - -.. _RealmObservableFactory_from_io_realm_Realm_RealmQuery_: - -.. _RealmObservableFactory_from_io_realm_Realm__RealmQuery_: - -.. _RealmObservableFactory_from_Realm_io_realm_RealmQuery_: - -.. _RealmObservableFactory_from_Realm__io_realm_RealmQuery_: - -.. _RealmObservableFactory_from_Realm_RealmQuery_: - -.. _RealmObservableFactory_from_Realm__RealmQuery_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__RealmQuery_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmQuery\ ` query - | ) - - - - - * - Creates a Single from a :ref:`RealmQuery ` . It should emit the query and then complete. - - A RealmQuery observable is cold. - - - - - - - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _from_DynamicRealm_DynamicRealmObject_: - -.. _from_DynamicRealm__DynamicRealmObject_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _RealmObservableFactory_from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RealmObservableFactory_from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RealmObservableFactory_from_DynamicRealm_DynamicRealmObject_: - -.. _RealmObservableFactory_from_DynamicRealm__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`DynamicRealm ` realm, - | :ref:`DynamicRealmObject ` object - | ) - - - - - * - Creates a Flowable for a :ref:`DynamicRealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object. - - DynamicRealmObject observables are hot as DynamicRealmObjects automatically are kept up to date. - - - - - - - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_E_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm__E_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_RealmModel_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm__RealmModel_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_E_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__E_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_RealmModel_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__RealmModel_: - -.. _from_io_realm_Realm_E_: - -.. _from_io_realm_Realm__E_: - -.. _from_io_realm_Realm_RealmModel_: - -.. _from_io_realm_Realm__RealmModel_: - -.. _from_Realm_E_: - -.. _from_Realm__E_: - -.. _from_Realm_RealmModel_: - -.. _from_Realm__RealmModel_: - -.. _RealmObservableFactory_from_io_realm_Realm_E_: - -.. _RealmObservableFactory_from_io_realm_Realm__E_: - -.. _RealmObservableFactory_from_io_realm_Realm_RealmModel_: - -.. _RealmObservableFactory_from_io_realm_Realm__RealmModel_: - -.. _RealmObservableFactory_from_Realm_E_: - -.. _RealmObservableFactory_from_Realm__E_: - -.. _RealmObservableFactory_from_Realm_RealmModel_: - -.. _RealmObservableFactory_from_Realm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | **E** object - | ) - - - - - * - Creates a Flowable for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object. - - RealmObject observables are hot as RealmObjects are automatically kept up to date. - - - - - - - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm__RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__RealmList_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _from_io_realm_DynamicRealm_RealmList_: - -.. _from_io_realm_DynamicRealm__RealmList_: - -.. _from_DynamicRealm_io_realm_RealmList_: - -.. _from_DynamicRealm__io_realm_RealmList_: - -.. _from_DynamicRealm_RealmList_: - -.. _from_DynamicRealm__RealmList_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_RealmList_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm__RealmList_: - -.. _RealmObservableFactory_from_DynamicRealm_io_realm_RealmList_: - -.. _RealmObservableFactory_from_DynamicRealm__io_realm_RealmList_: - -.. _RealmObservableFactory_from_DynamicRealm_RealmList_: - -.. _RealmObservableFactory_from_DynamicRealm__RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates a Flowable for a :ref:`RealmList ` . It should emit the initial list when subscribed to and on each subsequent update of the RealmList. - - RealmList observables are hot as RealmLists are automatically kept up to date. - - Note: :ref:`io.realm.RealmChangeListener ` is currently not supported on RealmLists. - - - - - - - - - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm__io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm__RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__io_realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__RealmList_: - -.. _from_io_realm_Realm_io_realm_RealmList_: - -.. _from_io_realm_Realm__io_realm_RealmList_: - -.. _from_io_realm_Realm_RealmList_: - -.. _from_io_realm_Realm__RealmList_: - -.. _from_Realm_io_realm_RealmList_: - -.. _from_Realm__io_realm_RealmList_: - -.. _from_Realm_RealmList_: - -.. _from_Realm__RealmList_: - -.. _RealmObservableFactory_from_io_realm_Realm_io_realm_RealmList_: - -.. _RealmObservableFactory_from_io_realm_Realm__io_realm_RealmList_: - -.. _RealmObservableFactory_from_io_realm_Realm_RealmList_: - -.. _RealmObservableFactory_from_io_realm_Realm__RealmList_: - -.. _RealmObservableFactory_from_Realm_io_realm_RealmList_: - -.. _RealmObservableFactory_from_Realm__io_realm_RealmList_: - -.. _RealmObservableFactory_from_Realm_RealmList_: - -.. _RealmObservableFactory_from_Realm__RealmList_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates an Observable for a :ref:`RealmList ` . It should emit the initial list when subscribed to and on each subsequent update of the RealmList. - - RealmList observables are hot as RealmLists are automatically kept up to date. - - Note: :ref:`io.realm.RealmChangeListener ` is currently not supported on RealmLists. - - - - - - - - - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm__RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__RealmResults_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _from_io_realm_DynamicRealm_RealmResults_: - -.. _from_io_realm_DynamicRealm__RealmResults_: - -.. _from_DynamicRealm_io_realm_RealmResults_: - -.. _from_DynamicRealm__io_realm_RealmResults_: - -.. _from_DynamicRealm_RealmResults_: - -.. _from_DynamicRealm__RealmResults_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_RealmResults_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm__RealmResults_: - -.. _RealmObservableFactory_from_DynamicRealm_io_realm_RealmResults_: - -.. _RealmObservableFactory_from_DynamicRealm__io_realm_RealmResults_: - -.. _RealmObservableFactory_from_DynamicRealm_RealmResults_: - -.. _RealmObservableFactory_from_DynamicRealm__RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm__RealmResults_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a Flowable for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults. - - Realm observables are hot as RealmResults are automatically kept up to date. - - - - - - - - - **Returns** - - Rx observable that emit all updates to the RealmResults. - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm__io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm__RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__io_realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__RealmResults_: - -.. _from_io_realm_Realm_io_realm_RealmResults_: - -.. _from_io_realm_Realm__io_realm_RealmResults_: - -.. _from_io_realm_Realm_RealmResults_: - -.. _from_io_realm_Realm__RealmResults_: - -.. _from_Realm_io_realm_RealmResults_: - -.. _from_Realm__io_realm_RealmResults_: - -.. _from_Realm_RealmResults_: - -.. _from_Realm__RealmResults_: - -.. _RealmObservableFactory_from_io_realm_Realm_io_realm_RealmResults_: - -.. _RealmObservableFactory_from_io_realm_Realm__io_realm_RealmResults_: - -.. _RealmObservableFactory_from_io_realm_Realm_RealmResults_: - -.. _RealmObservableFactory_from_io_realm_Realm__RealmResults_: - -.. _RealmObservableFactory_from_Realm_io_realm_RealmResults_: - -.. _RealmObservableFactory_from_Realm__io_realm_RealmResults_: - -.. _RealmObservableFactory_from_Realm_RealmResults_: - -.. _RealmObservableFactory_from_Realm__RealmResults_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm__RealmResults_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a Flowable for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults. - - RealmResults observables are hot as RealmResults are automatically kept up to date. - - - - - - - - - **Returns** - - Rx observable that emit all updates to the RealmObject. - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_DynamicRealm_: - -.. _io_realm_rx_RealmObservableFactory_from_DynamicRealm_: - -.. _from_io_realm_DynamicRealm_: - -.. _from_DynamicRealm_: - -.. _RealmObservableFactory_from_io_realm_DynamicRealm_: - -.. _RealmObservableFactory_from_DynamicRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`DynamicRealm ` realm - | ) - - - - - * - Creates a Flowable for a :ref:`DynamicRealm ` . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm. - - DynamicRealm observables are hot as DynamicRealms are automatically kept up to date. - - - - - - - - - **Returns** - - Rx observable that emit all updates to the DynamicRealm. - - - - - - - - - -.. _io_realm_rx_RealmObservableFactory_from_io_realm_Realm_: - -.. _io_realm_rx_RealmObservableFactory_from_Realm_: - -.. _from_io_realm_Realm_: - -.. _from_Realm_: - -.. _RealmObservableFactory_from_io_realm_Realm_: - -.. _RealmObservableFactory_from_Realm_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`Realm ` realm - | ) - - - - - * - Creates a Flowable for a :ref:`Realm ` . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm. - - Realm flowables are hot as Realms are automatically kept up to date. - - - - - - - - - **Returns** - - Rx observable that emit all updates to the Realm. - - - - - - - - - - - -.. _hashCode: - -.. _hashCode__: - -.. _RealmObservableFactory_hashCode: - -.. _RealmObservableFactory_hashCode__: - -.. _io_realm_rx_RealmObservableFactory_hashCode: - -.. _io_realm_rx_RealmObservableFactory_hashCode__: - - - -hashCode --------- - -.. list-table:: - :header-rows: 1 - - * - | public **int** :ref:`hashCode ` () - | - - - - - * - - - - - - - - - - - - **Overrides** - - ``hashCode`` in class `Object `__ - - - - - - - diff --git a/source/sdk/temp/java/api/io/realm/rx/RxObservableFactory.txt b/source/sdk/temp/java/api/io/realm/rx/RxObservableFactory.txt deleted file mode 100644 index b436053494..0000000000 --- a/source/sdk/temp/java/api/io/realm/rx/RxObservableFactory.txt +++ /dev/null @@ -1,1808 +0,0 @@ - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - - - -Interface RxObservableFactory -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -.. _io_realm_rx_RxObservableFactory: - - - -io.realm.rx -=========== - -Factory interface for creating Rx Observables for Realm classes. - - -Method Summary -============== - -.. list-table:: - :header-rows: 1 - - * - Modifier and Type - - Method and Description - - * - public **** - - | :ref:`changesetsFrom ` ( - | :ref:`DynamicRealm ` realm, - | :ref:`DynamicRealmObject ` object - | ) - - - Creates an Observable for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | **E** object - | ) - - - Creates an Observable for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates an Observable for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates an Observable for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates an Observable for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates an Observable for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmQuery\ ` query - | ) - - - Creates a Single from a :ref:`RealmQuery ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmQuery\ ` query - | ) - - - Creates a Single from a :ref:`RealmQuery ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`DynamicRealm ` realm, - | :ref:`DynamicRealmObject ` object - | ) - - - Creates a Flowable for a :ref:`DynamicRealmObject ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | **E** object - | ) - - - Creates a Flowable for a :ref:`RealmObject ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates a Flowable for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - Creates an Observable for a :ref:`RealmList ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a Flowable for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - Creates a Flowable for a :ref:`RealmResults ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`DynamicRealm ` realm - | ) - - - Creates a Flowable for a :ref:`DynamicRealm ` . - - - - - - - * - public **** - - | :ref:`from ` ( - | :ref:`Realm ` realm - | ) - - - Creates a Flowable for a :ref:`Realm ` . - - - - - - - - - -Method Detail -============= - -.. _changesetsFrom: - -.. _changesetsFrom__: - -.. _RxObservableFactory_changesetsFrom: - -.. _RxObservableFactory_changesetsFrom__: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom__: - - - -changesetsFrom --------------- - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm__DynamicRealmObject_: - -.. _changesetsFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _changesetsFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _changesetsFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _changesetsFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _changesetsFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _changesetsFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _changesetsFrom_DynamicRealm_DynamicRealmObject_: - -.. _changesetsFrom_DynamicRealm__DynamicRealmObject_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm_DynamicRealmObject_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` ( - | :ref:`DynamicRealm ` realm, - | :ref:`DynamicRealmObject ` object - | ) - - - - - * - Creates an Observable for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object + the :ref:`io.realm.ObjectChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - - - **Parameters** - - - ``object`` - RealmObject to listen to changes for. - - - - - ``realm`` - :ref:`Realm ` instance object is coming from. - - - - - - - - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm_E_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm__E_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm_RealmModel_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm__RealmModel_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm_E_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm__E_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm_RealmModel_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm__RealmModel_: - -.. _changesetsFrom_io_realm_Realm_E_: - -.. _changesetsFrom_io_realm_Realm__E_: - -.. _changesetsFrom_io_realm_Realm_RealmModel_: - -.. _changesetsFrom_io_realm_Realm__RealmModel_: - -.. _changesetsFrom_Realm_E_: - -.. _changesetsFrom_Realm__E_: - -.. _changesetsFrom_Realm_RealmModel_: - -.. _changesetsFrom_Realm__RealmModel_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm_E_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm__E_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm_RealmModel_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm__RealmModel_: - -.. _RxObservableFactory_changesetsFrom_Realm_E_: - -.. _RxObservableFactory_changesetsFrom_Realm__E_: - -.. _RxObservableFactory_changesetsFrom_Realm_RealmModel_: - -.. _RxObservableFactory_changesetsFrom_Realm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | **E** object - | ) - - - - - * - Creates an Observable for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object it should emit the object + the :ref:`io.realm.ObjectChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefore be left to the user. - - - - - **Type Parameters** - - - ``E`` - type of RealmObject - - - - - - - - **Parameters** - - - ``object`` - RealmObject to listen to changes for. - - - - - ``realm`` - :ref:`Realm ` instance object is coming from. - - - - - - - - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm__RealmList_: - -.. _changesetsFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _changesetsFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _changesetsFrom_io_realm_DynamicRealm_RealmList_: - -.. _changesetsFrom_io_realm_DynamicRealm__RealmList_: - -.. _changesetsFrom_DynamicRealm_io_realm_RealmList_: - -.. _changesetsFrom_DynamicRealm__io_realm_RealmList_: - -.. _changesetsFrom_DynamicRealm_RealmList_: - -.. _changesetsFrom_DynamicRealm__RealmList_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__RealmList_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm_io_realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm__io_realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm__RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates an Observable for a :ref:`RealmList ` . It should emit the initial RealmList when subscribed to and on each subsequent update of the RealmList it should emit the RealmList + the :ref:`OrderedCollectionChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users. - - - - - - - **Parameters** - - - ``list`` - :ref:`RealmList ` to listen to changes for. - - - - - - - ``realm`` - :ref:`Realm ` instance list is coming from. - - - - - - - - - - **Returns** - - Rx observable that emit all updates + their changeset. - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm_io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm__io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm__RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm_io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm__io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm__RealmList_: - -.. _changesetsFrom_io_realm_Realm_io_realm_RealmList_: - -.. _changesetsFrom_io_realm_Realm__io_realm_RealmList_: - -.. _changesetsFrom_io_realm_Realm_RealmList_: - -.. _changesetsFrom_io_realm_Realm__RealmList_: - -.. _changesetsFrom_Realm_io_realm_RealmList_: - -.. _changesetsFrom_Realm__io_realm_RealmList_: - -.. _changesetsFrom_Realm_RealmList_: - -.. _changesetsFrom_Realm__RealmList_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm_io_realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm__io_realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm__RealmList_: - -.. _RxObservableFactory_changesetsFrom_Realm_io_realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_Realm__io_realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_Realm_RealmList_: - -.. _RxObservableFactory_changesetsFrom_Realm__RealmList_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates an Observable for a :ref:`RealmList ` . It should emit the initial RealmList when subscribed to and on each subsequent update of the RealmIst it should emit the RealmList + the :ref:`OrderedCollectionChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users. - - - - - **Type Parameters** - - - ``E`` - type of RealmObject - - - - - - - - **Parameters** - - - ``list`` - :ref:`RealmList ` to listen to changes for. - - - - - - - ``realm`` - :ref:`Realm ` instance list is coming from. - - - - - - - - - - **Returns** - - Rx observable that emit all updates + their changeset. - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm__RealmResults_: - -.. _changesetsFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _changesetsFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _changesetsFrom_io_realm_DynamicRealm_RealmResults_: - -.. _changesetsFrom_io_realm_DynamicRealm__RealmResults_: - -.. _changesetsFrom_DynamicRealm_io_realm_RealmResults_: - -.. _changesetsFrom_DynamicRealm__io_realm_RealmResults_: - -.. _changesetsFrom_DynamicRealm_RealmResults_: - -.. _changesetsFrom_DynamicRealm__RealmResults_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_io_realm_DynamicRealm__RealmResults_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm_io_realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm__io_realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_DynamicRealm__RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_DynamicRealm__RealmResults_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates an Observable for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults it should emit the RealmResults + the :ref:`OrderedCollectionChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users. - - - - - - - **Parameters** - - - ``results`` - :ref:`RealmResults ` to listen to changes for. - - - - - - - ``realm`` - :ref:`Realm ` instance results are coming from. - - - - - - - - - - **Returns** - - Rx observable that emit all updates + their changeset. - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_io_realm_Realm__RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm_io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm__io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm__RealmResults_: - -.. _changesetsFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _changesetsFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _changesetsFrom_io_realm_Realm_RealmResults_: - -.. _changesetsFrom_io_realm_Realm__RealmResults_: - -.. _changesetsFrom_Realm_io_realm_RealmResults_: - -.. _changesetsFrom_Realm__io_realm_RealmResults_: - -.. _changesetsFrom_Realm_RealmResults_: - -.. _changesetsFrom_Realm__RealmResults_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm_io_realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm__io_realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_io_realm_Realm__RealmResults_: - -.. _RxObservableFactory_changesetsFrom_Realm_io_realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_Realm__io_realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_Realm_RealmResults_: - -.. _RxObservableFactory_changesetsFrom_Realm__RealmResults_: - -.. _io_realm_rx_RxObservableFactory_changesetsFrom_Realm__RealmResults_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`changesetsFrom ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates an Observable for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults it should emit the RealmResults + the :ref:`OrderedCollectionChangeSet ` that describes the update. - - Changeset observables do not support backpressure as a changeset depends on the state of the previous changeset. Handling backpressure should therefor be left to users. - - - - - **Type Parameters** - - - ``E`` - type of RealmObject - - - - - - - - **Parameters** - - - ``results`` - :ref:`RealmResults ` to listen to changes for. - - - - - - - ``realm`` - :ref:`Realm ` instance results are coming from. - - - - - - - - - - **Returns** - - Rx observable that emit all updates + their changeset. - - - - - - - - - - - -.. _from: - -.. _from__: - -.. _RxObservableFactory_from: - -.. _RxObservableFactory_from__: - -.. _io_realm_rx_RxObservableFactory_from: - -.. _io_realm_rx_RxObservableFactory_from__: - - - -from ----- - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm__RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_io_realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__io_realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__RealmQuery_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmQuery_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmQuery_: - -.. _from_io_realm_DynamicRealm_RealmQuery_: - -.. _from_io_realm_DynamicRealm__RealmQuery_: - -.. _from_DynamicRealm_io_realm_RealmQuery_: - -.. _from_DynamicRealm__io_realm_RealmQuery_: - -.. _from_DynamicRealm_RealmQuery_: - -.. _from_DynamicRealm__RealmQuery_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmQuery_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmQuery_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_RealmQuery_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm__RealmQuery_: - -.. _RxObservableFactory_from_DynamicRealm_io_realm_RealmQuery_: - -.. _RxObservableFactory_from_DynamicRealm__io_realm_RealmQuery_: - -.. _RxObservableFactory_from_DynamicRealm_RealmQuery_: - -.. _RxObservableFactory_from_DynamicRealm__RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__RealmQuery_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmQuery\ ` query - | ) - - - - - * - Creates a Single from a :ref:`RealmQuery ` . It should emit the query and then complete. - - A RealmQuery observable is cold. - - - - - - - **Parameters** - - - ``query`` - RealmObject to listen to changes for. - - - - - ``realm`` - :ref:`DynamicRealm ` instance query is coming from. - - - - - - - - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_io_realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm__io_realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm__RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_io_realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__io_realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__RealmQuery_: - -.. _from_io_realm_Realm_io_realm_RealmQuery_: - -.. _from_io_realm_Realm__io_realm_RealmQuery_: - -.. _from_io_realm_Realm_RealmQuery_: - -.. _from_io_realm_Realm__RealmQuery_: - -.. _from_Realm_io_realm_RealmQuery_: - -.. _from_Realm__io_realm_RealmQuery_: - -.. _from_Realm_RealmQuery_: - -.. _from_Realm__RealmQuery_: - -.. _RxObservableFactory_from_io_realm_Realm_io_realm_RealmQuery_: - -.. _RxObservableFactory_from_io_realm_Realm__io_realm_RealmQuery_: - -.. _RxObservableFactory_from_io_realm_Realm_RealmQuery_: - -.. _RxObservableFactory_from_io_realm_Realm__RealmQuery_: - -.. _RxObservableFactory_from_Realm_io_realm_RealmQuery_: - -.. _RxObservableFactory_from_Realm__io_realm_RealmQuery_: - -.. _RxObservableFactory_from_Realm_RealmQuery_: - -.. _RxObservableFactory_from_Realm__RealmQuery_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__RealmQuery_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmQuery\ ` query - | ) - - - - - * - Creates a Single from a :ref:`RealmQuery ` . It should emit the query and then complete. - - A RealmQuery observable is cold. - - - - - **Type Parameters** - - - ``E`` - type of query target - - - - - - - - **Parameters** - - - ``query`` - RealmQuery to emit. - - - - - ``realm`` - :ref:`Realm ` instance query is coming from. - - - - - - - - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_DynamicRealmObject_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _from_DynamicRealm_DynamicRealmObject_: - -.. _from_DynamicRealm__DynamicRealmObject_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_DynamicRealmObject_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm__DynamicRealmObject_: - -.. _RxObservableFactory_from_DynamicRealm_io_realm_DynamicRealmObject_: - -.. _RxObservableFactory_from_DynamicRealm__io_realm_DynamicRealmObject_: - -.. _RxObservableFactory_from_DynamicRealm_DynamicRealmObject_: - -.. _RxObservableFactory_from_DynamicRealm__DynamicRealmObject_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`DynamicRealm ` realm, - | :ref:`DynamicRealmObject ` object - | ) - - - - - * - Creates a Flowable for a :ref:`DynamicRealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object. - - DynamicRealmObject observables are hot as DynamicRealmObjects automatically are kept up to date. - - - - - - - **Parameters** - - - ``object`` - DynamicRealmObject to listen to changes for. - - - - - ``realm`` - :ref:`DynamicRealm ` instance object is coming from. - - - - - - - - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_E_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm__E_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_RealmModel_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm__RealmModel_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_E_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__E_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_RealmModel_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__RealmModel_: - -.. _from_io_realm_Realm_E_: - -.. _from_io_realm_Realm__E_: - -.. _from_io_realm_Realm_RealmModel_: - -.. _from_io_realm_Realm__RealmModel_: - -.. _from_Realm_E_: - -.. _from_Realm__E_: - -.. _from_Realm_RealmModel_: - -.. _from_Realm__RealmModel_: - -.. _RxObservableFactory_from_io_realm_Realm_E_: - -.. _RxObservableFactory_from_io_realm_Realm__E_: - -.. _RxObservableFactory_from_io_realm_Realm_RealmModel_: - -.. _RxObservableFactory_from_io_realm_Realm__RealmModel_: - -.. _RxObservableFactory_from_Realm_E_: - -.. _RxObservableFactory_from_Realm__E_: - -.. _RxObservableFactory_from_Realm_RealmModel_: - -.. _RxObservableFactory_from_Realm__RealmModel_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | **E** object - | ) - - - - - * - Creates a Flowable for a :ref:`RealmObject ` . It should emit the initial object when subscribed to and on each subsequent update of the object. - - RealmObject observables are hot as RealmObjects are automatically kept up to date. - - - - - **Type Parameters** - - - ``E`` - type of query target - - - - - - - - **Parameters** - - - ``object`` - RealmObject to listen to changes for. - - - - - ``realm`` - :ref:`Realm ` instance object is coming from. - - - - - - - - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm__RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__RealmList_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _from_io_realm_DynamicRealm_RealmList_: - -.. _from_io_realm_DynamicRealm__RealmList_: - -.. _from_DynamicRealm_io_realm_RealmList_: - -.. _from_DynamicRealm__io_realm_RealmList_: - -.. _from_DynamicRealm_RealmList_: - -.. _from_DynamicRealm__RealmList_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmList_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmList_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_RealmList_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm__RealmList_: - -.. _RxObservableFactory_from_DynamicRealm_io_realm_RealmList_: - -.. _RxObservableFactory_from_DynamicRealm__io_realm_RealmList_: - -.. _RxObservableFactory_from_DynamicRealm_RealmList_: - -.. _RxObservableFactory_from_DynamicRealm__RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates a Flowable for a :ref:`RealmList ` . It should emit the initial list when subscribed to and on each subsequent update of the RealmList. - - RealmList observables are hot as RealmLists are automatically kept up to date. - - Note: :ref:`io.realm.RealmChangeListener ` is currently not supported on RealmLists. - - - - - - - - - **Parameters** - - - ``list`` - RealmList to listen to changes for. - - - - - ``realm`` - :ref:`DynamicRealm ` instance list is coming from. - - - - - - - - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm__io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm__RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__io_realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__RealmList_: - -.. _from_io_realm_Realm_io_realm_RealmList_: - -.. _from_io_realm_Realm__io_realm_RealmList_: - -.. _from_io_realm_Realm_RealmList_: - -.. _from_io_realm_Realm__RealmList_: - -.. _from_Realm_io_realm_RealmList_: - -.. _from_Realm__io_realm_RealmList_: - -.. _from_Realm_RealmList_: - -.. _from_Realm__RealmList_: - -.. _RxObservableFactory_from_io_realm_Realm_io_realm_RealmList_: - -.. _RxObservableFactory_from_io_realm_Realm__io_realm_RealmList_: - -.. _RxObservableFactory_from_io_realm_Realm_RealmList_: - -.. _RxObservableFactory_from_io_realm_Realm__RealmList_: - -.. _RxObservableFactory_from_Realm_io_realm_RealmList_: - -.. _RxObservableFactory_from_Realm__io_realm_RealmList_: - -.. _RxObservableFactory_from_Realm_RealmList_: - -.. _RxObservableFactory_from_Realm__RealmList_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__RealmList_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmList\ ` list - | ) - - - - - * - Creates an Observable for a :ref:`RealmList ` . It should emit the initial list when subscribed to and on each subsequent update of the RealmList. - - RealmList observables are hot as RealmLists are automatically kept up to date. - - Note: :ref:`io.realm.RealmChangeListener ` is currently not supported on RealmLists. - - - - - - - **Type Parameters** - - - ``E`` - type of query target - - - - - - - - **Parameters** - - - ``list`` - RealmObject to listen to changes for. - - - - - ``realm`` - :ref:`Realm ` instance list is coming from. - - - - - - - - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm__RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__RealmResults_: - -.. _from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _from_io_realm_DynamicRealm_RealmResults_: - -.. _from_io_realm_DynamicRealm__RealmResults_: - -.. _from_DynamicRealm_io_realm_RealmResults_: - -.. _from_DynamicRealm__io_realm_RealmResults_: - -.. _from_DynamicRealm_RealmResults_: - -.. _from_DynamicRealm__RealmResults_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_io_realm_RealmResults_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm__io_realm_RealmResults_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_RealmResults_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm__RealmResults_: - -.. _RxObservableFactory_from_DynamicRealm_io_realm_RealmResults_: - -.. _RxObservableFactory_from_DynamicRealm__io_realm_RealmResults_: - -.. _RxObservableFactory_from_DynamicRealm_RealmResults_: - -.. _RxObservableFactory_from_DynamicRealm__RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm__RealmResults_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`DynamicRealm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a Flowable for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults. - - Realm observables are hot as RealmResults are automatically kept up to date. - - - - - - - **Parameters** - - - ``results`` - :ref:`RealmResults ` to listen to changes for. - - - - - - - ``realm`` - :ref:`DynamicRealm ` instance results are coming from. - - - - - - - - - - **Returns** - - Rx observable that emit all updates to the RealmResults. - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm__io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm__RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__io_realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__RealmResults_: - -.. _from_io_realm_Realm_io_realm_RealmResults_: - -.. _from_io_realm_Realm__io_realm_RealmResults_: - -.. _from_io_realm_Realm_RealmResults_: - -.. _from_io_realm_Realm__RealmResults_: - -.. _from_Realm_io_realm_RealmResults_: - -.. _from_Realm__io_realm_RealmResults_: - -.. _from_Realm_RealmResults_: - -.. _from_Realm__RealmResults_: - -.. _RxObservableFactory_from_io_realm_Realm_io_realm_RealmResults_: - -.. _RxObservableFactory_from_io_realm_Realm__io_realm_RealmResults_: - -.. _RxObservableFactory_from_io_realm_Realm_RealmResults_: - -.. _RxObservableFactory_from_io_realm_Realm__RealmResults_: - -.. _RxObservableFactory_from_Realm_io_realm_RealmResults_: - -.. _RxObservableFactory_from_Realm__io_realm_RealmResults_: - -.. _RxObservableFactory_from_Realm_RealmResults_: - -.. _RxObservableFactory_from_Realm__RealmResults_: - -.. _io_realm_rx_RxObservableFactory_from_Realm__RealmResults_E__: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` <**E** >( - | :ref:`Realm ` realm, - | :ref:`io.realm.RealmResults\ ` results - | ) - - - - - * - Creates a Flowable for a :ref:`RealmResults ` . It should emit the initial RealmResult when subscribed to and on each subsequent update of the RealmResults. - - RealmResults observables are hot as RealmResults are automatically kept up to date. - - - - - **Type Parameters** - - - ``E`` - type of RealmObject - - - - - - - - **Parameters** - - - ``results`` - :ref:`RealmResults ` to listen to changes for. - - - - - - - ``realm`` - :ref:`Realm ` instance results are coming from. - - - - - - - - - - **Returns** - - Rx observable that emit all updates to the RealmObject. - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_DynamicRealm_: - -.. _io_realm_rx_RxObservableFactory_from_DynamicRealm_: - -.. _from_io_realm_DynamicRealm_: - -.. _from_DynamicRealm_: - -.. _RxObservableFactory_from_io_realm_DynamicRealm_: - -.. _RxObservableFactory_from_DynamicRealm_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`DynamicRealm ` realm - | ) - - - - - * - Creates a Flowable for a :ref:`DynamicRealm ` . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm. - - DynamicRealm observables are hot as DynamicRealms are automatically kept up to date. - - - - - - - **Parameters** - - - ``realm`` - :ref:`DynamicRealm ` to listen to changes for. - - - - - - - - - - **Returns** - - Rx observable that emit all updates to the DynamicRealm. - - - - - - - - - -.. _io_realm_rx_RxObservableFactory_from_io_realm_Realm_: - -.. _io_realm_rx_RxObservableFactory_from_Realm_: - -.. _from_io_realm_Realm_: - -.. _from_Realm_: - -.. _RxObservableFactory_from_io_realm_Realm_: - -.. _RxObservableFactory_from_Realm_: - -.. list-table:: - :header-rows: 1 - - * - | public **** :ref:`from ` ( - | :ref:`Realm ` realm - | ) - - - - - * - Creates a Flowable for a :ref:`Realm ` . It should emit the initial state of the Realm when subscribed to and on each subsequent update of the Realm. - - Realm flowables are hot as Realms are automatically kept up to date. - - - - - - - **Parameters** - - - ``realm`` - :ref:`Realm ` to listen to changes for. - - - - - - - - - - **Returns** - - Rx observable that emit all updates to the Realm. - - - - - - - - - - - - From ca4d1bf747e91bc5ba90735f1f7fbbfa535124be Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 8 May 2024 16:38:58 -0400 Subject: [PATCH 08/63] Fix includes file naming --- ...-model.rst => create-asymmetric-object-model.rst} | 0 ...etric-object.rst => create-asymmetric-object.rst} | 0 ...ct-model.rst => create-embedded-object-model.rst} | 0 ...mbedded-object.rst => create-embedded-object.rst} | 0 ...bject-model.rst => create-realm-object-model.rst} | 0 ...eate-realm-object.rst => create-realm-object.rst} | 0 source/sdk/crud/create.txt | 12 ++++++------ 7 files changed, 6 insertions(+), 6 deletions(-) rename source/includes/sdk-examples/crud/{crud-create-asymmetric-object-model.rst => create-asymmetric-object-model.rst} (100%) rename source/includes/sdk-examples/crud/{crud-create-asymmetric-object.rst => create-asymmetric-object.rst} (100%) rename source/includes/sdk-examples/crud/{crud-create-embedded-object-model.rst => create-embedded-object-model.rst} (100%) rename source/includes/sdk-examples/crud/{crud-create-embedded-object.rst => create-embedded-object.rst} (100%) rename source/includes/sdk-examples/crud/{crud-create-realm-object-model.rst => create-realm-object-model.rst} (100%) rename source/includes/sdk-examples/crud/{crud-create-realm-object.rst => create-realm-object.rst} (100%) diff --git a/source/includes/sdk-examples/crud/crud-create-asymmetric-object-model.rst b/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst similarity index 100% rename from source/includes/sdk-examples/crud/crud-create-asymmetric-object-model.rst rename to source/includes/sdk-examples/crud/create-asymmetric-object-model.rst diff --git a/source/includes/sdk-examples/crud/crud-create-asymmetric-object.rst b/source/includes/sdk-examples/crud/create-asymmetric-object.rst similarity index 100% rename from source/includes/sdk-examples/crud/crud-create-asymmetric-object.rst rename to source/includes/sdk-examples/crud/create-asymmetric-object.rst diff --git a/source/includes/sdk-examples/crud/crud-create-embedded-object-model.rst b/source/includes/sdk-examples/crud/create-embedded-object-model.rst similarity index 100% rename from source/includes/sdk-examples/crud/crud-create-embedded-object-model.rst rename to source/includes/sdk-examples/crud/create-embedded-object-model.rst diff --git a/source/includes/sdk-examples/crud/crud-create-embedded-object.rst b/source/includes/sdk-examples/crud/create-embedded-object.rst similarity index 100% rename from source/includes/sdk-examples/crud/crud-create-embedded-object.rst rename to source/includes/sdk-examples/crud/create-embedded-object.rst diff --git a/source/includes/sdk-examples/crud/crud-create-realm-object-model.rst b/source/includes/sdk-examples/crud/create-realm-object-model.rst similarity index 100% rename from source/includes/sdk-examples/crud/crud-create-realm-object-model.rst rename to source/includes/sdk-examples/crud/create-realm-object-model.rst diff --git a/source/includes/sdk-examples/crud/crud-create-realm-object.rst b/source/includes/sdk-examples/crud/create-realm-object.rst similarity index 100% rename from source/includes/sdk-examples/crud/crud-create-realm-object.rst rename to source/includes/sdk-examples/crud/create-realm-object.rst diff --git a/source/sdk/crud/create.txt b/source/sdk/crud/create.txt index 4a40f8814a..59c0506b73 100644 --- a/source/sdk/crud/create.txt +++ b/source/sdk/crud/create.txt @@ -210,7 +210,7 @@ Create a Realm Object .. include:: /includes/api-details/typescript/crud/create-realm-object-description.rst -.. include:: /includes/sdk-examples/crud-create-realm-object.rst +.. include:: /includes/sdk-examples/crud/create-realm-object.rst Model ````` @@ -218,7 +218,7 @@ Model For more information about modeling an object, refer to: :ref:`sdk-define-a-new-object-type`. -.. include:: /includes/sdk-examples/crud-create-realm-object-model.rst +.. include:: /includes/sdk-examples/crud/create-realm-object-model.rst .. _sdks-create-an-embedded-object: @@ -288,7 +288,7 @@ different parent object or share it between multiple parent objects. .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst -.. include:: /includes/sdk-examples/crud-create-embedded-object.rst +.. include:: /includes/sdk-examples/crud/create-embedded-object.rst Model ````` @@ -296,7 +296,7 @@ Model For more information about modeling an embedded object, refer to: :ref:`sdks-embedded-objects`. -.. include:: /includes/sdk-examples/crud-create-embedded-object-model.rst +.. include:: /includes/sdk-examples/crud/create-embedded-object-model.rst .. _sdks-create-asymmetric-object: @@ -357,7 +357,7 @@ refer to :ref:`sdks-stream-data-to-atlas`. .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst -.. include:: /includes/sdk-examples/crud-create-asymmetric-object.rst +.. include:: /includes/sdk-examples/crud/create-asymmetric-object.rst Model ````` @@ -365,4 +365,4 @@ Model For more information about modeling an asymmetric object, refer to: :ref:`sdks-asymmetric-objects`. -.. include:: /includes/sdk-examples/crud-create-asymmetric-object-model.rst +.. include:: /includes/sdk-examples/crud/create-asymmetric-object-model.rst From 1a9a3dd8b8bd959883d343454891a9a8a955619c Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 8 May 2024 16:45:34 -0400 Subject: [PATCH 09/63] Fix build errors --- source/sdk/crud/create.txt | 16 ++++++++-------- .../{troubleshooting.txt => troubleshoot.txt} | 0 2 files changed, 8 insertions(+), 8 deletions(-) rename source/sdk/test-and-debug/{troubleshooting.txt => troubleshoot.txt} (100%) diff --git a/source/sdk/crud/create.txt b/source/sdk/crud/create.txt index 59c0506b73..89a155572a 100644 --- a/source/sdk/crud/create.txt +++ b/source/sdk/crud/create.txt @@ -276,17 +276,17 @@ different parent object or share it between multiple parent objects. .. tab:: :tabid: objectivec - .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst .. tab:: :tabid: swift - .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst .. tab:: :tabid: typescript - .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst .. include:: /includes/sdk-examples/crud/create-embedded-object.rst @@ -330,12 +330,12 @@ refer to :ref:`sdks-stream-data-to-atlas`. .. tab:: :tabid: java - .. include:: /includes/api-details/generic/crud/create-asymmetric-object-not-supported.rst + .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst .. tab:: :tabid: javascript - .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst .. tab:: :tabid: kotlin @@ -345,17 +345,17 @@ refer to :ref:`sdks-stream-data-to-atlas`. .. tab:: :tabid: objectivec - .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst .. tab:: :tabid: swift - .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst .. tab:: :tabid: typescript - .. include:: /includes/api-details/generic/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst .. include:: /includes/sdk-examples/crud/create-asymmetric-object.rst diff --git a/source/sdk/test-and-debug/troubleshooting.txt b/source/sdk/test-and-debug/troubleshoot.txt similarity index 100% rename from source/sdk/test-and-debug/troubleshooting.txt rename to source/sdk/test-and-debug/troubleshoot.txt From 799666176323e93e18bfbd26ca3bdb0d3eddfd55 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 8 May 2024 17:02:00 -0400 Subject: [PATCH 10/63] Provide examples to copy for easier implementation --- templates/code-example-include.rst | 57 ++++++++++++++++++++ templates/tabs-plus-code-example-include.rst | 48 +++++++++++++++++ 2 files changed, 105 insertions(+) create mode 100644 templates/code-example-include.rst create mode 100644 templates/tabs-plus-code-example-include.rst diff --git a/templates/code-example-include.rst b/templates/code-example-include.rst new file mode 100644 index 0000000000..5fbdd73384 --- /dev/null +++ b/templates/code-example-include.rst @@ -0,0 +1,57 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.create-asymmetric-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_ingest.test.snippet.write-asymmetric-object.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingAPIPlaceholders/missing.java + :language: java + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AsymmetricSyncTest.snippet.create-asymmetric-object.kt + :language: kotlin + :emphasize-lines: 10, 11 + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.create-asymmetric-object.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.write-asymmetric-object.ts + :language: typescript diff --git a/templates/tabs-plus-code-example-include.rst b/templates/tabs-plus-code-example-include.rst new file mode 100644 index 0000000000..0b9235a03c --- /dev/null +++ b/templates/tabs-plus-code-example-include.rst @@ -0,0 +1,48 @@ +.. tabs-drivers:: + + .. tab:: + :tabid: cpp + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + +.. include:: /includes/sdk-examples/crud/create-asymmetric-object.rst \ No newline at end of file From 12149ed953b26bba383c02cc268dd6c2a6bc2083 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 8 May 2024 17:14:03 -0400 Subject: [PATCH 11/63] Add consolidated page example --- templates/consolidated-page.rst | 81 +++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 templates/consolidated-page.rst diff --git a/templates/consolidated-page.rst b/templates/consolidated-page.rst new file mode 100644 index 0000000000..80b0f6476b --- /dev/null +++ b/templates/consolidated-page.rst @@ -0,0 +1,81 @@ +.. _sdks-YOUR_REF_NAME: + +========== +Page Title +========== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. tabs-selector:: drivers + +Add your conceptual content to the page. Then, add the +contents of the ``tabs-plus-code-example-include.rst`` and create SDK-specific +includes with SDK-specific API information. + +If more than one SDK is lacking SDK-specific API information, create a generic +include with general information in the ``includes/api-details/generic`` +directory, in a directory that is appropriately named for the docs ToC section. + +To populate the code example box with switchable language selector, copy the +contents of ``code-example-include.rst`` and fill in the appropriate details +for all of the code examples. If a code example is missing or an API doesn't +exist in an SDK, use the appropriate placeholders for that language. + +Example Page Content +-------------------- + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + +.. include:: /templates/code-example-include.rst + +.. The above `.. include::` creates the code example box with language selector +.. Make sure to use the appropriate include in the `includes/` directory. From 43d6c797937d1636176d965dcc003ca29ab1b27a Mon Sep 17 00:00:00 2001 From: dacharyc Date: Thu, 9 May 2024 10:36:43 -0400 Subject: [PATCH 12/63] Consolidate and rename code example placeholders --- .../missing.cpp => MissingPlaceholders/api.cpp} | 0 .../missing.cs => MissingPlaceholders/api.cs} | 0 .../missing.dart => MissingPlaceholders/api.dart} | 0 .../missing.java => MissingPlaceholders/api.java} | 0 .../missing.js => MissingPlaceholders/api.js} | 0 .../missing.kt => MissingPlaceholders/api.kt} | 0 .../missing.m => MissingPlaceholders/api.m} | 0 .../missing.swift => MissingPlaceholders/api.swift} | 0 .../missing.ts => MissingPlaceholders/api.ts} | 0 .../missing.cpp => MissingPlaceholders/example.cpp} | 0 .../missing.cs => MissingPlaceholders/example.cs} | 0 .../example.dart} | 0 .../example.java} | 0 .../missing.js => MissingPlaceholders/example.js} | 0 .../missing.kt => MissingPlaceholders/example.kt} | 0 .../missing.m => MissingPlaceholders/example.m} | 0 .../example.swift} | 0 .../missing.ts => MissingPlaceholders/example.ts} | 0 .../crud/create-asymmetric-object-model.rst | 6 +++--- .../sdk-examples/crud/create-asymmetric-object.rst | 8 ++++---- .../crud/create-embedded-object-model.rst | 10 +++++----- .../sdk-examples/crud/create-embedded-object.rst | 4 ++-- .../sdk-examples/crud/create-realm-object-model.rst | 12 ++++++------ .../sdk-examples/crud/create-realm-object.rst | 2 +- 24 files changed, 21 insertions(+), 21 deletions(-) rename source/examples/{MissingAPIPlaceholders/missing.cpp => MissingPlaceholders/api.cpp} (100%) rename source/examples/{MissingAPIPlaceholders/missing.cs => MissingPlaceholders/api.cs} (100%) rename source/examples/{MissingAPIPlaceholders/missing.dart => MissingPlaceholders/api.dart} (100%) rename source/examples/{MissingAPIPlaceholders/missing.java => MissingPlaceholders/api.java} (100%) rename source/examples/{MissingAPIPlaceholders/missing.js => MissingPlaceholders/api.js} (100%) rename source/examples/{MissingAPIPlaceholders/missing.kt => MissingPlaceholders/api.kt} (100%) rename source/examples/{MissingAPIPlaceholders/missing.m => MissingPlaceholders/api.m} (100%) rename source/examples/{MissingAPIPlaceholders/missing.swift => MissingPlaceholders/api.swift} (100%) rename source/examples/{MissingAPIPlaceholders/missing.ts => MissingPlaceholders/api.ts} (100%) rename source/examples/{MissingExamplePlaceholders/missing.cpp => MissingPlaceholders/example.cpp} (100%) rename source/examples/{MissingExamplePlaceholders/missing.cs => MissingPlaceholders/example.cs} (100%) rename source/examples/{MissingExamplePlaceholders/missing.dart => MissingPlaceholders/example.dart} (100%) rename source/examples/{MissingExamplePlaceholders/missing.java => MissingPlaceholders/example.java} (100%) rename source/examples/{MissingExamplePlaceholders/missing.js => MissingPlaceholders/example.js} (100%) rename source/examples/{MissingExamplePlaceholders/missing.kt => MissingPlaceholders/example.kt} (100%) rename source/examples/{MissingExamplePlaceholders/missing.m => MissingPlaceholders/example.m} (100%) rename source/examples/{MissingExamplePlaceholders/missing.swift => MissingPlaceholders/example.swift} (100%) rename source/examples/{MissingExamplePlaceholders/missing.ts => MissingPlaceholders/example.ts} (100%) diff --git a/source/examples/MissingAPIPlaceholders/missing.cpp b/source/examples/MissingPlaceholders/api.cpp similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.cpp rename to source/examples/MissingPlaceholders/api.cpp diff --git a/source/examples/MissingAPIPlaceholders/missing.cs b/source/examples/MissingPlaceholders/api.cs similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.cs rename to source/examples/MissingPlaceholders/api.cs diff --git a/source/examples/MissingAPIPlaceholders/missing.dart b/source/examples/MissingPlaceholders/api.dart similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.dart rename to source/examples/MissingPlaceholders/api.dart diff --git a/source/examples/MissingAPIPlaceholders/missing.java b/source/examples/MissingPlaceholders/api.java similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.java rename to source/examples/MissingPlaceholders/api.java diff --git a/source/examples/MissingAPIPlaceholders/missing.js b/source/examples/MissingPlaceholders/api.js similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.js rename to source/examples/MissingPlaceholders/api.js diff --git a/source/examples/MissingAPIPlaceholders/missing.kt b/source/examples/MissingPlaceholders/api.kt similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.kt rename to source/examples/MissingPlaceholders/api.kt diff --git a/source/examples/MissingAPIPlaceholders/missing.m b/source/examples/MissingPlaceholders/api.m similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.m rename to source/examples/MissingPlaceholders/api.m diff --git a/source/examples/MissingAPIPlaceholders/missing.swift b/source/examples/MissingPlaceholders/api.swift similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.swift rename to source/examples/MissingPlaceholders/api.swift diff --git a/source/examples/MissingAPIPlaceholders/missing.ts b/source/examples/MissingPlaceholders/api.ts similarity index 100% rename from source/examples/MissingAPIPlaceholders/missing.ts rename to source/examples/MissingPlaceholders/api.ts diff --git a/source/examples/MissingExamplePlaceholders/missing.cpp b/source/examples/MissingPlaceholders/example.cpp similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.cpp rename to source/examples/MissingPlaceholders/example.cpp diff --git a/source/examples/MissingExamplePlaceholders/missing.cs b/source/examples/MissingPlaceholders/example.cs similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.cs rename to source/examples/MissingPlaceholders/example.cs diff --git a/source/examples/MissingExamplePlaceholders/missing.dart b/source/examples/MissingPlaceholders/example.dart similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.dart rename to source/examples/MissingPlaceholders/example.dart diff --git a/source/examples/MissingExamplePlaceholders/missing.java b/source/examples/MissingPlaceholders/example.java similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.java rename to source/examples/MissingPlaceholders/example.java diff --git a/source/examples/MissingExamplePlaceholders/missing.js b/source/examples/MissingPlaceholders/example.js similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.js rename to source/examples/MissingPlaceholders/example.js diff --git a/source/examples/MissingExamplePlaceholders/missing.kt b/source/examples/MissingPlaceholders/example.kt similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.kt rename to source/examples/MissingPlaceholders/example.kt diff --git a/source/examples/MissingExamplePlaceholders/missing.m b/source/examples/MissingPlaceholders/example.m similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.m rename to source/examples/MissingPlaceholders/example.m diff --git a/source/examples/MissingExamplePlaceholders/missing.swift b/source/examples/MissingPlaceholders/example.swift similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.swift rename to source/examples/MissingPlaceholders/example.swift diff --git a/source/examples/MissingExamplePlaceholders/missing.ts b/source/examples/MissingPlaceholders/example.ts similarity index 100% rename from source/examples/MissingExamplePlaceholders/missing.ts rename to source/examples/MissingPlaceholders/example.ts diff --git a/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst b/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst index 586a50ca45..f41d389e0e 100644 --- a/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst +++ b/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst @@ -10,7 +10,7 @@ - id: csharp content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.cs + .. literalinclude:: /examples/MissingPlaceholders/example.cs :language: csharp - id: dart @@ -23,7 +23,7 @@ - id: java content: | - .. literalinclude:: /examples/MissingAPIPlaceholders/missing.java + .. literalinclude:: /examples/MissingPlaceholders/api.java :language: java - id: javascript @@ -42,7 +42,7 @@ - id: objectivec content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + .. literalinclude:: /examples/MissingPlaceholders/example.m :language: objectivec - id: swift diff --git a/source/includes/sdk-examples/crud/create-asymmetric-object.rst b/source/includes/sdk-examples/crud/create-asymmetric-object.rst index 5fbdd73384..332e2e4ef3 100644 --- a/source/includes/sdk-examples/crud/create-asymmetric-object.rst +++ b/source/includes/sdk-examples/crud/create-asymmetric-object.rst @@ -10,7 +10,7 @@ - id: csharp content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.cs + .. literalinclude:: /examples/MissingPlaceholders/example.cs :language: csharp - id: dart @@ -22,13 +22,13 @@ - id: java content: | - .. literalinclude:: /examples/MissingAPIPlaceholders/missing.java + .. literalinclude:: /examples/MissingPlaceholders/api.java :language: java - id: javascript content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.js + .. literalinclude:: /examples/MissingPlaceholders/example.js :language: javascript - id: kotlin @@ -41,7 +41,7 @@ - id: objectivec content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + .. literalinclude:: /examples/MissingPlaceholders/example.m :language: objectivec - id: swift diff --git a/source/includes/sdk-examples/crud/create-embedded-object-model.rst b/source/includes/sdk-examples/crud/create-embedded-object-model.rst index d6b56296cf..c008b52013 100644 --- a/source/includes/sdk-examples/crud/create-embedded-object-model.rst +++ b/source/includes/sdk-examples/crud/create-embedded-object-model.rst @@ -16,7 +16,7 @@ - id: dart content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.dart + .. literalinclude:: /examples/MissingPlaceholders/example.dart :language: dart - id: java @@ -36,23 +36,23 @@ - id: kotlin content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.kt + .. literalinclude:: /examples/MissingPlaceholders/example.kt :language: kotlin - id: objectivec content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + .. literalinclude:: /examples/MissingPlaceholders/example.m :language: objectivec - id: swift content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.swift + .. literalinclude:: /examples/MissingPlaceholders/example.swift :language: swift - id: typescript content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.ts + .. literalinclude:: /examples/MissingPlaceholders/example.ts :language: typescript diff --git a/source/includes/sdk-examples/crud/create-embedded-object.rst b/source/includes/sdk-examples/crud/create-embedded-object.rst index 018ada3e1e..50a666809a 100644 --- a/source/includes/sdk-examples/crud/create-embedded-object.rst +++ b/source/includes/sdk-examples/crud/create-embedded-object.rst @@ -16,7 +16,7 @@ - id: dart content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.dart + .. literalinclude:: /examples/MissingPlaceholders/example.dart :language: dart - id: java @@ -54,5 +54,5 @@ - id: typescript content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.ts + .. literalinclude:: /examples/MissingPlaceholders/example.ts :language: typescript diff --git a/source/includes/sdk-examples/crud/create-realm-object-model.rst b/source/includes/sdk-examples/crud/create-realm-object-model.rst index 15429210f6..5723d8d99f 100644 --- a/source/includes/sdk-examples/crud/create-realm-object-model.rst +++ b/source/includes/sdk-examples/crud/create-realm-object-model.rst @@ -22,35 +22,35 @@ - id: java content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.java + .. literalinclude:: /examples/MissingPlaceholders/example.java :language: java - id: javascript content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.js + .. literalinclude:: /examples/MissingPlaceholders/example.js :language: javascript - id: kotlin content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.kt + .. literalinclude:: /examples/MissingPlaceholders/example.kt :language: kotlin - id: objectivec content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + .. literalinclude:: /examples/MissingPlaceholders/example.m :language: objectivec - id: swift content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.swift + .. literalinclude:: /examples/MissingPlaceholders/example.swift :language: swift - id: typescript content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.ts + .. literalinclude:: /examples/MissingPlaceholders/example.ts :language: typescript diff --git a/source/includes/sdk-examples/crud/create-realm-object.rst b/source/includes/sdk-examples/crud/create-realm-object.rst index 502ab3e55f..b179aad056 100644 --- a/source/includes/sdk-examples/crud/create-realm-object.rst +++ b/source/includes/sdk-examples/crud/create-realm-object.rst @@ -55,5 +55,5 @@ - id: typescript content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.ts + .. literalinclude:: /examples/MissingPlaceholders/example.ts :language: typescript From 4da6ed0a66d070e9f4f88059e121ecdd71c80fcf Mon Sep 17 00:00:00 2001 From: dacharyc Date: Mon, 13 May 2024 15:00:00 -0400 Subject: [PATCH 13/63] Add missing serialization & threading pages --- source/index.txt | 1 + source/sdk/crud.txt | 2 +- source/sdk/serialization.txt | 13 +++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 source/sdk/serialization.txt diff --git a/source/index.txt b/source/index.txt index 764ab2fae3..8604e948d8 100644 --- a/source/index.txt +++ b/source/index.txt @@ -24,6 +24,7 @@ Welcome to the Atlas Device SDK Docs Manage Users Sync Data Test and Debug + Serialization SDK Telemetry API Reference Build with Frameworks diff --git a/source/sdk/crud.txt b/source/sdk/crud.txt index efafe96865..1dd90517b4 100644 --- a/source/sdk/crud.txt +++ b/source/sdk/crud.txt @@ -10,7 +10,7 @@ Read and Write Data Update Delete Query Engines - Threading + Threading The following pages contain information about how to read and write data, manage objects across threads, and use the Atlas Device SDK query engines: diff --git a/source/sdk/serialization.txt b/source/sdk/serialization.txt new file mode 100644 index 0000000000..fbbc0e03e5 --- /dev/null +++ b/source/sdk/serialization.txt @@ -0,0 +1,13 @@ +.. _sdks-serialization: + +============= +Serialization +============= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about serialization in the SDKs. From 971dfd3a08c099b3a50c848879b54cf505bffd2e Mon Sep 17 00:00:00 2001 From: dacharyc Date: Mon, 13 May 2024 16:14:16 -0400 Subject: [PATCH 14/63] Add release notes, fix API reference issues --- source/index.txt | 1 + source/sdk/api-reference.txt | 6 ++---- source/sdk/release-notes.txt | 28 ++++++++++++++++++++++++++++ 3 files changed, 31 insertions(+), 4 deletions(-) create mode 100644 source/sdk/release-notes.txt diff --git a/source/index.txt b/source/index.txt index 8604e948d8..64e5986d7f 100644 --- a/source/index.txt +++ b/source/index.txt @@ -27,6 +27,7 @@ Welcome to the Atlas Device SDK Docs Serialization SDK Telemetry API Reference + Release Notes Build with Frameworks Build for Platforms Realm Studio diff --git a/source/sdk/api-reference.txt b/source/sdk/api-reference.txt index ee844669b5..ee74cc8fa6 100644 --- a/source/sdk/api-reference.txt +++ b/source/sdk/api-reference.txt @@ -8,10 +8,9 @@ API Reference C# API Reference (.NET) C++ API Reference (Doxygen) Dart API Reference - Kotlin API Reference Java API Reference Java (Kotlin Extensions) API Reference - JavaScript SDK Reference + JavaScript API Reference Kotlin API Reference Swift API Reference Objective-C API Reference @@ -21,10 +20,9 @@ The following pages contain API reference documentation for Atlas Device SDKs: - :ref:`C# API Reference (.NET) ` - :ref:`C++ API Reference (Doxygen) ` - :ref:`Dart API Reference ` -- :ref:`Kotlin API Reference ` - :ref:`Java API Reference ` - :ref:`Java (Kotlin Extensions) API Reference ` -- :ref:`JavaScript SDK Reference ` +- :ref:`JavaScript API Reference (JavaScript & TypeScript) ` - :ref:`Kotlin API Reference ` - :ref:`Objective-C API Reference ` - :ref:`Swift API Reference ` diff --git a/source/sdk/release-notes.txt b/source/sdk/release-notes.txt new file mode 100644 index 0000000000..f64e63fa42 --- /dev/null +++ b/source/sdk/release-notes.txt @@ -0,0 +1,28 @@ +============= +API Reference +============= + +.. toctree:: + :titlesonly: + + C++ SDK + Flutter SDK (Dart) + Java SDK + Kotlin SDK + .NET SDK (C#) + Node.js SDK + React Native SDK + Swift SDK (Swift & Objective-C) + Web SDK + +The following pages contain API reference documentation for Atlas Device SDKs: + +- :github:`C++ SDK ` +- :github:`Flutter SDK (Dart) ` +- :github:`Java SDK ` +- :github:`Kotlin SDK ` +- :github:`.NET SDK (C#) ` +- :github:`Node.js SDK ` +- :github:`React Native SDK ` +- :github:`Swift SDK (Swift & Objective-C) ` +- :github:`Web SDK ` From b59b8d565a8a590fd5313855a799427d81d172a6 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Mon, 13 May 2024 16:56:24 -0400 Subject: [PATCH 15/63] Add a placeholder page for live vs. frozen objects --- source/index.txt | 1 + source/sdk/live-frozen-objects.txt | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 source/sdk/live-frozen-objects.txt diff --git a/source/index.txt b/source/index.txt index 64e5986d7f..fab371d0b8 100644 --- a/source/index.txt +++ b/source/index.txt @@ -18,6 +18,7 @@ Welcome to the Atlas Device SDK Docs Quick Start Model Data Open & Manage Database Files + Live vs. Frozen Objects Read & Write Data React to Changes Access Atlas diff --git a/source/sdk/live-frozen-objects.txt b/source/sdk/live-frozen-objects.txt new file mode 100644 index 0000000000..a574838b6e --- /dev/null +++ b/source/sdk/live-frozen-objects.txt @@ -0,0 +1,15 @@ +.. _sdks-live-and-frozen-objects: + +======================= +Live and Frozen Objects +======================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for consolidated content about SDK objects being live by +default, except when frozen, and how that differs from Kotlin's frozen +architecture. From 4528af3c7e62b94c062d7ab465479e051cc8170e Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 15 May 2024 12:46:58 -0400 Subject: [PATCH 16/63] Move temp files out of source and resolve build errors --- .../crud/create-realm-object-description.rst | 2 +- .../create-asymmetric-object-description.rst | 2 +- .../kotlin/crud/create-procedure.rst | 2 +- .../crud/create-realm-object-description.rst | 2 +- .../crud/create-realm-object-description.rst | 2 +- source/index.txt | 6 +- source/sdk/api-reference.txt | 18 +++--- source/sdk/crud/create.txt | 12 +++- .../query-engines/filter-data-swift-sdk.txt | 6 ++ .../query-engines/realm-query-language.txt | 62 +++---------------- source/sdk/files/configure-and-open.txt | 11 ++++ source/sdk/model-data/object-models.txt | 24 ++++++- source/sdk/sync/event-library.txt | 2 +- source/stitch/index.txt | 3 - source/studio/explore-realm-file.txt | 2 +- source/studio/modify-schema.txt | 39 ++---------- {source/sdk/temp => temp}/cpp.txt | 0 .../cpp/app-services/call-a-function.txt | 0 .../cpp/app-services/connect-to-app.txt | 0 .../cpp/application-services.txt | 0 {source/sdk/temp => temp}/cpp/crud.txt | 0 {source/sdk/temp => temp}/cpp/crud/create.txt | 0 {source/sdk/temp => temp}/cpp/crud/delete.txt | 0 .../temp => temp}/cpp/crud/filter-data.txt | 0 {source/sdk/temp => temp}/cpp/crud/read.txt | 0 .../sdk/temp => temp}/cpp/crud/threading.txt | 0 {source/sdk/temp => temp}/cpp/crud/update.txt | 0 {source/sdk/temp => temp}/cpp/facets.toml | 0 {source/sdk/temp => temp}/cpp/install.txt | 0 {source/sdk/temp => temp}/cpp/logging.txt | 0 .../sdk/temp => temp}/cpp/manage-users.txt | 0 {source/sdk/temp => temp}/cpp/model-data.txt | 0 .../cpp/model-data/object-models.txt | 0 .../cpp/model-data/relationships.txt | 0 .../cpp/model-data/supported-types.txt | 0 {source/sdk/temp => temp}/cpp/quick-start.txt | 0 .../temp => temp}/cpp/react-to-changes.txt | 0 {source/sdk/temp => temp}/cpp/realm-files.txt | 0 .../cpp/realm-files/compact-realm.txt | 0 .../configure-and-open-a-realm.txt | 0 .../cpp/realm-files/encrypt-a-realm.txt | 0 {source/sdk/temp => temp}/cpp/sync.txt | 0 .../cpp/sync/handle-sync-errors.txt | 0 .../sdk/temp => temp}/cpp/sync/log-level.txt | 0 .../cpp/sync/manage-sync-session.txt | 0 .../cpp/sync/stream-data-to-atlas.txt | 0 .../cpp/sync/sync-subscriptions.txt | 0 .../cpp/sync/write-to-synced-realm.txt | 0 {source/sdk/temp => temp}/cpp/telemetry.txt | 0 .../cpp/users/authenticate-users.txt | 0 .../cpp/users/custom-user-data.txt | 0 .../cpp/users/manage-email-password-users.txt | 0 {source/sdk/temp => temp}/dotnet.txt | 0 .../dotnet/app-services/call-a-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../app-services/manage-user-api-keys.txt | 0 .../app-services/mongodb-remote-access.txt | 0 .../dotnet/application-services.txt | 0 .../temp => temp}/dotnet/async-console.txt | 0 .../temp => temp}/dotnet/compatibility.txt | 0 {source/sdk/temp => temp}/dotnet/crud.txt | 0 .../sdk/temp => temp}/dotnet/crud/create.txt | 0 .../sdk/temp => temp}/dotnet/crud/delete.txt | 0 .../sdk/temp => temp}/dotnet/crud/filter.txt | 0 .../sdk/temp => temp}/dotnet/crud/read.txt | 0 .../temp => temp}/dotnet/crud/threading.txt | 0 .../sdk/temp => temp}/dotnet/crud/update.txt | 0 .../dotnet/crud/write-transactions.txt | 0 {source/sdk/temp => temp}/dotnet/facets.toml | 0 {source/sdk/temp => temp}/dotnet/install.txt | 0 {source/sdk/temp => temp}/dotnet/logging.txt | 0 .../dotnet/manage-users/authenticate.txt | 0 .../manage-users/create-and-delete-users.txt | 0 .../dotnet/manage-users/custom-user-data.txt | 0 .../manage-users/link-user-identities.txt | 0 .../manage-email-password-users.txt | 0 .../manage-users/multi-user-applications.txt | 0 .../dotnet/manage-users/user-metadata.txt | 0 .../sdk/temp => temp}/dotnet/model-data.txt | 0 .../model-data/change-an-object-model.txt | 0 .../dotnet/model-data/data-binding.txt | 0 .../dotnet/model-data/data-types.txt | 0 .../model-data/data-types/collections.txt | 0 .../model-data/data-types/dictionaries.txt | 0 .../data-types/embedded-objects.txt | 0 .../model-data/data-types/field-types.txt | 0 .../model-data/data-types/geospatials.txt | 0 .../dotnet/model-data/data-types/lists.txt | 0 .../model-data/data-types/realm-integer.txt | 0 .../model-data/data-types/realm-value.txt | 0 .../dotnet/model-data/data-types/sets.txt | 0 .../dotnet/model-data/define-object-model.txt | 0 .../dotnet/model-data/manual-schema.txt | 0 .../model-data/object-models-and-schemas.txt | 0 .../dotnet/model-data/relationships.txt | 0 .../sdk/temp => temp}/dotnet/quick-start.txt | 0 .../temp => temp}/dotnet/react-to-changes.txt | 0 .../sdk/temp => temp}/dotnet/realm-files.txt | 0 .../dotnet/realm-files/bundle-a-realm.txt | 0 .../dotnet/realm-files/compact-realm.txt | 0 .../dotnet/realm-files/delete-a-realm.txt | 0 .../dotnet/realm-files/encrypt-a-realm.txt | 0 .../dotnet/realm-files/realms.txt | 0 {source/sdk/temp => temp}/dotnet/sync.txt | 0 .../dotnet/sync/add-sync-to-app.txt | 0 .../dotnet/sync/asymmetric-sync.txt | 0 .../dotnet/sync/client-reset.txt | 0 .../configure-and-open-a-synced-realm.txt | 0 .../dotnet/sync/convert-realm.txt | 0 .../dotnet/sync/flexible-sync.txt | 0 .../dotnet/sync/handle-sync-errors.txt | 0 .../dotnet/sync/partition-based-sync.txt | 0 .../dotnet/sync/sync-progress.txt | 0 .../dotnet/sync/sync-session.txt | 0 .../dotnet/sync/write-to-synced-realm.txt | 0 .../sdk/temp => temp}/dotnet/telemetry.txt | 0 .../temp => temp}/dotnet/troubleshooting.txt | 0 {source/sdk/temp => temp}/dotnet/unity.txt | 0 .../temp => temp}/dotnet/work-with-users.txt | 0 {source/sdk/temp => temp}/flutter.txt | 0 .../temp => temp}/flutter/app-services.txt | 0 .../flutter/app-services/call-function.txt | 0 .../flutter/app-services/connect-to-app.txt | 0 .../flutter/app-services/graphql-api.txt | 0 {source/sdk/temp => temp}/flutter/crud.txt | 0 .../sdk/temp => temp}/flutter/crud/create.txt | 0 .../sdk/temp => temp}/flutter/crud/delete.txt | 0 .../sdk/temp => temp}/flutter/crud/read.txt | 0 .../sdk/temp => temp}/flutter/crud/update.txt | 0 {source/sdk/temp => temp}/flutter/facets.toml | 0 {source/sdk/temp => temp}/flutter/install.txt | 0 {source/sdk/temp => temp}/flutter/logging.txt | 0 .../sdk/temp => temp}/flutter/quick-start.txt | 0 .../temp => temp}/flutter/realm-database.txt | 0 .../realm-database/configure-and-open.txt | 0 .../flutter/realm-database/freeze.txt | 0 .../flutter/realm-database/model-data.txt | 0 .../realm-database/model-data/data-types.txt | 0 .../model-data/define-realm-object-schema.txt | 0 .../realm-database/model-data/geospatial.txt | 0 .../model-data/property-annotations.txt | 0 .../model-data/relationships.txt | 0 .../model-data/update-realm-object-schema.txt | 0 .../realm-database/react-to-changes.txt | 0 .../flutter/realm-database/realm-files.txt | 0 .../realm-database/realm-files/bundle.txt | 0 .../realm-database/realm-files/compact.txt | 0 .../realm-database/realm-files/delete.txt | 0 .../realm-database/realm-files/encrypt.txt | 0 {source/sdk/temp => temp}/flutter/sync.txt | 0 .../flutter/sync/add-sync-to-app.txt | 0 .../flutter/sync/handle-sync-errors.txt | 0 .../temp => temp}/flutter/sync/log-level.txt | 0 .../flutter/sync/manage-sync-session.txt | 0 .../sync/manage-sync-subscriptions.txt | 0 .../flutter/sync/open-synced-realm.txt | 0 .../flutter/sync/stream-data-to-atlas.txt | 0 .../flutter/sync/sync-multiple-processes.txt | 0 .../flutter/sync/write-to-synced-realm.txt | 0 .../sdk/temp => temp}/flutter/telemetry.txt | 0 .../temp => temp}/flutter/test-and-debug.txt | 0 .../temp => temp}/flutter/troubleshooting.txt | 0 .../temp => temp}/flutter/upgrade-to-v2.txt | 0 {source/sdk/temp => temp}/flutter/users.txt | 0 .../flutter/users/access-token.txt | 0 .../flutter/users/authenticate.txt | 0 .../flutter/users/custom-user-data.txt | 0 .../flutter/users/delete-user.txt | 0 .../flutter/users/email-password-users.txt | 0 .../flutter/users/link-user-identities.txt | 0 .../flutter/users/multiple-users.txt | 0 .../flutter/users/user-metadata.txt | 0 {source/sdk/temp => temp}/java.txt | 0 {source/sdk/temp => temp}/java/adapters.txt | 0 {source/sdk/temp => temp}/java/api.txt | 0 .../sdk/temp => temp}/java/app-services.txt | 0 .../java/app-services/call-a-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../app-services/mongodb-remote-access.txt | 0 {source/sdk/temp => temp}/java/async-api.txt | 0 {source/sdk/temp => temp}/java/crud.txt | 0 .../sdk/temp => temp}/java/crud/create.txt | 0 .../sdk/temp => temp}/java/crud/delete.txt | 0 .../temp => temp}/java/crud/filter-data.txt | 0 {source/sdk/temp => temp}/java/crud/read.txt | 0 .../sdk/temp => temp}/java/crud/threading.txt | 0 .../sdk/temp => temp}/java/crud/update.txt | 0 {source/sdk/temp => temp}/java/facets.toml | 0 {source/sdk/temp => temp}/java/install.txt | 0 .../sdk/temp => temp}/java/manage-users.txt | 0 .../sdk/temp => temp}/java/migrate/index.txt | 0 {source/sdk/temp => temp}/java/model-data.txt | 0 .../java/model-data/data-types.txt | 0 .../model-data/data-types/collections.txt | 0 .../java/model-data/data-types/counters.txt | 0 .../data-types/embedded-objects.txt | 0 .../java/model-data/data-types/enums.txt | 0 .../model-data/data-types/field-types.txt | 0 .../java/model-data/data-types/realmany.txt | 0 .../model-data/data-types/realmdictionary.txt | 0 .../java/model-data/data-types/realmset.txt | 0 .../define-a-realm-object-model.txt | 0 .../model-data/modify-an-object-schema.txt | 0 .../java/model-data/relationships.txt | 0 .../sdk/temp => temp}/java/quick-starts.txt | 0 .../java/quick-starts/livedata.txt | 0 .../java/quick-starts/quick-start-local.txt | 0 .../java/quick-starts/quick-start-sync.txt | 0 .../temp => temp}/java/react-to-changes.txt | 0 .../sdk/temp => temp}/java/realm-files.txt | 0 .../java/realm-files/bundle-a-realm.txt | 0 .../java/realm-files/encryption.txt | 0 .../realm-files/open-and-close-a-realm.txt | 0 {source/sdk/temp => temp}/java/sync.txt | 0 .../java/sync/background-sync.txt | 0 .../configure-and-open-a-synced-realm.txt | 0 .../temp => temp}/java/sync/flexible-sync.txt | 0 .../java/sync/handle-sync-errors.txt | 0 .../manual-client-reset-data-recovery.txt | 0 .../java/sync/network-connection.txt | 0 .../java/sync/partition-based-sync.txt | 0 .../java/sync/pause-resume-sync.txt | 0 .../java/sync/reset-a-client-realm.txt | 0 .../temp => temp}/java/sync/sync-progress.txt | 0 {source/sdk/temp => temp}/java/telemetry.txt | 0 .../sdk/temp => temp}/java/test-and-debug.txt | 0 .../java/test-and-debug/debugging.txt | 0 .../java/test-and-debug/log-realm-events.txt | 0 .../java/test-and-debug/testing.txt | 0 .../java/test-and-debug/troubleshooting.txt | 0 .../temp => temp}/java/troubleshooting.txt | 0 .../java/users/authenticate-users.txt | 0 .../java/users/create-delete-users.txt | 0 .../java/users/custom-user-data.txt | 0 .../java/users/email-password-users.txt | 0 .../java/users/link-user-identities.txt | 0 .../java/users/manage-user-api-keys.txt | 0 .../java/users/multi-user-applications.txt | 0 {source/sdk/temp => temp}/kotlin.txt | 0 .../sdk/temp => temp}/kotlin/app-services.txt | 0 .../kotlin/app-services/call-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../kotlin/app-services/handle-app-errors.txt | 0 {source/sdk/temp => temp}/kotlin/facets.toml | 0 {source/sdk/temp => temp}/kotlin/install.txt | 0 {source/sdk/temp => temp}/kotlin/logging.txt | 0 .../migrate-from-java-sdk-to-kotlin-sdk.txt | 0 .../sdk/temp => temp}/kotlin/quick-start.txt | 0 .../temp => temp}/kotlin/realm-database.txt | 0 .../kotlin/realm-database/crud.txt | 0 .../kotlin/realm-database/crud/create.txt | 0 .../kotlin/realm-database/crud/delete.txt | 0 .../kotlin/realm-database/crud/read.txt | 0 .../kotlin/realm-database/crud/update.txt | 0 .../kotlin/realm-database/errors.txt | 0 .../kotlin/realm-database/frozen-arch.txt | 0 .../realm-database/open-and-close-a-realm.txt | 0 .../realm-database/react-to-changes.txt | 0 .../kotlin/realm-database/realm-files.txt | 0 .../realm-files/bundle-a-realm.txt | 0 .../realm-files/compact-realm.txt | 0 .../realm-files/delete-a-realm.txt | 0 .../realm-files/encrypt-a-realm.txt | 0 .../kotlin/realm-database/schemas.txt | 0 .../schemas/change-an-object-model.txt | 0 .../schemas/define-realm-object-model.txt | 0 .../realm-database/schemas/geospatials.txt | 0 .../schemas/model-data-device-sync.txt | 0 .../schemas/property-annotations.txt | 0 .../realm-database/schemas/relationships.txt | 0 .../schemas/supported-types.txt | 0 .../kotlin/realm-database/serialization.txt | 0 {source/sdk/temp => temp}/kotlin/sync.txt | 0 .../kotlin/sync/add-sync-to-app.txt | 0 .../kotlin/sync/background-sync.txt | 0 .../kotlin/sync/handle-sync-errors.txt | 0 .../temp => temp}/kotlin/sync/log-level.txt | 0 .../kotlin/sync/manage-sync-session.txt | 0 .../kotlin/sync/open-a-synced-realm.txt | 0 .../kotlin/sync/partition-based-sync.txt | 0 .../kotlin/sync/stream-data-to-atlas.txt | 0 .../temp => temp}/kotlin/sync/subscribe.txt | 0 .../kotlin/sync/write-to-synced-realm.txt | 0 .../sdk/temp => temp}/kotlin/telemetry.txt | 0 .../temp => temp}/kotlin/troubleshooting.txt | 0 {source/sdk/temp => temp}/kotlin/users.txt | 0 .../kotlin/users/authenticate-users.txt | 0 .../kotlin/users/custom-user-data.txt | 0 .../kotlin/users/delete-users.txt | 0 .../kotlin/users/link-credentials.txt | 0 .../users/manage-email-password-users.txt | 0 .../kotlin/users/manage-user-api-keys.txt | 0 .../kotlin/users/multi-user-applications.txt | 0 .../kotlin/users/user-metadata.txt | 0 {source => temp}/migrate.txt | 0 {source/sdk/temp => temp}/node.txt | 0 .../sdk/temp => temp}/node/app-services.txt | 0 .../node/app-services/call-a-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../node/app-services/query-mongodb.txt | 0 {source/sdk/temp => temp}/node/crud.txt | 0 .../sdk/temp => temp}/node/crud/create.txt | 0 .../sdk/temp => temp}/node/crud/delete.txt | 0 .../temp => temp}/node/crud/query-data.txt | 0 {source/sdk/temp => temp}/node/crud/read.txt | 0 .../sdk/temp => temp}/node/crud/update.txt | 0 {source/sdk/temp => temp}/node/facets.toml | 0 {source/sdk/temp => temp}/node/install.txt | 0 .../sdk/temp => temp}/node/integrations.txt | 0 .../node/integrations/electron-cra.txt | 0 .../node/integrations/electron.txt | 0 {source/sdk/temp => temp}/node/logging.txt | 0 .../sdk/temp => temp}/node/manage-users.txt | 0 .../sdk/temp => temp}/node/migrate/index.txt | 0 {source/sdk/temp => temp}/node/model-data.txt | 0 .../node/model-data/data-types.txt | 0 .../model-data/data-types/collections.txt | 0 .../model-data/data-types/dictionaries.txt | 0 .../data-types/embedded-objects.txt | 0 .../model-data/data-types/field-types.txt | 0 .../node/model-data/data-types/geospatial.txt | 0 .../node/model-data/data-types/mixed.txt | 0 .../node/model-data/data-types/sets.txt | 0 .../node/model-data/data-types/uuid.txt | 0 .../define-a-realm-object-model.txt | 0 .../model-data/modify-an-object-schema.txt | 0 .../relationships-and-embedded-objects.txt | 0 .../sdk/temp => temp}/node/quick-start.txt | 0 .../temp => temp}/node/react-to-changes.txt | 0 .../sdk/temp => temp}/node/realm-files.txt | 0 .../temp => temp}/node/realm-files/bundle.txt | 0 .../node/realm-files/compact-realm.txt | 0 .../node/realm-files/encrypt.txt | 0 .../realm-files/open-and-close-a-realm.txt | 0 {source/sdk/temp => temp}/node/sync.txt | 0 .../node/sync/client-reset-data-recovery.txt | 0 .../configure-and-open-a-synced-realm.txt | 0 .../temp => temp}/node/sync/flexible-sync.txt | 0 .../node/sync/handle-sync-errors.txt | 0 .../sdk/temp => temp}/node/sync/log-level.txt | 0 .../node/sync/manage-sync-session.txt | 0 .../node/sync/partition-based-sync.txt | 0 .../node/sync/stream-data-to-atlas.txt | 0 {source/sdk/temp => temp}/node/telemetry.txt | 0 .../node/users/access-custom-user-data.txt | 0 .../node/users/authenticate-users.txt | 0 .../node/users/create-delete-users.txt | 0 .../node/users/link-identities.txt | 0 .../users/manage-email-password-users.txt | 0 .../node/users/manage-user-api-keys.txt | 0 .../node/users/multi-user-applications.txt | 0 .../node/users/user-metadata.txt | 0 {source/sdk/temp => temp}/react-native.txt | 0 .../react-native/api-reference.txt | 0 .../api-reference/app-provider.txt | 0 .../api-reference/realm-provider.txt | 0 .../api-reference/user-provider.txt | 0 .../react-native/app-services.txt | 0 .../app-services/call-a-function.txt | 0 .../connect-to-app-services-app.txt | 0 .../app-services/query-mongodb.txt | 0 .../react-native/bootstrap-with-expo.txt | 0 .../sdk/temp => temp}/react-native/crud.txt | 0 .../react-native/crud/create.txt | 0 .../react-native/crud/delete.txt | 0 .../react-native/crud/query-data.txt | 0 .../temp => temp}/react-native/crud/read.txt | 0 .../react-native/crud/update.txt | 0 .../temp => temp}/react-native/facets.toml | 0 .../temp => temp}/react-native/install.txt | 0 .../react-native/integrations.txt | 0 .../integrations/mac-catalyst.txt | 0 .../temp => temp}/react-native/logging.txt | 0 .../react-native/manage-users.txt | 0 .../manage-users/authenticate-users.txt | 0 .../manage-users/create-and-delete-users.txt | 0 .../manage-users/custom-user-data.txt | 0 .../manage-users/link-user-identities.txt | 0 .../manage-email-password-users.txt | 0 .../manage-users/manage-user-api-keys.txt | 0 .../manage-users/multi-user-applications.txt | 0 .../react-native/migrate/index.txt | 0 .../temp => temp}/react-native/model-data.txt | 0 .../model-data/change-an-object-model.txt | 0 .../react-native/model-data/data-types.txt | 0 .../model-data/data-types/collections.txt | 0 .../model-data/data-types/dictionaries.txt | 0 .../data-types/embedded-objects.txt | 0 .../model-data/data-types/geospatial.txt | 0 .../model-data/data-types/mixed.txt | 0 .../model-data/data-types/property-types.txt | 0 .../model-data/data-types/sets.txt | 0 .../model-data/data-types/uuid.txt | 0 .../define-a-realm-object-model.txt | 0 .../relationships-and-embedded-objects.txt | 0 .../react-native/quick-start.txt | 0 .../react-native/react-to-changes.txt | 0 .../react-native/realm-files.txt | 0 .../react-native/realm-files/bundle.txt | 0 .../realm-files/compact-realm.txt | 0 .../realm-files/configure-a-realm.txt | 0 .../react-native/realm-files/encrypt.txt | 0 .../temp => temp}/react-native/sync-data.txt | 0 .../sync-data/client-reset-data-recovery.txt | 0 .../sync-data/configure-a-synced-realm.txt | 0 .../react-native/sync-data/flexible-sync.txt | 0 .../sync-data/handle-sync-errors.txt | 0 .../react-native/sync-data/log-level.txt | 0 .../sync-data/manage-sync-session.txt | 0 .../sync-data/partition-based-sync.txt | 0 .../sync-data/stream-data-to-atlas.txt | 0 .../temp => temp}/react-native/telemetry.txt | 0 .../react-native/test-and-debug.txt | 0 .../react-native/test-and-debug/testing.txt | 0 .../test-and-debug/troubleshooting.txt | 0 {source => temp}/sdk.txt | 2 - {source/sdk/temp => temp}/swift.txt | 0 .../sdk/temp => temp}/swift/api-reference.txt | 0 .../swift/app-services/call-a-function.txt | 0 .../connect-to-app-services-backend.txt | 0 .../app-services/mongodb-remote-access.txt | 0 .../swift/application-services.txt | 0 {source/sdk/temp => temp}/swift/crud.txt | 0 .../sdk/temp => temp}/swift/crud/create.txt | 0 .../sdk/temp => temp}/swift/crud/delete.txt | 0 .../temp => temp}/swift/crud/filter-data.txt | 0 {source/sdk/temp => temp}/swift/crud/read.txt | 0 .../temp => temp}/swift/crud/threading.txt | 0 .../sdk/temp => temp}/swift/crud/update.txt | 0 {source/sdk/temp => temp}/swift/facets.toml | 0 {source/sdk/temp => temp}/swift/install.txt | 0 {source/sdk/temp => temp}/swift/logging.txt | 0 .../sdk/temp => temp}/swift/model-data.txt | 0 .../model-data/change-an-object-model.txt | 0 .../model-data/model-data-device-sync.txt | 0 .../swift/model-data/object-models.txt | 0 .../swift/model-data/relationships.txt | 0 .../swift/model-data/supported-types.txt | 0 .../sdk/temp => temp}/swift/quick-start.txt | 0 .../temp => temp}/swift/react-to-changes.txt | 0 .../sdk/temp => temp}/swift/realm-files.txt | 0 .../swift/realm-files/bundle-a-realm.txt | 0 .../swift/realm-files/compacting.txt | 0 .../configure-and-open-a-realm.txt | 0 .../swift/realm-files/delete-a-realm.txt | 0 .../swift/realm-files/encrypt-a-realm.txt | 0 .../temp => temp}/swift/realm-files/tvos.txt | 0 .../temp => temp}/swift/swift-concurrency.txt | 0 .../temp => temp}/swift/swiftui-tutorial.txt | 0 {source/sdk/temp => temp}/swift/swiftui.txt | 0 .../swift/swiftui/background-sync.txt | 0 .../swiftui/configure-and-open-realm.txt | 0 .../swift/swiftui/filter-data.txt | 0 .../swift/swiftui/model-data.txt | 0 .../model-data/change-an-object-model.txt | 0 .../define-a-realm-object-model.txt | 0 .../swiftui/pass-realm-data-between-views.txt | 0 .../swift/swiftui/react-to-changes.txt | 0 .../swift/swiftui/swiftui-previews.txt | 0 .../sdk/temp => temp}/swift/swiftui/write.txt | 0 {source/sdk/temp => temp}/swift/sync.txt | 0 .../swift/sync/add-sync-to-app.txt | 0 .../swift/sync/background-sync.txt | 0 .../configure-and-open-a-synced-realm.txt | 0 .../swift/sync/event-library.txt | 0 .../swift/sync/flexible-sync.txt | 0 .../swift/sync/handle-sync-errors.txt | 0 .../temp => temp}/swift/sync/log-level.txt | 0 .../swift/sync/partition-based-sync.txt | 0 .../swift/sync/stream-data-to-atlas.txt | 0 .../temp => temp}/swift/sync/sync-session.txt | 0 .../swift/sync/write-to-synced-realm.txt | 0 {source/sdk/temp => temp}/swift/telemetry.txt | 0 .../temp => temp}/swift/test-and-debug.txt | 0 .../swift/use-realm-with-actors.txt | 0 .../swift/users/authenticate-users.txt | 0 .../swift/users/create-and-delete-users.txt | 0 .../swift/users/custom-user-data.txt | 0 .../swift/users/link-user-identities.txt | 0 .../users/manage-email-password-users.txt | 0 .../swift/users/manage-user-api-keys.txt | 0 .../swift/users/multi-user-applications.txt | 0 .../swift/users/user-metadata.txt | 0 .../temp => temp}/swift/work-with-users.txt | 0 .../temp => temp}/swift/xcode-playgrounds.txt | 0 {source => temp}/web.txt | 0 .../web/access-custom-user-data.txt | 0 {source => temp}/web/api-reference.txt | 0 {source => temp}/web/atlas-app-services.txt | 0 {source => temp}/web/authenticate.txt | 0 {source => temp}/web/call-a-function.txt | 0 {source => temp}/web/create-delete-user.txt | 0 .../web/create-manage-api-keys.txt | 0 {source => temp}/web/facets.toml | 0 {source => temp}/web/graphql-apollo-react.txt | 0 {source => temp}/web/init-app-client.txt | 0 {source => temp}/web/install.txt | 0 {source => temp}/web/link-identities.txt | 0 .../web/manage-email-password-users.txt | 0 {source => temp}/web/migrate.txt | 0 {source => temp}/web/mongodb.txt | 0 {source => temp}/web/nextjs.txt | 0 {source => temp}/web/quickstart.txt | 0 {source => temp}/web/react-web-quickstart.txt | 0 {source => temp}/web/sync.txt | 0 {source => temp}/web/telemetry.txt | 0 {source => temp}/web/users.txt | 0 .../web/work-with-multiple-users.txt | 0 508 files changed, 80 insertions(+), 117 deletions(-) rename {source/sdk/temp => temp}/cpp.txt (100%) rename {source/sdk/temp => temp}/cpp/app-services/call-a-function.txt (100%) rename {source/sdk/temp => temp}/cpp/app-services/connect-to-app.txt (100%) rename {source/sdk/temp => temp}/cpp/application-services.txt (100%) rename {source/sdk/temp => temp}/cpp/crud.txt (100%) rename {source/sdk/temp => temp}/cpp/crud/create.txt (100%) rename {source/sdk/temp => temp}/cpp/crud/delete.txt (100%) rename {source/sdk/temp => temp}/cpp/crud/filter-data.txt (100%) rename {source/sdk/temp => temp}/cpp/crud/read.txt (100%) rename {source/sdk/temp => temp}/cpp/crud/threading.txt (100%) rename {source/sdk/temp => temp}/cpp/crud/update.txt (100%) rename {source/sdk/temp => temp}/cpp/facets.toml (100%) rename {source/sdk/temp => temp}/cpp/install.txt (100%) rename {source/sdk/temp => temp}/cpp/logging.txt (100%) rename {source/sdk/temp => temp}/cpp/manage-users.txt (100%) rename {source/sdk/temp => temp}/cpp/model-data.txt (100%) rename {source/sdk/temp => temp}/cpp/model-data/object-models.txt (100%) rename {source/sdk/temp => temp}/cpp/model-data/relationships.txt (100%) rename {source/sdk/temp => temp}/cpp/model-data/supported-types.txt (100%) rename {source/sdk/temp => temp}/cpp/quick-start.txt (100%) rename {source/sdk/temp => temp}/cpp/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/cpp/realm-files.txt (100%) rename {source/sdk/temp => temp}/cpp/realm-files/compact-realm.txt (100%) rename {source/sdk/temp => temp}/cpp/realm-files/configure-and-open-a-realm.txt (100%) rename {source/sdk/temp => temp}/cpp/realm-files/encrypt-a-realm.txt (100%) rename {source/sdk/temp => temp}/cpp/sync.txt (100%) rename {source/sdk/temp => temp}/cpp/sync/handle-sync-errors.txt (100%) rename {source/sdk/temp => temp}/cpp/sync/log-level.txt (100%) rename {source/sdk/temp => temp}/cpp/sync/manage-sync-session.txt (100%) rename {source/sdk/temp => temp}/cpp/sync/stream-data-to-atlas.txt (100%) rename {source/sdk/temp => temp}/cpp/sync/sync-subscriptions.txt (100%) rename {source/sdk/temp => temp}/cpp/sync/write-to-synced-realm.txt (100%) rename {source/sdk/temp => temp}/cpp/telemetry.txt (100%) rename {source/sdk/temp => temp}/cpp/users/authenticate-users.txt (100%) rename {source/sdk/temp => temp}/cpp/users/custom-user-data.txt (100%) rename {source/sdk/temp => temp}/cpp/users/manage-email-password-users.txt (100%) rename {source/sdk/temp => temp}/dotnet.txt (100%) rename {source/sdk/temp => temp}/dotnet/app-services/call-a-function.txt (100%) rename {source/sdk/temp => temp}/dotnet/app-services/connect-to-app-services-backend.txt (100%) rename {source/sdk/temp => temp}/dotnet/app-services/manage-user-api-keys.txt (100%) rename {source/sdk/temp => temp}/dotnet/app-services/mongodb-remote-access.txt (100%) rename {source/sdk/temp => temp}/dotnet/application-services.txt (100%) rename {source/sdk/temp => temp}/dotnet/async-console.txt (100%) rename {source/sdk/temp => temp}/dotnet/compatibility.txt (100%) rename {source/sdk/temp => temp}/dotnet/crud.txt (100%) rename {source/sdk/temp => temp}/dotnet/crud/create.txt (100%) rename {source/sdk/temp => temp}/dotnet/crud/delete.txt (100%) rename {source/sdk/temp => temp}/dotnet/crud/filter.txt (100%) rename {source/sdk/temp => temp}/dotnet/crud/read.txt (100%) rename {source/sdk/temp => temp}/dotnet/crud/threading.txt (100%) rename {source/sdk/temp => temp}/dotnet/crud/update.txt (100%) rename {source/sdk/temp => temp}/dotnet/crud/write-transactions.txt (100%) rename {source/sdk/temp => temp}/dotnet/facets.toml (100%) rename {source/sdk/temp => temp}/dotnet/install.txt (100%) rename {source/sdk/temp => temp}/dotnet/logging.txt (100%) rename {source/sdk/temp => temp}/dotnet/manage-users/authenticate.txt (100%) rename {source/sdk/temp => temp}/dotnet/manage-users/create-and-delete-users.txt (100%) rename {source/sdk/temp => temp}/dotnet/manage-users/custom-user-data.txt (100%) rename {source/sdk/temp => temp}/dotnet/manage-users/link-user-identities.txt (100%) rename {source/sdk/temp => temp}/dotnet/manage-users/manage-email-password-users.txt (100%) rename {source/sdk/temp => temp}/dotnet/manage-users/multi-user-applications.txt (100%) rename {source/sdk/temp => temp}/dotnet/manage-users/user-metadata.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/change-an-object-model.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-binding.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/collections.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/dictionaries.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/embedded-objects.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/field-types.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/geospatials.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/lists.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/realm-integer.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/realm-value.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/data-types/sets.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/define-object-model.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/manual-schema.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/object-models-and-schemas.txt (100%) rename {source/sdk/temp => temp}/dotnet/model-data/relationships.txt (100%) rename {source/sdk/temp => temp}/dotnet/quick-start.txt (100%) rename {source/sdk/temp => temp}/dotnet/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/dotnet/realm-files.txt (100%) rename {source/sdk/temp => temp}/dotnet/realm-files/bundle-a-realm.txt (100%) rename {source/sdk/temp => temp}/dotnet/realm-files/compact-realm.txt (100%) rename {source/sdk/temp => temp}/dotnet/realm-files/delete-a-realm.txt (100%) rename {source/sdk/temp => temp}/dotnet/realm-files/encrypt-a-realm.txt (100%) rename {source/sdk/temp => temp}/dotnet/realm-files/realms.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/add-sync-to-app.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/asymmetric-sync.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/client-reset.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/configure-and-open-a-synced-realm.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/convert-realm.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/flexible-sync.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/handle-sync-errors.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/partition-based-sync.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/sync-progress.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/sync-session.txt (100%) rename {source/sdk/temp => temp}/dotnet/sync/write-to-synced-realm.txt (100%) rename {source/sdk/temp => temp}/dotnet/telemetry.txt (100%) rename {source/sdk/temp => temp}/dotnet/troubleshooting.txt (100%) rename {source/sdk/temp => temp}/dotnet/unity.txt (100%) rename {source/sdk/temp => temp}/dotnet/work-with-users.txt (100%) rename {source/sdk/temp => temp}/flutter.txt (100%) rename {source/sdk/temp => temp}/flutter/app-services.txt (100%) rename {source/sdk/temp => temp}/flutter/app-services/call-function.txt (100%) rename {source/sdk/temp => temp}/flutter/app-services/connect-to-app.txt (100%) rename {source/sdk/temp => temp}/flutter/app-services/graphql-api.txt (100%) rename {source/sdk/temp => temp}/flutter/crud.txt (100%) rename {source/sdk/temp => temp}/flutter/crud/create.txt (100%) rename {source/sdk/temp => temp}/flutter/crud/delete.txt (100%) rename {source/sdk/temp => temp}/flutter/crud/read.txt (100%) rename {source/sdk/temp => temp}/flutter/crud/update.txt (100%) rename {source/sdk/temp => temp}/flutter/facets.toml (100%) rename {source/sdk/temp => temp}/flutter/install.txt (100%) rename {source/sdk/temp => temp}/flutter/logging.txt (100%) rename {source/sdk/temp => temp}/flutter/quick-start.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/configure-and-open.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/freeze.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/model-data.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/model-data/data-types.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/model-data/define-realm-object-schema.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/model-data/geospatial.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/model-data/property-annotations.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/model-data/relationships.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/model-data/update-realm-object-schema.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/realm-files.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/realm-files/bundle.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/realm-files/compact.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/realm-files/delete.txt (100%) rename {source/sdk/temp => temp}/flutter/realm-database/realm-files/encrypt.txt (100%) rename {source/sdk/temp => temp}/flutter/sync.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/add-sync-to-app.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/handle-sync-errors.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/log-level.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/manage-sync-session.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/manage-sync-subscriptions.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/open-synced-realm.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/stream-data-to-atlas.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/sync-multiple-processes.txt (100%) rename {source/sdk/temp => temp}/flutter/sync/write-to-synced-realm.txt (100%) rename {source/sdk/temp => temp}/flutter/telemetry.txt (100%) rename {source/sdk/temp => temp}/flutter/test-and-debug.txt (100%) rename {source/sdk/temp => temp}/flutter/troubleshooting.txt (100%) rename {source/sdk/temp => temp}/flutter/upgrade-to-v2.txt (100%) rename {source/sdk/temp => temp}/flutter/users.txt (100%) rename {source/sdk/temp => temp}/flutter/users/access-token.txt (100%) rename {source/sdk/temp => temp}/flutter/users/authenticate.txt (100%) rename {source/sdk/temp => temp}/flutter/users/custom-user-data.txt (100%) rename {source/sdk/temp => temp}/flutter/users/delete-user.txt (100%) rename {source/sdk/temp => temp}/flutter/users/email-password-users.txt (100%) rename {source/sdk/temp => temp}/flutter/users/link-user-identities.txt (100%) rename {source/sdk/temp => temp}/flutter/users/multiple-users.txt (100%) rename {source/sdk/temp => temp}/flutter/users/user-metadata.txt (100%) rename {source/sdk/temp => temp}/java.txt (100%) rename {source/sdk/temp => temp}/java/adapters.txt (100%) rename {source/sdk/temp => temp}/java/api.txt (100%) rename {source/sdk/temp => temp}/java/app-services.txt (100%) rename {source/sdk/temp => temp}/java/app-services/call-a-function.txt (100%) rename {source/sdk/temp => temp}/java/app-services/connect-to-app-services-backend.txt (100%) rename {source/sdk/temp => temp}/java/app-services/mongodb-remote-access.txt (100%) rename {source/sdk/temp => temp}/java/async-api.txt (100%) rename {source/sdk/temp => temp}/java/crud.txt (100%) rename {source/sdk/temp => temp}/java/crud/create.txt (100%) rename {source/sdk/temp => temp}/java/crud/delete.txt (100%) rename {source/sdk/temp => temp}/java/crud/filter-data.txt (100%) rename {source/sdk/temp => temp}/java/crud/read.txt (100%) rename {source/sdk/temp => temp}/java/crud/threading.txt (100%) rename {source/sdk/temp => temp}/java/crud/update.txt (100%) rename {source/sdk/temp => temp}/java/facets.toml (100%) rename {source/sdk/temp => temp}/java/install.txt (100%) rename {source/sdk/temp => temp}/java/manage-users.txt (100%) rename {source/sdk/temp => temp}/java/migrate/index.txt (100%) rename {source/sdk/temp => temp}/java/model-data.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types/collections.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types/counters.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types/embedded-objects.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types/enums.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types/field-types.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types/realmany.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types/realmdictionary.txt (100%) rename {source/sdk/temp => temp}/java/model-data/data-types/realmset.txt (100%) rename {source/sdk/temp => temp}/java/model-data/define-a-realm-object-model.txt (100%) rename {source/sdk/temp => temp}/java/model-data/modify-an-object-schema.txt (100%) rename {source/sdk/temp => temp}/java/model-data/relationships.txt (100%) rename {source/sdk/temp => temp}/java/quick-starts.txt (100%) rename {source/sdk/temp => temp}/java/quick-starts/livedata.txt (100%) rename {source/sdk/temp => temp}/java/quick-starts/quick-start-local.txt (100%) rename {source/sdk/temp => temp}/java/quick-starts/quick-start-sync.txt (100%) rename {source/sdk/temp => temp}/java/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/java/realm-files.txt (100%) rename {source/sdk/temp => temp}/java/realm-files/bundle-a-realm.txt (100%) rename {source/sdk/temp => temp}/java/realm-files/encryption.txt (100%) rename {source/sdk/temp => temp}/java/realm-files/open-and-close-a-realm.txt (100%) rename {source/sdk/temp => temp}/java/sync.txt (100%) rename {source/sdk/temp => temp}/java/sync/background-sync.txt (100%) rename {source/sdk/temp => temp}/java/sync/configure-and-open-a-synced-realm.txt (100%) rename {source/sdk/temp => temp}/java/sync/flexible-sync.txt (100%) rename {source/sdk/temp => temp}/java/sync/handle-sync-errors.txt (100%) rename {source/sdk/temp => temp}/java/sync/manual-client-reset-data-recovery.txt (100%) rename {source/sdk/temp => temp}/java/sync/network-connection.txt (100%) rename {source/sdk/temp => temp}/java/sync/partition-based-sync.txt (100%) rename {source/sdk/temp => temp}/java/sync/pause-resume-sync.txt (100%) rename {source/sdk/temp => temp}/java/sync/reset-a-client-realm.txt (100%) rename {source/sdk/temp => temp}/java/sync/sync-progress.txt (100%) rename {source/sdk/temp => temp}/java/telemetry.txt (100%) rename {source/sdk/temp => temp}/java/test-and-debug.txt (100%) rename {source/sdk/temp => temp}/java/test-and-debug/debugging.txt (100%) rename {source/sdk/temp => temp}/java/test-and-debug/log-realm-events.txt (100%) rename {source/sdk/temp => temp}/java/test-and-debug/testing.txt (100%) rename {source/sdk/temp => temp}/java/test-and-debug/troubleshooting.txt (100%) rename {source/sdk/temp => temp}/java/troubleshooting.txt (100%) rename {source/sdk/temp => temp}/java/users/authenticate-users.txt (100%) rename {source/sdk/temp => temp}/java/users/create-delete-users.txt (100%) rename {source/sdk/temp => temp}/java/users/custom-user-data.txt (100%) rename {source/sdk/temp => temp}/java/users/email-password-users.txt (100%) rename {source/sdk/temp => temp}/java/users/link-user-identities.txt (100%) rename {source/sdk/temp => temp}/java/users/manage-user-api-keys.txt (100%) rename {source/sdk/temp => temp}/java/users/multi-user-applications.txt (100%) rename {source/sdk/temp => temp}/kotlin.txt (100%) rename {source/sdk/temp => temp}/kotlin/app-services.txt (100%) rename {source/sdk/temp => temp}/kotlin/app-services/call-function.txt (100%) rename {source/sdk/temp => temp}/kotlin/app-services/connect-to-app-services-backend.txt (100%) rename {source/sdk/temp => temp}/kotlin/app-services/handle-app-errors.txt (100%) rename {source/sdk/temp => temp}/kotlin/facets.toml (100%) rename {source/sdk/temp => temp}/kotlin/install.txt (100%) rename {source/sdk/temp => temp}/kotlin/logging.txt (100%) rename {source/sdk/temp => temp}/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt (100%) rename {source/sdk/temp => temp}/kotlin/quick-start.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/crud.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/crud/create.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/crud/delete.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/crud/read.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/crud/update.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/errors.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/frozen-arch.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/open-and-close-a-realm.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/realm-files.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/realm-files/bundle-a-realm.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/realm-files/compact-realm.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/realm-files/delete-a-realm.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/realm-files/encrypt-a-realm.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/schemas.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/schemas/change-an-object-model.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/schemas/define-realm-object-model.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/schemas/geospatials.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/schemas/model-data-device-sync.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/schemas/property-annotations.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/schemas/relationships.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/schemas/supported-types.txt (100%) rename {source/sdk/temp => temp}/kotlin/realm-database/serialization.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/add-sync-to-app.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/background-sync.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/handle-sync-errors.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/log-level.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/manage-sync-session.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/open-a-synced-realm.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/partition-based-sync.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/stream-data-to-atlas.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/subscribe.txt (100%) rename {source/sdk/temp => temp}/kotlin/sync/write-to-synced-realm.txt (100%) rename {source/sdk/temp => temp}/kotlin/telemetry.txt (100%) rename {source/sdk/temp => temp}/kotlin/troubleshooting.txt (100%) rename {source/sdk/temp => temp}/kotlin/users.txt (100%) rename {source/sdk/temp => temp}/kotlin/users/authenticate-users.txt (100%) rename {source/sdk/temp => temp}/kotlin/users/custom-user-data.txt (100%) rename {source/sdk/temp => temp}/kotlin/users/delete-users.txt (100%) rename {source/sdk/temp => temp}/kotlin/users/link-credentials.txt (100%) rename {source/sdk/temp => temp}/kotlin/users/manage-email-password-users.txt (100%) rename {source/sdk/temp => temp}/kotlin/users/manage-user-api-keys.txt (100%) rename {source/sdk/temp => temp}/kotlin/users/multi-user-applications.txt (100%) rename {source/sdk/temp => temp}/kotlin/users/user-metadata.txt (100%) rename {source => temp}/migrate.txt (100%) rename {source/sdk/temp => temp}/node.txt (100%) rename {source/sdk/temp => temp}/node/app-services.txt (100%) rename {source/sdk/temp => temp}/node/app-services/call-a-function.txt (100%) rename {source/sdk/temp => temp}/node/app-services/connect-to-app-services-backend.txt (100%) rename {source/sdk/temp => temp}/node/app-services/query-mongodb.txt (100%) rename {source/sdk/temp => temp}/node/crud.txt (100%) rename {source/sdk/temp => temp}/node/crud/create.txt (100%) rename {source/sdk/temp => temp}/node/crud/delete.txt (100%) rename {source/sdk/temp => temp}/node/crud/query-data.txt (100%) rename {source/sdk/temp => temp}/node/crud/read.txt (100%) rename {source/sdk/temp => temp}/node/crud/update.txt (100%) rename {source/sdk/temp => temp}/node/facets.toml (100%) rename {source/sdk/temp => temp}/node/install.txt (100%) rename {source/sdk/temp => temp}/node/integrations.txt (100%) rename {source/sdk/temp => temp}/node/integrations/electron-cra.txt (100%) rename {source/sdk/temp => temp}/node/integrations/electron.txt (100%) rename {source/sdk/temp => temp}/node/logging.txt (100%) rename {source/sdk/temp => temp}/node/manage-users.txt (100%) rename {source/sdk/temp => temp}/node/migrate/index.txt (100%) rename {source/sdk/temp => temp}/node/model-data.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types/collections.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types/dictionaries.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types/embedded-objects.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types/field-types.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types/geospatial.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types/mixed.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types/sets.txt (100%) rename {source/sdk/temp => temp}/node/model-data/data-types/uuid.txt (100%) rename {source/sdk/temp => temp}/node/model-data/define-a-realm-object-model.txt (100%) rename {source/sdk/temp => temp}/node/model-data/modify-an-object-schema.txt (100%) rename {source/sdk/temp => temp}/node/model-data/relationships-and-embedded-objects.txt (100%) rename {source/sdk/temp => temp}/node/quick-start.txt (100%) rename {source/sdk/temp => temp}/node/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/node/realm-files.txt (100%) rename {source/sdk/temp => temp}/node/realm-files/bundle.txt (100%) rename {source/sdk/temp => temp}/node/realm-files/compact-realm.txt (100%) rename {source/sdk/temp => temp}/node/realm-files/encrypt.txt (100%) rename {source/sdk/temp => temp}/node/realm-files/open-and-close-a-realm.txt (100%) rename {source/sdk/temp => temp}/node/sync.txt (100%) rename {source/sdk/temp => temp}/node/sync/client-reset-data-recovery.txt (100%) rename {source/sdk/temp => temp}/node/sync/configure-and-open-a-synced-realm.txt (100%) rename {source/sdk/temp => temp}/node/sync/flexible-sync.txt (100%) rename {source/sdk/temp => temp}/node/sync/handle-sync-errors.txt (100%) rename {source/sdk/temp => temp}/node/sync/log-level.txt (100%) rename {source/sdk/temp => temp}/node/sync/manage-sync-session.txt (100%) rename {source/sdk/temp => temp}/node/sync/partition-based-sync.txt (100%) rename {source/sdk/temp => temp}/node/sync/stream-data-to-atlas.txt (100%) rename {source/sdk/temp => temp}/node/telemetry.txt (100%) rename {source/sdk/temp => temp}/node/users/access-custom-user-data.txt (100%) rename {source/sdk/temp => temp}/node/users/authenticate-users.txt (100%) rename {source/sdk/temp => temp}/node/users/create-delete-users.txt (100%) rename {source/sdk/temp => temp}/node/users/link-identities.txt (100%) rename {source/sdk/temp => temp}/node/users/manage-email-password-users.txt (100%) rename {source/sdk/temp => temp}/node/users/manage-user-api-keys.txt (100%) rename {source/sdk/temp => temp}/node/users/multi-user-applications.txt (100%) rename {source/sdk/temp => temp}/node/users/user-metadata.txt (100%) rename {source/sdk/temp => temp}/react-native.txt (100%) rename {source/sdk/temp => temp}/react-native/api-reference.txt (100%) rename {source/sdk/temp => temp}/react-native/api-reference/app-provider.txt (100%) rename {source/sdk/temp => temp}/react-native/api-reference/realm-provider.txt (100%) rename {source/sdk/temp => temp}/react-native/api-reference/user-provider.txt (100%) rename {source/sdk/temp => temp}/react-native/app-services.txt (100%) rename {source/sdk/temp => temp}/react-native/app-services/call-a-function.txt (100%) rename {source/sdk/temp => temp}/react-native/app-services/connect-to-app-services-app.txt (100%) rename {source/sdk/temp => temp}/react-native/app-services/query-mongodb.txt (100%) rename {source/sdk/temp => temp}/react-native/bootstrap-with-expo.txt (100%) rename {source/sdk/temp => temp}/react-native/crud.txt (100%) rename {source/sdk/temp => temp}/react-native/crud/create.txt (100%) rename {source/sdk/temp => temp}/react-native/crud/delete.txt (100%) rename {source/sdk/temp => temp}/react-native/crud/query-data.txt (100%) rename {source/sdk/temp => temp}/react-native/crud/read.txt (100%) rename {source/sdk/temp => temp}/react-native/crud/update.txt (100%) rename {source/sdk/temp => temp}/react-native/facets.toml (100%) rename {source/sdk/temp => temp}/react-native/install.txt (100%) rename {source/sdk/temp => temp}/react-native/integrations.txt (100%) rename {source/sdk/temp => temp}/react-native/integrations/mac-catalyst.txt (100%) rename {source/sdk/temp => temp}/react-native/logging.txt (100%) rename {source/sdk/temp => temp}/react-native/manage-users.txt (100%) rename {source/sdk/temp => temp}/react-native/manage-users/authenticate-users.txt (100%) rename {source/sdk/temp => temp}/react-native/manage-users/create-and-delete-users.txt (100%) rename {source/sdk/temp => temp}/react-native/manage-users/custom-user-data.txt (100%) rename {source/sdk/temp => temp}/react-native/manage-users/link-user-identities.txt (100%) rename {source/sdk/temp => temp}/react-native/manage-users/manage-email-password-users.txt (100%) rename {source/sdk/temp => temp}/react-native/manage-users/manage-user-api-keys.txt (100%) rename {source/sdk/temp => temp}/react-native/manage-users/multi-user-applications.txt (100%) rename {source/sdk/temp => temp}/react-native/migrate/index.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/change-an-object-model.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types/collections.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types/dictionaries.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types/embedded-objects.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types/geospatial.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types/mixed.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types/property-types.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types/sets.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/data-types/uuid.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/define-a-realm-object-model.txt (100%) rename {source/sdk/temp => temp}/react-native/model-data/relationships-and-embedded-objects.txt (100%) rename {source/sdk/temp => temp}/react-native/quick-start.txt (100%) rename {source/sdk/temp => temp}/react-native/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/react-native/realm-files.txt (100%) rename {source/sdk/temp => temp}/react-native/realm-files/bundle.txt (100%) rename {source/sdk/temp => temp}/react-native/realm-files/compact-realm.txt (100%) rename {source/sdk/temp => temp}/react-native/realm-files/configure-a-realm.txt (100%) rename {source/sdk/temp => temp}/react-native/realm-files/encrypt.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data/client-reset-data-recovery.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data/configure-a-synced-realm.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data/flexible-sync.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data/handle-sync-errors.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data/log-level.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data/manage-sync-session.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data/partition-based-sync.txt (100%) rename {source/sdk/temp => temp}/react-native/sync-data/stream-data-to-atlas.txt (100%) rename {source/sdk/temp => temp}/react-native/telemetry.txt (100%) rename {source/sdk/temp => temp}/react-native/test-and-debug.txt (100%) rename {source/sdk/temp => temp}/react-native/test-and-debug/testing.txt (100%) rename {source/sdk/temp => temp}/react-native/test-and-debug/troubleshooting.txt (100%) rename {source => temp}/sdk.txt (97%) rename {source/sdk/temp => temp}/swift.txt (100%) rename {source/sdk/temp => temp}/swift/api-reference.txt (100%) rename {source/sdk/temp => temp}/swift/app-services/call-a-function.txt (100%) rename {source/sdk/temp => temp}/swift/app-services/connect-to-app-services-backend.txt (100%) rename {source/sdk/temp => temp}/swift/app-services/mongodb-remote-access.txt (100%) rename {source/sdk/temp => temp}/swift/application-services.txt (100%) rename {source/sdk/temp => temp}/swift/crud.txt (100%) rename {source/sdk/temp => temp}/swift/crud/create.txt (100%) rename {source/sdk/temp => temp}/swift/crud/delete.txt (100%) rename {source/sdk/temp => temp}/swift/crud/filter-data.txt (100%) rename {source/sdk/temp => temp}/swift/crud/read.txt (100%) rename {source/sdk/temp => temp}/swift/crud/threading.txt (100%) rename {source/sdk/temp => temp}/swift/crud/update.txt (100%) rename {source/sdk/temp => temp}/swift/facets.toml (100%) rename {source/sdk/temp => temp}/swift/install.txt (100%) rename {source/sdk/temp => temp}/swift/logging.txt (100%) rename {source/sdk/temp => temp}/swift/model-data.txt (100%) rename {source/sdk/temp => temp}/swift/model-data/change-an-object-model.txt (100%) rename {source/sdk/temp => temp}/swift/model-data/model-data-device-sync.txt (100%) rename {source/sdk/temp => temp}/swift/model-data/object-models.txt (100%) rename {source/sdk/temp => temp}/swift/model-data/relationships.txt (100%) rename {source/sdk/temp => temp}/swift/model-data/supported-types.txt (100%) rename {source/sdk/temp => temp}/swift/quick-start.txt (100%) rename {source/sdk/temp => temp}/swift/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/swift/realm-files.txt (100%) rename {source/sdk/temp => temp}/swift/realm-files/bundle-a-realm.txt (100%) rename {source/sdk/temp => temp}/swift/realm-files/compacting.txt (100%) rename {source/sdk/temp => temp}/swift/realm-files/configure-and-open-a-realm.txt (100%) rename {source/sdk/temp => temp}/swift/realm-files/delete-a-realm.txt (100%) rename {source/sdk/temp => temp}/swift/realm-files/encrypt-a-realm.txt (100%) rename {source/sdk/temp => temp}/swift/realm-files/tvos.txt (100%) rename {source/sdk/temp => temp}/swift/swift-concurrency.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui-tutorial.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/background-sync.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/configure-and-open-realm.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/filter-data.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/model-data.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/model-data/change-an-object-model.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/model-data/define-a-realm-object-model.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/pass-realm-data-between-views.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/react-to-changes.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/swiftui-previews.txt (100%) rename {source/sdk/temp => temp}/swift/swiftui/write.txt (100%) rename {source/sdk/temp => temp}/swift/sync.txt (100%) rename {source/sdk/temp => temp}/swift/sync/add-sync-to-app.txt (100%) rename {source/sdk/temp => temp}/swift/sync/background-sync.txt (100%) rename {source/sdk/temp => temp}/swift/sync/configure-and-open-a-synced-realm.txt (100%) rename {source/sdk/temp => temp}/swift/sync/event-library.txt (100%) rename {source/sdk/temp => temp}/swift/sync/flexible-sync.txt (100%) rename {source/sdk/temp => temp}/swift/sync/handle-sync-errors.txt (100%) rename {source/sdk/temp => temp}/swift/sync/log-level.txt (100%) rename {source/sdk/temp => temp}/swift/sync/partition-based-sync.txt (100%) rename {source/sdk/temp => temp}/swift/sync/stream-data-to-atlas.txt (100%) rename {source/sdk/temp => temp}/swift/sync/sync-session.txt (100%) rename {source/sdk/temp => temp}/swift/sync/write-to-synced-realm.txt (100%) rename {source/sdk/temp => temp}/swift/telemetry.txt (100%) rename {source/sdk/temp => temp}/swift/test-and-debug.txt (100%) rename {source/sdk/temp => temp}/swift/use-realm-with-actors.txt (100%) rename {source/sdk/temp => temp}/swift/users/authenticate-users.txt (100%) rename {source/sdk/temp => temp}/swift/users/create-and-delete-users.txt (100%) rename {source/sdk/temp => temp}/swift/users/custom-user-data.txt (100%) rename {source/sdk/temp => temp}/swift/users/link-user-identities.txt (100%) rename {source/sdk/temp => temp}/swift/users/manage-email-password-users.txt (100%) rename {source/sdk/temp => temp}/swift/users/manage-user-api-keys.txt (100%) rename {source/sdk/temp => temp}/swift/users/multi-user-applications.txt (100%) rename {source/sdk/temp => temp}/swift/users/user-metadata.txt (100%) rename {source/sdk/temp => temp}/swift/work-with-users.txt (100%) rename {source/sdk/temp => temp}/swift/xcode-playgrounds.txt (100%) rename {source => temp}/web.txt (100%) rename {source => temp}/web/access-custom-user-data.txt (100%) rename {source => temp}/web/api-reference.txt (100%) rename {source => temp}/web/atlas-app-services.txt (100%) rename {source => temp}/web/authenticate.txt (100%) rename {source => temp}/web/call-a-function.txt (100%) rename {source => temp}/web/create-delete-user.txt (100%) rename {source => temp}/web/create-manage-api-keys.txt (100%) rename {source => temp}/web/facets.toml (100%) rename {source => temp}/web/graphql-apollo-react.txt (100%) rename {source => temp}/web/init-app-client.txt (100%) rename {source => temp}/web/install.txt (100%) rename {source => temp}/web/link-identities.txt (100%) rename {source => temp}/web/manage-email-password-users.txt (100%) rename {source => temp}/web/migrate.txt (100%) rename {source => temp}/web/mongodb.txt (100%) rename {source => temp}/web/nextjs.txt (100%) rename {source => temp}/web/quickstart.txt (100%) rename {source => temp}/web/react-web-quickstart.txt (100%) rename {source => temp}/web/sync.txt (100%) rename {source => temp}/web/telemetry.txt (100%) rename {source => temp}/web/users.txt (100%) rename {source => temp}/web/work-with-multiple-users.txt (100%) diff --git a/source/includes/api-details/javascript/crud/create-realm-object-description.rst b/source/includes/api-details/javascript/crud/create-realm-object-description.rst index 2250961812..f18ba92475 100644 --- a/source/includes/api-details/javascript/crud/create-realm-object-description.rst +++ b/source/includes/api-details/javascript/crud/create-realm-object-description.rst @@ -1,5 +1,5 @@ To add an object to a realm, instantiate it as you would any other object and then pass it to :js-sdk:`Realm.create() ` inside of a -write transaction. If the realm's :ref:`schema ` includes +write transaction. If the realm's :ref:`schema ` includes the object type and the object conforms to the schema, then Realm stores the object, which is now *managed* by the realm. diff --git a/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst b/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst index 1607cc5dd6..5f145cc22d 100644 --- a/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst +++ b/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst @@ -4,7 +4,7 @@ it into the database. To create a new ``AsymmetricRealmObject`` instance, instantiate a new object of an -:ref:`asymmetric object type ` using +:ref:`asymmetric object type ` using `insert() <{+kotlin-sync-prefix+}io.realm.kotlin.mongodb.ext/insert.html>`__. In the following example, we instantiate a new ``WeatherSensor`` diff --git a/source/includes/api-details/kotlin/crud/create-procedure.rst b/source/includes/api-details/kotlin/crud/create-procedure.rst index 0398727886..4d81f4535e 100644 --- a/source/includes/api-details/kotlin/crud/create-procedure.rst +++ b/source/includes/api-details/kotlin/crud/create-procedure.rst @@ -32,4 +32,4 @@ In Kotlin, objects returned from a write closure become frozen objects when the write transaction completes. For more information, refer to - :ref:`kotlin-frozen-architecture`. + :ref:`sdks-live-and-frozen-objects`. diff --git a/source/includes/api-details/kotlin/crud/create-realm-object-description.rst b/source/includes/api-details/kotlin/crud/create-realm-object-description.rst index c6b59e347d..c5b9a4782a 100644 --- a/source/includes/api-details/kotlin/crud/create-realm-object-description.rst +++ b/source/includes/api-details/kotlin/crud/create-realm-object-description.rst @@ -1,5 +1,5 @@ To create a new ``RealmObject`` instance, instantiate a new object of a -:ref:`realm object type `. +:ref:`realm object type `. In the following example, we instantiate a ``Frog`` object in a ``realm.write()`` block, then pass the instantiated object to diff --git a/source/includes/api-details/typescript/crud/create-realm-object-description.rst b/source/includes/api-details/typescript/crud/create-realm-object-description.rst index 2250961812..f18ba92475 100644 --- a/source/includes/api-details/typescript/crud/create-realm-object-description.rst +++ b/source/includes/api-details/typescript/crud/create-realm-object-description.rst @@ -1,5 +1,5 @@ To add an object to a realm, instantiate it as you would any other object and then pass it to :js-sdk:`Realm.create() ` inside of a -write transaction. If the realm's :ref:`schema ` includes +write transaction. If the realm's :ref:`schema ` includes the object type and the object conforms to the schema, then Realm stores the object, which is now *managed* by the realm. diff --git a/source/index.txt b/source/index.txt index fab371d0b8..fb684ed1cf 100644 --- a/source/index.txt +++ b/source/index.txt @@ -210,20 +210,20 @@ other clients. Call Serverless Functions ~~~~~~~~~~~~~~~~~~~~~~~~~ - You can :ref:`call serverless Functions ` + You can :ref:`call serverless Functions ` from your client application that run in an App Services backend. Query MongoDB Atlas ~~~~~~~~~~~~~~~~~~~ - You can :ref:`query data stored in MongoDB ` + You can :ref:`query data stored in MongoDB ` directly from your client application code. Authenticate Users ~~~~~~~~~~~~~~~~~~ Authenticate users with built-in and third-party :ref:`authentication - providers `. Use the authenticated user to + providers `. Use the authenticated user to access App Services. .. image:: /images/illustrations/Spot_MauvePurple_APIs_Tech_RealmApp.png diff --git a/source/sdk/api-reference.txt b/source/sdk/api-reference.txt index ee74cc8fa6..d1500f92ba 100644 --- a/source/sdk/api-reference.txt +++ b/source/sdk/api-reference.txt @@ -17,12 +17,12 @@ API Reference The following pages contain API reference documentation for Atlas Device SDKs: -- :ref:`C# API Reference (.NET) ` -- :ref:`C++ API Reference (Doxygen) ` -- :ref:`Dart API Reference ` -- :ref:`Java API Reference ` -- :ref:`Java (Kotlin Extensions) API Reference ` -- :ref:`JavaScript API Reference (JavaScript & TypeScript) ` -- :ref:`Kotlin API Reference ` -- :ref:`Objective-C API Reference ` -- :ref:`Swift API Reference ` +- `C# API Reference (.NET) `__ +- `C++ API Reference (Doxygen) `__ +- `Dart API Reference `__ +- `Java API Reference `__ +- `Java (Kotlin Extensions) API Reference `__ +- `JavaScript API Reference (JavaScript & TypeScript) `__ +- `Kotlin API Reference `__ +- `Objective-C API Reference `__ +- `Swift API Reference `__ diff --git a/source/sdk/crud/create.txt b/source/sdk/crud/create.txt index 89a155572a..05f1debc6f 100644 --- a/source/sdk/crud/create.txt +++ b/source/sdk/crud/create.txt @@ -216,7 +216,7 @@ Model ````` For more information about modeling an object, refer to: -:ref:`sdk-define-a-new-object-type`. +:ref:`sdks-object-models`. .. include:: /includes/sdk-examples/crud/create-realm-object-model.rst @@ -366,3 +366,13 @@ For more information about modeling an asymmetric object, refer to: :ref:`sdks-asymmetric-objects`. .. include:: /includes/sdk-examples/crud/create-asymmetric-object-model.rst + +.. _sdks-create-unmanaged-copy: + +Create an Unmanaged Copy of an Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-upsert-an-object: + +Create or Update an Object (Upsert) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/crud/query-engines/filter-data-swift-sdk.txt b/source/sdk/crud/query-engines/filter-data-swift-sdk.txt index dd68cd6d02..91009f689d 100644 --- a/source/sdk/crud/query-engines/filter-data-swift-sdk.txt +++ b/source/sdk/crud/query-engines/filter-data-swift-sdk.txt @@ -21,3 +21,9 @@ Filter Data - Swift SDK :class: singlecol Placeholder page for Swift query engine details. + +- Remove the *many* ref targets here and settle on the most relevant ones for + each section. + +.. _ios-nspredicate-query: +.. _swift-query-geospatial: \ No newline at end of file diff --git a/source/sdk/crud/query-engines/realm-query-language.txt b/source/sdk/crud/query-engines/realm-query-language.txt index 8e09f1eb3f..76ec0e0b27 100644 --- a/source/sdk/crud/query-engines/realm-query-language.txt +++ b/source/sdk/crud/query-engines/realm-query-language.txt @@ -35,54 +35,14 @@ Some SDKs also support idiomatic APIs for querying realms in their language. Query with Realm SDKs --------------------- -For further reading on SDK-specific methods for querying realms, see the documentation -for your SDK: - -.. tabs:: - - .. tab:: Flutter SDK - :tabid: flutter - - - :ref:`Filter & Sort Results - Flutter SDK ` - - .. tab:: Java SDK - :tabid: java - - - :ref:`Query Engine - Java SDK ` - - :ref:`Query with Realm Query Language - Java SDK ` - - .. tab:: Kotlin SDK - :tabid: kotlin - - - :ref:`Filter Data - Kotlin SDK ` - - .. tab:: .NET SDK - :tabid: dotnet - - - :ref:`Query Engine - .NET SDK ` - - .. tab:: Node.JS SDK - :tabid: node - - - :ref:`Query Engine - Node.Js SDK ` - - :ref:`Filter Queries - Node.Js SDK ` - - .. tab:: React Native SDK - :tabid: react-native - - - :ref:`Query Engine - React Native SDK ` - - :ref:`Filter Queries - React Native SDK ` - - .. tab:: C++ SDK - :tabid: cpp - - The C++ SDK currently implements only a subset of RQL. For examples - querying Realm in the C++ SDK, refer to: - - - :ref:`Filter Data - C++ SDK ` +For language and SDK-specific methods for querying data, refer to the related +documentation: +- :ref:`sdks-crud-read` +- :ref:`Fluent Interface (Java SDK) ` +- :ref:`LINQ (.NET SDK) ` +- :ref:`Type-Safe and NSPredicate Queries (Swift SDK) ` - .. note:: Swift SDK does not support Realm Query Language The Swift SDK does not support querying with Realm Query Language. @@ -892,15 +852,7 @@ Full Text Search You can use RQL to query on properties that have a full-text search (FTS) annotation. FTS supports boolean match word searches, rather than searches for relevance. -For information on enabling FTS on a property, see the FTS documentation for -your SDK: - -- :ref:`Flutter SDK ` -- :ref:`Kotlin SDK ` -- :ref:`.NET SDK ` -- :ref:`Node.js SDK ` -- :ref:`React Native SDK ` -- Swift SDK does not yet support Full-Text Search. +For information on enabling FTS on a property, refer to :ref:`sdks-fts-property`. To query these properties, use the ``TEXT`` predicate in your query. diff --git a/source/sdk/files/configure-and-open.txt b/source/sdk/files/configure-and-open.txt index d44b190609..2d15768a84 100644 --- a/source/sdk/files/configure-and-open.txt +++ b/source/sdk/files/configure-and-open.txt @@ -19,3 +19,14 @@ Configure & Open a Database File :class: singlecol Placeholder page for configuring and opening a realm. + +.. _sdks-file-schema: + +File Schema +~~~~~~~~~~~ + +Placeholder for concept information about the database file schema (realm +schema). i.e. it's a collection of all the object schemas that the database +file can manage. Some SDKs require explicit realm file schemas, while others +automatically manage schemas for any object in your project, and you can +specify a subset of schemas (objects) when opening a realm. diff --git a/source/sdk/model-data/object-models.txt b/source/sdk/model-data/object-models.txt index 7439782093..a25708ff63 100644 --- a/source/sdk/model-data/object-models.txt +++ b/source/sdk/model-data/object-models.txt @@ -10,18 +10,38 @@ Define an SDK Object Model :depth: 3 :class: singlecol +.. _sdks-define-objects: + +Define an SDK Object +-------------------- + Placeholder page for defining an object model. .. _sdks-embedded-objects: Define an Embedded Object -------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~ Placeholder for defining an embedded object, so we have a ref target to link to. .. _sdks-asymmetric-objects: Define an Asymmetric Object ---------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~ Placeholder for defining an asymmetric object, so we have a ref target to link to. + +.. _sdks-define-geospatial-object: + +Define a Geospatial Object +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-define-special-property-types: + +Define Special Property Types +----------------------------- + +.. _sdks-fts-property: + +Define a Full-Text Search Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/sync/event-library.txt b/source/sdk/sync/event-library.txt index ca05786165..d6658e1bb0 100644 --- a/source/sdk/sync/event-library.txt +++ b/source/sdk/sync/event-library.txt @@ -213,7 +213,7 @@ JSON Object Serialization ~~~~~~~~~~~~~~~~~~~~~~~~~ The Event Library converts each event object to a JSON object. Most -:ref:`Realm types ` have an +:ref:`Realm types ` have an analogous JSON representation. For example, a Realm String property becomes a JSON String. diff --git a/source/stitch/index.txt b/source/stitch/index.txt index 45cd48ae34..1d1a045540 100644 --- a/source/stitch/index.txt +++ b/source/stitch/index.txt @@ -10,7 +10,6 @@ MongoDB Stitch (Legacy) :titlesonly: :hidden: - Migrate Your Stitch App to Realm (Legacy) Stitch Documentation (Legacy) Stitch JavaScript Browser SDK (Legacy) Stitch Java/Android SDK @@ -18,8 +17,6 @@ MongoDB Stitch (Legacy) (Legacy) Stitch React Native SDK (Legacy) Stitch JavaScript Server SDK -- :doc:`Migrate Your Stitch App to Realm ` - Stitch Documentation Archives ----------------------------- diff --git a/source/studio/explore-realm-file.txt b/source/studio/explore-realm-file.txt index 68feefb904..4d8c20b20b 100644 --- a/source/studio/explore-realm-file.txt +++ b/source/studio/explore-realm-file.txt @@ -52,7 +52,7 @@ tool to: - Validate the data in the realm file The Realm Studio query bar at the top of the main pane -accepts the :ref:`Realm JavaScript query syntax`. +accepts the :ref:`Realm Query Language query syntax `. You can query using: - Comparison operators diff --git a/source/studio/modify-schema.txt b/source/studio/modify-schema.txt index 4b060d53f0..c524114b66 100644 --- a/source/studio/modify-schema.txt +++ b/source/studio/modify-schema.txt @@ -16,8 +16,8 @@ Overview Realm Studio gives you tools to make non-breaking changes to your schema. You can: -- :ref:`Add classes to the schema` -- :ref:`Add properties to classes` +- :ref:`Add classes to the schema ` +- :ref:`Add properties to classes ` .. important:: @@ -112,36 +112,5 @@ Realm requires you to increment the version monotonically when you change the schema. If you try to open a realm with an updated object schema without migrating, your client will throw an error. -For instructions on how to complete this migration, consult your SDK's -migration guide. - -.. tabs-realm-sdks:: - - .. tab:: - :tabid: android - - :ref:`Schema Versions & Migrations - Realm Java SDK ` - - .. tab:: - :tabid: ios - - :ref:`Schema Versions & Migrations - Realm Swift SDK ` - - .. tab:: - :tabid: node - - :ref:`Schema Versions & Migrations - Realm Node.js SDK ` - - .. tab:: - :tabid: react-native - - :ref:`Schema Versions & Migrations - Realm React Native SDK ` - - .. tab:: - :tabid: dotnet - - :ref:`Schema Versions & Migrations - Realm .NET SDK ` - .. tab:: - :tabid: flutter - - :ref:`Schema Versions & Migrations - Realm Flutter SDK ` +For instructions on how to complete this migration, refer to +:ref:`sdks-change-object-model`. diff --git a/source/sdk/temp/cpp.txt b/temp/cpp.txt similarity index 100% rename from source/sdk/temp/cpp.txt rename to temp/cpp.txt diff --git a/source/sdk/temp/cpp/app-services/call-a-function.txt b/temp/cpp/app-services/call-a-function.txt similarity index 100% rename from source/sdk/temp/cpp/app-services/call-a-function.txt rename to temp/cpp/app-services/call-a-function.txt diff --git a/source/sdk/temp/cpp/app-services/connect-to-app.txt b/temp/cpp/app-services/connect-to-app.txt similarity index 100% rename from source/sdk/temp/cpp/app-services/connect-to-app.txt rename to temp/cpp/app-services/connect-to-app.txt diff --git a/source/sdk/temp/cpp/application-services.txt b/temp/cpp/application-services.txt similarity index 100% rename from source/sdk/temp/cpp/application-services.txt rename to temp/cpp/application-services.txt diff --git a/source/sdk/temp/cpp/crud.txt b/temp/cpp/crud.txt similarity index 100% rename from source/sdk/temp/cpp/crud.txt rename to temp/cpp/crud.txt diff --git a/source/sdk/temp/cpp/crud/create.txt b/temp/cpp/crud/create.txt similarity index 100% rename from source/sdk/temp/cpp/crud/create.txt rename to temp/cpp/crud/create.txt diff --git a/source/sdk/temp/cpp/crud/delete.txt b/temp/cpp/crud/delete.txt similarity index 100% rename from source/sdk/temp/cpp/crud/delete.txt rename to temp/cpp/crud/delete.txt diff --git a/source/sdk/temp/cpp/crud/filter-data.txt b/temp/cpp/crud/filter-data.txt similarity index 100% rename from source/sdk/temp/cpp/crud/filter-data.txt rename to temp/cpp/crud/filter-data.txt diff --git a/source/sdk/temp/cpp/crud/read.txt b/temp/cpp/crud/read.txt similarity index 100% rename from source/sdk/temp/cpp/crud/read.txt rename to temp/cpp/crud/read.txt diff --git a/source/sdk/temp/cpp/crud/threading.txt b/temp/cpp/crud/threading.txt similarity index 100% rename from source/sdk/temp/cpp/crud/threading.txt rename to temp/cpp/crud/threading.txt diff --git a/source/sdk/temp/cpp/crud/update.txt b/temp/cpp/crud/update.txt similarity index 100% rename from source/sdk/temp/cpp/crud/update.txt rename to temp/cpp/crud/update.txt diff --git a/source/sdk/temp/cpp/facets.toml b/temp/cpp/facets.toml similarity index 100% rename from source/sdk/temp/cpp/facets.toml rename to temp/cpp/facets.toml diff --git a/source/sdk/temp/cpp/install.txt b/temp/cpp/install.txt similarity index 100% rename from source/sdk/temp/cpp/install.txt rename to temp/cpp/install.txt diff --git a/source/sdk/temp/cpp/logging.txt b/temp/cpp/logging.txt similarity index 100% rename from source/sdk/temp/cpp/logging.txt rename to temp/cpp/logging.txt diff --git a/source/sdk/temp/cpp/manage-users.txt b/temp/cpp/manage-users.txt similarity index 100% rename from source/sdk/temp/cpp/manage-users.txt rename to temp/cpp/manage-users.txt diff --git a/source/sdk/temp/cpp/model-data.txt b/temp/cpp/model-data.txt similarity index 100% rename from source/sdk/temp/cpp/model-data.txt rename to temp/cpp/model-data.txt diff --git a/source/sdk/temp/cpp/model-data/object-models.txt b/temp/cpp/model-data/object-models.txt similarity index 100% rename from source/sdk/temp/cpp/model-data/object-models.txt rename to temp/cpp/model-data/object-models.txt diff --git a/source/sdk/temp/cpp/model-data/relationships.txt b/temp/cpp/model-data/relationships.txt similarity index 100% rename from source/sdk/temp/cpp/model-data/relationships.txt rename to temp/cpp/model-data/relationships.txt diff --git a/source/sdk/temp/cpp/model-data/supported-types.txt b/temp/cpp/model-data/supported-types.txt similarity index 100% rename from source/sdk/temp/cpp/model-data/supported-types.txt rename to temp/cpp/model-data/supported-types.txt diff --git a/source/sdk/temp/cpp/quick-start.txt b/temp/cpp/quick-start.txt similarity index 100% rename from source/sdk/temp/cpp/quick-start.txt rename to temp/cpp/quick-start.txt diff --git a/source/sdk/temp/cpp/react-to-changes.txt b/temp/cpp/react-to-changes.txt similarity index 100% rename from source/sdk/temp/cpp/react-to-changes.txt rename to temp/cpp/react-to-changes.txt diff --git a/source/sdk/temp/cpp/realm-files.txt b/temp/cpp/realm-files.txt similarity index 100% rename from source/sdk/temp/cpp/realm-files.txt rename to temp/cpp/realm-files.txt diff --git a/source/sdk/temp/cpp/realm-files/compact-realm.txt b/temp/cpp/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/temp/cpp/realm-files/compact-realm.txt rename to temp/cpp/realm-files/compact-realm.txt diff --git a/source/sdk/temp/cpp/realm-files/configure-and-open-a-realm.txt b/temp/cpp/realm-files/configure-and-open-a-realm.txt similarity index 100% rename from source/sdk/temp/cpp/realm-files/configure-and-open-a-realm.txt rename to temp/cpp/realm-files/configure-and-open-a-realm.txt diff --git a/source/sdk/temp/cpp/realm-files/encrypt-a-realm.txt b/temp/cpp/realm-files/encrypt-a-realm.txt similarity index 100% rename from source/sdk/temp/cpp/realm-files/encrypt-a-realm.txt rename to temp/cpp/realm-files/encrypt-a-realm.txt diff --git a/source/sdk/temp/cpp/sync.txt b/temp/cpp/sync.txt similarity index 100% rename from source/sdk/temp/cpp/sync.txt rename to temp/cpp/sync.txt diff --git a/source/sdk/temp/cpp/sync/handle-sync-errors.txt b/temp/cpp/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/temp/cpp/sync/handle-sync-errors.txt rename to temp/cpp/sync/handle-sync-errors.txt diff --git a/source/sdk/temp/cpp/sync/log-level.txt b/temp/cpp/sync/log-level.txt similarity index 100% rename from source/sdk/temp/cpp/sync/log-level.txt rename to temp/cpp/sync/log-level.txt diff --git a/source/sdk/temp/cpp/sync/manage-sync-session.txt b/temp/cpp/sync/manage-sync-session.txt similarity index 100% rename from source/sdk/temp/cpp/sync/manage-sync-session.txt rename to temp/cpp/sync/manage-sync-session.txt diff --git a/source/sdk/temp/cpp/sync/stream-data-to-atlas.txt b/temp/cpp/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/temp/cpp/sync/stream-data-to-atlas.txt rename to temp/cpp/sync/stream-data-to-atlas.txt diff --git a/source/sdk/temp/cpp/sync/sync-subscriptions.txt b/temp/cpp/sync/sync-subscriptions.txt similarity index 100% rename from source/sdk/temp/cpp/sync/sync-subscriptions.txt rename to temp/cpp/sync/sync-subscriptions.txt diff --git a/source/sdk/temp/cpp/sync/write-to-synced-realm.txt b/temp/cpp/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/temp/cpp/sync/write-to-synced-realm.txt rename to temp/cpp/sync/write-to-synced-realm.txt diff --git a/source/sdk/temp/cpp/telemetry.txt b/temp/cpp/telemetry.txt similarity index 100% rename from source/sdk/temp/cpp/telemetry.txt rename to temp/cpp/telemetry.txt diff --git a/source/sdk/temp/cpp/users/authenticate-users.txt b/temp/cpp/users/authenticate-users.txt similarity index 100% rename from source/sdk/temp/cpp/users/authenticate-users.txt rename to temp/cpp/users/authenticate-users.txt diff --git a/source/sdk/temp/cpp/users/custom-user-data.txt b/temp/cpp/users/custom-user-data.txt similarity index 100% rename from source/sdk/temp/cpp/users/custom-user-data.txt rename to temp/cpp/users/custom-user-data.txt diff --git a/source/sdk/temp/cpp/users/manage-email-password-users.txt b/temp/cpp/users/manage-email-password-users.txt similarity index 100% rename from source/sdk/temp/cpp/users/manage-email-password-users.txt rename to temp/cpp/users/manage-email-password-users.txt diff --git a/source/sdk/temp/dotnet.txt b/temp/dotnet.txt similarity index 100% rename from source/sdk/temp/dotnet.txt rename to temp/dotnet.txt diff --git a/source/sdk/temp/dotnet/app-services/call-a-function.txt b/temp/dotnet/app-services/call-a-function.txt similarity index 100% rename from source/sdk/temp/dotnet/app-services/call-a-function.txt rename to temp/dotnet/app-services/call-a-function.txt diff --git a/source/sdk/temp/dotnet/app-services/connect-to-app-services-backend.txt b/temp/dotnet/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/temp/dotnet/app-services/connect-to-app-services-backend.txt rename to temp/dotnet/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/temp/dotnet/app-services/manage-user-api-keys.txt b/temp/dotnet/app-services/manage-user-api-keys.txt similarity index 100% rename from source/sdk/temp/dotnet/app-services/manage-user-api-keys.txt rename to temp/dotnet/app-services/manage-user-api-keys.txt diff --git a/source/sdk/temp/dotnet/app-services/mongodb-remote-access.txt b/temp/dotnet/app-services/mongodb-remote-access.txt similarity index 100% rename from source/sdk/temp/dotnet/app-services/mongodb-remote-access.txt rename to temp/dotnet/app-services/mongodb-remote-access.txt diff --git a/source/sdk/temp/dotnet/application-services.txt b/temp/dotnet/application-services.txt similarity index 100% rename from source/sdk/temp/dotnet/application-services.txt rename to temp/dotnet/application-services.txt diff --git a/source/sdk/temp/dotnet/async-console.txt b/temp/dotnet/async-console.txt similarity index 100% rename from source/sdk/temp/dotnet/async-console.txt rename to temp/dotnet/async-console.txt diff --git a/source/sdk/temp/dotnet/compatibility.txt b/temp/dotnet/compatibility.txt similarity index 100% rename from source/sdk/temp/dotnet/compatibility.txt rename to temp/dotnet/compatibility.txt diff --git a/source/sdk/temp/dotnet/crud.txt b/temp/dotnet/crud.txt similarity index 100% rename from source/sdk/temp/dotnet/crud.txt rename to temp/dotnet/crud.txt diff --git a/source/sdk/temp/dotnet/crud/create.txt b/temp/dotnet/crud/create.txt similarity index 100% rename from source/sdk/temp/dotnet/crud/create.txt rename to temp/dotnet/crud/create.txt diff --git a/source/sdk/temp/dotnet/crud/delete.txt b/temp/dotnet/crud/delete.txt similarity index 100% rename from source/sdk/temp/dotnet/crud/delete.txt rename to temp/dotnet/crud/delete.txt diff --git a/source/sdk/temp/dotnet/crud/filter.txt b/temp/dotnet/crud/filter.txt similarity index 100% rename from source/sdk/temp/dotnet/crud/filter.txt rename to temp/dotnet/crud/filter.txt diff --git a/source/sdk/temp/dotnet/crud/read.txt b/temp/dotnet/crud/read.txt similarity index 100% rename from source/sdk/temp/dotnet/crud/read.txt rename to temp/dotnet/crud/read.txt diff --git a/source/sdk/temp/dotnet/crud/threading.txt b/temp/dotnet/crud/threading.txt similarity index 100% rename from source/sdk/temp/dotnet/crud/threading.txt rename to temp/dotnet/crud/threading.txt diff --git a/source/sdk/temp/dotnet/crud/update.txt b/temp/dotnet/crud/update.txt similarity index 100% rename from source/sdk/temp/dotnet/crud/update.txt rename to temp/dotnet/crud/update.txt diff --git a/source/sdk/temp/dotnet/crud/write-transactions.txt b/temp/dotnet/crud/write-transactions.txt similarity index 100% rename from source/sdk/temp/dotnet/crud/write-transactions.txt rename to temp/dotnet/crud/write-transactions.txt diff --git a/source/sdk/temp/dotnet/facets.toml b/temp/dotnet/facets.toml similarity index 100% rename from source/sdk/temp/dotnet/facets.toml rename to temp/dotnet/facets.toml diff --git a/source/sdk/temp/dotnet/install.txt b/temp/dotnet/install.txt similarity index 100% rename from source/sdk/temp/dotnet/install.txt rename to temp/dotnet/install.txt diff --git a/source/sdk/temp/dotnet/logging.txt b/temp/dotnet/logging.txt similarity index 100% rename from source/sdk/temp/dotnet/logging.txt rename to temp/dotnet/logging.txt diff --git a/source/sdk/temp/dotnet/manage-users/authenticate.txt b/temp/dotnet/manage-users/authenticate.txt similarity index 100% rename from source/sdk/temp/dotnet/manage-users/authenticate.txt rename to temp/dotnet/manage-users/authenticate.txt diff --git a/source/sdk/temp/dotnet/manage-users/create-and-delete-users.txt b/temp/dotnet/manage-users/create-and-delete-users.txt similarity index 100% rename from source/sdk/temp/dotnet/manage-users/create-and-delete-users.txt rename to temp/dotnet/manage-users/create-and-delete-users.txt diff --git a/source/sdk/temp/dotnet/manage-users/custom-user-data.txt b/temp/dotnet/manage-users/custom-user-data.txt similarity index 100% rename from source/sdk/temp/dotnet/manage-users/custom-user-data.txt rename to temp/dotnet/manage-users/custom-user-data.txt diff --git a/source/sdk/temp/dotnet/manage-users/link-user-identities.txt b/temp/dotnet/manage-users/link-user-identities.txt similarity index 100% rename from source/sdk/temp/dotnet/manage-users/link-user-identities.txt rename to temp/dotnet/manage-users/link-user-identities.txt diff --git a/source/sdk/temp/dotnet/manage-users/manage-email-password-users.txt b/temp/dotnet/manage-users/manage-email-password-users.txt similarity index 100% rename from source/sdk/temp/dotnet/manage-users/manage-email-password-users.txt rename to temp/dotnet/manage-users/manage-email-password-users.txt diff --git a/source/sdk/temp/dotnet/manage-users/multi-user-applications.txt b/temp/dotnet/manage-users/multi-user-applications.txt similarity index 100% rename from source/sdk/temp/dotnet/manage-users/multi-user-applications.txt rename to temp/dotnet/manage-users/multi-user-applications.txt diff --git a/source/sdk/temp/dotnet/manage-users/user-metadata.txt b/temp/dotnet/manage-users/user-metadata.txt similarity index 100% rename from source/sdk/temp/dotnet/manage-users/user-metadata.txt rename to temp/dotnet/manage-users/user-metadata.txt diff --git a/source/sdk/temp/dotnet/model-data.txt b/temp/dotnet/model-data.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data.txt rename to temp/dotnet/model-data.txt diff --git a/source/sdk/temp/dotnet/model-data/change-an-object-model.txt b/temp/dotnet/model-data/change-an-object-model.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/change-an-object-model.txt rename to temp/dotnet/model-data/change-an-object-model.txt diff --git a/source/sdk/temp/dotnet/model-data/data-binding.txt b/temp/dotnet/model-data/data-binding.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-binding.txt rename to temp/dotnet/model-data/data-binding.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types.txt b/temp/dotnet/model-data/data-types.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types.txt rename to temp/dotnet/model-data/data-types.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/collections.txt b/temp/dotnet/model-data/data-types/collections.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/collections.txt rename to temp/dotnet/model-data/data-types/collections.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/dictionaries.txt b/temp/dotnet/model-data/data-types/dictionaries.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/dictionaries.txt rename to temp/dotnet/model-data/data-types/dictionaries.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/embedded-objects.txt b/temp/dotnet/model-data/data-types/embedded-objects.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/embedded-objects.txt rename to temp/dotnet/model-data/data-types/embedded-objects.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/field-types.txt b/temp/dotnet/model-data/data-types/field-types.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/field-types.txt rename to temp/dotnet/model-data/data-types/field-types.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/geospatials.txt b/temp/dotnet/model-data/data-types/geospatials.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/geospatials.txt rename to temp/dotnet/model-data/data-types/geospatials.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/lists.txt b/temp/dotnet/model-data/data-types/lists.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/lists.txt rename to temp/dotnet/model-data/data-types/lists.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/realm-integer.txt b/temp/dotnet/model-data/data-types/realm-integer.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/realm-integer.txt rename to temp/dotnet/model-data/data-types/realm-integer.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/realm-value.txt b/temp/dotnet/model-data/data-types/realm-value.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/realm-value.txt rename to temp/dotnet/model-data/data-types/realm-value.txt diff --git a/source/sdk/temp/dotnet/model-data/data-types/sets.txt b/temp/dotnet/model-data/data-types/sets.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/data-types/sets.txt rename to temp/dotnet/model-data/data-types/sets.txt diff --git a/source/sdk/temp/dotnet/model-data/define-object-model.txt b/temp/dotnet/model-data/define-object-model.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/define-object-model.txt rename to temp/dotnet/model-data/define-object-model.txt diff --git a/source/sdk/temp/dotnet/model-data/manual-schema.txt b/temp/dotnet/model-data/manual-schema.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/manual-schema.txt rename to temp/dotnet/model-data/manual-schema.txt diff --git a/source/sdk/temp/dotnet/model-data/object-models-and-schemas.txt b/temp/dotnet/model-data/object-models-and-schemas.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/object-models-and-schemas.txt rename to temp/dotnet/model-data/object-models-and-schemas.txt diff --git a/source/sdk/temp/dotnet/model-data/relationships.txt b/temp/dotnet/model-data/relationships.txt similarity index 100% rename from source/sdk/temp/dotnet/model-data/relationships.txt rename to temp/dotnet/model-data/relationships.txt diff --git a/source/sdk/temp/dotnet/quick-start.txt b/temp/dotnet/quick-start.txt similarity index 100% rename from source/sdk/temp/dotnet/quick-start.txt rename to temp/dotnet/quick-start.txt diff --git a/source/sdk/temp/dotnet/react-to-changes.txt b/temp/dotnet/react-to-changes.txt similarity index 100% rename from source/sdk/temp/dotnet/react-to-changes.txt rename to temp/dotnet/react-to-changes.txt diff --git a/source/sdk/temp/dotnet/realm-files.txt b/temp/dotnet/realm-files.txt similarity index 100% rename from source/sdk/temp/dotnet/realm-files.txt rename to temp/dotnet/realm-files.txt diff --git a/source/sdk/temp/dotnet/realm-files/bundle-a-realm.txt b/temp/dotnet/realm-files/bundle-a-realm.txt similarity index 100% rename from source/sdk/temp/dotnet/realm-files/bundle-a-realm.txt rename to temp/dotnet/realm-files/bundle-a-realm.txt diff --git a/source/sdk/temp/dotnet/realm-files/compact-realm.txt b/temp/dotnet/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/temp/dotnet/realm-files/compact-realm.txt rename to temp/dotnet/realm-files/compact-realm.txt diff --git a/source/sdk/temp/dotnet/realm-files/delete-a-realm.txt b/temp/dotnet/realm-files/delete-a-realm.txt similarity index 100% rename from source/sdk/temp/dotnet/realm-files/delete-a-realm.txt rename to temp/dotnet/realm-files/delete-a-realm.txt diff --git a/source/sdk/temp/dotnet/realm-files/encrypt-a-realm.txt b/temp/dotnet/realm-files/encrypt-a-realm.txt similarity index 100% rename from source/sdk/temp/dotnet/realm-files/encrypt-a-realm.txt rename to temp/dotnet/realm-files/encrypt-a-realm.txt diff --git a/source/sdk/temp/dotnet/realm-files/realms.txt b/temp/dotnet/realm-files/realms.txt similarity index 100% rename from source/sdk/temp/dotnet/realm-files/realms.txt rename to temp/dotnet/realm-files/realms.txt diff --git a/source/sdk/temp/dotnet/sync.txt b/temp/dotnet/sync.txt similarity index 100% rename from source/sdk/temp/dotnet/sync.txt rename to temp/dotnet/sync.txt diff --git a/source/sdk/temp/dotnet/sync/add-sync-to-app.txt b/temp/dotnet/sync/add-sync-to-app.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/add-sync-to-app.txt rename to temp/dotnet/sync/add-sync-to-app.txt diff --git a/source/sdk/temp/dotnet/sync/asymmetric-sync.txt b/temp/dotnet/sync/asymmetric-sync.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/asymmetric-sync.txt rename to temp/dotnet/sync/asymmetric-sync.txt diff --git a/source/sdk/temp/dotnet/sync/client-reset.txt b/temp/dotnet/sync/client-reset.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/client-reset.txt rename to temp/dotnet/sync/client-reset.txt diff --git a/source/sdk/temp/dotnet/sync/configure-and-open-a-synced-realm.txt b/temp/dotnet/sync/configure-and-open-a-synced-realm.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/configure-and-open-a-synced-realm.txt rename to temp/dotnet/sync/configure-and-open-a-synced-realm.txt diff --git a/source/sdk/temp/dotnet/sync/convert-realm.txt b/temp/dotnet/sync/convert-realm.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/convert-realm.txt rename to temp/dotnet/sync/convert-realm.txt diff --git a/source/sdk/temp/dotnet/sync/flexible-sync.txt b/temp/dotnet/sync/flexible-sync.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/flexible-sync.txt rename to temp/dotnet/sync/flexible-sync.txt diff --git a/source/sdk/temp/dotnet/sync/handle-sync-errors.txt b/temp/dotnet/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/handle-sync-errors.txt rename to temp/dotnet/sync/handle-sync-errors.txt diff --git a/source/sdk/temp/dotnet/sync/partition-based-sync.txt b/temp/dotnet/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/partition-based-sync.txt rename to temp/dotnet/sync/partition-based-sync.txt diff --git a/source/sdk/temp/dotnet/sync/sync-progress.txt b/temp/dotnet/sync/sync-progress.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/sync-progress.txt rename to temp/dotnet/sync/sync-progress.txt diff --git a/source/sdk/temp/dotnet/sync/sync-session.txt b/temp/dotnet/sync/sync-session.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/sync-session.txt rename to temp/dotnet/sync/sync-session.txt diff --git a/source/sdk/temp/dotnet/sync/write-to-synced-realm.txt b/temp/dotnet/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/temp/dotnet/sync/write-to-synced-realm.txt rename to temp/dotnet/sync/write-to-synced-realm.txt diff --git a/source/sdk/temp/dotnet/telemetry.txt b/temp/dotnet/telemetry.txt similarity index 100% rename from source/sdk/temp/dotnet/telemetry.txt rename to temp/dotnet/telemetry.txt diff --git a/source/sdk/temp/dotnet/troubleshooting.txt b/temp/dotnet/troubleshooting.txt similarity index 100% rename from source/sdk/temp/dotnet/troubleshooting.txt rename to temp/dotnet/troubleshooting.txt diff --git a/source/sdk/temp/dotnet/unity.txt b/temp/dotnet/unity.txt similarity index 100% rename from source/sdk/temp/dotnet/unity.txt rename to temp/dotnet/unity.txt diff --git a/source/sdk/temp/dotnet/work-with-users.txt b/temp/dotnet/work-with-users.txt similarity index 100% rename from source/sdk/temp/dotnet/work-with-users.txt rename to temp/dotnet/work-with-users.txt diff --git a/source/sdk/temp/flutter.txt b/temp/flutter.txt similarity index 100% rename from source/sdk/temp/flutter.txt rename to temp/flutter.txt diff --git a/source/sdk/temp/flutter/app-services.txt b/temp/flutter/app-services.txt similarity index 100% rename from source/sdk/temp/flutter/app-services.txt rename to temp/flutter/app-services.txt diff --git a/source/sdk/temp/flutter/app-services/call-function.txt b/temp/flutter/app-services/call-function.txt similarity index 100% rename from source/sdk/temp/flutter/app-services/call-function.txt rename to temp/flutter/app-services/call-function.txt diff --git a/source/sdk/temp/flutter/app-services/connect-to-app.txt b/temp/flutter/app-services/connect-to-app.txt similarity index 100% rename from source/sdk/temp/flutter/app-services/connect-to-app.txt rename to temp/flutter/app-services/connect-to-app.txt diff --git a/source/sdk/temp/flutter/app-services/graphql-api.txt b/temp/flutter/app-services/graphql-api.txt similarity index 100% rename from source/sdk/temp/flutter/app-services/graphql-api.txt rename to temp/flutter/app-services/graphql-api.txt diff --git a/source/sdk/temp/flutter/crud.txt b/temp/flutter/crud.txt similarity index 100% rename from source/sdk/temp/flutter/crud.txt rename to temp/flutter/crud.txt diff --git a/source/sdk/temp/flutter/crud/create.txt b/temp/flutter/crud/create.txt similarity index 100% rename from source/sdk/temp/flutter/crud/create.txt rename to temp/flutter/crud/create.txt diff --git a/source/sdk/temp/flutter/crud/delete.txt b/temp/flutter/crud/delete.txt similarity index 100% rename from source/sdk/temp/flutter/crud/delete.txt rename to temp/flutter/crud/delete.txt diff --git a/source/sdk/temp/flutter/crud/read.txt b/temp/flutter/crud/read.txt similarity index 100% rename from source/sdk/temp/flutter/crud/read.txt rename to temp/flutter/crud/read.txt diff --git a/source/sdk/temp/flutter/crud/update.txt b/temp/flutter/crud/update.txt similarity index 100% rename from source/sdk/temp/flutter/crud/update.txt rename to temp/flutter/crud/update.txt diff --git a/source/sdk/temp/flutter/facets.toml b/temp/flutter/facets.toml similarity index 100% rename from source/sdk/temp/flutter/facets.toml rename to temp/flutter/facets.toml diff --git a/source/sdk/temp/flutter/install.txt b/temp/flutter/install.txt similarity index 100% rename from source/sdk/temp/flutter/install.txt rename to temp/flutter/install.txt diff --git a/source/sdk/temp/flutter/logging.txt b/temp/flutter/logging.txt similarity index 100% rename from source/sdk/temp/flutter/logging.txt rename to temp/flutter/logging.txt diff --git a/source/sdk/temp/flutter/quick-start.txt b/temp/flutter/quick-start.txt similarity index 100% rename from source/sdk/temp/flutter/quick-start.txt rename to temp/flutter/quick-start.txt diff --git a/source/sdk/temp/flutter/realm-database.txt b/temp/flutter/realm-database.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database.txt rename to temp/flutter/realm-database.txt diff --git a/source/sdk/temp/flutter/realm-database/configure-and-open.txt b/temp/flutter/realm-database/configure-and-open.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/configure-and-open.txt rename to temp/flutter/realm-database/configure-and-open.txt diff --git a/source/sdk/temp/flutter/realm-database/freeze.txt b/temp/flutter/realm-database/freeze.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/freeze.txt rename to temp/flutter/realm-database/freeze.txt diff --git a/source/sdk/temp/flutter/realm-database/model-data.txt b/temp/flutter/realm-database/model-data.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/model-data.txt rename to temp/flutter/realm-database/model-data.txt diff --git a/source/sdk/temp/flutter/realm-database/model-data/data-types.txt b/temp/flutter/realm-database/model-data/data-types.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/model-data/data-types.txt rename to temp/flutter/realm-database/model-data/data-types.txt diff --git a/source/sdk/temp/flutter/realm-database/model-data/define-realm-object-schema.txt b/temp/flutter/realm-database/model-data/define-realm-object-schema.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/model-data/define-realm-object-schema.txt rename to temp/flutter/realm-database/model-data/define-realm-object-schema.txt diff --git a/source/sdk/temp/flutter/realm-database/model-data/geospatial.txt b/temp/flutter/realm-database/model-data/geospatial.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/model-data/geospatial.txt rename to temp/flutter/realm-database/model-data/geospatial.txt diff --git a/source/sdk/temp/flutter/realm-database/model-data/property-annotations.txt b/temp/flutter/realm-database/model-data/property-annotations.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/model-data/property-annotations.txt rename to temp/flutter/realm-database/model-data/property-annotations.txt diff --git a/source/sdk/temp/flutter/realm-database/model-data/relationships.txt b/temp/flutter/realm-database/model-data/relationships.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/model-data/relationships.txt rename to temp/flutter/realm-database/model-data/relationships.txt diff --git a/source/sdk/temp/flutter/realm-database/model-data/update-realm-object-schema.txt b/temp/flutter/realm-database/model-data/update-realm-object-schema.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/model-data/update-realm-object-schema.txt rename to temp/flutter/realm-database/model-data/update-realm-object-schema.txt diff --git a/source/sdk/temp/flutter/realm-database/react-to-changes.txt b/temp/flutter/realm-database/react-to-changes.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/react-to-changes.txt rename to temp/flutter/realm-database/react-to-changes.txt diff --git a/source/sdk/temp/flutter/realm-database/realm-files.txt b/temp/flutter/realm-database/realm-files.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/realm-files.txt rename to temp/flutter/realm-database/realm-files.txt diff --git a/source/sdk/temp/flutter/realm-database/realm-files/bundle.txt b/temp/flutter/realm-database/realm-files/bundle.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/realm-files/bundle.txt rename to temp/flutter/realm-database/realm-files/bundle.txt diff --git a/source/sdk/temp/flutter/realm-database/realm-files/compact.txt b/temp/flutter/realm-database/realm-files/compact.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/realm-files/compact.txt rename to temp/flutter/realm-database/realm-files/compact.txt diff --git a/source/sdk/temp/flutter/realm-database/realm-files/delete.txt b/temp/flutter/realm-database/realm-files/delete.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/realm-files/delete.txt rename to temp/flutter/realm-database/realm-files/delete.txt diff --git a/source/sdk/temp/flutter/realm-database/realm-files/encrypt.txt b/temp/flutter/realm-database/realm-files/encrypt.txt similarity index 100% rename from source/sdk/temp/flutter/realm-database/realm-files/encrypt.txt rename to temp/flutter/realm-database/realm-files/encrypt.txt diff --git a/source/sdk/temp/flutter/sync.txt b/temp/flutter/sync.txt similarity index 100% rename from source/sdk/temp/flutter/sync.txt rename to temp/flutter/sync.txt diff --git a/source/sdk/temp/flutter/sync/add-sync-to-app.txt b/temp/flutter/sync/add-sync-to-app.txt similarity index 100% rename from source/sdk/temp/flutter/sync/add-sync-to-app.txt rename to temp/flutter/sync/add-sync-to-app.txt diff --git a/source/sdk/temp/flutter/sync/handle-sync-errors.txt b/temp/flutter/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/temp/flutter/sync/handle-sync-errors.txt rename to temp/flutter/sync/handle-sync-errors.txt diff --git a/source/sdk/temp/flutter/sync/log-level.txt b/temp/flutter/sync/log-level.txt similarity index 100% rename from source/sdk/temp/flutter/sync/log-level.txt rename to temp/flutter/sync/log-level.txt diff --git a/source/sdk/temp/flutter/sync/manage-sync-session.txt b/temp/flutter/sync/manage-sync-session.txt similarity index 100% rename from source/sdk/temp/flutter/sync/manage-sync-session.txt rename to temp/flutter/sync/manage-sync-session.txt diff --git a/source/sdk/temp/flutter/sync/manage-sync-subscriptions.txt b/temp/flutter/sync/manage-sync-subscriptions.txt similarity index 100% rename from source/sdk/temp/flutter/sync/manage-sync-subscriptions.txt rename to temp/flutter/sync/manage-sync-subscriptions.txt diff --git a/source/sdk/temp/flutter/sync/open-synced-realm.txt b/temp/flutter/sync/open-synced-realm.txt similarity index 100% rename from source/sdk/temp/flutter/sync/open-synced-realm.txt rename to temp/flutter/sync/open-synced-realm.txt diff --git a/source/sdk/temp/flutter/sync/stream-data-to-atlas.txt b/temp/flutter/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/temp/flutter/sync/stream-data-to-atlas.txt rename to temp/flutter/sync/stream-data-to-atlas.txt diff --git a/source/sdk/temp/flutter/sync/sync-multiple-processes.txt b/temp/flutter/sync/sync-multiple-processes.txt similarity index 100% rename from source/sdk/temp/flutter/sync/sync-multiple-processes.txt rename to temp/flutter/sync/sync-multiple-processes.txt diff --git a/source/sdk/temp/flutter/sync/write-to-synced-realm.txt b/temp/flutter/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/temp/flutter/sync/write-to-synced-realm.txt rename to temp/flutter/sync/write-to-synced-realm.txt diff --git a/source/sdk/temp/flutter/telemetry.txt b/temp/flutter/telemetry.txt similarity index 100% rename from source/sdk/temp/flutter/telemetry.txt rename to temp/flutter/telemetry.txt diff --git a/source/sdk/temp/flutter/test-and-debug.txt b/temp/flutter/test-and-debug.txt similarity index 100% rename from source/sdk/temp/flutter/test-and-debug.txt rename to temp/flutter/test-and-debug.txt diff --git a/source/sdk/temp/flutter/troubleshooting.txt b/temp/flutter/troubleshooting.txt similarity index 100% rename from source/sdk/temp/flutter/troubleshooting.txt rename to temp/flutter/troubleshooting.txt diff --git a/source/sdk/temp/flutter/upgrade-to-v2.txt b/temp/flutter/upgrade-to-v2.txt similarity index 100% rename from source/sdk/temp/flutter/upgrade-to-v2.txt rename to temp/flutter/upgrade-to-v2.txt diff --git a/source/sdk/temp/flutter/users.txt b/temp/flutter/users.txt similarity index 100% rename from source/sdk/temp/flutter/users.txt rename to temp/flutter/users.txt diff --git a/source/sdk/temp/flutter/users/access-token.txt b/temp/flutter/users/access-token.txt similarity index 100% rename from source/sdk/temp/flutter/users/access-token.txt rename to temp/flutter/users/access-token.txt diff --git a/source/sdk/temp/flutter/users/authenticate.txt b/temp/flutter/users/authenticate.txt similarity index 100% rename from source/sdk/temp/flutter/users/authenticate.txt rename to temp/flutter/users/authenticate.txt diff --git a/source/sdk/temp/flutter/users/custom-user-data.txt b/temp/flutter/users/custom-user-data.txt similarity index 100% rename from source/sdk/temp/flutter/users/custom-user-data.txt rename to temp/flutter/users/custom-user-data.txt diff --git a/source/sdk/temp/flutter/users/delete-user.txt b/temp/flutter/users/delete-user.txt similarity index 100% rename from source/sdk/temp/flutter/users/delete-user.txt rename to temp/flutter/users/delete-user.txt diff --git a/source/sdk/temp/flutter/users/email-password-users.txt b/temp/flutter/users/email-password-users.txt similarity index 100% rename from source/sdk/temp/flutter/users/email-password-users.txt rename to temp/flutter/users/email-password-users.txt diff --git a/source/sdk/temp/flutter/users/link-user-identities.txt b/temp/flutter/users/link-user-identities.txt similarity index 100% rename from source/sdk/temp/flutter/users/link-user-identities.txt rename to temp/flutter/users/link-user-identities.txt diff --git a/source/sdk/temp/flutter/users/multiple-users.txt b/temp/flutter/users/multiple-users.txt similarity index 100% rename from source/sdk/temp/flutter/users/multiple-users.txt rename to temp/flutter/users/multiple-users.txt diff --git a/source/sdk/temp/flutter/users/user-metadata.txt b/temp/flutter/users/user-metadata.txt similarity index 100% rename from source/sdk/temp/flutter/users/user-metadata.txt rename to temp/flutter/users/user-metadata.txt diff --git a/source/sdk/temp/java.txt b/temp/java.txt similarity index 100% rename from source/sdk/temp/java.txt rename to temp/java.txt diff --git a/source/sdk/temp/java/adapters.txt b/temp/java/adapters.txt similarity index 100% rename from source/sdk/temp/java/adapters.txt rename to temp/java/adapters.txt diff --git a/source/sdk/temp/java/api.txt b/temp/java/api.txt similarity index 100% rename from source/sdk/temp/java/api.txt rename to temp/java/api.txt diff --git a/source/sdk/temp/java/app-services.txt b/temp/java/app-services.txt similarity index 100% rename from source/sdk/temp/java/app-services.txt rename to temp/java/app-services.txt diff --git a/source/sdk/temp/java/app-services/call-a-function.txt b/temp/java/app-services/call-a-function.txt similarity index 100% rename from source/sdk/temp/java/app-services/call-a-function.txt rename to temp/java/app-services/call-a-function.txt diff --git a/source/sdk/temp/java/app-services/connect-to-app-services-backend.txt b/temp/java/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/temp/java/app-services/connect-to-app-services-backend.txt rename to temp/java/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/temp/java/app-services/mongodb-remote-access.txt b/temp/java/app-services/mongodb-remote-access.txt similarity index 100% rename from source/sdk/temp/java/app-services/mongodb-remote-access.txt rename to temp/java/app-services/mongodb-remote-access.txt diff --git a/source/sdk/temp/java/async-api.txt b/temp/java/async-api.txt similarity index 100% rename from source/sdk/temp/java/async-api.txt rename to temp/java/async-api.txt diff --git a/source/sdk/temp/java/crud.txt b/temp/java/crud.txt similarity index 100% rename from source/sdk/temp/java/crud.txt rename to temp/java/crud.txt diff --git a/source/sdk/temp/java/crud/create.txt b/temp/java/crud/create.txt similarity index 100% rename from source/sdk/temp/java/crud/create.txt rename to temp/java/crud/create.txt diff --git a/source/sdk/temp/java/crud/delete.txt b/temp/java/crud/delete.txt similarity index 100% rename from source/sdk/temp/java/crud/delete.txt rename to temp/java/crud/delete.txt diff --git a/source/sdk/temp/java/crud/filter-data.txt b/temp/java/crud/filter-data.txt similarity index 100% rename from source/sdk/temp/java/crud/filter-data.txt rename to temp/java/crud/filter-data.txt diff --git a/source/sdk/temp/java/crud/read.txt b/temp/java/crud/read.txt similarity index 100% rename from source/sdk/temp/java/crud/read.txt rename to temp/java/crud/read.txt diff --git a/source/sdk/temp/java/crud/threading.txt b/temp/java/crud/threading.txt similarity index 100% rename from source/sdk/temp/java/crud/threading.txt rename to temp/java/crud/threading.txt diff --git a/source/sdk/temp/java/crud/update.txt b/temp/java/crud/update.txt similarity index 100% rename from source/sdk/temp/java/crud/update.txt rename to temp/java/crud/update.txt diff --git a/source/sdk/temp/java/facets.toml b/temp/java/facets.toml similarity index 100% rename from source/sdk/temp/java/facets.toml rename to temp/java/facets.toml diff --git a/source/sdk/temp/java/install.txt b/temp/java/install.txt similarity index 100% rename from source/sdk/temp/java/install.txt rename to temp/java/install.txt diff --git a/source/sdk/temp/java/manage-users.txt b/temp/java/manage-users.txt similarity index 100% rename from source/sdk/temp/java/manage-users.txt rename to temp/java/manage-users.txt diff --git a/source/sdk/temp/java/migrate/index.txt b/temp/java/migrate/index.txt similarity index 100% rename from source/sdk/temp/java/migrate/index.txt rename to temp/java/migrate/index.txt diff --git a/source/sdk/temp/java/model-data.txt b/temp/java/model-data.txt similarity index 100% rename from source/sdk/temp/java/model-data.txt rename to temp/java/model-data.txt diff --git a/source/sdk/temp/java/model-data/data-types.txt b/temp/java/model-data/data-types.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types.txt rename to temp/java/model-data/data-types.txt diff --git a/source/sdk/temp/java/model-data/data-types/collections.txt b/temp/java/model-data/data-types/collections.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types/collections.txt rename to temp/java/model-data/data-types/collections.txt diff --git a/source/sdk/temp/java/model-data/data-types/counters.txt b/temp/java/model-data/data-types/counters.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types/counters.txt rename to temp/java/model-data/data-types/counters.txt diff --git a/source/sdk/temp/java/model-data/data-types/embedded-objects.txt b/temp/java/model-data/data-types/embedded-objects.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types/embedded-objects.txt rename to temp/java/model-data/data-types/embedded-objects.txt diff --git a/source/sdk/temp/java/model-data/data-types/enums.txt b/temp/java/model-data/data-types/enums.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types/enums.txt rename to temp/java/model-data/data-types/enums.txt diff --git a/source/sdk/temp/java/model-data/data-types/field-types.txt b/temp/java/model-data/data-types/field-types.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types/field-types.txt rename to temp/java/model-data/data-types/field-types.txt diff --git a/source/sdk/temp/java/model-data/data-types/realmany.txt b/temp/java/model-data/data-types/realmany.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types/realmany.txt rename to temp/java/model-data/data-types/realmany.txt diff --git a/source/sdk/temp/java/model-data/data-types/realmdictionary.txt b/temp/java/model-data/data-types/realmdictionary.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types/realmdictionary.txt rename to temp/java/model-data/data-types/realmdictionary.txt diff --git a/source/sdk/temp/java/model-data/data-types/realmset.txt b/temp/java/model-data/data-types/realmset.txt similarity index 100% rename from source/sdk/temp/java/model-data/data-types/realmset.txt rename to temp/java/model-data/data-types/realmset.txt diff --git a/source/sdk/temp/java/model-data/define-a-realm-object-model.txt b/temp/java/model-data/define-a-realm-object-model.txt similarity index 100% rename from source/sdk/temp/java/model-data/define-a-realm-object-model.txt rename to temp/java/model-data/define-a-realm-object-model.txt diff --git a/source/sdk/temp/java/model-data/modify-an-object-schema.txt b/temp/java/model-data/modify-an-object-schema.txt similarity index 100% rename from source/sdk/temp/java/model-data/modify-an-object-schema.txt rename to temp/java/model-data/modify-an-object-schema.txt diff --git a/source/sdk/temp/java/model-data/relationships.txt b/temp/java/model-data/relationships.txt similarity index 100% rename from source/sdk/temp/java/model-data/relationships.txt rename to temp/java/model-data/relationships.txt diff --git a/source/sdk/temp/java/quick-starts.txt b/temp/java/quick-starts.txt similarity index 100% rename from source/sdk/temp/java/quick-starts.txt rename to temp/java/quick-starts.txt diff --git a/source/sdk/temp/java/quick-starts/livedata.txt b/temp/java/quick-starts/livedata.txt similarity index 100% rename from source/sdk/temp/java/quick-starts/livedata.txt rename to temp/java/quick-starts/livedata.txt diff --git a/source/sdk/temp/java/quick-starts/quick-start-local.txt b/temp/java/quick-starts/quick-start-local.txt similarity index 100% rename from source/sdk/temp/java/quick-starts/quick-start-local.txt rename to temp/java/quick-starts/quick-start-local.txt diff --git a/source/sdk/temp/java/quick-starts/quick-start-sync.txt b/temp/java/quick-starts/quick-start-sync.txt similarity index 100% rename from source/sdk/temp/java/quick-starts/quick-start-sync.txt rename to temp/java/quick-starts/quick-start-sync.txt diff --git a/source/sdk/temp/java/react-to-changes.txt b/temp/java/react-to-changes.txt similarity index 100% rename from source/sdk/temp/java/react-to-changes.txt rename to temp/java/react-to-changes.txt diff --git a/source/sdk/temp/java/realm-files.txt b/temp/java/realm-files.txt similarity index 100% rename from source/sdk/temp/java/realm-files.txt rename to temp/java/realm-files.txt diff --git a/source/sdk/temp/java/realm-files/bundle-a-realm.txt b/temp/java/realm-files/bundle-a-realm.txt similarity index 100% rename from source/sdk/temp/java/realm-files/bundle-a-realm.txt rename to temp/java/realm-files/bundle-a-realm.txt diff --git a/source/sdk/temp/java/realm-files/encryption.txt b/temp/java/realm-files/encryption.txt similarity index 100% rename from source/sdk/temp/java/realm-files/encryption.txt rename to temp/java/realm-files/encryption.txt diff --git a/source/sdk/temp/java/realm-files/open-and-close-a-realm.txt b/temp/java/realm-files/open-and-close-a-realm.txt similarity index 100% rename from source/sdk/temp/java/realm-files/open-and-close-a-realm.txt rename to temp/java/realm-files/open-and-close-a-realm.txt diff --git a/source/sdk/temp/java/sync.txt b/temp/java/sync.txt similarity index 100% rename from source/sdk/temp/java/sync.txt rename to temp/java/sync.txt diff --git a/source/sdk/temp/java/sync/background-sync.txt b/temp/java/sync/background-sync.txt similarity index 100% rename from source/sdk/temp/java/sync/background-sync.txt rename to temp/java/sync/background-sync.txt diff --git a/source/sdk/temp/java/sync/configure-and-open-a-synced-realm.txt b/temp/java/sync/configure-and-open-a-synced-realm.txt similarity index 100% rename from source/sdk/temp/java/sync/configure-and-open-a-synced-realm.txt rename to temp/java/sync/configure-and-open-a-synced-realm.txt diff --git a/source/sdk/temp/java/sync/flexible-sync.txt b/temp/java/sync/flexible-sync.txt similarity index 100% rename from source/sdk/temp/java/sync/flexible-sync.txt rename to temp/java/sync/flexible-sync.txt diff --git a/source/sdk/temp/java/sync/handle-sync-errors.txt b/temp/java/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/temp/java/sync/handle-sync-errors.txt rename to temp/java/sync/handle-sync-errors.txt diff --git a/source/sdk/temp/java/sync/manual-client-reset-data-recovery.txt b/temp/java/sync/manual-client-reset-data-recovery.txt similarity index 100% rename from source/sdk/temp/java/sync/manual-client-reset-data-recovery.txt rename to temp/java/sync/manual-client-reset-data-recovery.txt diff --git a/source/sdk/temp/java/sync/network-connection.txt b/temp/java/sync/network-connection.txt similarity index 100% rename from source/sdk/temp/java/sync/network-connection.txt rename to temp/java/sync/network-connection.txt diff --git a/source/sdk/temp/java/sync/partition-based-sync.txt b/temp/java/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/temp/java/sync/partition-based-sync.txt rename to temp/java/sync/partition-based-sync.txt diff --git a/source/sdk/temp/java/sync/pause-resume-sync.txt b/temp/java/sync/pause-resume-sync.txt similarity index 100% rename from source/sdk/temp/java/sync/pause-resume-sync.txt rename to temp/java/sync/pause-resume-sync.txt diff --git a/source/sdk/temp/java/sync/reset-a-client-realm.txt b/temp/java/sync/reset-a-client-realm.txt similarity index 100% rename from source/sdk/temp/java/sync/reset-a-client-realm.txt rename to temp/java/sync/reset-a-client-realm.txt diff --git a/source/sdk/temp/java/sync/sync-progress.txt b/temp/java/sync/sync-progress.txt similarity index 100% rename from source/sdk/temp/java/sync/sync-progress.txt rename to temp/java/sync/sync-progress.txt diff --git a/source/sdk/temp/java/telemetry.txt b/temp/java/telemetry.txt similarity index 100% rename from source/sdk/temp/java/telemetry.txt rename to temp/java/telemetry.txt diff --git a/source/sdk/temp/java/test-and-debug.txt b/temp/java/test-and-debug.txt similarity index 100% rename from source/sdk/temp/java/test-and-debug.txt rename to temp/java/test-and-debug.txt diff --git a/source/sdk/temp/java/test-and-debug/debugging.txt b/temp/java/test-and-debug/debugging.txt similarity index 100% rename from source/sdk/temp/java/test-and-debug/debugging.txt rename to temp/java/test-and-debug/debugging.txt diff --git a/source/sdk/temp/java/test-and-debug/log-realm-events.txt b/temp/java/test-and-debug/log-realm-events.txt similarity index 100% rename from source/sdk/temp/java/test-and-debug/log-realm-events.txt rename to temp/java/test-and-debug/log-realm-events.txt diff --git a/source/sdk/temp/java/test-and-debug/testing.txt b/temp/java/test-and-debug/testing.txt similarity index 100% rename from source/sdk/temp/java/test-and-debug/testing.txt rename to temp/java/test-and-debug/testing.txt diff --git a/source/sdk/temp/java/test-and-debug/troubleshooting.txt b/temp/java/test-and-debug/troubleshooting.txt similarity index 100% rename from source/sdk/temp/java/test-and-debug/troubleshooting.txt rename to temp/java/test-and-debug/troubleshooting.txt diff --git a/source/sdk/temp/java/troubleshooting.txt b/temp/java/troubleshooting.txt similarity index 100% rename from source/sdk/temp/java/troubleshooting.txt rename to temp/java/troubleshooting.txt diff --git a/source/sdk/temp/java/users/authenticate-users.txt b/temp/java/users/authenticate-users.txt similarity index 100% rename from source/sdk/temp/java/users/authenticate-users.txt rename to temp/java/users/authenticate-users.txt diff --git a/source/sdk/temp/java/users/create-delete-users.txt b/temp/java/users/create-delete-users.txt similarity index 100% rename from source/sdk/temp/java/users/create-delete-users.txt rename to temp/java/users/create-delete-users.txt diff --git a/source/sdk/temp/java/users/custom-user-data.txt b/temp/java/users/custom-user-data.txt similarity index 100% rename from source/sdk/temp/java/users/custom-user-data.txt rename to temp/java/users/custom-user-data.txt diff --git a/source/sdk/temp/java/users/email-password-users.txt b/temp/java/users/email-password-users.txt similarity index 100% rename from source/sdk/temp/java/users/email-password-users.txt rename to temp/java/users/email-password-users.txt diff --git a/source/sdk/temp/java/users/link-user-identities.txt b/temp/java/users/link-user-identities.txt similarity index 100% rename from source/sdk/temp/java/users/link-user-identities.txt rename to temp/java/users/link-user-identities.txt diff --git a/source/sdk/temp/java/users/manage-user-api-keys.txt b/temp/java/users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/temp/java/users/manage-user-api-keys.txt rename to temp/java/users/manage-user-api-keys.txt diff --git a/source/sdk/temp/java/users/multi-user-applications.txt b/temp/java/users/multi-user-applications.txt similarity index 100% rename from source/sdk/temp/java/users/multi-user-applications.txt rename to temp/java/users/multi-user-applications.txt diff --git a/source/sdk/temp/kotlin.txt b/temp/kotlin.txt similarity index 100% rename from source/sdk/temp/kotlin.txt rename to temp/kotlin.txt diff --git a/source/sdk/temp/kotlin/app-services.txt b/temp/kotlin/app-services.txt similarity index 100% rename from source/sdk/temp/kotlin/app-services.txt rename to temp/kotlin/app-services.txt diff --git a/source/sdk/temp/kotlin/app-services/call-function.txt b/temp/kotlin/app-services/call-function.txt similarity index 100% rename from source/sdk/temp/kotlin/app-services/call-function.txt rename to temp/kotlin/app-services/call-function.txt diff --git a/source/sdk/temp/kotlin/app-services/connect-to-app-services-backend.txt b/temp/kotlin/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/temp/kotlin/app-services/connect-to-app-services-backend.txt rename to temp/kotlin/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/temp/kotlin/app-services/handle-app-errors.txt b/temp/kotlin/app-services/handle-app-errors.txt similarity index 100% rename from source/sdk/temp/kotlin/app-services/handle-app-errors.txt rename to temp/kotlin/app-services/handle-app-errors.txt diff --git a/source/sdk/temp/kotlin/facets.toml b/temp/kotlin/facets.toml similarity index 100% rename from source/sdk/temp/kotlin/facets.toml rename to temp/kotlin/facets.toml diff --git a/source/sdk/temp/kotlin/install.txt b/temp/kotlin/install.txt similarity index 100% rename from source/sdk/temp/kotlin/install.txt rename to temp/kotlin/install.txt diff --git a/source/sdk/temp/kotlin/logging.txt b/temp/kotlin/logging.txt similarity index 100% rename from source/sdk/temp/kotlin/logging.txt rename to temp/kotlin/logging.txt diff --git a/source/sdk/temp/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt b/temp/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt similarity index 100% rename from source/sdk/temp/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt rename to temp/kotlin/migrate-from-java-sdk-to-kotlin-sdk.txt diff --git a/source/sdk/temp/kotlin/quick-start.txt b/temp/kotlin/quick-start.txt similarity index 100% rename from source/sdk/temp/kotlin/quick-start.txt rename to temp/kotlin/quick-start.txt diff --git a/source/sdk/temp/kotlin/realm-database.txt b/temp/kotlin/realm-database.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database.txt rename to temp/kotlin/realm-database.txt diff --git a/source/sdk/temp/kotlin/realm-database/crud.txt b/temp/kotlin/realm-database/crud.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/crud.txt rename to temp/kotlin/realm-database/crud.txt diff --git a/source/sdk/temp/kotlin/realm-database/crud/create.txt b/temp/kotlin/realm-database/crud/create.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/crud/create.txt rename to temp/kotlin/realm-database/crud/create.txt diff --git a/source/sdk/temp/kotlin/realm-database/crud/delete.txt b/temp/kotlin/realm-database/crud/delete.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/crud/delete.txt rename to temp/kotlin/realm-database/crud/delete.txt diff --git a/source/sdk/temp/kotlin/realm-database/crud/read.txt b/temp/kotlin/realm-database/crud/read.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/crud/read.txt rename to temp/kotlin/realm-database/crud/read.txt diff --git a/source/sdk/temp/kotlin/realm-database/crud/update.txt b/temp/kotlin/realm-database/crud/update.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/crud/update.txt rename to temp/kotlin/realm-database/crud/update.txt diff --git a/source/sdk/temp/kotlin/realm-database/errors.txt b/temp/kotlin/realm-database/errors.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/errors.txt rename to temp/kotlin/realm-database/errors.txt diff --git a/source/sdk/temp/kotlin/realm-database/frozen-arch.txt b/temp/kotlin/realm-database/frozen-arch.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/frozen-arch.txt rename to temp/kotlin/realm-database/frozen-arch.txt diff --git a/source/sdk/temp/kotlin/realm-database/open-and-close-a-realm.txt b/temp/kotlin/realm-database/open-and-close-a-realm.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/open-and-close-a-realm.txt rename to temp/kotlin/realm-database/open-and-close-a-realm.txt diff --git a/source/sdk/temp/kotlin/realm-database/react-to-changes.txt b/temp/kotlin/realm-database/react-to-changes.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/react-to-changes.txt rename to temp/kotlin/realm-database/react-to-changes.txt diff --git a/source/sdk/temp/kotlin/realm-database/realm-files.txt b/temp/kotlin/realm-database/realm-files.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/realm-files.txt rename to temp/kotlin/realm-database/realm-files.txt diff --git a/source/sdk/temp/kotlin/realm-database/realm-files/bundle-a-realm.txt b/temp/kotlin/realm-database/realm-files/bundle-a-realm.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/realm-files/bundle-a-realm.txt rename to temp/kotlin/realm-database/realm-files/bundle-a-realm.txt diff --git a/source/sdk/temp/kotlin/realm-database/realm-files/compact-realm.txt b/temp/kotlin/realm-database/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/realm-files/compact-realm.txt rename to temp/kotlin/realm-database/realm-files/compact-realm.txt diff --git a/source/sdk/temp/kotlin/realm-database/realm-files/delete-a-realm.txt b/temp/kotlin/realm-database/realm-files/delete-a-realm.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/realm-files/delete-a-realm.txt rename to temp/kotlin/realm-database/realm-files/delete-a-realm.txt diff --git a/source/sdk/temp/kotlin/realm-database/realm-files/encrypt-a-realm.txt b/temp/kotlin/realm-database/realm-files/encrypt-a-realm.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/realm-files/encrypt-a-realm.txt rename to temp/kotlin/realm-database/realm-files/encrypt-a-realm.txt diff --git a/source/sdk/temp/kotlin/realm-database/schemas.txt b/temp/kotlin/realm-database/schemas.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/schemas.txt rename to temp/kotlin/realm-database/schemas.txt diff --git a/source/sdk/temp/kotlin/realm-database/schemas/change-an-object-model.txt b/temp/kotlin/realm-database/schemas/change-an-object-model.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/schemas/change-an-object-model.txt rename to temp/kotlin/realm-database/schemas/change-an-object-model.txt diff --git a/source/sdk/temp/kotlin/realm-database/schemas/define-realm-object-model.txt b/temp/kotlin/realm-database/schemas/define-realm-object-model.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/schemas/define-realm-object-model.txt rename to temp/kotlin/realm-database/schemas/define-realm-object-model.txt diff --git a/source/sdk/temp/kotlin/realm-database/schemas/geospatials.txt b/temp/kotlin/realm-database/schemas/geospatials.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/schemas/geospatials.txt rename to temp/kotlin/realm-database/schemas/geospatials.txt diff --git a/source/sdk/temp/kotlin/realm-database/schemas/model-data-device-sync.txt b/temp/kotlin/realm-database/schemas/model-data-device-sync.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/schemas/model-data-device-sync.txt rename to temp/kotlin/realm-database/schemas/model-data-device-sync.txt diff --git a/source/sdk/temp/kotlin/realm-database/schemas/property-annotations.txt b/temp/kotlin/realm-database/schemas/property-annotations.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/schemas/property-annotations.txt rename to temp/kotlin/realm-database/schemas/property-annotations.txt diff --git a/source/sdk/temp/kotlin/realm-database/schemas/relationships.txt b/temp/kotlin/realm-database/schemas/relationships.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/schemas/relationships.txt rename to temp/kotlin/realm-database/schemas/relationships.txt diff --git a/source/sdk/temp/kotlin/realm-database/schemas/supported-types.txt b/temp/kotlin/realm-database/schemas/supported-types.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/schemas/supported-types.txt rename to temp/kotlin/realm-database/schemas/supported-types.txt diff --git a/source/sdk/temp/kotlin/realm-database/serialization.txt b/temp/kotlin/realm-database/serialization.txt similarity index 100% rename from source/sdk/temp/kotlin/realm-database/serialization.txt rename to temp/kotlin/realm-database/serialization.txt diff --git a/source/sdk/temp/kotlin/sync.txt b/temp/kotlin/sync.txt similarity index 100% rename from source/sdk/temp/kotlin/sync.txt rename to temp/kotlin/sync.txt diff --git a/source/sdk/temp/kotlin/sync/add-sync-to-app.txt b/temp/kotlin/sync/add-sync-to-app.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/add-sync-to-app.txt rename to temp/kotlin/sync/add-sync-to-app.txt diff --git a/source/sdk/temp/kotlin/sync/background-sync.txt b/temp/kotlin/sync/background-sync.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/background-sync.txt rename to temp/kotlin/sync/background-sync.txt diff --git a/source/sdk/temp/kotlin/sync/handle-sync-errors.txt b/temp/kotlin/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/handle-sync-errors.txt rename to temp/kotlin/sync/handle-sync-errors.txt diff --git a/source/sdk/temp/kotlin/sync/log-level.txt b/temp/kotlin/sync/log-level.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/log-level.txt rename to temp/kotlin/sync/log-level.txt diff --git a/source/sdk/temp/kotlin/sync/manage-sync-session.txt b/temp/kotlin/sync/manage-sync-session.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/manage-sync-session.txt rename to temp/kotlin/sync/manage-sync-session.txt diff --git a/source/sdk/temp/kotlin/sync/open-a-synced-realm.txt b/temp/kotlin/sync/open-a-synced-realm.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/open-a-synced-realm.txt rename to temp/kotlin/sync/open-a-synced-realm.txt diff --git a/source/sdk/temp/kotlin/sync/partition-based-sync.txt b/temp/kotlin/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/partition-based-sync.txt rename to temp/kotlin/sync/partition-based-sync.txt diff --git a/source/sdk/temp/kotlin/sync/stream-data-to-atlas.txt b/temp/kotlin/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/stream-data-to-atlas.txt rename to temp/kotlin/sync/stream-data-to-atlas.txt diff --git a/source/sdk/temp/kotlin/sync/subscribe.txt b/temp/kotlin/sync/subscribe.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/subscribe.txt rename to temp/kotlin/sync/subscribe.txt diff --git a/source/sdk/temp/kotlin/sync/write-to-synced-realm.txt b/temp/kotlin/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/temp/kotlin/sync/write-to-synced-realm.txt rename to temp/kotlin/sync/write-to-synced-realm.txt diff --git a/source/sdk/temp/kotlin/telemetry.txt b/temp/kotlin/telemetry.txt similarity index 100% rename from source/sdk/temp/kotlin/telemetry.txt rename to temp/kotlin/telemetry.txt diff --git a/source/sdk/temp/kotlin/troubleshooting.txt b/temp/kotlin/troubleshooting.txt similarity index 100% rename from source/sdk/temp/kotlin/troubleshooting.txt rename to temp/kotlin/troubleshooting.txt diff --git a/source/sdk/temp/kotlin/users.txt b/temp/kotlin/users.txt similarity index 100% rename from source/sdk/temp/kotlin/users.txt rename to temp/kotlin/users.txt diff --git a/source/sdk/temp/kotlin/users/authenticate-users.txt b/temp/kotlin/users/authenticate-users.txt similarity index 100% rename from source/sdk/temp/kotlin/users/authenticate-users.txt rename to temp/kotlin/users/authenticate-users.txt diff --git a/source/sdk/temp/kotlin/users/custom-user-data.txt b/temp/kotlin/users/custom-user-data.txt similarity index 100% rename from source/sdk/temp/kotlin/users/custom-user-data.txt rename to temp/kotlin/users/custom-user-data.txt diff --git a/source/sdk/temp/kotlin/users/delete-users.txt b/temp/kotlin/users/delete-users.txt similarity index 100% rename from source/sdk/temp/kotlin/users/delete-users.txt rename to temp/kotlin/users/delete-users.txt diff --git a/source/sdk/temp/kotlin/users/link-credentials.txt b/temp/kotlin/users/link-credentials.txt similarity index 100% rename from source/sdk/temp/kotlin/users/link-credentials.txt rename to temp/kotlin/users/link-credentials.txt diff --git a/source/sdk/temp/kotlin/users/manage-email-password-users.txt b/temp/kotlin/users/manage-email-password-users.txt similarity index 100% rename from source/sdk/temp/kotlin/users/manage-email-password-users.txt rename to temp/kotlin/users/manage-email-password-users.txt diff --git a/source/sdk/temp/kotlin/users/manage-user-api-keys.txt b/temp/kotlin/users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/temp/kotlin/users/manage-user-api-keys.txt rename to temp/kotlin/users/manage-user-api-keys.txt diff --git a/source/sdk/temp/kotlin/users/multi-user-applications.txt b/temp/kotlin/users/multi-user-applications.txt similarity index 100% rename from source/sdk/temp/kotlin/users/multi-user-applications.txt rename to temp/kotlin/users/multi-user-applications.txt diff --git a/source/sdk/temp/kotlin/users/user-metadata.txt b/temp/kotlin/users/user-metadata.txt similarity index 100% rename from source/sdk/temp/kotlin/users/user-metadata.txt rename to temp/kotlin/users/user-metadata.txt diff --git a/source/migrate.txt b/temp/migrate.txt similarity index 100% rename from source/migrate.txt rename to temp/migrate.txt diff --git a/source/sdk/temp/node.txt b/temp/node.txt similarity index 100% rename from source/sdk/temp/node.txt rename to temp/node.txt diff --git a/source/sdk/temp/node/app-services.txt b/temp/node/app-services.txt similarity index 100% rename from source/sdk/temp/node/app-services.txt rename to temp/node/app-services.txt diff --git a/source/sdk/temp/node/app-services/call-a-function.txt b/temp/node/app-services/call-a-function.txt similarity index 100% rename from source/sdk/temp/node/app-services/call-a-function.txt rename to temp/node/app-services/call-a-function.txt diff --git a/source/sdk/temp/node/app-services/connect-to-app-services-backend.txt b/temp/node/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/temp/node/app-services/connect-to-app-services-backend.txt rename to temp/node/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/temp/node/app-services/query-mongodb.txt b/temp/node/app-services/query-mongodb.txt similarity index 100% rename from source/sdk/temp/node/app-services/query-mongodb.txt rename to temp/node/app-services/query-mongodb.txt diff --git a/source/sdk/temp/node/crud.txt b/temp/node/crud.txt similarity index 100% rename from source/sdk/temp/node/crud.txt rename to temp/node/crud.txt diff --git a/source/sdk/temp/node/crud/create.txt b/temp/node/crud/create.txt similarity index 100% rename from source/sdk/temp/node/crud/create.txt rename to temp/node/crud/create.txt diff --git a/source/sdk/temp/node/crud/delete.txt b/temp/node/crud/delete.txt similarity index 100% rename from source/sdk/temp/node/crud/delete.txt rename to temp/node/crud/delete.txt diff --git a/source/sdk/temp/node/crud/query-data.txt b/temp/node/crud/query-data.txt similarity index 100% rename from source/sdk/temp/node/crud/query-data.txt rename to temp/node/crud/query-data.txt diff --git a/source/sdk/temp/node/crud/read.txt b/temp/node/crud/read.txt similarity index 100% rename from source/sdk/temp/node/crud/read.txt rename to temp/node/crud/read.txt diff --git a/source/sdk/temp/node/crud/update.txt b/temp/node/crud/update.txt similarity index 100% rename from source/sdk/temp/node/crud/update.txt rename to temp/node/crud/update.txt diff --git a/source/sdk/temp/node/facets.toml b/temp/node/facets.toml similarity index 100% rename from source/sdk/temp/node/facets.toml rename to temp/node/facets.toml diff --git a/source/sdk/temp/node/install.txt b/temp/node/install.txt similarity index 100% rename from source/sdk/temp/node/install.txt rename to temp/node/install.txt diff --git a/source/sdk/temp/node/integrations.txt b/temp/node/integrations.txt similarity index 100% rename from source/sdk/temp/node/integrations.txt rename to temp/node/integrations.txt diff --git a/source/sdk/temp/node/integrations/electron-cra.txt b/temp/node/integrations/electron-cra.txt similarity index 100% rename from source/sdk/temp/node/integrations/electron-cra.txt rename to temp/node/integrations/electron-cra.txt diff --git a/source/sdk/temp/node/integrations/electron.txt b/temp/node/integrations/electron.txt similarity index 100% rename from source/sdk/temp/node/integrations/electron.txt rename to temp/node/integrations/electron.txt diff --git a/source/sdk/temp/node/logging.txt b/temp/node/logging.txt similarity index 100% rename from source/sdk/temp/node/logging.txt rename to temp/node/logging.txt diff --git a/source/sdk/temp/node/manage-users.txt b/temp/node/manage-users.txt similarity index 100% rename from source/sdk/temp/node/manage-users.txt rename to temp/node/manage-users.txt diff --git a/source/sdk/temp/node/migrate/index.txt b/temp/node/migrate/index.txt similarity index 100% rename from source/sdk/temp/node/migrate/index.txt rename to temp/node/migrate/index.txt diff --git a/source/sdk/temp/node/model-data.txt b/temp/node/model-data.txt similarity index 100% rename from source/sdk/temp/node/model-data.txt rename to temp/node/model-data.txt diff --git a/source/sdk/temp/node/model-data/data-types.txt b/temp/node/model-data/data-types.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types.txt rename to temp/node/model-data/data-types.txt diff --git a/source/sdk/temp/node/model-data/data-types/collections.txt b/temp/node/model-data/data-types/collections.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types/collections.txt rename to temp/node/model-data/data-types/collections.txt diff --git a/source/sdk/temp/node/model-data/data-types/dictionaries.txt b/temp/node/model-data/data-types/dictionaries.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types/dictionaries.txt rename to temp/node/model-data/data-types/dictionaries.txt diff --git a/source/sdk/temp/node/model-data/data-types/embedded-objects.txt b/temp/node/model-data/data-types/embedded-objects.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types/embedded-objects.txt rename to temp/node/model-data/data-types/embedded-objects.txt diff --git a/source/sdk/temp/node/model-data/data-types/field-types.txt b/temp/node/model-data/data-types/field-types.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types/field-types.txt rename to temp/node/model-data/data-types/field-types.txt diff --git a/source/sdk/temp/node/model-data/data-types/geospatial.txt b/temp/node/model-data/data-types/geospatial.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types/geospatial.txt rename to temp/node/model-data/data-types/geospatial.txt diff --git a/source/sdk/temp/node/model-data/data-types/mixed.txt b/temp/node/model-data/data-types/mixed.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types/mixed.txt rename to temp/node/model-data/data-types/mixed.txt diff --git a/source/sdk/temp/node/model-data/data-types/sets.txt b/temp/node/model-data/data-types/sets.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types/sets.txt rename to temp/node/model-data/data-types/sets.txt diff --git a/source/sdk/temp/node/model-data/data-types/uuid.txt b/temp/node/model-data/data-types/uuid.txt similarity index 100% rename from source/sdk/temp/node/model-data/data-types/uuid.txt rename to temp/node/model-data/data-types/uuid.txt diff --git a/source/sdk/temp/node/model-data/define-a-realm-object-model.txt b/temp/node/model-data/define-a-realm-object-model.txt similarity index 100% rename from source/sdk/temp/node/model-data/define-a-realm-object-model.txt rename to temp/node/model-data/define-a-realm-object-model.txt diff --git a/source/sdk/temp/node/model-data/modify-an-object-schema.txt b/temp/node/model-data/modify-an-object-schema.txt similarity index 100% rename from source/sdk/temp/node/model-data/modify-an-object-schema.txt rename to temp/node/model-data/modify-an-object-schema.txt diff --git a/source/sdk/temp/node/model-data/relationships-and-embedded-objects.txt b/temp/node/model-data/relationships-and-embedded-objects.txt similarity index 100% rename from source/sdk/temp/node/model-data/relationships-and-embedded-objects.txt rename to temp/node/model-data/relationships-and-embedded-objects.txt diff --git a/source/sdk/temp/node/quick-start.txt b/temp/node/quick-start.txt similarity index 100% rename from source/sdk/temp/node/quick-start.txt rename to temp/node/quick-start.txt diff --git a/source/sdk/temp/node/react-to-changes.txt b/temp/node/react-to-changes.txt similarity index 100% rename from source/sdk/temp/node/react-to-changes.txt rename to temp/node/react-to-changes.txt diff --git a/source/sdk/temp/node/realm-files.txt b/temp/node/realm-files.txt similarity index 100% rename from source/sdk/temp/node/realm-files.txt rename to temp/node/realm-files.txt diff --git a/source/sdk/temp/node/realm-files/bundle.txt b/temp/node/realm-files/bundle.txt similarity index 100% rename from source/sdk/temp/node/realm-files/bundle.txt rename to temp/node/realm-files/bundle.txt diff --git a/source/sdk/temp/node/realm-files/compact-realm.txt b/temp/node/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/temp/node/realm-files/compact-realm.txt rename to temp/node/realm-files/compact-realm.txt diff --git a/source/sdk/temp/node/realm-files/encrypt.txt b/temp/node/realm-files/encrypt.txt similarity index 100% rename from source/sdk/temp/node/realm-files/encrypt.txt rename to temp/node/realm-files/encrypt.txt diff --git a/source/sdk/temp/node/realm-files/open-and-close-a-realm.txt b/temp/node/realm-files/open-and-close-a-realm.txt similarity index 100% rename from source/sdk/temp/node/realm-files/open-and-close-a-realm.txt rename to temp/node/realm-files/open-and-close-a-realm.txt diff --git a/source/sdk/temp/node/sync.txt b/temp/node/sync.txt similarity index 100% rename from source/sdk/temp/node/sync.txt rename to temp/node/sync.txt diff --git a/source/sdk/temp/node/sync/client-reset-data-recovery.txt b/temp/node/sync/client-reset-data-recovery.txt similarity index 100% rename from source/sdk/temp/node/sync/client-reset-data-recovery.txt rename to temp/node/sync/client-reset-data-recovery.txt diff --git a/source/sdk/temp/node/sync/configure-and-open-a-synced-realm.txt b/temp/node/sync/configure-and-open-a-synced-realm.txt similarity index 100% rename from source/sdk/temp/node/sync/configure-and-open-a-synced-realm.txt rename to temp/node/sync/configure-and-open-a-synced-realm.txt diff --git a/source/sdk/temp/node/sync/flexible-sync.txt b/temp/node/sync/flexible-sync.txt similarity index 100% rename from source/sdk/temp/node/sync/flexible-sync.txt rename to temp/node/sync/flexible-sync.txt diff --git a/source/sdk/temp/node/sync/handle-sync-errors.txt b/temp/node/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/temp/node/sync/handle-sync-errors.txt rename to temp/node/sync/handle-sync-errors.txt diff --git a/source/sdk/temp/node/sync/log-level.txt b/temp/node/sync/log-level.txt similarity index 100% rename from source/sdk/temp/node/sync/log-level.txt rename to temp/node/sync/log-level.txt diff --git a/source/sdk/temp/node/sync/manage-sync-session.txt b/temp/node/sync/manage-sync-session.txt similarity index 100% rename from source/sdk/temp/node/sync/manage-sync-session.txt rename to temp/node/sync/manage-sync-session.txt diff --git a/source/sdk/temp/node/sync/partition-based-sync.txt b/temp/node/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/temp/node/sync/partition-based-sync.txt rename to temp/node/sync/partition-based-sync.txt diff --git a/source/sdk/temp/node/sync/stream-data-to-atlas.txt b/temp/node/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/temp/node/sync/stream-data-to-atlas.txt rename to temp/node/sync/stream-data-to-atlas.txt diff --git a/source/sdk/temp/node/telemetry.txt b/temp/node/telemetry.txt similarity index 100% rename from source/sdk/temp/node/telemetry.txt rename to temp/node/telemetry.txt diff --git a/source/sdk/temp/node/users/access-custom-user-data.txt b/temp/node/users/access-custom-user-data.txt similarity index 100% rename from source/sdk/temp/node/users/access-custom-user-data.txt rename to temp/node/users/access-custom-user-data.txt diff --git a/source/sdk/temp/node/users/authenticate-users.txt b/temp/node/users/authenticate-users.txt similarity index 100% rename from source/sdk/temp/node/users/authenticate-users.txt rename to temp/node/users/authenticate-users.txt diff --git a/source/sdk/temp/node/users/create-delete-users.txt b/temp/node/users/create-delete-users.txt similarity index 100% rename from source/sdk/temp/node/users/create-delete-users.txt rename to temp/node/users/create-delete-users.txt diff --git a/source/sdk/temp/node/users/link-identities.txt b/temp/node/users/link-identities.txt similarity index 100% rename from source/sdk/temp/node/users/link-identities.txt rename to temp/node/users/link-identities.txt diff --git a/source/sdk/temp/node/users/manage-email-password-users.txt b/temp/node/users/manage-email-password-users.txt similarity index 100% rename from source/sdk/temp/node/users/manage-email-password-users.txt rename to temp/node/users/manage-email-password-users.txt diff --git a/source/sdk/temp/node/users/manage-user-api-keys.txt b/temp/node/users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/temp/node/users/manage-user-api-keys.txt rename to temp/node/users/manage-user-api-keys.txt diff --git a/source/sdk/temp/node/users/multi-user-applications.txt b/temp/node/users/multi-user-applications.txt similarity index 100% rename from source/sdk/temp/node/users/multi-user-applications.txt rename to temp/node/users/multi-user-applications.txt diff --git a/source/sdk/temp/node/users/user-metadata.txt b/temp/node/users/user-metadata.txt similarity index 100% rename from source/sdk/temp/node/users/user-metadata.txt rename to temp/node/users/user-metadata.txt diff --git a/source/sdk/temp/react-native.txt b/temp/react-native.txt similarity index 100% rename from source/sdk/temp/react-native.txt rename to temp/react-native.txt diff --git a/source/sdk/temp/react-native/api-reference.txt b/temp/react-native/api-reference.txt similarity index 100% rename from source/sdk/temp/react-native/api-reference.txt rename to temp/react-native/api-reference.txt diff --git a/source/sdk/temp/react-native/api-reference/app-provider.txt b/temp/react-native/api-reference/app-provider.txt similarity index 100% rename from source/sdk/temp/react-native/api-reference/app-provider.txt rename to temp/react-native/api-reference/app-provider.txt diff --git a/source/sdk/temp/react-native/api-reference/realm-provider.txt b/temp/react-native/api-reference/realm-provider.txt similarity index 100% rename from source/sdk/temp/react-native/api-reference/realm-provider.txt rename to temp/react-native/api-reference/realm-provider.txt diff --git a/source/sdk/temp/react-native/api-reference/user-provider.txt b/temp/react-native/api-reference/user-provider.txt similarity index 100% rename from source/sdk/temp/react-native/api-reference/user-provider.txt rename to temp/react-native/api-reference/user-provider.txt diff --git a/source/sdk/temp/react-native/app-services.txt b/temp/react-native/app-services.txt similarity index 100% rename from source/sdk/temp/react-native/app-services.txt rename to temp/react-native/app-services.txt diff --git a/source/sdk/temp/react-native/app-services/call-a-function.txt b/temp/react-native/app-services/call-a-function.txt similarity index 100% rename from source/sdk/temp/react-native/app-services/call-a-function.txt rename to temp/react-native/app-services/call-a-function.txt diff --git a/source/sdk/temp/react-native/app-services/connect-to-app-services-app.txt b/temp/react-native/app-services/connect-to-app-services-app.txt similarity index 100% rename from source/sdk/temp/react-native/app-services/connect-to-app-services-app.txt rename to temp/react-native/app-services/connect-to-app-services-app.txt diff --git a/source/sdk/temp/react-native/app-services/query-mongodb.txt b/temp/react-native/app-services/query-mongodb.txt similarity index 100% rename from source/sdk/temp/react-native/app-services/query-mongodb.txt rename to temp/react-native/app-services/query-mongodb.txt diff --git a/source/sdk/temp/react-native/bootstrap-with-expo.txt b/temp/react-native/bootstrap-with-expo.txt similarity index 100% rename from source/sdk/temp/react-native/bootstrap-with-expo.txt rename to temp/react-native/bootstrap-with-expo.txt diff --git a/source/sdk/temp/react-native/crud.txt b/temp/react-native/crud.txt similarity index 100% rename from source/sdk/temp/react-native/crud.txt rename to temp/react-native/crud.txt diff --git a/source/sdk/temp/react-native/crud/create.txt b/temp/react-native/crud/create.txt similarity index 100% rename from source/sdk/temp/react-native/crud/create.txt rename to temp/react-native/crud/create.txt diff --git a/source/sdk/temp/react-native/crud/delete.txt b/temp/react-native/crud/delete.txt similarity index 100% rename from source/sdk/temp/react-native/crud/delete.txt rename to temp/react-native/crud/delete.txt diff --git a/source/sdk/temp/react-native/crud/query-data.txt b/temp/react-native/crud/query-data.txt similarity index 100% rename from source/sdk/temp/react-native/crud/query-data.txt rename to temp/react-native/crud/query-data.txt diff --git a/source/sdk/temp/react-native/crud/read.txt b/temp/react-native/crud/read.txt similarity index 100% rename from source/sdk/temp/react-native/crud/read.txt rename to temp/react-native/crud/read.txt diff --git a/source/sdk/temp/react-native/crud/update.txt b/temp/react-native/crud/update.txt similarity index 100% rename from source/sdk/temp/react-native/crud/update.txt rename to temp/react-native/crud/update.txt diff --git a/source/sdk/temp/react-native/facets.toml b/temp/react-native/facets.toml similarity index 100% rename from source/sdk/temp/react-native/facets.toml rename to temp/react-native/facets.toml diff --git a/source/sdk/temp/react-native/install.txt b/temp/react-native/install.txt similarity index 100% rename from source/sdk/temp/react-native/install.txt rename to temp/react-native/install.txt diff --git a/source/sdk/temp/react-native/integrations.txt b/temp/react-native/integrations.txt similarity index 100% rename from source/sdk/temp/react-native/integrations.txt rename to temp/react-native/integrations.txt diff --git a/source/sdk/temp/react-native/integrations/mac-catalyst.txt b/temp/react-native/integrations/mac-catalyst.txt similarity index 100% rename from source/sdk/temp/react-native/integrations/mac-catalyst.txt rename to temp/react-native/integrations/mac-catalyst.txt diff --git a/source/sdk/temp/react-native/logging.txt b/temp/react-native/logging.txt similarity index 100% rename from source/sdk/temp/react-native/logging.txt rename to temp/react-native/logging.txt diff --git a/source/sdk/temp/react-native/manage-users.txt b/temp/react-native/manage-users.txt similarity index 100% rename from source/sdk/temp/react-native/manage-users.txt rename to temp/react-native/manage-users.txt diff --git a/source/sdk/temp/react-native/manage-users/authenticate-users.txt b/temp/react-native/manage-users/authenticate-users.txt similarity index 100% rename from source/sdk/temp/react-native/manage-users/authenticate-users.txt rename to temp/react-native/manage-users/authenticate-users.txt diff --git a/source/sdk/temp/react-native/manage-users/create-and-delete-users.txt b/temp/react-native/manage-users/create-and-delete-users.txt similarity index 100% rename from source/sdk/temp/react-native/manage-users/create-and-delete-users.txt rename to temp/react-native/manage-users/create-and-delete-users.txt diff --git a/source/sdk/temp/react-native/manage-users/custom-user-data.txt b/temp/react-native/manage-users/custom-user-data.txt similarity index 100% rename from source/sdk/temp/react-native/manage-users/custom-user-data.txt rename to temp/react-native/manage-users/custom-user-data.txt diff --git a/source/sdk/temp/react-native/manage-users/link-user-identities.txt b/temp/react-native/manage-users/link-user-identities.txt similarity index 100% rename from source/sdk/temp/react-native/manage-users/link-user-identities.txt rename to temp/react-native/manage-users/link-user-identities.txt diff --git a/source/sdk/temp/react-native/manage-users/manage-email-password-users.txt b/temp/react-native/manage-users/manage-email-password-users.txt similarity index 100% rename from source/sdk/temp/react-native/manage-users/manage-email-password-users.txt rename to temp/react-native/manage-users/manage-email-password-users.txt diff --git a/source/sdk/temp/react-native/manage-users/manage-user-api-keys.txt b/temp/react-native/manage-users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/temp/react-native/manage-users/manage-user-api-keys.txt rename to temp/react-native/manage-users/manage-user-api-keys.txt diff --git a/source/sdk/temp/react-native/manage-users/multi-user-applications.txt b/temp/react-native/manage-users/multi-user-applications.txt similarity index 100% rename from source/sdk/temp/react-native/manage-users/multi-user-applications.txt rename to temp/react-native/manage-users/multi-user-applications.txt diff --git a/source/sdk/temp/react-native/migrate/index.txt b/temp/react-native/migrate/index.txt similarity index 100% rename from source/sdk/temp/react-native/migrate/index.txt rename to temp/react-native/migrate/index.txt diff --git a/source/sdk/temp/react-native/model-data.txt b/temp/react-native/model-data.txt similarity index 100% rename from source/sdk/temp/react-native/model-data.txt rename to temp/react-native/model-data.txt diff --git a/source/sdk/temp/react-native/model-data/change-an-object-model.txt b/temp/react-native/model-data/change-an-object-model.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/change-an-object-model.txt rename to temp/react-native/model-data/change-an-object-model.txt diff --git a/source/sdk/temp/react-native/model-data/data-types.txt b/temp/react-native/model-data/data-types.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types.txt rename to temp/react-native/model-data/data-types.txt diff --git a/source/sdk/temp/react-native/model-data/data-types/collections.txt b/temp/react-native/model-data/data-types/collections.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types/collections.txt rename to temp/react-native/model-data/data-types/collections.txt diff --git a/source/sdk/temp/react-native/model-data/data-types/dictionaries.txt b/temp/react-native/model-data/data-types/dictionaries.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types/dictionaries.txt rename to temp/react-native/model-data/data-types/dictionaries.txt diff --git a/source/sdk/temp/react-native/model-data/data-types/embedded-objects.txt b/temp/react-native/model-data/data-types/embedded-objects.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types/embedded-objects.txt rename to temp/react-native/model-data/data-types/embedded-objects.txt diff --git a/source/sdk/temp/react-native/model-data/data-types/geospatial.txt b/temp/react-native/model-data/data-types/geospatial.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types/geospatial.txt rename to temp/react-native/model-data/data-types/geospatial.txt diff --git a/source/sdk/temp/react-native/model-data/data-types/mixed.txt b/temp/react-native/model-data/data-types/mixed.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types/mixed.txt rename to temp/react-native/model-data/data-types/mixed.txt diff --git a/source/sdk/temp/react-native/model-data/data-types/property-types.txt b/temp/react-native/model-data/data-types/property-types.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types/property-types.txt rename to temp/react-native/model-data/data-types/property-types.txt diff --git a/source/sdk/temp/react-native/model-data/data-types/sets.txt b/temp/react-native/model-data/data-types/sets.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types/sets.txt rename to temp/react-native/model-data/data-types/sets.txt diff --git a/source/sdk/temp/react-native/model-data/data-types/uuid.txt b/temp/react-native/model-data/data-types/uuid.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/data-types/uuid.txt rename to temp/react-native/model-data/data-types/uuid.txt diff --git a/source/sdk/temp/react-native/model-data/define-a-realm-object-model.txt b/temp/react-native/model-data/define-a-realm-object-model.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/define-a-realm-object-model.txt rename to temp/react-native/model-data/define-a-realm-object-model.txt diff --git a/source/sdk/temp/react-native/model-data/relationships-and-embedded-objects.txt b/temp/react-native/model-data/relationships-and-embedded-objects.txt similarity index 100% rename from source/sdk/temp/react-native/model-data/relationships-and-embedded-objects.txt rename to temp/react-native/model-data/relationships-and-embedded-objects.txt diff --git a/source/sdk/temp/react-native/quick-start.txt b/temp/react-native/quick-start.txt similarity index 100% rename from source/sdk/temp/react-native/quick-start.txt rename to temp/react-native/quick-start.txt diff --git a/source/sdk/temp/react-native/react-to-changes.txt b/temp/react-native/react-to-changes.txt similarity index 100% rename from source/sdk/temp/react-native/react-to-changes.txt rename to temp/react-native/react-to-changes.txt diff --git a/source/sdk/temp/react-native/realm-files.txt b/temp/react-native/realm-files.txt similarity index 100% rename from source/sdk/temp/react-native/realm-files.txt rename to temp/react-native/realm-files.txt diff --git a/source/sdk/temp/react-native/realm-files/bundle.txt b/temp/react-native/realm-files/bundle.txt similarity index 100% rename from source/sdk/temp/react-native/realm-files/bundle.txt rename to temp/react-native/realm-files/bundle.txt diff --git a/source/sdk/temp/react-native/realm-files/compact-realm.txt b/temp/react-native/realm-files/compact-realm.txt similarity index 100% rename from source/sdk/temp/react-native/realm-files/compact-realm.txt rename to temp/react-native/realm-files/compact-realm.txt diff --git a/source/sdk/temp/react-native/realm-files/configure-a-realm.txt b/temp/react-native/realm-files/configure-a-realm.txt similarity index 100% rename from source/sdk/temp/react-native/realm-files/configure-a-realm.txt rename to temp/react-native/realm-files/configure-a-realm.txt diff --git a/source/sdk/temp/react-native/realm-files/encrypt.txt b/temp/react-native/realm-files/encrypt.txt similarity index 100% rename from source/sdk/temp/react-native/realm-files/encrypt.txt rename to temp/react-native/realm-files/encrypt.txt diff --git a/source/sdk/temp/react-native/sync-data.txt b/temp/react-native/sync-data.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data.txt rename to temp/react-native/sync-data.txt diff --git a/source/sdk/temp/react-native/sync-data/client-reset-data-recovery.txt b/temp/react-native/sync-data/client-reset-data-recovery.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data/client-reset-data-recovery.txt rename to temp/react-native/sync-data/client-reset-data-recovery.txt diff --git a/source/sdk/temp/react-native/sync-data/configure-a-synced-realm.txt b/temp/react-native/sync-data/configure-a-synced-realm.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data/configure-a-synced-realm.txt rename to temp/react-native/sync-data/configure-a-synced-realm.txt diff --git a/source/sdk/temp/react-native/sync-data/flexible-sync.txt b/temp/react-native/sync-data/flexible-sync.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data/flexible-sync.txt rename to temp/react-native/sync-data/flexible-sync.txt diff --git a/source/sdk/temp/react-native/sync-data/handle-sync-errors.txt b/temp/react-native/sync-data/handle-sync-errors.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data/handle-sync-errors.txt rename to temp/react-native/sync-data/handle-sync-errors.txt diff --git a/source/sdk/temp/react-native/sync-data/log-level.txt b/temp/react-native/sync-data/log-level.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data/log-level.txt rename to temp/react-native/sync-data/log-level.txt diff --git a/source/sdk/temp/react-native/sync-data/manage-sync-session.txt b/temp/react-native/sync-data/manage-sync-session.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data/manage-sync-session.txt rename to temp/react-native/sync-data/manage-sync-session.txt diff --git a/source/sdk/temp/react-native/sync-data/partition-based-sync.txt b/temp/react-native/sync-data/partition-based-sync.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data/partition-based-sync.txt rename to temp/react-native/sync-data/partition-based-sync.txt diff --git a/source/sdk/temp/react-native/sync-data/stream-data-to-atlas.txt b/temp/react-native/sync-data/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/temp/react-native/sync-data/stream-data-to-atlas.txt rename to temp/react-native/sync-data/stream-data-to-atlas.txt diff --git a/source/sdk/temp/react-native/telemetry.txt b/temp/react-native/telemetry.txt similarity index 100% rename from source/sdk/temp/react-native/telemetry.txt rename to temp/react-native/telemetry.txt diff --git a/source/sdk/temp/react-native/test-and-debug.txt b/temp/react-native/test-and-debug.txt similarity index 100% rename from source/sdk/temp/react-native/test-and-debug.txt rename to temp/react-native/test-and-debug.txt diff --git a/source/sdk/temp/react-native/test-and-debug/testing.txt b/temp/react-native/test-and-debug/testing.txt similarity index 100% rename from source/sdk/temp/react-native/test-and-debug/testing.txt rename to temp/react-native/test-and-debug/testing.txt diff --git a/source/sdk/temp/react-native/test-and-debug/troubleshooting.txt b/temp/react-native/test-and-debug/troubleshooting.txt similarity index 100% rename from source/sdk/temp/react-native/test-and-debug/troubleshooting.txt rename to temp/react-native/test-and-debug/troubleshooting.txt diff --git a/source/sdk.txt b/temp/sdk.txt similarity index 97% rename from source/sdk.txt rename to temp/sdk.txt index a758cf9037..23e7da1fcb 100644 --- a/source/sdk.txt +++ b/temp/sdk.txt @@ -92,5 +92,3 @@ and platforms. Each SDK is language-idiomatic and includes: :icon-alt: C++ SDK icon Build applications in C++. Access data stored in realms and sync data with Atlas. - -For legacy (pre-v10) Realm Documentation, see https://www.mongodb.com/docs/realm-legacy/docs/. diff --git a/source/sdk/temp/swift.txt b/temp/swift.txt similarity index 100% rename from source/sdk/temp/swift.txt rename to temp/swift.txt diff --git a/source/sdk/temp/swift/api-reference.txt b/temp/swift/api-reference.txt similarity index 100% rename from source/sdk/temp/swift/api-reference.txt rename to temp/swift/api-reference.txt diff --git a/source/sdk/temp/swift/app-services/call-a-function.txt b/temp/swift/app-services/call-a-function.txt similarity index 100% rename from source/sdk/temp/swift/app-services/call-a-function.txt rename to temp/swift/app-services/call-a-function.txt diff --git a/source/sdk/temp/swift/app-services/connect-to-app-services-backend.txt b/temp/swift/app-services/connect-to-app-services-backend.txt similarity index 100% rename from source/sdk/temp/swift/app-services/connect-to-app-services-backend.txt rename to temp/swift/app-services/connect-to-app-services-backend.txt diff --git a/source/sdk/temp/swift/app-services/mongodb-remote-access.txt b/temp/swift/app-services/mongodb-remote-access.txt similarity index 100% rename from source/sdk/temp/swift/app-services/mongodb-remote-access.txt rename to temp/swift/app-services/mongodb-remote-access.txt diff --git a/source/sdk/temp/swift/application-services.txt b/temp/swift/application-services.txt similarity index 100% rename from source/sdk/temp/swift/application-services.txt rename to temp/swift/application-services.txt diff --git a/source/sdk/temp/swift/crud.txt b/temp/swift/crud.txt similarity index 100% rename from source/sdk/temp/swift/crud.txt rename to temp/swift/crud.txt diff --git a/source/sdk/temp/swift/crud/create.txt b/temp/swift/crud/create.txt similarity index 100% rename from source/sdk/temp/swift/crud/create.txt rename to temp/swift/crud/create.txt diff --git a/source/sdk/temp/swift/crud/delete.txt b/temp/swift/crud/delete.txt similarity index 100% rename from source/sdk/temp/swift/crud/delete.txt rename to temp/swift/crud/delete.txt diff --git a/source/sdk/temp/swift/crud/filter-data.txt b/temp/swift/crud/filter-data.txt similarity index 100% rename from source/sdk/temp/swift/crud/filter-data.txt rename to temp/swift/crud/filter-data.txt diff --git a/source/sdk/temp/swift/crud/read.txt b/temp/swift/crud/read.txt similarity index 100% rename from source/sdk/temp/swift/crud/read.txt rename to temp/swift/crud/read.txt diff --git a/source/sdk/temp/swift/crud/threading.txt b/temp/swift/crud/threading.txt similarity index 100% rename from source/sdk/temp/swift/crud/threading.txt rename to temp/swift/crud/threading.txt diff --git a/source/sdk/temp/swift/crud/update.txt b/temp/swift/crud/update.txt similarity index 100% rename from source/sdk/temp/swift/crud/update.txt rename to temp/swift/crud/update.txt diff --git a/source/sdk/temp/swift/facets.toml b/temp/swift/facets.toml similarity index 100% rename from source/sdk/temp/swift/facets.toml rename to temp/swift/facets.toml diff --git a/source/sdk/temp/swift/install.txt b/temp/swift/install.txt similarity index 100% rename from source/sdk/temp/swift/install.txt rename to temp/swift/install.txt diff --git a/source/sdk/temp/swift/logging.txt b/temp/swift/logging.txt similarity index 100% rename from source/sdk/temp/swift/logging.txt rename to temp/swift/logging.txt diff --git a/source/sdk/temp/swift/model-data.txt b/temp/swift/model-data.txt similarity index 100% rename from source/sdk/temp/swift/model-data.txt rename to temp/swift/model-data.txt diff --git a/source/sdk/temp/swift/model-data/change-an-object-model.txt b/temp/swift/model-data/change-an-object-model.txt similarity index 100% rename from source/sdk/temp/swift/model-data/change-an-object-model.txt rename to temp/swift/model-data/change-an-object-model.txt diff --git a/source/sdk/temp/swift/model-data/model-data-device-sync.txt b/temp/swift/model-data/model-data-device-sync.txt similarity index 100% rename from source/sdk/temp/swift/model-data/model-data-device-sync.txt rename to temp/swift/model-data/model-data-device-sync.txt diff --git a/source/sdk/temp/swift/model-data/object-models.txt b/temp/swift/model-data/object-models.txt similarity index 100% rename from source/sdk/temp/swift/model-data/object-models.txt rename to temp/swift/model-data/object-models.txt diff --git a/source/sdk/temp/swift/model-data/relationships.txt b/temp/swift/model-data/relationships.txt similarity index 100% rename from source/sdk/temp/swift/model-data/relationships.txt rename to temp/swift/model-data/relationships.txt diff --git a/source/sdk/temp/swift/model-data/supported-types.txt b/temp/swift/model-data/supported-types.txt similarity index 100% rename from source/sdk/temp/swift/model-data/supported-types.txt rename to temp/swift/model-data/supported-types.txt diff --git a/source/sdk/temp/swift/quick-start.txt b/temp/swift/quick-start.txt similarity index 100% rename from source/sdk/temp/swift/quick-start.txt rename to temp/swift/quick-start.txt diff --git a/source/sdk/temp/swift/react-to-changes.txt b/temp/swift/react-to-changes.txt similarity index 100% rename from source/sdk/temp/swift/react-to-changes.txt rename to temp/swift/react-to-changes.txt diff --git a/source/sdk/temp/swift/realm-files.txt b/temp/swift/realm-files.txt similarity index 100% rename from source/sdk/temp/swift/realm-files.txt rename to temp/swift/realm-files.txt diff --git a/source/sdk/temp/swift/realm-files/bundle-a-realm.txt b/temp/swift/realm-files/bundle-a-realm.txt similarity index 100% rename from source/sdk/temp/swift/realm-files/bundle-a-realm.txt rename to temp/swift/realm-files/bundle-a-realm.txt diff --git a/source/sdk/temp/swift/realm-files/compacting.txt b/temp/swift/realm-files/compacting.txt similarity index 100% rename from source/sdk/temp/swift/realm-files/compacting.txt rename to temp/swift/realm-files/compacting.txt diff --git a/source/sdk/temp/swift/realm-files/configure-and-open-a-realm.txt b/temp/swift/realm-files/configure-and-open-a-realm.txt similarity index 100% rename from source/sdk/temp/swift/realm-files/configure-and-open-a-realm.txt rename to temp/swift/realm-files/configure-and-open-a-realm.txt diff --git a/source/sdk/temp/swift/realm-files/delete-a-realm.txt b/temp/swift/realm-files/delete-a-realm.txt similarity index 100% rename from source/sdk/temp/swift/realm-files/delete-a-realm.txt rename to temp/swift/realm-files/delete-a-realm.txt diff --git a/source/sdk/temp/swift/realm-files/encrypt-a-realm.txt b/temp/swift/realm-files/encrypt-a-realm.txt similarity index 100% rename from source/sdk/temp/swift/realm-files/encrypt-a-realm.txt rename to temp/swift/realm-files/encrypt-a-realm.txt diff --git a/source/sdk/temp/swift/realm-files/tvos.txt b/temp/swift/realm-files/tvos.txt similarity index 100% rename from source/sdk/temp/swift/realm-files/tvos.txt rename to temp/swift/realm-files/tvos.txt diff --git a/source/sdk/temp/swift/swift-concurrency.txt b/temp/swift/swift-concurrency.txt similarity index 100% rename from source/sdk/temp/swift/swift-concurrency.txt rename to temp/swift/swift-concurrency.txt diff --git a/source/sdk/temp/swift/swiftui-tutorial.txt b/temp/swift/swiftui-tutorial.txt similarity index 100% rename from source/sdk/temp/swift/swiftui-tutorial.txt rename to temp/swift/swiftui-tutorial.txt diff --git a/source/sdk/temp/swift/swiftui.txt b/temp/swift/swiftui.txt similarity index 100% rename from source/sdk/temp/swift/swiftui.txt rename to temp/swift/swiftui.txt diff --git a/source/sdk/temp/swift/swiftui/background-sync.txt b/temp/swift/swiftui/background-sync.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/background-sync.txt rename to temp/swift/swiftui/background-sync.txt diff --git a/source/sdk/temp/swift/swiftui/configure-and-open-realm.txt b/temp/swift/swiftui/configure-and-open-realm.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/configure-and-open-realm.txt rename to temp/swift/swiftui/configure-and-open-realm.txt diff --git a/source/sdk/temp/swift/swiftui/filter-data.txt b/temp/swift/swiftui/filter-data.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/filter-data.txt rename to temp/swift/swiftui/filter-data.txt diff --git a/source/sdk/temp/swift/swiftui/model-data.txt b/temp/swift/swiftui/model-data.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/model-data.txt rename to temp/swift/swiftui/model-data.txt diff --git a/source/sdk/temp/swift/swiftui/model-data/change-an-object-model.txt b/temp/swift/swiftui/model-data/change-an-object-model.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/model-data/change-an-object-model.txt rename to temp/swift/swiftui/model-data/change-an-object-model.txt diff --git a/source/sdk/temp/swift/swiftui/model-data/define-a-realm-object-model.txt b/temp/swift/swiftui/model-data/define-a-realm-object-model.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/model-data/define-a-realm-object-model.txt rename to temp/swift/swiftui/model-data/define-a-realm-object-model.txt diff --git a/source/sdk/temp/swift/swiftui/pass-realm-data-between-views.txt b/temp/swift/swiftui/pass-realm-data-between-views.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/pass-realm-data-between-views.txt rename to temp/swift/swiftui/pass-realm-data-between-views.txt diff --git a/source/sdk/temp/swift/swiftui/react-to-changes.txt b/temp/swift/swiftui/react-to-changes.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/react-to-changes.txt rename to temp/swift/swiftui/react-to-changes.txt diff --git a/source/sdk/temp/swift/swiftui/swiftui-previews.txt b/temp/swift/swiftui/swiftui-previews.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/swiftui-previews.txt rename to temp/swift/swiftui/swiftui-previews.txt diff --git a/source/sdk/temp/swift/swiftui/write.txt b/temp/swift/swiftui/write.txt similarity index 100% rename from source/sdk/temp/swift/swiftui/write.txt rename to temp/swift/swiftui/write.txt diff --git a/source/sdk/temp/swift/sync.txt b/temp/swift/sync.txt similarity index 100% rename from source/sdk/temp/swift/sync.txt rename to temp/swift/sync.txt diff --git a/source/sdk/temp/swift/sync/add-sync-to-app.txt b/temp/swift/sync/add-sync-to-app.txt similarity index 100% rename from source/sdk/temp/swift/sync/add-sync-to-app.txt rename to temp/swift/sync/add-sync-to-app.txt diff --git a/source/sdk/temp/swift/sync/background-sync.txt b/temp/swift/sync/background-sync.txt similarity index 100% rename from source/sdk/temp/swift/sync/background-sync.txt rename to temp/swift/sync/background-sync.txt diff --git a/source/sdk/temp/swift/sync/configure-and-open-a-synced-realm.txt b/temp/swift/sync/configure-and-open-a-synced-realm.txt similarity index 100% rename from source/sdk/temp/swift/sync/configure-and-open-a-synced-realm.txt rename to temp/swift/sync/configure-and-open-a-synced-realm.txt diff --git a/source/sdk/temp/swift/sync/event-library.txt b/temp/swift/sync/event-library.txt similarity index 100% rename from source/sdk/temp/swift/sync/event-library.txt rename to temp/swift/sync/event-library.txt diff --git a/source/sdk/temp/swift/sync/flexible-sync.txt b/temp/swift/sync/flexible-sync.txt similarity index 100% rename from source/sdk/temp/swift/sync/flexible-sync.txt rename to temp/swift/sync/flexible-sync.txt diff --git a/source/sdk/temp/swift/sync/handle-sync-errors.txt b/temp/swift/sync/handle-sync-errors.txt similarity index 100% rename from source/sdk/temp/swift/sync/handle-sync-errors.txt rename to temp/swift/sync/handle-sync-errors.txt diff --git a/source/sdk/temp/swift/sync/log-level.txt b/temp/swift/sync/log-level.txt similarity index 100% rename from source/sdk/temp/swift/sync/log-level.txt rename to temp/swift/sync/log-level.txt diff --git a/source/sdk/temp/swift/sync/partition-based-sync.txt b/temp/swift/sync/partition-based-sync.txt similarity index 100% rename from source/sdk/temp/swift/sync/partition-based-sync.txt rename to temp/swift/sync/partition-based-sync.txt diff --git a/source/sdk/temp/swift/sync/stream-data-to-atlas.txt b/temp/swift/sync/stream-data-to-atlas.txt similarity index 100% rename from source/sdk/temp/swift/sync/stream-data-to-atlas.txt rename to temp/swift/sync/stream-data-to-atlas.txt diff --git a/source/sdk/temp/swift/sync/sync-session.txt b/temp/swift/sync/sync-session.txt similarity index 100% rename from source/sdk/temp/swift/sync/sync-session.txt rename to temp/swift/sync/sync-session.txt diff --git a/source/sdk/temp/swift/sync/write-to-synced-realm.txt b/temp/swift/sync/write-to-synced-realm.txt similarity index 100% rename from source/sdk/temp/swift/sync/write-to-synced-realm.txt rename to temp/swift/sync/write-to-synced-realm.txt diff --git a/source/sdk/temp/swift/telemetry.txt b/temp/swift/telemetry.txt similarity index 100% rename from source/sdk/temp/swift/telemetry.txt rename to temp/swift/telemetry.txt diff --git a/source/sdk/temp/swift/test-and-debug.txt b/temp/swift/test-and-debug.txt similarity index 100% rename from source/sdk/temp/swift/test-and-debug.txt rename to temp/swift/test-and-debug.txt diff --git a/source/sdk/temp/swift/use-realm-with-actors.txt b/temp/swift/use-realm-with-actors.txt similarity index 100% rename from source/sdk/temp/swift/use-realm-with-actors.txt rename to temp/swift/use-realm-with-actors.txt diff --git a/source/sdk/temp/swift/users/authenticate-users.txt b/temp/swift/users/authenticate-users.txt similarity index 100% rename from source/sdk/temp/swift/users/authenticate-users.txt rename to temp/swift/users/authenticate-users.txt diff --git a/source/sdk/temp/swift/users/create-and-delete-users.txt b/temp/swift/users/create-and-delete-users.txt similarity index 100% rename from source/sdk/temp/swift/users/create-and-delete-users.txt rename to temp/swift/users/create-and-delete-users.txt diff --git a/source/sdk/temp/swift/users/custom-user-data.txt b/temp/swift/users/custom-user-data.txt similarity index 100% rename from source/sdk/temp/swift/users/custom-user-data.txt rename to temp/swift/users/custom-user-data.txt diff --git a/source/sdk/temp/swift/users/link-user-identities.txt b/temp/swift/users/link-user-identities.txt similarity index 100% rename from source/sdk/temp/swift/users/link-user-identities.txt rename to temp/swift/users/link-user-identities.txt diff --git a/source/sdk/temp/swift/users/manage-email-password-users.txt b/temp/swift/users/manage-email-password-users.txt similarity index 100% rename from source/sdk/temp/swift/users/manage-email-password-users.txt rename to temp/swift/users/manage-email-password-users.txt diff --git a/source/sdk/temp/swift/users/manage-user-api-keys.txt b/temp/swift/users/manage-user-api-keys.txt similarity index 100% rename from source/sdk/temp/swift/users/manage-user-api-keys.txt rename to temp/swift/users/manage-user-api-keys.txt diff --git a/source/sdk/temp/swift/users/multi-user-applications.txt b/temp/swift/users/multi-user-applications.txt similarity index 100% rename from source/sdk/temp/swift/users/multi-user-applications.txt rename to temp/swift/users/multi-user-applications.txt diff --git a/source/sdk/temp/swift/users/user-metadata.txt b/temp/swift/users/user-metadata.txt similarity index 100% rename from source/sdk/temp/swift/users/user-metadata.txt rename to temp/swift/users/user-metadata.txt diff --git a/source/sdk/temp/swift/work-with-users.txt b/temp/swift/work-with-users.txt similarity index 100% rename from source/sdk/temp/swift/work-with-users.txt rename to temp/swift/work-with-users.txt diff --git a/source/sdk/temp/swift/xcode-playgrounds.txt b/temp/swift/xcode-playgrounds.txt similarity index 100% rename from source/sdk/temp/swift/xcode-playgrounds.txt rename to temp/swift/xcode-playgrounds.txt diff --git a/source/web.txt b/temp/web.txt similarity index 100% rename from source/web.txt rename to temp/web.txt diff --git a/source/web/access-custom-user-data.txt b/temp/web/access-custom-user-data.txt similarity index 100% rename from source/web/access-custom-user-data.txt rename to temp/web/access-custom-user-data.txt diff --git a/source/web/api-reference.txt b/temp/web/api-reference.txt similarity index 100% rename from source/web/api-reference.txt rename to temp/web/api-reference.txt diff --git a/source/web/atlas-app-services.txt b/temp/web/atlas-app-services.txt similarity index 100% rename from source/web/atlas-app-services.txt rename to temp/web/atlas-app-services.txt diff --git a/source/web/authenticate.txt b/temp/web/authenticate.txt similarity index 100% rename from source/web/authenticate.txt rename to temp/web/authenticate.txt diff --git a/source/web/call-a-function.txt b/temp/web/call-a-function.txt similarity index 100% rename from source/web/call-a-function.txt rename to temp/web/call-a-function.txt diff --git a/source/web/create-delete-user.txt b/temp/web/create-delete-user.txt similarity index 100% rename from source/web/create-delete-user.txt rename to temp/web/create-delete-user.txt diff --git a/source/web/create-manage-api-keys.txt b/temp/web/create-manage-api-keys.txt similarity index 100% rename from source/web/create-manage-api-keys.txt rename to temp/web/create-manage-api-keys.txt diff --git a/source/web/facets.toml b/temp/web/facets.toml similarity index 100% rename from source/web/facets.toml rename to temp/web/facets.toml diff --git a/source/web/graphql-apollo-react.txt b/temp/web/graphql-apollo-react.txt similarity index 100% rename from source/web/graphql-apollo-react.txt rename to temp/web/graphql-apollo-react.txt diff --git a/source/web/init-app-client.txt b/temp/web/init-app-client.txt similarity index 100% rename from source/web/init-app-client.txt rename to temp/web/init-app-client.txt diff --git a/source/web/install.txt b/temp/web/install.txt similarity index 100% rename from source/web/install.txt rename to temp/web/install.txt diff --git a/source/web/link-identities.txt b/temp/web/link-identities.txt similarity index 100% rename from source/web/link-identities.txt rename to temp/web/link-identities.txt diff --git a/source/web/manage-email-password-users.txt b/temp/web/manage-email-password-users.txt similarity index 100% rename from source/web/manage-email-password-users.txt rename to temp/web/manage-email-password-users.txt diff --git a/source/web/migrate.txt b/temp/web/migrate.txt similarity index 100% rename from source/web/migrate.txt rename to temp/web/migrate.txt diff --git a/source/web/mongodb.txt b/temp/web/mongodb.txt similarity index 100% rename from source/web/mongodb.txt rename to temp/web/mongodb.txt diff --git a/source/web/nextjs.txt b/temp/web/nextjs.txt similarity index 100% rename from source/web/nextjs.txt rename to temp/web/nextjs.txt diff --git a/source/web/quickstart.txt b/temp/web/quickstart.txt similarity index 100% rename from source/web/quickstart.txt rename to temp/web/quickstart.txt diff --git a/source/web/react-web-quickstart.txt b/temp/web/react-web-quickstart.txt similarity index 100% rename from source/web/react-web-quickstart.txt rename to temp/web/react-web-quickstart.txt diff --git a/source/web/sync.txt b/temp/web/sync.txt similarity index 100% rename from source/web/sync.txt rename to temp/web/sync.txt diff --git a/source/web/telemetry.txt b/temp/web/telemetry.txt similarity index 100% rename from source/web/telemetry.txt rename to temp/web/telemetry.txt diff --git a/source/web/users.txt b/temp/web/users.txt similarity index 100% rename from source/web/users.txt rename to temp/web/users.txt diff --git a/source/web/work-with-multiple-users.txt b/temp/web/work-with-multiple-users.txt similarity index 100% rename from source/web/work-with-multiple-users.txt rename to temp/web/work-with-multiple-users.txt From db143e644960a7dba34fbbaa347b95f94fd6c07d Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 15 May 2024 12:52:54 -0400 Subject: [PATCH 17/63] Fix remaining build errors --- .../sdk/crud/query-engines/realm-query-language.txt | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/source/sdk/crud/query-engines/realm-query-language.txt b/source/sdk/crud/query-engines/realm-query-language.txt index 76ec0e0b27..a7c2cdd014 100644 --- a/source/sdk/crud/query-engines/realm-query-language.txt +++ b/source/sdk/crud/query-engines/realm-query-language.txt @@ -907,15 +907,8 @@ In the following query, we are checking that the coordinates of the embeddeded .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.rql-geospatial.js :language: js -For more information on defining geospatial shapes and objects with embedded geospatial data, -see the geospatial documentation for your SDK: - -- :ref:`Flutter SDK ` -- :ref:`Kotlin SDK ` -- :ref:`.NET SDK ` -- :ref:`Node.js SDK ` -- :ref:`React Native SDK ` -- :ref:`Swift SDK ` +For more information on defining geospatial shapes and objects with embedded +geospatial data, refer to :ref:`sdks-define-geospatial-object`. .. _rql-backlinks: From 6ae1805a7be0d155d34252c942672ea55cb1dcd6 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Mon, 20 May 2024 13:23:25 -0400 Subject: [PATCH 18/63] Add meta and facet values to the page template --- templates/consolidated-page.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/templates/consolidated-page.rst b/templates/consolidated-page.rst index 80b0f6476b..9de5ec7729 100644 --- a/templates/consolidated-page.rst +++ b/templates/consolidated-page.rst @@ -4,6 +4,18 @@ Page Title ========== +.. meta:: + :description: Provide a short description of the consolidated page. This is critical for SEO. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none From 39b1564ab8df35cfd62be35317b852027abf0e61 Mon Sep 17 00:00:00 2001 From: lindseymoore <71525840+lindseymoore@users.noreply.github.com> Date: Mon, 20 May 2024 17:49:32 -0400 Subject: [PATCH 19/63] DOCSP-39161 .NET updateBaseURL (#3246) ## Pull Request Info Jira ticket: https://jira.mongodb.org/browse/DOCSP-39161 - [Connect to App Services Backend](https://preview-mongodblindseymoore.gatsbyjs.io/realm/DOCSP-39161/sdk/dotnet/app-services/connect-to-app-services-backend/) - Note: Commented out failing tests. Fixing them will be a part of this ticket: https://jira.mongodb.org/browse/DOCSP-39638. ### Reminder Checklist Before merging your PR, make sure to check a few things. - [ ] Did you tag pages appropriately? - genre - meta.keywords - meta.description - [x] Describe your PR's changes in the Release Notes section - [ ] Create a Jira ticket for related docs-app-services work, if any ### Release Notes - .NET SDK - Application Services/Connect to an App Services App: Add a section on updating the base URL during runtime. ### Review Guidelines [REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md) --------- Co-authored-by: MongoCaleb --- .github/workflows/dotnet-core.yml | 6 +- .../dotnet/Examples/AggregationExamples.cs | 6 +- examples/dotnet/Examples/BaseURLChange.cs | 86 +++++++++++++++++++ .../Examples/DataTypesSectionExamples.cs | 2 +- examples/dotnet/Examples/Examples.csproj | 2 +- examples/dotnet/Examples/MongoDBExamples.cs | 4 +- .../dotnet/Examples/ProgressNotifications.cs | 21 ++--- examples/dotnet/README.md | 8 ++ .../BaseURLChange.snippet.custom-base-url.cs | 5 ++ ...seURLChange.snippet.experimental-import.cs | 1 + .../BaseURLChange.snippet.update-base-url.cs | 15 ++++ .../connect-to-app-services-backend.txt | 56 ++++++++++++ 12 files changed, 194 insertions(+), 18 deletions(-) create mode 100644 examples/dotnet/Examples/BaseURLChange.cs create mode 100644 source/examples/generated/dotnet/BaseURLChange.snippet.custom-base-url.cs create mode 100644 source/examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs create mode 100644 source/examples/generated/dotnet/BaseURLChange.snippet.update-base-url.cs diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index ecdfb60c20..b10e040f91 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -15,7 +15,11 @@ jobs: - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 7.0.203 + dotnet-version: | + 6.0.x + 7.0.x + - name: which sdks are installed + run: dotnet --list-sdks - name: Install dependencies run: cd examples/dotnet && dotnet restore - name: Build diff --git a/examples/dotnet/Examples/AggregationExamples.cs b/examples/dotnet/Examples/AggregationExamples.cs index 6cb7ca211b..550cca4e1c 100644 --- a/examples/dotnet/Examples/AggregationExamples.cs +++ b/examples/dotnet/Examples/AggregationExamples.cs @@ -105,7 +105,7 @@ private void SetupPlantCollection() plantsCollection = dbPlantInventory.GetCollection("plants"); } - [Test] + // [Test] public async Task GroupsAndCounts() { if (plantsCollection == null) @@ -166,7 +166,7 @@ public async Task GroupsAndCounts() Assert.AreEqual(2, aggResult[1]["count"].AsInt32); } - [Test] + // [Test] public async Task Filters() { if (plantsCollection == null) @@ -199,7 +199,7 @@ public async Task Filters() Assert.AreEqual(thaiBasil.Partition, aggResult[1].Partition); } - [Test] + // [Test] public async Task Projects() { if (plantsCollection == null) diff --git a/examples/dotnet/Examples/BaseURLChange.cs b/examples/dotnet/Examples/BaseURLChange.cs new file mode 100644 index 0000000000..d2350ec6b0 --- /dev/null +++ b/examples/dotnet/Examples/BaseURLChange.cs @@ -0,0 +1,86 @@ +using System; +using System.Threading.Tasks; +using NUnit.Framework; +using Realms; +using Realms.Sync; +using Realms.Sync.Exceptions; +using Realms.Sync.Testing; +using Realms.Logging; +using System.Threading; + +//:snippet-start: experimental-import +using System.Diagnostics.CodeAnalysis; +//:snippet-end: + +namespace Examples +{ + public class BaseURLChange + { + + [Test] + + public async Task testEdgeAppWithCustomBaseURL() + { + var YOUR_APP_ID = "sync-edge-server-cskhoow"; + + // :snippet-start: custom-base-url + // Specify a base URL to connect to a server other than the default. + var appConfig = new AppConfiguration(YOUR_APP_ID); + appConfig.BaseUri = new Uri("http://localhost:80"); + + var app = App.Create(appConfig); + // :snippet-end: + + try { + var user = await app.LogInAsync(Credentials.Anonymous()); + Assert.AreEqual(UserState.LoggedIn, user.State); + await user.LogOutAsync(); + } + catch (Exception e) { + Console.WriteLine(e.Message); + Assert.AreEqual(e.Message, "Could not connect to the server."); + } + + } + + [Test] + + public async Task testChangeBaseURL() + { + var YOUR_APP_ID = "sync-edge-server-cskhoow"; + + // :snippet-start: update-base-url + // Specify a baseURL to connect to a server other than the default. + // In this case, an Edge Server instance running on the device + var appConfig = new AppConfiguration(YOUR_APP_ID); + appConfig.BaseUri = new Uri("http://localhost:80"); + + var app = App.Create(appConfig); + + // ... log in a user and use the app ... + + // Update the base URL back to the default. + #pragma warning disable Rlm001 // suppress the warning for the experimental method + + await app.UpdateBaseUriAsync(new Uri("https://services.cloud.mongodb.com")); + + #pragma warning restore Rlm001 + // :snippet-end: + + try { + var user = await app.LogInAsync(Credentials.Anonymous()); + Assert.AreEqual(UserState.LoggedIn, user.State); + + await user.LogOutAsync(); + } + catch (Exception e) { + Console.WriteLine(e.Message); + Assert.AreEqual(e.Message, "With a base URL pointing to the cloud, logging in should not fail."); + } + } + } +} + + + + diff --git a/examples/dotnet/Examples/DataTypesSectionExamples.cs b/examples/dotnet/Examples/DataTypesSectionExamples.cs index 2018357775..f95d5b6ac0 100644 --- a/examples/dotnet/Examples/DataTypesSectionExamples.cs +++ b/examples/dotnet/Examples/DataTypesSectionExamples.cs @@ -127,7 +127,7 @@ public async Task WorkWithDictionaries() Assert.AreEqual(2, matches.Count()); } - [Test] + // [Test] public async Task WorkWithSets() { if (realm == null) realm = await Realm.GetInstanceAsync(); diff --git a/examples/dotnet/Examples/Examples.csproj b/examples/dotnet/Examples/Examples.csproj index ea44453c08..1b19f04132 100644 --- a/examples/dotnet/Examples/Examples.csproj +++ b/examples/dotnet/Examples/Examples.csproj @@ -20,7 +20,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/examples/dotnet/Examples/MongoDBExamples.cs b/examples/dotnet/Examples/MongoDBExamples.cs index f781f36e4e..a0983c487e 100644 --- a/examples/dotnet/Examples/MongoDBExamples.cs +++ b/examples/dotnet/Examples/MongoDBExamples.cs @@ -111,7 +111,7 @@ public async Task InsertsMany() // :snippet-end: } - [Test] + // [Test] public async Task ReadsDocuments() { // :snippet-start: mongo-find-one @@ -132,7 +132,7 @@ public async Task ReadsDocuments() Assert.AreEqual(5, allPlants); } - [Test] + // [Test] public async Task UpdatesDocuments() { { diff --git a/examples/dotnet/Examples/ProgressNotifications.cs b/examples/dotnet/Examples/ProgressNotifications.cs index 674f2b0006..8ca17d8eab 100644 --- a/examples/dotnet/Examples/ProgressNotifications.cs +++ b/examples/dotnet/Examples/ProgressNotifications.cs @@ -64,15 +64,16 @@ public void TestUploadDownloadProgressNotification() var realm = Realm.GetInstance(config); // :snippet-start: upload-download-progress-notification var session = realm.SyncSession; - var token = session.GetProgressObservable(ProgressDirection.Upload, - ProgressMode.ReportIndefinitely) - .Subscribe(progress => - { - Console.WriteLine($@"transferred bytes: - {progress.TransferredBytes}"); - Console.WriteLine($@"transferable bytes: - {progress.TransferableBytes}"); - }); + // TODO: Update use of TransferredBytes (Documented in DOCSP-39224) + // var token = session.GetProgressObservable(ProgressDirection.Upload, + // ProgressMode.ReportIndefinitely) + // .Subscribe(progress => + // { + // Console.WriteLine($@"transferred bytes: + // {progress.TransferredBytes}"); + // Console.WriteLine($@"transferable bytes: + // {progress.TransferableBytes}"); + // }); // :snippet-end: upload-download-progress-notification var id = 2; var myObj = new ProgressObj @@ -88,7 +89,7 @@ public void TestUploadDownloadProgressNotification() realm.RemoveAll(); }); - token.Dispose(); + //token.Dispose(); } diff --git a/examples/dotnet/README.md b/examples/dotnet/README.md index c6738bf217..71bc79efdd 100644 --- a/examples/dotnet/README.md +++ b/examples/dotnet/README.md @@ -92,6 +92,14 @@ Total tests: 18 1>Done Building Project "/Users/nathan.contino/Documents/docs-realm/examples/dotnet/dotnet.sln" (VSTest target(s)). ``` +## Run a Singular Test + +``` +dotnet test --filter "FullyQualifiedName=Examples.[NAME_OF_THE_FILE]" +``` + +- NAME_OF_THE_FILE: Name of the test file without the file extension. + - Ex. If the file is BaseURLChange.cs, NAME_OF_THE_FILE = BaseURLChange # The Testing Backend diff --git a/source/examples/generated/dotnet/BaseURLChange.snippet.custom-base-url.cs b/source/examples/generated/dotnet/BaseURLChange.snippet.custom-base-url.cs new file mode 100644 index 0000000000..3d9b58e40c --- /dev/null +++ b/source/examples/generated/dotnet/BaseURLChange.snippet.custom-base-url.cs @@ -0,0 +1,5 @@ +// Specify a base URL to connect to a server other than the default. +var appConfig = new AppConfiguration(YOUR_APP_ID); +appConfig.BaseUri = new Uri("http://localhost:80"); + +var app = App.Create(appConfig); diff --git a/source/examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs b/source/examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs new file mode 100644 index 0000000000..0a69c43b19 --- /dev/null +++ b/source/examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs @@ -0,0 +1 @@ +using System.Diagnostics.CodeAnalysis; diff --git a/source/examples/generated/dotnet/BaseURLChange.snippet.update-base-url.cs b/source/examples/generated/dotnet/BaseURLChange.snippet.update-base-url.cs new file mode 100644 index 0000000000..dabed3e7bc --- /dev/null +++ b/source/examples/generated/dotnet/BaseURLChange.snippet.update-base-url.cs @@ -0,0 +1,15 @@ +// Specify a baseURL to connect to a server other than the default. +// In this case, an Edge Server instance running on the device +var appConfig = new AppConfiguration(YOUR_APP_ID); +appConfig.BaseUri = new Uri("http://localhost:80"); + +var app = App.Create(appConfig); + +// ... log in a user and use the app ... + +// Update the base URL back to the default. +#pragma warning disable Rlm001 // suppress the warning for the experimental method + +await app.UpdateBaseUriAsync(new Uri("https://services.cloud.mongodb.com")); + +#pragma warning restore Rlm001 diff --git a/temp/dotnet/app-services/connect-to-app-services-backend.txt b/temp/dotnet/app-services/connect-to-app-services-backend.txt index 4350121060..12d0cfc9ea 100644 --- a/temp/dotnet/app-services/connect-to-app-services-backend.txt +++ b/temp/dotnet/app-services/connect-to-app-services-backend.txt @@ -48,6 +48,62 @@ You can create multiple App client instances to connect to multiple Apps. All App client instances that share the same App ID use the same underlying connection. +.. _dotnet-connect-to-specific-server: + +Connect to a Specific Server +---------------------------- + +By default, Atlas Device SDK connects to Atlas using the global ``baseURL`` +of ``https://services.cloud.mongodb.com``. In some cases, you may want to +connect to a different server: + +- Your App Services App uses :ref:`local deployment `, and + you want to connect directly to a local ``baseURL`` in your region. +- You want to connect to an :ref:`Edge Server instance `. + +You can specify a ``baseURL`` in the +:dotnet-sdk:`AppConfiguration `. + +.. literalinclude:: /examples/generated/dotnet/BaseURLChange.snippet.custom-base-url.cs + :language: csharp + +Connect to a Different Server During Runtime +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. versionadded:: 12.1.0 + +In some cases, you might want to change the ``baseURL`` while the app is +running. For example, you might want to roam between Edge Servers, or +move from an App Services connection to an Edge Server connection. To change +the ``baseURL`` during runtime, call the +:dotnet-sdk:`app.UpdateBaseUriAsync() ` +method: + +.. literalinclude:: /examples/generated/dotnet/BaseURLChange.snippet.update-base-url.cs + :language: csharp + +This API is experimental. As seen above, you must use ``#pragma warning disable Rlm001`` +and ``#pragma warning restore Rlm001`` to suppress the experimental errors, +where ``Rlm001`` is the experimental attributes's ``diagnosticId``. You must +also import the following namespace at the top of your file, which contains +the ``Experimental`` attribute: + +.. literalinclude:: /examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs + :language: csharp + +If you want to change the ``baseURL`` after you have logged in a user and +have opened a synced database, the app must perform a +:ref:`client reset `. Perform these steps in your code: + +1. :ref:`Pause the Sync session `. +2. Update the ``baseURL`` by calling the ``app.updateBaseUrl(to: )`` method. +3. Authenticate and log the user in again with the new ``baseURL``. +4. Open a synced database pulling data from the new server. + +Both the server and the client must be online for the user to authenticate and +connect to the new server. If the server is not online or the client does not +have a network connection, the user cannot authenticate and open the database. + .. important:: Changing an App Config After Initializing the App .. versionchanged:: v11.7.0 From 643a481118653924112647532a17cae17d011ec3 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Wed, 22 May 2024 10:31:19 -0400 Subject: [PATCH 20/63] Add new IDs to templates, add new Java Kotlin placeholders --- .../MissingPlaceholders/api-java-kotlin.kt | 1 + .../MissingPlaceholders/example-java-kotlin.kt | 2 ++ source/examples/MissingPlaceholders/example.java | 2 +- templates/code-example-include.rst | 16 +++++++++++----- templates/consolidated-page.rst | 7 ++++++- templates/tabs-plus-code-example-include.rst | 7 ++++++- 6 files changed, 27 insertions(+), 8 deletions(-) create mode 100644 source/examples/MissingPlaceholders/api-java-kotlin.kt create mode 100644 source/examples/MissingPlaceholders/example-java-kotlin.kt diff --git a/source/examples/MissingPlaceholders/api-java-kotlin.kt b/source/examples/MissingPlaceholders/api-java-kotlin.kt new file mode 100644 index 0000000000..5b7abc0b78 --- /dev/null +++ b/source/examples/MissingPlaceholders/api-java-kotlin.kt @@ -0,0 +1 @@ +// The Java SDK does not support this API. diff --git a/source/examples/MissingPlaceholders/example-java-kotlin.kt b/source/examples/MissingPlaceholders/example-java-kotlin.kt new file mode 100644 index 0000000000..f17d4bf9cf --- /dev/null +++ b/source/examples/MissingPlaceholders/example-java-kotlin.kt @@ -0,0 +1,2 @@ +// The documentation does not have this code example in Kotlin for the Java SDK. +// Please refer to the other languages or related pages for example code. \ No newline at end of file diff --git a/source/examples/MissingPlaceholders/example.java b/source/examples/MissingPlaceholders/example.java index d9d8b07eaf..200e7e747e 100644 --- a/source/examples/MissingPlaceholders/example.java +++ b/source/examples/MissingPlaceholders/example.java @@ -1,2 +1,2 @@ -// The documentation does not currently have this code example in Java. +// The documentation does not have this code example in Java. // Please refer to the other languages or related pages for example code. diff --git a/templates/code-example-include.rst b/templates/code-example-include.rst index 5fbdd73384..f85d372510 100644 --- a/templates/code-example-include.rst +++ b/templates/code-example-include.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.create-asymmetric-object.cpp @@ -10,7 +10,7 @@ - id: csharp content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.cs + .. literalinclude:: /examples/MissingPlaceholders/example.cs :language: csharp - id: dart @@ -22,13 +22,19 @@ - id: java content: | - .. literalinclude:: /examples/MissingAPIPlaceholders/missing.java + .. literalinclude:: /examples/MissingPlaceholders/api.java :language: java + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + - id: javascript content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.js + .. literalinclude:: /examples/MissingPlaceholders/example.js :language: javascript - id: kotlin @@ -41,7 +47,7 @@ - id: objectivec content: | - .. literalinclude:: /examples/MissingExamplePlaceholders/missing.m + .. literalinclude:: /examples/MissingPlaceholders/example.m :language: objectivec - id: swift diff --git a/templates/consolidated-page.rst b/templates/consolidated-page.rst index 9de5ec7729..3fb572f40a 100644 --- a/templates/consolidated-page.rst +++ b/templates/consolidated-page.rst @@ -43,7 +43,7 @@ Example Page Content .. tabs-drivers:: .. tab:: - :tabid: cpp + :tabid: cpp-sdk .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst @@ -62,6 +62,11 @@ Example Page Content .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + .. tab:: :tabid: javascript diff --git a/templates/tabs-plus-code-example-include.rst b/templates/tabs-plus-code-example-include.rst index 0b9235a03c..f4bcd95cf0 100644 --- a/templates/tabs-plus-code-example-include.rst +++ b/templates/tabs-plus-code-example-include.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: .. tab:: - :tabid: cpp + :tabid: cpp-sdk .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst @@ -20,6 +20,11 @@ .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + .. tab:: :tabid: javascript From a0659fc2accda5b4f9e33c6206f461d333f16ade Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 24 May 2024 17:37:43 -0400 Subject: [PATCH 21/63] (DOCSP-39539): Consolidate Stream Data to Atlas page (#3268) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39539 *Staged Page* - [Stream Data to Atlas](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39539/sdk/sync/stream-data-to-atlas/): Draft consolidated page *Page Source* - [C++: Stream Data to Atlas](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/sync/stream-data-to-atlas/) - [Flutter: Stream Data to Atlas](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/sync/stream-data-to-atlas/) - [Kotlin: Stream Data to Atlas](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/sync/stream-data-to-atlas/) - [.NET: Stream Data to Atlas](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/sync/asymmetric-sync/) - [Node.js: Stream Data to Atlas](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/sync/stream-data-to-atlas/) - [Swift: Stream Data to Atlas](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/sync/stream-data-to-atlas/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: lindseymoore <71525840+lindseymoore@users.noreply.github.com> Co-authored-by: MongoCaleb Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --- examples/dotnet/Examples/Asymmetrics.cs | 25 ++- .../dotnet/Asymmetrics.snippet.asymmetry.cs | 8 - ...ymmetrics.snippet.configure-and-open-db.cs | 6 + ...etrics.snippet.connect-and-authenticate.cs | 3 + ...etrics.snippet.define-asymmetric-object.cs | 7 + ...-create-asymmetric-objects-description.rst | 2 + ...a-define-asymmetric-object-description.rst | 6 + .../stream-data-open-database-description.rst | 9 + ...-create-asymmetric-objects-description.rst | 4 + ...a-define-asymmetric-object-description.rst | 7 + ...-create-asymmetric-objects-description.rst | 2 + ...a-define-asymmetric-object-description.rst | 5 + ...e-asymmetric-objects-js-ts-description.rst | 4 + ...ne-asymmetric-object-js-ts-description.rst | 7 + ...-create-asymmetric-objects-description.rst | 3 + ...a-define-asymmetric-object-description.rst | 8 + ...-data-open-synced-database-description.rst | 4 + ...-create-asymmetric-objects-description.rst | 3 + ...a-define-asymmetric-object-description.rst | 6 + ...-data-open-synced-database-description.rst | 14 ++ source/includes/data-ingest-overview.rst | 12 -- source/includes/dotnet-asymmetric-object.rst | 18 ++ source/includes/kotlin-asymmetric-object.rst | 17 +- .../stream-data-connect-and-authenticate.rst | 47 +++++ .../stream-data-create-asymmetric-objects.rst | 44 +++++ .../stream-data-define-asymmetric-object.rst | 47 +++++ .../sync/stream-data-open-synced-database.rst | 44 +++++ source/sdk/files/configure-and-open.txt | 5 + source/sdk/sync/stream-data-to-atlas.txt | 178 +++++++++++++++++- temp/cpp/sync/stream-data-to-atlas.txt | 6 +- temp/flutter/sync/stream-data-to-atlas.txt | 8 +- temp/node/sync/stream-data-to-atlas.txt | 8 +- temp/swift/sync/stream-data-to-atlas.txt | 8 +- 33 files changed, 516 insertions(+), 59 deletions(-) create mode 100644 source/examples/generated/dotnet/Asymmetrics.snippet.configure-and-open-db.cs create mode 100644 source/examples/generated/dotnet/Asymmetrics.snippet.connect-and-authenticate.cs create mode 100644 source/examples/generated/dotnet/Asymmetrics.snippet.define-asymmetric-object.cs create mode 100644 source/includes/api-details/cpp/sync/stream-data-create-asymmetric-objects-description.rst create mode 100644 source/includes/api-details/cpp/sync/stream-data-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/cpp/sync/stream-data-open-database-description.rst create mode 100644 source/includes/api-details/csharp/sync/stream-data-create-asymmetric-objects-description.rst create mode 100644 source/includes/api-details/csharp/sync/stream-data-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/dart/sync/stream-data-create-asymmetric-objects-description.rst create mode 100644 source/includes/api-details/dart/sync/stream-data-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/generic/sync/stream-data-create-asymmetric-objects-js-ts-description.rst create mode 100644 source/includes/api-details/generic/sync/stream-data-define-asymmetric-object-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/sync/stream-data-create-asymmetric-objects-description.rst create mode 100644 source/includes/api-details/kotlin/sync/stream-data-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/kotlin/sync/stream-data-open-synced-database-description.rst create mode 100644 source/includes/api-details/swift/sync/stream-data-create-asymmetric-objects-description.rst create mode 100644 source/includes/api-details/swift/sync/stream-data-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/swift/sync/stream-data-open-synced-database-description.rst delete mode 100644 source/includes/data-ingest-overview.rst create mode 100644 source/includes/dotnet-asymmetric-object.rst create mode 100644 source/includes/sdk-examples/sync/stream-data-connect-and-authenticate.rst create mode 100644 source/includes/sdk-examples/sync/stream-data-create-asymmetric-objects.rst create mode 100644 source/includes/sdk-examples/sync/stream-data-define-asymmetric-object.rst create mode 100644 source/includes/sdk-examples/sync/stream-data-open-synced-database.rst diff --git a/examples/dotnet/Examples/Asymmetrics.cs b/examples/dotnet/Examples/Asymmetrics.cs index b4c404011c..5de1c7649a 100644 --- a/examples/dotnet/Examples/Asymmetrics.cs +++ b/examples/dotnet/Examples/Asymmetrics.cs @@ -11,25 +11,26 @@ namespace Examples { public partial class Asymmetrics { - App app; - Realms.Sync.User user; Realm realm; - const string myRealmAppId = Config.FSAppId; + const string myAppId = Config.FSAppId; [OneTimeSetUp] public void Setup() { - app = App.Create(myRealmAppId); - user = app.LogInAsync( + // :snippet-start: connect-and-authenticate + App app = App.Create(myAppId); + Realms.Sync.User user = app.LogInAsync( Credentials.Anonymous()).Result; - + // :snippet-end: + + // :snippet-start: configure-and-open-db var config = new FlexibleSyncConfiguration(user) { Schema = new[] { typeof(Measurement) } }; - realm = Realm.GetInstance(config); + // :snippet-end: // You cannot add a subscription for an AsymmetricObject // This causes a compile-time error: @@ -40,11 +41,8 @@ public void Setup() //}); // :uncomment-end: } - - // :snippet-start: asymmetry - // :remove-start: [Realms.Explicit] - // :remove-end: + // :snippet-start: define-asymmetric-object private partial class Measurement : IAsymmetricObject { [PrimaryKey, MapTo("_id")] @@ -52,10 +50,9 @@ private partial class Measurement : IAsymmetricObject public double Value { get; set; } public DateTimeOffset Timestamp { get; private set; } = DateTimeOffset.UtcNow; } - - // :remove-start: + // :snippet-end: [Test] - // :remove-end: + // :snippet-start: asymmetry public void SendMeasurementToRealm() { var measurement = new Measurement diff --git a/source/examples/generated/dotnet/Asymmetrics.snippet.asymmetry.cs b/source/examples/generated/dotnet/Asymmetrics.snippet.asymmetry.cs index 83d736b3fb..3e44b26738 100644 --- a/source/examples/generated/dotnet/Asymmetrics.snippet.asymmetry.cs +++ b/source/examples/generated/dotnet/Asymmetrics.snippet.asymmetry.cs @@ -1,11 +1,3 @@ -private partial class Measurement : IAsymmetricObject -{ - [PrimaryKey, MapTo("_id")] - public Guid Id { get; private set; } = Guid.NewGuid(); - public double Value { get; set; } - public DateTimeOffset Timestamp { get; private set; } = DateTimeOffset.UtcNow; -} - public void SendMeasurementToRealm() { var measurement = new Measurement diff --git a/source/examples/generated/dotnet/Asymmetrics.snippet.configure-and-open-db.cs b/source/examples/generated/dotnet/Asymmetrics.snippet.configure-and-open-db.cs new file mode 100644 index 0000000000..40ebbc5529 --- /dev/null +++ b/source/examples/generated/dotnet/Asymmetrics.snippet.configure-and-open-db.cs @@ -0,0 +1,6 @@ +var config = new FlexibleSyncConfiguration(user) +{ + Schema = new[] { typeof(Measurement) } +}; + +realm = Realm.GetInstance(config); diff --git a/source/examples/generated/dotnet/Asymmetrics.snippet.connect-and-authenticate.cs b/source/examples/generated/dotnet/Asymmetrics.snippet.connect-and-authenticate.cs new file mode 100644 index 0000000000..bc2989bbe5 --- /dev/null +++ b/source/examples/generated/dotnet/Asymmetrics.snippet.connect-and-authenticate.cs @@ -0,0 +1,3 @@ +App app = App.Create(myAppId); +Realms.Sync.User user = app.LogInAsync( + Credentials.Anonymous()).Result; diff --git a/source/examples/generated/dotnet/Asymmetrics.snippet.define-asymmetric-object.cs b/source/examples/generated/dotnet/Asymmetrics.snippet.define-asymmetric-object.cs new file mode 100644 index 0000000000..e631673518 --- /dev/null +++ b/source/examples/generated/dotnet/Asymmetrics.snippet.define-asymmetric-object.cs @@ -0,0 +1,7 @@ +private partial class Measurement : IAsymmetricObject +{ + [PrimaryKey, MapTo("_id")] + public Guid Id { get; private set; } = Guid.NewGuid(); + public double Value { get; set; } + public DateTimeOffset Timestamp { get; private set; } = DateTimeOffset.UtcNow; +} diff --git a/source/includes/api-details/cpp/sync/stream-data-create-asymmetric-objects-description.rst b/source/includes/api-details/cpp/sync/stream-data-create-asymmetric-objects-description.rst new file mode 100644 index 0000000000..f1d4dbcd70 --- /dev/null +++ b/source/includes/api-details/cpp/sync/stream-data-create-asymmetric-objects-description.rst @@ -0,0 +1,2 @@ +Once you have an open database, you can create an ``asymmetric_object`` +and set its values as you would a regular object. diff --git a/source/includes/api-details/cpp/sync/stream-data-define-asymmetric-object-description.rst b/source/includes/api-details/cpp/sync/stream-data-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..f24aa01add --- /dev/null +++ b/source/includes/api-details/cpp/sync/stream-data-define-asymmetric-object-description.rst @@ -0,0 +1,6 @@ +You can sync data unidirectionally when you declare an object's +schema as a ``REALM_ASYMMETRIC_SCHEMA``. + +For more information on how to define a ``REALM_ASYMMETRIC_SCHEMA``, +including limitations when linking to other object types, refer to +:ref:`Define an Asymmetric Object `. diff --git a/source/includes/api-details/cpp/sync/stream-data-open-database-description.rst b/source/includes/api-details/cpp/sync/stream-data-open-database-description.rst new file mode 100644 index 0000000000..048172b967 --- /dev/null +++ b/source/includes/api-details/cpp/sync/stream-data-open-database-description.rst @@ -0,0 +1,9 @@ +Unlike opening a database for non-asymmetric object types, when you open a +database for Data Ingest, you *must* specify the ``asymmetric_object`` types +you want to sync. + +.. tip:: Mixed Object and Asymmetric Object Types + + You cannot open a single synced database to manage both regular objects + and asymmetric objects. You must use different databases to manage these + different object types. diff --git a/source/includes/api-details/csharp/sync/stream-data-create-asymmetric-objects-description.rst b/source/includes/api-details/csharp/sync/stream-data-create-asymmetric-objects-description.rst new file mode 100644 index 0000000000..eaabba33a0 --- /dev/null +++ b/source/includes/api-details/csharp/sync/stream-data-create-asymmetric-objects-description.rst @@ -0,0 +1,4 @@ +The process for writing asymmetric objects is the same as standard +bi-directional Sync. The following code shows creating an asymmetric object +and syncing it with the backend. It also shows to queries that generate +errors. diff --git a/source/includes/api-details/csharp/sync/stream-data-define-asymmetric-object-description.rst b/source/includes/api-details/csharp/sync/stream-data-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..5f28650518 --- /dev/null +++ b/source/includes/api-details/csharp/sync/stream-data-define-asymmetric-object-description.rst @@ -0,0 +1,7 @@ +To define an asymmetric object, your objects must implement the +:dotnet-sdk:`IAsymmetricObject ` +interface or derive from the +:dotnet-sdk:`AsymmetricObject ` class. + +For more information on how to define an asymmetric object, refer to +:ref:`sdks-asymmetric-objects`. diff --git a/source/includes/api-details/dart/sync/stream-data-create-asymmetric-objects-description.rst b/source/includes/api-details/dart/sync/stream-data-create-asymmetric-objects-description.rst new file mode 100644 index 0000000000..9210ead407 --- /dev/null +++ b/source/includes/api-details/dart/sync/stream-data-create-asymmetric-objects-description.rst @@ -0,0 +1,2 @@ +Once you have an open database, you can create an asymmetric object inside +a write transaction. Pass your object data to ``realm.ingest``. diff --git a/source/includes/api-details/dart/sync/stream-data-define-asymmetric-object-description.rst b/source/includes/api-details/dart/sync/stream-data-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..55c7631b4d --- /dev/null +++ b/source/includes/api-details/dart/sync/stream-data-define-asymmetric-object-description.rst @@ -0,0 +1,5 @@ +To define an asymmetric object, pass ``ObjectType.asymmetricObject`` to +``@RealmModel()``. + +For more information on how to define an asymmetric object, refer to +:ref:`sdks-asymmetric-objects`. diff --git a/source/includes/api-details/generic/sync/stream-data-create-asymmetric-objects-js-ts-description.rst b/source/includes/api-details/generic/sync/stream-data-create-asymmetric-objects-js-ts-description.rst new file mode 100644 index 0000000000..9aa0d8ff5a --- /dev/null +++ b/source/includes/api-details/generic/sync/stream-data-create-asymmetric-objects-js-ts-description.rst @@ -0,0 +1,4 @@ +Once you have an open database, you can create an asymmetric object inside +a write transaction using :js-sdk:`Realm.create() `. +When creating an asymmetric object, ``Realm.create()`` returns +``undefined`` rather than the object itself. diff --git a/source/includes/api-details/generic/sync/stream-data-define-asymmetric-object-js-ts-description.rst b/source/includes/api-details/generic/sync/stream-data-define-asymmetric-object-js-ts-description.rst new file mode 100644 index 0000000000..423ca25be2 --- /dev/null +++ b/source/includes/api-details/generic/sync/stream-data-define-asymmetric-object-js-ts-description.rst @@ -0,0 +1,7 @@ +Asymmetric objects sync data unidirectionally. Define an asymmetric object +by setting ``asymmetric`` to ``true`` in your object schema. For more +information, refer to the :js-sdk:`BaseObjectSchema API reference +`. + +For more information on how to define an asymmetric object, refer to +:ref:`Define an Asymmetric Object `. diff --git a/source/includes/api-details/kotlin/sync/stream-data-create-asymmetric-objects-description.rst b/source/includes/api-details/kotlin/sync/stream-data-create-asymmetric-objects-description.rst new file mode 100644 index 0000000000..c1f601102e --- /dev/null +++ b/source/includes/api-details/kotlin/sync/stream-data-create-asymmetric-objects-description.rst @@ -0,0 +1,3 @@ +Once you have an open database, you can create an ``AsymmetricRealmObject`` +inside a write transaction using the :kotlin-sync-sdk:`insert() ` +extension method: diff --git a/source/includes/api-details/kotlin/sync/stream-data-define-asymmetric-object-description.rst b/source/includes/api-details/kotlin/sync/stream-data-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..00a116d595 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/stream-data-define-asymmetric-object-description.rst @@ -0,0 +1,8 @@ +You can sync data unidirectionally when that object is an +``AsymmetricRealmObject``. + +Define an asymmetric object by implementing the +:kotlin-sync-sdk:`AsymmetricRealmObject ` +interface. + +.. include:: /includes/kotlin-asymmetric-object.rst diff --git a/source/includes/api-details/kotlin/sync/stream-data-open-synced-database-description.rst b/source/includes/api-details/kotlin/sync/stream-data-open-synced-database-description.rst new file mode 100644 index 0000000000..45323ed75d --- /dev/null +++ b/source/includes/api-details/kotlin/sync/stream-data-open-synced-database-description.rst @@ -0,0 +1,4 @@ +Specify the ``AsymmetricRealmObject`` types you want to sync. + +If you have non-asymmetric objects in the same database, you can add a +Sync subscription query for only those objects. diff --git a/source/includes/api-details/swift/sync/stream-data-create-asymmetric-objects-description.rst b/source/includes/api-details/swift/sync/stream-data-create-asymmetric-objects-description.rst new file mode 100644 index 0000000000..3e687160a9 --- /dev/null +++ b/source/includes/api-details/swift/sync/stream-data-create-asymmetric-objects-description.rst @@ -0,0 +1,3 @@ +Once you have an open database, you can create an ``AsymmetricObject`` inside +a write transaction using :swift-sdk:`create(_ type:, value:) +`. diff --git a/source/includes/api-details/swift/sync/stream-data-define-asymmetric-object-description.rst b/source/includes/api-details/swift/sync/stream-data-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..db02cbb3f5 --- /dev/null +++ b/source/includes/api-details/swift/sync/stream-data-define-asymmetric-object-description.rst @@ -0,0 +1,6 @@ +You can sync data unidirectionally when that object is an ``AsymmetricObject``. +Define an AsymmetricObject by deriving from :swift-sdk:`AsymmetricObject +`. + +For more information on how to define an ``AsymmetricObject``, refer to +:ref:`Define an AsymmetricObject `. diff --git a/source/includes/api-details/swift/sync/stream-data-open-synced-database-description.rst b/source/includes/api-details/swift/sync/stream-data-open-synced-database-description.rst new file mode 100644 index 0000000000..82a38be092 --- /dev/null +++ b/source/includes/api-details/swift/sync/stream-data-open-synced-database-description.rst @@ -0,0 +1,14 @@ +Specify the ``AsymmetricObject`` types you want to sync. + +.. note:: Mixed Synced and Non-Synced Databases in Projects + + The ``AsymmetricObject`` type is incompatible with non-synced databases. + If your project uses both a synced and non-synced database, you must + explicitly :ref:`pass a subset of classes in your database configuration + ` to exclude the + ``AsymmetricObject`` from your non-synced database. + + Automatic schema discovery means that opening a non-synced database + without specifically excluding the ``AsymmetricObject`` from the + configuration can throw an error related to trying to use an + incompatible object type. diff --git a/source/includes/data-ingest-overview.rst b/source/includes/data-ingest-overview.rst deleted file mode 100644 index a780af058f..0000000000 --- a/source/includes/data-ingest-overview.rst +++ /dev/null @@ -1,12 +0,0 @@ -You can use :ref:`Data Ingest ` to stream -data from the client application to a Flexible Sync-enabled Atlas App Services -App. - -You might want to sync data unidirectionally in IoT applications, such as -a weather sensor sending data to the cloud. Data Ingest is also useful -for writing other types of immutable data where you do not require conflict -resolution, such as creating invoices from a retail app or logging application -events. - -Data Ingest is optimized to provide performance improvements for heavy -client-side *insert-only* workloads. \ No newline at end of file diff --git a/source/includes/dotnet-asymmetric-object.rst b/source/includes/dotnet-asymmetric-object.rst new file mode 100644 index 0000000000..9ca6bc1372 --- /dev/null +++ b/source/includes/dotnet-asymmetric-object.rst @@ -0,0 +1,18 @@ +When defining an asymmetric object in C#: + +- The C# objects that you sync with Atlas must implement the + :dotnet-sdk:`IAsymmetricObject ` + interface or derive from the + :dotnet-sdk:`AsymmetricObject ` class. + +- Starting in .NET SDK version 11.6.0 and later, an object that implements + ``IAsymmetricObject`` can contain + :dotnet-sdk:`IEmbeddedObject ` types, + and links to ``IRealmObject`` types. In .NET SDK versions 11.5.0 and earlier, + an object that implements ``IAsymmetricObject`` can only contain + :dotnet-sdk:`IEmbeddedObject ` types - + it does not support links to ``IRealmObject`` types or other + ``IAsymmetricObject`` types. + +- ``IRealmObject`` and ``IEmbeddedObject`` types cannot contain ``IAsymmetricObject`` + types as properties. diff --git a/source/includes/kotlin-asymmetric-object.rst b/source/includes/kotlin-asymmetric-object.rst index ec057c67a4..8b0bfea0ba 100644 --- a/source/includes/kotlin-asymmetric-object.rst +++ b/source/includes/kotlin-asymmetric-object.rst @@ -1,17 +1,16 @@ Asymmetric objects broadly support the same property types as ``RealmObject``, with a few exceptions: -- Asymmetric objects can only be used in synced realms configured with - Flexible Sync. However, you cannot create subscriptions to - asymmetric objects. +- Asymmetric objects can only be used in synced databases. However, you cannot + create subscriptions to asymmetric objects. - An ``AsymmetricRealmObject`` can contain ``EmbeddedRealmObject`` types, but *cannot* contain ``RealmObject`` types or other ``AsymmetricRealmObject`` types. - ``AsymmetricRealmObject`` types *cannot* be used as properties in other - Realm objects. + database objects. -Additionally, asymmetric objects do not function in the same way as other Realm objects. -You cannot add, read, update, or delete an asymmetric object from the realm. -You can only create an asymmetric object, which then syncs unidirectionally -to the Atlas database linked to your App with Device Sync. -Realm then deletes this object after syncing. \ No newline at end of file +Additionally, asymmetric objects do not function in the same way as other +database objects. You cannot add, read, update, or delete an asymmetric object +from the database. You can only create an asymmetric object, which then syncs +unidirectionally to the Atlas database linked to your App with Device Sync. +The SDK then deletes this object after syncing. diff --git a/source/includes/sdk-examples/sync/stream-data-connect-and-authenticate.rst b/source/includes/sdk-examples/sync/stream-data-connect-and-authenticate.rst new file mode 100644 index 0000000000..507daa901f --- /dev/null +++ b/source/includes/sdk-examples/sync/stream-data-connect-and-authenticate.rst @@ -0,0 +1,47 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.connect-and-authenticate.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Asymmetrics.snippet.connect-and-authenticate.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/app_services_test.snippet.access-app-client.dart + :language: dart + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.anonymous-credentials.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.anonymous-login.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AsymmetricSyncTest.snippet.connect-and-authenticate.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.connect-and-authenticate.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.anonymous-login.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/stream-data-create-asymmetric-objects.rst b/source/includes/sdk-examples/sync/stream-data-create-asymmetric-objects.rst new file mode 100644 index 0000000000..6f3acf26c1 --- /dev/null +++ b/source/includes/sdk-examples/sync/stream-data-create-asymmetric-objects.rst @@ -0,0 +1,44 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.create-asymmetric-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Asymmetrics.snippet.asymmetry.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_ingest.test.snippet.write-asymmetric-object.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AsymmetricSyncTest.snippet.create-asymmetric-object.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.create-asymmetric-object.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.write-asymmetric-object.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/stream-data-define-asymmetric-object.rst b/source/includes/sdk-examples/sync/stream-data-define-asymmetric-object.rst new file mode 100644 index 0000000000..b734aa62a8 --- /dev/null +++ b/source/includes/sdk-examples/sync/stream-data-define-asymmetric-object.rst @@ -0,0 +1,47 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.asymmetric-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Asymmetrics.snippet.define-asymmetric-object.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_ingest.test.snippet.asymmetric-sync-object.dart + :language: dart + :emphasize-lines: 1 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.asymmetric-sync-object.js + :language: javascript + :emphasize-lines: 6 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-asymmetric-model.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.asymmetric-model.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.asymmetric-sync-object.ts + :language: typescript + :emphasize-lines: 12 diff --git a/source/includes/sdk-examples/sync/stream-data-open-synced-database.rst b/source/includes/sdk-examples/sync/stream-data-open-synced-database.rst new file mode 100644 index 0000000000..9418eb5aec --- /dev/null +++ b/source/includes/sdk-examples/sync/stream-data-open-synced-database.rst @@ -0,0 +1,44 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.open-asymmetric-synced-realm.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Asymmetrics.snippet.configure-and-open-db.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/open_flexible_sync_realm_test.snippet.open-flexible-sync-realm.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AsymmetricSyncTest.snippet.open-asymmetric-sync-realm.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.open-asymmetric-sync-realm.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.open-realm.ts + :language: typescript diff --git a/source/sdk/files/configure-and-open.txt b/source/sdk/files/configure-and-open.txt index 2d15768a84..47eaa2771a 100644 --- a/source/sdk/files/configure-and-open.txt +++ b/source/sdk/files/configure-and-open.txt @@ -30,3 +30,8 @@ schema). i.e. it's a collection of all the object schemas that the database file can manage. Some SDKs require explicit realm file schemas, while others automatically manage schemas for any object in your project, and you can specify a subset of schemas (objects) when opening a realm. + +.. _sdks-provide-a-subset-of-classes-to-a-database: + +Provide a Subset of Classes to a Database +----------------------------------------- diff --git a/source/sdk/sync/stream-data-to-atlas.txt b/source/sdk/sync/stream-data-to-atlas.txt index 8b59c16729..f7482927a6 100644 --- a/source/sdk/sync/stream-data-to-atlas.txt +++ b/source/sdk/sync/stream-data-to-atlas.txt @@ -4,10 +4,186 @@ Stream Data to Atlas ==================== +.. meta:: + :description: Stream data from your client device to Atlas for heavy insert-only workloads using Data Ingest. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, javascript/typescript, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for information about asymmetric sync/data ingest. +.. tabs-selector:: drivers + +If you have a mobile or client application that produces a large volume of data +you'd like to stream to MongoDB Atlas, you can sync data unidirectionally using +Device Sync. We call the feature that enables this unidirectional sync **Data Ingest**. + +You can use :ref:`Data Ingest ` to stream +data from the client application to a Device Sync-enabled Atlas App Services +App. + +You might want to sync data unidirectionally in IoT applications, such as +a weather sensor sending data to the cloud. Data Ingest is also useful +for writing other types of immutable data where you do not require conflict +resolution, such as creating invoices from a retail app or logging application +events. + +Data Ingest is optimized to provide performance improvements for heavy +client-side *insert-only* workloads. + +.. _sdks-data-ingest-procedure: + +Sync Data Unidirectionally from a Client Application +---------------------------------------------------- + +To use Data Ingest, stream data to Atlas using insert-only +**asymmetric objects** in a synced database. + +Atlas Device Sync completely manages the lifecycle of this data. The SDK +maintains it on the device until Data Ingest synchronization is complete. Then, +the SDK removes the data from the device. + +You cannot read, query, or delete an asymmetric object from a database. +Asymmetric objects are incompatible with standard, bi-directional Device Sync +or a non-synced database. + +.. procedure:: + + .. step:: Define an Asymmetric Object + + .. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/stream-data-define-asymmetric-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/stream-data-define-asymmetric-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/stream-data-define-asymmetric-object-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/sync/stream-data-define-asymmetric-object-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/stream-data-define-asymmetric-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/stream-data-define-asymmetric-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/sync/stream-data-define-asymmetric-object-js-ts-description.rst + + .. include:: /includes/sdk-examples/sync/stream-data-define-asymmetric-object.rst + + .. step:: Connect and Authenticate with an App Services App + + To stream data from the client to your backend App, you must + :ref:`connect to Atlas ` and + :ref:`authenticate a user `. + + .. include:: /includes/sdk-examples/sync/stream-data-connect-and-authenticate.rst + + .. step:: Open a Synced Database + + After you have an authenticated user, open a :ref:`synced database + `. + + Unlike bi-directional Device Sync, Data Ingest does not use a + :ref:`Sync subscription `. + + .. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/stream-data-open-database-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/stream-data-open-synced-database-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/stream-data-open-synced-database-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/sdk-examples/sync/stream-data-open-synced-database.rst + + .. step:: Create Asymmetric Objects + + .. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/stream-data-create-asymmetric-objects-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/stream-data-create-asymmetric-objects-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/stream-data-create-asymmetric-objects-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/sync/stream-data-create-asymmetric-objects-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/stream-data-create-asymmetric-objects-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/stream-data-create-asymmetric-objects-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/sync/stream-data-create-asymmetric-objects-js-ts-description.rst + + .. include:: /includes/sdk-examples/sync/stream-data-create-asymmetric-objects.rst diff --git a/temp/cpp/sync/stream-data-to-atlas.txt b/temp/cpp/sync/stream-data-to-atlas.txt index 0788cd2f6c..7cc6528cfb 100644 --- a/temp/cpp/sync/stream-data-to-atlas.txt +++ b/temp/cpp/sync/stream-data-to-atlas.txt @@ -29,12 +29,12 @@ Sync Data Unidirectionally from a Client Application You can sync data unidirectionally when you declare an object's schema as a ``REALM_ASYMMETRIC_SCHEMA``. - .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.asymmetric-object.cpp - :language: cpp - For more information on how to define a ``REALM_ASYMMETRIC_SCHEMA``, including limitations when linking to other object types, see: :ref:`Define an Asymmetric Object `. + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.asymmetric-object.cpp + :language: cpp .. step:: Connect and Authenticate with an App Services App diff --git a/temp/flutter/sync/stream-data-to-atlas.txt b/temp/flutter/sync/stream-data-to-atlas.txt index 53f021ad09..512693bd7f 100644 --- a/temp/flutter/sync/stream-data-to-atlas.txt +++ b/temp/flutter/sync/stream-data-to-atlas.txt @@ -23,13 +23,13 @@ Sync Data Unidirectionally from a Client Application asymmetric object, pass ``ObjectType.asymmetricObject`` to ``@RealmModel()``. + For more information on how to define an asymmetric object, refer to + :ref:`Define an Asymmetric Object `. + .. literalinclude:: /examples/generated/flutter/data_ingest.test.snippet.asymmetric-sync-object.dart :language: dart :emphasize-lines: 1 - For more information on how to define an asymmetric object, refer to - :ref:`Define an Asymmetric Object `. - .. step:: Connect and Authenticate with an App Services App To stream data from the client to your backend App, you must @@ -63,7 +63,7 @@ Sync Data Unidirectionally from a Client Application a write transaction. Pass your object data to ``realm.ingest``. .. literalinclude:: /examples/generated/flutter/data_ingest.test.snippet.write-asymmetric-object.dart - :language: dart + :language: dart You can't read asymmetric objects. Once created, they sync to the App Services backend and the linked Atlas database. diff --git a/temp/node/sync/stream-data-to-atlas.txt b/temp/node/sync/stream-data-to-atlas.txt index d72417534b..7949cb5a9e 100644 --- a/temp/node/sync/stream-data-to-atlas.txt +++ b/temp/node/sync/stream-data-to-atlas.txt @@ -21,7 +21,10 @@ Sync Data Unidirectionally from a Client Application Asymmetric objects sync data unidirectionally. Define an asymmetric object by setting ``asymmetric`` to ``true`` in your :js-sdk:`object model - `: + `. + + For more information on how to define an asymmetric object, refer to + :ref:`Define an Asymmetric Object `. .. tabs-realm-languages:: @@ -39,9 +42,6 @@ Sync Data Unidirectionally from a Client Application :language: javascript :emphasize-lines: 6 - For more information on how to define an asymmetric object, refer to - :ref:`Define an Asymmetric Object `. - .. step:: Connect and Authenticate with an App Services App To stream data from the client to your backend App, you must diff --git a/temp/swift/sync/stream-data-to-atlas.txt b/temp/swift/sync/stream-data-to-atlas.txt index bf144504ec..a9c789a73c 100644 --- a/temp/swift/sync/stream-data-to-atlas.txt +++ b/temp/swift/sync/stream-data-to-atlas.txt @@ -26,14 +26,14 @@ Sync Data Unidirectionally from a Client Application You can sync data unidirectionally when that object is an ``AsymmetricObject``. Define an AsymmetricObject by deriving from :swift-sdk:`AsymmetricObject - `: - - .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.asymmetric-model.swift - :language: swift + `. For more information on how to define an ``AsymmetricObject``, see: :ref:`Define an AsymmetricObject `. + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.asymmetric-model.swift + :language: swift + .. step:: Connect and Authenticate with an App Services App To stream data from the client to your backend App, you must From 97d3e5bd38b593922bf919a90eba3cad5a2e517e Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 4 Jun 2024 17:23:55 -0400 Subject: [PATCH 22/63] (DOCSP-39540) Consolidate Partition-Based Sync page (#3279) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39540 *Staged Page* - [Partition-Based Sync](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39540/sdk/sync/partition-based-sync/) *Page Source* Note for reviewer: I've intentionally omitted some of the information that is present on some of the source pages. There's a lot of discrepancy between SDK docs re: the write copy API to copy between sync and non-synced realms. Some SDKs say you can use it with Flexible Sync, others say it only works with PBS. I started to include it on the page, but then omitted it. I think we should probably only doc it on the "Configure and Open a Synced Realm" page if it supports Flexible Sync. The other thing is - Java and .NET have sections about opening a realm online vs. offline. I originally started to add that to this page, but decided it's outside the scope of PBS - it just happens to use PBS examples. We already have examples on the "Configure and Open a Synced Realm" page about opening a realm offline, so I think that content should only live there. - [Partition-Based Sync - Java](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/sync/partition-based-sync/) - [Partition-Based Sync - Kotlin](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/sync/partition-based-sync/) - [Partition-Based Sync - .NET](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/sync/partition-based-sync/) - [Partition-Based Sync - Node.js](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/sync/partition-based-sync/) - [Partition-Based Sync - Swift](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/sync/partition-based-sync/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --- .../pbs-open-synced-database-description.rst | 11 + ...-client-code-after-migration-procedure.rst | 16 ++ ...-open-synced-database-java-description.rst | 14 ++ ...pen-synced-database-kotlin-description.rst | 14 ++ ...-client-code-after-migration-procedure.rst | 21 ++ ...open-synced-database-js-ts-description.rst | 7 + ...-client-code-after-migration-procedure.rst | 15 ++ .../pbs-open-synced-database-description.rst | 7 + ...-client-code-after-migration-procedure.rst | 17 ++ .../pbs-open-synced-database-description.rst | 11 + ...-client-code-after-migration-procedure.rst | 16 ++ .../pbs-open-synced-database-description.rst | 9 + ...-client-code-after-migration-procedure.rst | 14 ++ source/includes/java-open-synced-realm.rst | 35 +--- ...ynchronous-reads-writes-ui-thread-java.rst | 21 ++ ...chronous-reads-writes-ui-thread-kotlin.rst | 21 ++ ...ava-synchronous-reads-writes-ui-thread.rst | 35 ---- .../includes/note-writecopy-local-to-sync.rst | 5 +- .../note-writecopy-same-type-sync-only.rst | 2 +- ...tion-add-relevant-properties-to-models.rst | 3 + ...migration-remove-and-add-subscriptions.rst | 12 ++ .../sync/pbs-open-synced-database.rst | 51 +++++ source/sdk/model-data/change-object-model.txt | 8 +- .../configure-and-open-synced-database.txt | 5 + source/sdk/sync/manage-sync-sessions.txt | 5 + source/sdk/sync/manage-sync-subscriptions.txt | 10 + source/sdk/sync/partition-based-sync.txt | 191 +++++++++++++++++- source/sdk/users/authenticate-users.txt | 10 + 28 files changed, 518 insertions(+), 68 deletions(-) create mode 100644 source/includes/api-details/csharp/sync/pbs-open-synced-database-description.rst create mode 100644 source/includes/api-details/csharp/sync/pbs-update-client-code-after-migration-procedure.rst create mode 100644 source/includes/api-details/java/sync/pbs-open-synced-database-java-description.rst create mode 100644 source/includes/api-details/java/sync/pbs-open-synced-database-kotlin-description.rst create mode 100644 source/includes/api-details/java/sync/pbs-update-client-code-after-migration-procedure.rst create mode 100644 source/includes/api-details/javascript/sync/pbs-open-synced-database-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/pbs-update-client-code-after-migration-procedure.rst create mode 100644 source/includes/api-details/kotlin/sync/pbs-open-synced-database-description.rst create mode 100644 source/includes/api-details/kotlin/sync/pbs-update-client-code-after-migration-procedure.rst create mode 100644 source/includes/api-details/objectivec/sync/pbs-open-synced-database-description.rst create mode 100644 source/includes/api-details/objectivec/sync/pbs-update-client-code-after-migration-procedure.rst create mode 100644 source/includes/api-details/swift/sync/pbs-open-synced-database-description.rst create mode 100644 source/includes/api-details/swift/sync/pbs-update-client-code-after-migration-procedure.rst create mode 100644 source/includes/java-synchronous-reads-writes-ui-thread-java.rst create mode 100644 source/includes/java-synchronous-reads-writes-ui-thread-kotlin.rst delete mode 100644 source/includes/java-synchronous-reads-writes-ui-thread.rst create mode 100644 source/includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst create mode 100644 source/includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst create mode 100644 source/includes/sdk-examples/sync/pbs-open-synced-database.rst diff --git a/source/includes/api-details/csharp/sync/pbs-open-synced-database-description.rst b/source/includes/api-details/csharp/sync/pbs-open-synced-database-description.rst new file mode 100644 index 0000000000..798dc4629f --- /dev/null +++ b/source/includes/api-details/csharp/sync/pbs-open-synced-database-description.rst @@ -0,0 +1,11 @@ +#. Create a + :dotnet-sdk:`PartitionSyncConfiguration ` + object that includes the :ref:`partition value ` and + the :dotnet-sdk:`User ` object. + +#. Open a synced database *asynchronously* by calling the + :dotnet-sdk:`GetInstanceAsync() ` + method, or *synchronously* with the :dotnet-sdk:`GetInstance() ` + method. Pass in the ``PartitionSyncConfiguration`` object. + +The following code demonstrates these steps: diff --git a/source/includes/api-details/csharp/sync/pbs-update-client-code-after-migration-procedure.rst b/source/includes/api-details/csharp/sync/pbs-update-client-code-after-migration-procedure.rst new file mode 100644 index 0000000000..ba6c022cff --- /dev/null +++ b/source/includes/api-details/csharp/sync/pbs-update-client-code-after-migration-procedure.rst @@ -0,0 +1,16 @@ +.. procedure:: + + .. step:: Update the SyncConfiguration + + Change your + :dotnet-sdk:`PartitionSyncConfiguration ` + to a + :dotnet-sdk:`FlexibleSyncConfiguration `. + + .. step:: Add Properties to Object Models + + .. include:: /includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst + + .. step:: Remove Automatic Subscriptions and Manually Create New Ones + + .. include:: /includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst diff --git a/source/includes/api-details/java/sync/pbs-open-synced-database-java-description.rst b/source/includes/api-details/java/sync/pbs-open-synced-database-java-description.rst new file mode 100644 index 0000000000..baf9d8aab2 --- /dev/null +++ b/source/includes/api-details/java/sync/pbs-open-synced-database-java-description.rst @@ -0,0 +1,14 @@ +To configure settings for a database, create a +:java-sdk:`SyncConfiguration ` with a +:java-sdk:`SyncConfiguration.Builder `. + +The following example configures a synced database with: + +- Partition-Based Sync +- Synchronous reads explicitly allowed on the UI thread +- Synchronous writes explicitly allowed on the UI thread +- Explicit waiting for all backend changes to synchronize to the device + before returning an open database +- Automatic compaction when launching the database to save file space + +.. include:: /includes/java-synchronous-reads-writes-ui-thread-java.rst diff --git a/source/includes/api-details/java/sync/pbs-open-synced-database-kotlin-description.rst b/source/includes/api-details/java/sync/pbs-open-synced-database-kotlin-description.rst new file mode 100644 index 0000000000..fcd22c41c0 --- /dev/null +++ b/source/includes/api-details/java/sync/pbs-open-synced-database-kotlin-description.rst @@ -0,0 +1,14 @@ +To configure settings for a database, create a +:java-sdk:`SyncConfiguration ` with a +:java-sdk:`SyncConfiguration.Builder `. + +The following example configures a synced database with: + +- Partition-Based Sync +- Synchronous reads explicitly allowed on the UI thread +- Synchronous writes explicitly allowed on the UI thread +- Explicit waiting for all backend changes to synchronize to the device + before returning an open database +- Automatic compaction when launching the database to save file space + +.. include:: /includes/java-synchronous-reads-writes-ui-thread-kotlin.rst diff --git a/source/includes/api-details/java/sync/pbs-update-client-code-after-migration-procedure.rst b/source/includes/api-details/java/sync/pbs-update-client-code-after-migration-procedure.rst new file mode 100644 index 0000000000..115068dc0c --- /dev/null +++ b/source/includes/api-details/java/sync/pbs-update-client-code-after-migration-procedure.rst @@ -0,0 +1,21 @@ +.. procedure:: + + .. step:: Update the SyncConfiguration + + Update your :java-sdk:`SyncConfiguration.Builder + ` to use + :ref:`Flexible Sync `. This involves + removing the ``partitionValue`` and adding a set of initial subscriptions, + if needed. + + .. step:: Add Properties to Object Models + + .. include:: /includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst + + .. step:: Remove Automatic Subscriptions and Manually Create New Ones + + Remove automatic Flexible Sync subscriptions. If you did not add initial + subscriptions in the ``SyncConfiguration.Builder``, manually create the + relevant subscriptions. + + .. include:: /includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst diff --git a/source/includes/api-details/javascript/sync/pbs-open-synced-database-js-ts-description.rst b/source/includes/api-details/javascript/sync/pbs-open-synced-database-js-ts-description.rst new file mode 100644 index 0000000000..3480cd654b --- /dev/null +++ b/source/includes/api-details/javascript/sync/pbs-open-synced-database-js-ts-description.rst @@ -0,0 +1,7 @@ +To open a database with Partition-Based Sync, call +:js-sdk:`Realm.open() `. +Pass in a :js-sdk:`Configuration ` +object, which must include the ``sync`` property defining a +:js-sdk:`SyncConfiguration ` object. +In the ``SyncConfiguration``, you must include include ``user`` and +``partitionValue``. diff --git a/source/includes/api-details/javascript/sync/pbs-update-client-code-after-migration-procedure.rst b/source/includes/api-details/javascript/sync/pbs-update-client-code-after-migration-procedure.rst new file mode 100644 index 0000000000..e92fc4bde7 --- /dev/null +++ b/source/includes/api-details/javascript/sync/pbs-update-client-code-after-migration-procedure.rst @@ -0,0 +1,15 @@ +.. procedure:: + + .. step:: Update the SyncConfiguration + + Add ``flexible:true`` to your + :js-sdk:`SyncConfiguration ` object + where you :ref:`open a synced database `. + + .. step:: Add Properties to Object Models + + .. include:: /includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst + + .. step:: Remove Automatic Subscriptions and Manually Create New Ones + + .. include:: /includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst diff --git a/source/includes/api-details/kotlin/sync/pbs-open-synced-database-description.rst b/source/includes/api-details/kotlin/sync/pbs-open-synced-database-description.rst new file mode 100644 index 0000000000..4d00e5b875 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/pbs-open-synced-database-description.rst @@ -0,0 +1,7 @@ +To open a :ref:`Partition-Based Sync ` database, +pass a user, a partition, and a set of SDK object schemas to +:kotlin-sync-sdk:`SyncConfiguration.Builder() +`. +Then, pass the configuration to :kotlin-sdk:`Realm.open() +` to open +an instance of the database: diff --git a/source/includes/api-details/kotlin/sync/pbs-update-client-code-after-migration-procedure.rst b/source/includes/api-details/kotlin/sync/pbs-update-client-code-after-migration-procedure.rst new file mode 100644 index 0000000000..c724541e75 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/pbs-update-client-code-after-migration-procedure.rst @@ -0,0 +1,17 @@ +.. procedure:: + + .. step:: Update the SyncConfiguration + + Update your :kotlin-sync-sdk:`SyncConfiguration.Builder() + ` + to use Flexible Sync where you :ref:`open a synced database + `. This involves removing the + ``partitionValue`` and adding a set of initial subscriptions, if needed. + + .. step:: Add Properties to Object Models + + .. include:: /includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst + + .. step:: Remove Automatic Subscriptions and Manually Create New Ones + + .. include:: /includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst diff --git a/source/includes/api-details/objectivec/sync/pbs-open-synced-database-description.rst b/source/includes/api-details/objectivec/sync/pbs-open-synced-database-description.rst new file mode 100644 index 0000000000..1db2b70a09 --- /dev/null +++ b/source/includes/api-details/objectivec/sync/pbs-open-synced-database-description.rst @@ -0,0 +1,11 @@ +The first time you log in and open a synced database, log in the +user, and pass the user's :objc-sdk:`RLMSyncConfiguration +` +object with the desired :objc-sdk:`partitionValue +` +to :objc-sdk:`+[RLMRealm realmWithConfiguration:error:] +`. + +This opens a synced database on the device. The database +attempts to sync with your App in the background to check for changes +on the server, or upload changes that the user has made. diff --git a/source/includes/api-details/objectivec/sync/pbs-update-client-code-after-migration-procedure.rst b/source/includes/api-details/objectivec/sync/pbs-update-client-code-after-migration-procedure.rst new file mode 100644 index 0000000000..92c567135f --- /dev/null +++ b/source/includes/api-details/objectivec/sync/pbs-update-client-code-after-migration-procedure.rst @@ -0,0 +1,16 @@ +.. procedure:: + + .. step:: Update the Sync Configuration + + Switch to a :objc-sdk:`RLMUser -flexibleSyncConfiguration + ` + where you :ref:`open a synced database + `. + + .. step:: Add Properties to Object Models + + .. include:: /includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst + + .. step:: Remove Automatic Subscriptions and Manually Create New Ones + + .. include:: /includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst diff --git a/source/includes/api-details/swift/sync/pbs-open-synced-database-description.rst b/source/includes/api-details/swift/sync/pbs-open-synced-database-description.rst new file mode 100644 index 0000000000..19545e7bde --- /dev/null +++ b/source/includes/api-details/swift/sync/pbs-open-synced-database-description.rst @@ -0,0 +1,9 @@ +Pass a logged-in user's :swift-sdk:`configuration ` +object with the desired :ref:`partition value ` to +:swift-sdk:`realm initializers +`. + +You can optionally :ref:`specify whether a database should download +changes before opening `. If you do not +specify download behavior, this opens a database with data that is on +the device, and attempts to sync changes in the background. diff --git a/source/includes/api-details/swift/sync/pbs-update-client-code-after-migration-procedure.rst b/source/includes/api-details/swift/sync/pbs-update-client-code-after-migration-procedure.rst new file mode 100644 index 0000000000..075f272abe --- /dev/null +++ b/source/includes/api-details/swift/sync/pbs-update-client-code-after-migration-procedure.rst @@ -0,0 +1,14 @@ +.. procedure:: + + .. step:: Update the Sync Configuration + + Switch to a ``flexibleSyncConfiguration()`` where you :ref:`open a synced + database `. + + .. step:: Add Properties to Object Models + + .. include:: /includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst + + .. step:: Remove Automatic Subscriptions and Manually Create New Ones + + .. include:: /includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst diff --git a/source/includes/java-open-synced-realm.rst b/source/includes/java-open-synced-realm.rst index 9799fb9202..d3febf4ff9 100644 --- a/source/includes/java-open-synced-realm.rst +++ b/source/includes/java-open-synced-realm.rst @@ -1,38 +1,17 @@ -To open a synced realm, call +To open a synced database, call :java-sdk:`getInstanceAsync() `, passing in a :java-sdk:`SyncConfiguration ` -object. The following code demonstrates how to create a realm with -specific sync settings created using a ``SyncConfiguration`` object: - -.. tabs-realm-languages:: - - .. tab:: - :tabid: kotlin - - .. literalinclude:: /examples/generated/java/sync/OpenARealmTest.snippet.allow-reads-writes-ui-thread.kt - :language: kotlin - :copyable: false +object. - .. tab:: - :tabid: java - - .. literalinclude:: /examples/generated/java/sync/OpenARealmTest.snippet.allow-reads-writes-ui-thread.java - :language: java - :copyable: false - -The code above shows how to open the realm *asynchronously* -by using :java-sdk:`getInstanceAsync() -`. -You can also open a realm synchronously by using :java-sdk:`getInstance() +You can also open a database synchronously by using :java-sdk:`getInstance() `, which -returns an open realm before synchronizing all data from the backend. +returns an open database before synchronizing all data from the backend. However, this may lead to temporary data inconsistencies while the remote data is downloaded, and is generally not recommended. You can use the :java-sdk:`waitForInitialRemoteData() ` configuration option to force the SDK to fetch remote data before -opening the realm to avoid these inconsistencies. +opening the database to avoid these inconsistencies. -The :ref:`partition value ` specifies which subset of your data to sync. -This is typically a user ID, project ID, store ID, or some other category identifier in -your app that has particular relevance to the current user. +The following code demonstrates how to create a database with +specific sync settings created using a ``SyncConfiguration`` object: diff --git a/source/includes/java-synchronous-reads-writes-ui-thread-java.rst b/source/includes/java-synchronous-reads-writes-ui-thread-java.rst new file mode 100644 index 0000000000..2c2f04d218 --- /dev/null +++ b/source/includes/java-synchronous-reads-writes-ui-thread-java.rst @@ -0,0 +1,21 @@ +.. important:: Synchronous Reads and Writes on the UI Thread + + By default, you can only read or write to a database in your + application's UI thread using asynchronous transactions. That is, + you can only use ``Realm`` methods whose name ends with the word + ``Async`` in the main thread of your Android application unless you + explicitly allow the use of synchronous methods. + + This restriction exists for the benefit of your application users: + performing read and write operations on the UI thread can lead to + unresponsive or slow UI interactions, so it's usually best to handle + these operations either asynchronously or in a background thread. + However, if your application requires the use of synchronous + database reads or writes on the UI thread, you can explicitly allow + the use of synchronous methods with the following + ``SyncConfiguration`` options: + +.. literalinclude:: /examples/generated/java/sync/OpenARealmTest.snippet.allow-reads-writes-ui-thread.java + :language: java + :emphasize-lines: 2,3 + :copyable: false diff --git a/source/includes/java-synchronous-reads-writes-ui-thread-kotlin.rst b/source/includes/java-synchronous-reads-writes-ui-thread-kotlin.rst new file mode 100644 index 0000000000..41174f4bf6 --- /dev/null +++ b/source/includes/java-synchronous-reads-writes-ui-thread-kotlin.rst @@ -0,0 +1,21 @@ +.. important:: Synchronous Reads and Writes on the UI Thread + + By default, you can only read or write to a database in your + application's UI thread using asynchronous transactions. That is, + you can only use ``Realm`` methods whose name ends with the word + ``Async`` in the main thread of your Android application unless you + explicitly allow the use of synchronous methods. + + This restriction exists for the benefit of your application users: + performing read and write operations on the UI thread can lead to + unresponsive or slow UI interactions, so it's usually best to handle + these operations either asynchronously or in a background thread. + However, if your application requires the use of synchronous + database reads or writes on the UI thread, you can explicitly allow + the use of synchronous methods with the following + ``SyncConfiguration`` options: + +.. literalinclude:: /examples/generated/java/sync/OpenARealmTest.snippet.allow-reads-writes-ui-thread.kt + :language: kotlin + :emphasize-lines: 2,3 + :copyable: false diff --git a/source/includes/java-synchronous-reads-writes-ui-thread.rst b/source/includes/java-synchronous-reads-writes-ui-thread.rst deleted file mode 100644 index b00d6c41cc..0000000000 --- a/source/includes/java-synchronous-reads-writes-ui-thread.rst +++ /dev/null @@ -1,35 +0,0 @@ -.. important:: Synchronous Reads and Writes on the UI Thread - - By default, you can only read or write to a realm in your - application's UI thread using - :ref:`asynchronous transactions `. That is, - you can only use ``Realm`` methods whose name ends with the word - ``Async`` in the main thread of your Android application unless you - explicitly allow the use of synchronous methods. - - This restriction exists for the benefit of your application users: - performing read and write operations on the UI thread can lead to - unresponsive or slow UI interactions, so it's usually best to handle - these operations either asynchronously or in a background thread. - However, if your application requires the use of synchronous - realm reads or writes on the UI thread, you can explicitly allow - the use of synchronous methods with the following - ``SyncConfiguration`` options: - - .. tabs-realm-languages:: - - .. tab:: - :tabid: java - - .. literalinclude:: /examples/generated/java/sync/OpenARealmTest.snippet.allow-reads-writes-ui-thread.java - :language: java - :emphasize-lines: 2,3 - :copyable: false - - .. tab:: - :tabid: kotlin - - .. literalinclude:: /examples/generated/java/sync/OpenARealmTest.snippet.allow-reads-writes-ui-thread.kt - :language: kotlin - :emphasize-lines: 2,3 - :copyable: false diff --git a/source/includes/note-writecopy-local-to-sync.rst b/source/includes/note-writecopy-local-to-sync.rst index 32e04aa2c6..54842c19a0 100644 --- a/source/includes/note-writecopy-local-to-sync.rst +++ b/source/includes/note-writecopy-local-to-sync.rst @@ -1,5 +1,6 @@ .. note:: Partition-Based Sync Only - This method only supports converting between a non-sync realm and + This method only supports converting between a non-sync database and Partition-Based Sync. If your app uses Flexible Sync, you must manually - iterate through the objects in one realm and copy them into the other realm. + iterate through the objects in one database and copy them into the other + database. diff --git a/source/includes/note-writecopy-same-type-sync-only.rst b/source/includes/note-writecopy-same-type-sync-only.rst index b001c8b878..88a02f4806 100644 --- a/source/includes/note-writecopy-same-type-sync-only.rst +++ b/source/includes/note-writecopy-same-type-sync-only.rst @@ -3,4 +3,4 @@ This method only supports copying a Partition-Based Sync configuration for another Partition-Based Sync user, or a Flexible Sync configuration for another Flexible Sync user. You cannot use this method to convert between a - Partition-Based Sync realm and a Flexible Sync realm or vice-versa. + Partition-Based Sync database and a Flexible Sync database or vice-versa. diff --git a/source/includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst b/source/includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst new file mode 100644 index 0000000000..c13df8c5f1 --- /dev/null +++ b/source/includes/pbs-to-fs-migration-add-relevant-properties-to-models.rst @@ -0,0 +1,3 @@ +Add relevant properties to your object models to use in your Flexible Sync +subscriptions. For example, you might add an ``ownerId`` property to enable +a user to sync only their own data. diff --git a/source/includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst b/source/includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst new file mode 100644 index 0000000000..861f97a29e --- /dev/null +++ b/source/includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst @@ -0,0 +1,12 @@ +When you migrate from Partition-Based Sync to Flexible Sync, the SDK +automatically creates hidden Sync subscriptions for your app. The +next time you add or change subscriptions, we recommend that you: + +1. :ref:`Remove the automatically-generated subscriptions `. +2. :ref:`Manually add the relevant subscriptions in your client codebase `. + +This enables you to see all of your subscription logic together in your +codebase for future iteration and debugging. + +For more information about the automatically-generated Sync +subscriptions, refer to :ref:`realm-sync-migrate-client`. diff --git a/source/includes/sdk-examples/sync/pbs-open-synced-database.rst b/source/includes/sdk-examples/sync/pbs-open-synced-database.rst new file mode 100644 index 0000000000..45ad1a60ea --- /dev/null +++ b/source/includes/sdk-examples/sync/pbs-open-synced-database.rst @@ -0,0 +1,51 @@ +.. tabs-drivers:: + + tabs: + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/OpenARealmExamples.snippet.open-synced-realm.cs + :language: csharp + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/OpenARealmTest.snippet.configure-a-realm.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/OpenARealmTest.snippet.configure-a-realm.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/open-and-close-a-realm.snippet.open-partition-based.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.open-a-synced-realm.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.init-synced-realm.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.open-realm-partition-based-sync.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/open-and-close-a-realm.snippet.open-partition-based.ts + :language: typescript diff --git a/source/sdk/model-data/change-object-model.txt b/source/sdk/model-data/change-object-model.txt index 5fd2bc4565..31a0b48759 100644 --- a/source/sdk/model-data/change-object-model.txt +++ b/source/sdk/model-data/change-object-model.txt @@ -10,4 +10,10 @@ Change an Object Model :depth: 2 :class: singlecol -Placeholder page for changing an object model. (Migrations) \ No newline at end of file +Placeholder page for changing an object model. (Migrations) + +.. _sdks-delete-a-property: + +Delete a Property +----------------- + diff --git a/source/sdk/sync/configure-and-open-synced-database.txt b/source/sdk/sync/configure-and-open-synced-database.txt index f2a178fbca..d073d7040d 100644 --- a/source/sdk/sync/configure-and-open-synced-database.txt +++ b/source/sdk/sync/configure-and-open-synced-database.txt @@ -19,3 +19,8 @@ Configure & Open a Synced Database :class: singlecol Placeholder page for configuring and opening a synced database. + +.. _sdks-download-changes-before-open: + +Download Changes Before Open +---------------------------- diff --git a/source/sdk/sync/manage-sync-sessions.txt b/source/sdk/sync/manage-sync-sessions.txt index 171c6c6366..49254167b0 100644 --- a/source/sdk/sync/manage-sync-sessions.txt +++ b/source/sdk/sync/manage-sync-sessions.txt @@ -19,3 +19,8 @@ Manage Sync Sessions :class: singlecol Placeholder page for information about managing sync sessions. + +.. _sdks-pause-resume-sync: + +Pause or Resume a Sync Session +------------------------------ diff --git a/source/sdk/sync/manage-sync-subscriptions.txt b/source/sdk/sync/manage-sync-subscriptions.txt index d3a3d1a42a..436c09a9a3 100644 --- a/source/sdk/sync/manage-sync-subscriptions.txt +++ b/source/sdk/sync/manage-sync-subscriptions.txt @@ -11,3 +11,13 @@ Manage Sync Subscriptions :class: singlecol Placeholder page for information about managing Flexible Sync subscriptions. + +.. _sdks-add-sync-subscriptions: + +Add Sync Subscriptions +---------------------- + +.. _sdks-remove-sync-subscriptions: + +Remove Sync Subscriptions +------------------------- diff --git a/source/sdk/sync/partition-based-sync.txt b/source/sdk/sync/partition-based-sync.txt index 7c91c8a1bf..bab26c8f1f 100644 --- a/source/sdk/sync/partition-based-sync.txt +++ b/source/sdk/sync/partition-based-sync.txt @@ -4,10 +4,199 @@ Partition-Based Sync ==================== +.. meta:: + :description: Learn how to migrate a Partition-Based Sync app to Flexible Sync, or open a database for Partition-Based Sync. + :keywords: Realm, .NET SDK, Kotlin SDK, Java SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: csharp, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for Partition-Based Sync content. +.. tabs-selector:: drivers + +Partition-Based Sync is a legacy mode for using Atlas Device Sync with Atlas +Device SDK. You can no longer create new Partition-Based Sync apps. All of the +Device Sync-related content on other pages in the SDK docs assume your app +uses the default Sync mode, Flexible Sync. + +This page covers how to migrate a Partition-Based Sync app to a Flexible Sync +app. For apps that still use Partition-Based Sync, this page also has details +for opening a database with Partition-Based Sync. + +.. tip:: C++ and Flutter SDKs Do Not Support Partition-Based Sync + + The examples on this page do not include details for C++ or Dart because + the C++ and Flutter SDKs have never supported Partition-Based Sync. + +.. _sdks-migrate-pbs-to-fs: + +Migrate from Partition-Based Sync to Flexible Sync +-------------------------------------------------- + +You can migrate your app from Partition-Based Sync mode +to Flexible Sync. Migrating is an automatic process that does not require +any changes to your application code. Automatic migration requires +the following minimum SDK versions: + +- .NET SDK v11.1.0 and later +- Java SDK v10.16.0 and later +- Kotlin SDK v1.9.0 and later +- Node.js SDK v11.10.0 and later +- Swift SDK v10.40.0 and later + +Migrating enables you to keep your existing App Services users and +authentication configuration. Flexible Sync provides more versatile permissions +configuration options and more granular data synchronization. + +For more information about how to migrate your App Services App from +Partition-Based Sync to Flexible Sync mode, refer to :ref:`Migrate Device Sync Modes +` in the App Services documentation. + +.. _sdks-update-client-code-after-pbs-to-fs-migration: + +Update Client Code After Migration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The automatic migration from Partition-Based Sync to Flexible Sync does not +require any changes to your client code. However, to support this +functionality, the SDK automatically handles the differences between the two +Sync Modes by: + +- Automatically creating Sync subscriptions for each object type + where ``partitionKey == partitionValue``. +- Injecting a ``partitionKey`` field into every object if one does not already + exist. This is required for the automatic Sync subscription. + +If you need to make updates to your client code after migration, consider +updating your client codebase to remove this hidden migration functionality. + +You might want update your client codebase when: + +- You add a new model or change a model in your client codebase. +- You add or change functionality that involves reading or writing SDK objects. +- You want to implement more fine-grained control over what data you sync. + +Convert Partition-Based Sync Client Code to Use Flexible Sync +````````````````````````````````````````````````````````````` + +Make these changes to convert your Partition-Based Sync client code to use +Flexible Sync: + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/pbs-update-client-code-after-migration-procedure.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/pbs-update-client-code-after-migration-procedure.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/pbs-update-client-code-after-migration-procedure.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/pbs-update-client-code-after-migration-procedure.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/pbs-update-client-code-after-migration-procedure.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/pbs-update-client-code-after-migration-procedure.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/pbs-update-client-code-after-migration-procedure.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/pbs-update-client-code-after-migration-procedure.rst + +For examples of Flexible Sync permissions strategies, including examples of +how to model data for these strategies, refer to the :ref:`flexible-sync-permissions-guide` +in the App Services documentation. + +.. _sdks-pbs-open-synced-database: + +Open a Synced Database with Partition-Based Sync +------------------------------------------------ + +You can open a synced database for Partition-Based Sync by passing the +appropriate partition value in the Sync configuration. + +.. tip:: Partition Value + + For App Services Apps that use Partition-Based Sync, your client + implementation must include a partition value. This is the value of the + :ref:`partition key ` field in the Partition-Based Sync + configuration. + + The partition value determines which data the client application can access. + + You pass in the partition value when you open a synced database. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/pbs-open-synced-database-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/pbs-open-synced-database-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/pbs-open-synced-database-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/pbs-open-synced-database-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/pbs-open-synced-database-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/pbs-open-synced-database-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/pbs-open-synced-database-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/pbs-open-synced-database-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/pbs-open-synced-database.rst diff --git a/source/sdk/users/authenticate-users.txt b/source/sdk/users/authenticate-users.txt index 4b334a24b2..dc83c98b78 100644 --- a/source/sdk/users/authenticate-users.txt +++ b/source/sdk/users/authenticate-users.txt @@ -11,3 +11,13 @@ Authenticate Users :class: singlecol Placeholder page for authenticate users content. + +.. _sdks-offline-login: + +Offline Login +------------- + +.. _sdks-refresh-token-expiry: + +Refresh Token Expiration +------------------------ From 8ee6c6b335232f5bbca5704683d4c2403f512e85 Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 18 Jun 2024 13:59:10 -0400 Subject: [PATCH 23/63] (DOCSP-39501): Consolidate Quick Start page (#3280) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39501 *Staged Page* - [Quick Start](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39501/sdk/quick-start/) - [SwiftUI Quick Start](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39501/frameworks/swiftui/quick-start/): Existing content ported over with Realm naming and ref updates - [Flutter Quick Start](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39501/frameworks/flutter/quick-start/): Move existing Flutter-specific content out of quick start to this relevant section - [Unity Quick Start](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39501/platforms/unity/): Existing content ported over with Realm naming and ref updates Adding a note here to capture this in the PR record: - Product has made the call to remove Java SDK info from our "getting started" content (here and the Install page), so I've removed the Java and Kotlin (Java SDK) examples from the consolidated quick start page. - Based on relatively low usage of the Java SDK Quick Start with LiveData page, and the need to update it to show Kotlin SDK or at the very least not Partition-Based Sync, I've checked with engineering and product and am removing this page from the docs. It doesn't seem worthwhile to continue to incur the maintenance cost. *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++ Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/quick-start/) - [Flutter Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/quick-start/) - [Flutter Install Page](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/install/) - [Java Local Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/quick-starts/quick-start-local/) - [Java Sync Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/quick-starts/quick-start-sync/) - [Java Quick Start with Live Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/quick-starts/livedata/) - [Kotlin Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/quick-start/) - [.NET Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/quick-start/) - [.NET SDK/Quick Start for Unity](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/unity/) - [Node.js Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/quick-start/) - [Swift Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/quick-start/) - [SwiftUI Quick Start](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/swiftui-tutorial/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --- source/frameworks/flutter.txt | 10 +- source/frameworks/flutter/quick-start.txt | 110 +++++ source/frameworks/swiftui.txt | 11 +- source/frameworks/swiftui/quick-start.txt | 420 +++++++++++++++++ ...quick-start-close-database-description.rst | 2 + ...t-define-your-object-model-description.rst | 8 + .../quick-start-import-realm-description.rst | 2 + .../quick-start-open-database-description.rst | 4 + ...start-open-synced-database-description.rst | 5 + .../quick-start-write-to-synced-db.rst | 3 + ...quick-start-close-database-description.rst | 13 + ...t-define-your-object-model-description.rst | 7 + .../quick-start-import-realm-description.rst | 1 + .../quick-start-open-database-description.rst | 6 + ...start-open-synced-database-description.rst | 5 + ...quick-start-close-database-description.rst | 1 + ...art-define-your-object-model-procedure.rst | 37 ++ .../quick-start-import-realm-description.rst | 8 + .../quick-start-open-database-description.rst | 7 + ...start-open-synced-database-description.rst | 17 + ...start-close-database-js-ts-description.rst | 2 + ...ne-your-object-model-js-ts-description.rst | 12 + ...k-start-import-realm-js-ts-description.rst | 2 + ...-start-open-database-js-ts-description.rst | 3 + ...open-synced-database-js-ts-description.rst | 14 + ...quick-start-close-database-description.rst | 4 + ...t-define-your-object-model-description.rst | 3 + .../quick-start-import-realm-description.rst | 8 + .../quick-start-open-database-description.rst | 10 + ...start-open-synced-database-description.rst | 26 ++ ...quick-start-close-database-description.rst | 5 + ...t-define-your-object-model-description.rst | 3 + .../quick-start-import-realm-description.rst | 7 + .../quick-start-open-database-description.rst | 7 + ...start-open-synced-database-description.rst | 7 + .../includes/dotnet-implement-interface.rst | 10 +- .../quick-start-authenticate-user.rst | 45 ++ .../quick-start-close-database.rst | 45 ++ .../quick-start-create-objects.rst | 45 ++ .../quick-start-define-your-object-model.rst | 46 ++ .../quick-start-delete-objects.rst | 45 ++ .../quick-start-filter-objects.rst | 45 ++ .../quick-start/quick-start-import-realm.rst | 46 ++ .../quick-start-initialize-app.rst | 45 ++ .../quick-start/quick-start-open-database.rst | 45 ++ .../quick-start-open-synced-database.rst | 45 ++ .../quick-start-react-to-changes.rst | 46 ++ .../quick-start/quick-start-read-objects.rst | 45 ++ .../quick-start-update-object-properties.rst | 45 ++ .../quick-start-write-to-synced-db.rst | 44 ++ source/includes/sync-memory-performance.rst | 6 +- ...rary-name-reflects-former-realm-naming.rst | 4 + source/platforms.txt | 2 + source/platforms/unity.txt | 276 +++++++++++ source/sdk/crud/query-engines.txt | 2 - source/sdk/crud/read.txt | 22 + source/sdk/crud/threading.txt | 5 + source/sdk/model-data/object-models.txt | 14 +- source/sdk/quick-start.txt | 427 +++++++++++++++++- templates/consolidated-page.rst | 2 +- 60 files changed, 2163 insertions(+), 29 deletions(-) create mode 100644 source/frameworks/flutter/quick-start.txt create mode 100644 source/frameworks/swiftui/quick-start.txt create mode 100644 source/includes/api-details/cpp/quick-start/quick-start-close-database-description.rst create mode 100644 source/includes/api-details/cpp/quick-start/quick-start-define-your-object-model-description.rst create mode 100644 source/includes/api-details/cpp/quick-start/quick-start-import-realm-description.rst create mode 100644 source/includes/api-details/cpp/quick-start/quick-start-open-database-description.rst create mode 100644 source/includes/api-details/cpp/quick-start/quick-start-open-synced-database-description.rst create mode 100644 source/includes/api-details/cpp/quick-start/quick-start-write-to-synced-db.rst create mode 100644 source/includes/api-details/csharp/quick-start/quick-start-close-database-description.rst create mode 100644 source/includes/api-details/csharp/quick-start/quick-start-define-your-object-model-description.rst create mode 100644 source/includes/api-details/csharp/quick-start/quick-start-import-realm-description.rst create mode 100644 source/includes/api-details/csharp/quick-start/quick-start-open-database-description.rst create mode 100644 source/includes/api-details/csharp/quick-start/quick-start-open-synced-database-description.rst create mode 100644 source/includes/api-details/dart/quick-start/quick-start-close-database-description.rst create mode 100644 source/includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst create mode 100644 source/includes/api-details/dart/quick-start/quick-start-import-realm-description.rst create mode 100644 source/includes/api-details/dart/quick-start/quick-start-open-database-description.rst create mode 100644 source/includes/api-details/dart/quick-start/quick-start-open-synced-database-description.rst create mode 100644 source/includes/api-details/javascript/quick-start/quick-start-close-database-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/quick-start/quick-start-define-your-object-model-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/quick-start/quick-start-import-realm-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/quick-start/quick-start-open-database-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/quick-start/quick-start-open-synced-database-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/quick-start/quick-start-close-database-description.rst create mode 100644 source/includes/api-details/kotlin/quick-start/quick-start-define-your-object-model-description.rst create mode 100644 source/includes/api-details/kotlin/quick-start/quick-start-import-realm-description.rst create mode 100644 source/includes/api-details/kotlin/quick-start/quick-start-open-database-description.rst create mode 100644 source/includes/api-details/kotlin/quick-start/quick-start-open-synced-database-description.rst create mode 100644 source/includes/api-details/swift/quick-start/quick-start-close-database-description.rst create mode 100644 source/includes/api-details/swift/quick-start/quick-start-define-your-object-model-description.rst create mode 100644 source/includes/api-details/swift/quick-start/quick-start-import-realm-description.rst create mode 100644 source/includes/api-details/swift/quick-start/quick-start-open-database-description.rst create mode 100644 source/includes/api-details/swift/quick-start/quick-start-open-synced-database-description.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-authenticate-user.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-close-database.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-create-objects.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-define-your-object-model.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-delete-objects.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-filter-objects.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-import-realm.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-initialize-app.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-open-database.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-open-synced-database.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-react-to-changes.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-read-objects.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-update-object-properties.rst create mode 100644 source/includes/sdk-examples/quick-start/quick-start-write-to-synced-db.rst create mode 100644 source/includes/tip-library-name-reflects-former-realm-naming.rst create mode 100644 source/platforms/unity.txt diff --git a/source/frameworks/flutter.txt b/source/frameworks/flutter.txt index e3937c6699..fe10d1acbc 100644 --- a/source/frameworks/flutter.txt +++ b/source/frameworks/flutter.txt @@ -4,11 +4,7 @@ Build with Flutter ================== -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol +.. toctree:: + :titlesonly: -Placeholder page for information about building with Flutter. (This may -be a directory depending on how much content we have/need.) + Quick Start diff --git a/source/frameworks/flutter/quick-start.txt b/source/frameworks/flutter/quick-start.txt new file mode 100644 index 0000000000..5a4d70244d --- /dev/null +++ b/source/frameworks/flutter/quick-start.txt @@ -0,0 +1,110 @@ +.. _frameworks-flutter-quick-start: + +======================== +Quick Start with Flutter +======================== + +.. meta:: + :description: Get started using Atlas Device SDK with Flutter in a Flutter application. + :keywords: Realm, Flutter, Flutter SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: dart + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +This quick start demonstrates how to use Atlas Device SDK with Flutter in a +Flutter application. + +.. tip:: Flutter Project or Standalone Dart Project? + + This quick start contains information for using the SDK in a Flutter + project. The package that you import and the way you create object + models differs when using the SDK in a standalone Dart project. For + a quick start using a standalone Dart project, refer to + :ref:`sdks-quick-start`. + +Install the SDK +--------------- + +Install the ``realm`` package for use in Flutter applications. For more +information about installing the SDK in a Flutter project, refer to +:ref:`sdks-install`. + +Import the SDK +-------------- + +Import the ``realm`` package into any files where you use it. + +.. code-block:: dart + :caption: ExampleFile.dart + + import 'package:realm/realm.dart'; + +Define Your Object Model +------------------------ + +Your application's **data model** defines the structure of data stored within +the database. You can define your application's data model via Dart +classes in your application code with an SDK object schema. +You then have to generate the :flutter-sdk:`RealmObjectBase ` +class that's used within your application. + +For more information, refer to :ref:`Define an Object Schema +`. + +.. procedure:: + + .. step:: Create a Model Class + + Add an SDK model class. Give your class a private name + (starting with ``_``), such as a file ``car.dart`` with a class + ``_Car``. + + .. literalinclude:: /examples/generated/flutter/car.snippet.define-model-flutter.dart + :language: dart + :caption: car.dart + + .. step:: Generate an SDK Object Class + + Generate a RealmObject class ``Car`` from the data model class ``_Car``: + + .. code-block:: + + dart run realm generate + + Running this creates a ``Car`` class in a ``car.realm.dart`` file + located in the directory where you defined the model class. This ``Car`` + class is public and part of the same library as the ``_Car`` data model + class. The generated ``Car`` class is what's used throughout your + application. + + .. step:: Watch for Changes to the Model (Optional) + + You can watch your data model class to generate a new ``Car`` class + whenever there's a change to ``_Car``: + + .. code-block:: + + dart run realm generate --watch + +Perform CRUD Operations and More +-------------------------------- + +Installing the library and the commands to generate the models are specific +to using the SDK with a Flutter project or a standalone Dart project. But +all the other operations, from reading and writing data to syncing data across +devices, are the same for a Flutter or standalone Dart project. + +To learn more about performing these operations, refer to the main Quick Start. +Shared content starts with the :ref:`Open a Database ` +section. diff --git a/source/frameworks/swiftui.txt b/source/frameworks/swiftui.txt index 869adedb3f..4fe996a62f 100644 --- a/source/frameworks/swiftui.txt +++ b/source/frameworks/swiftui.txt @@ -4,12 +4,7 @@ Build with SwiftUI ================== -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol +.. toctree:: + :titlesonly: -Placeholder page for information about building with SwiftUI. - -This will be a directory with SwiftUI content. + Quick Start diff --git a/source/frameworks/swiftui/quick-start.txt b/source/frameworks/swiftui/quick-start.txt new file mode 100644 index 0000000000..f4161d5187 --- /dev/null +++ b/source/frameworks/swiftui/quick-start.txt @@ -0,0 +1,420 @@ +.. _ios-swiftui-quick-start: + +======================== +Quick Start with SwiftUI +======================== + +.. meta:: + :description: Use Atlas Device SDK for Swift with SwiftUI property wrappers. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +This quick start demonstrates how to use the Atlas Device SDK for Swift +with SwiftUI with a small working app. The app contains all of the code to +get you up and running with SwiftUI and the SDK quickly. + +If you'd prefer to learn from a working example app, check out the +SwiftUI :ref:`template app ` or the :ref:`swift-swiftui-tutorial`. + +Prerequisites +------------- + +- :ref:`Install the Swift SDK. ` +- Meet the minimum Xcode and iOS targets required by the Swift SDK version. +- Create a new Xcode project using the SwiftUI "App" template. + +Example App Overview +-------------------- + +This page contains all of the code for a working SwiftUI and Atlas Device SDK +app. The app starts on the ``ItemsView``, where you can edit a list of items: + +- Press the ``Add`` button on the bottom right of the screen to add + randomly-generated items. +- Press the ``Edit`` button on the top right to modify the list order, + which the app persists in the realm. +- You can also swipe to delete items. + +When you have items in the list, you can press one of the items to +navigate to the ``ItemDetailsView``. This is where you can modify the +item name or mark it as a favorite: + +- Press the text field in the center of the screen and type a new name. + When you press Return, the item name should update across the app. +- You can also toggle its favorite status by pressing the heart toggle in the + top right. + +.. tip:: + + This guide optionally integrates with :ref:`Device Sync `. See + :ref:`swiftui-integrate-with-sync` below. + +Get Started +~~~~~~~~~~~ + +We assume you have created an Xcode project with the SwiftUI "App" +template. Open the main Swift file and delete all of the code inside, +including any ``@main`` ``App`` classes that Xcode generated for you. At +the top of the file, import the Realm and SwiftUI frameworks: + +.. literalinclude:: /examples/generated/swiftui/local/SwiftUIFlexSyncExampleApp.snippet.imports.swift + :language: swift + +.. tip:: + + Just want to dive right in with the complete code? Jump to + :ref:`swiftui-complete-code` below. + +.. _swiftui_quickstart-define-models: + +Define Models +~~~~~~~~~~~~~ + +A common SDK data modeling use case is to have "things" and +"containers of things". This app defines two related SDK object models: item +and itemGroup. + +An item has two user-facing properties: + +- A randomly generated-name, which the user can edit. +- An ``isFavorite`` boolean property, which shows whether the user "favorited" + the item. + +An itemGroup contains items. You can extend the itemGroup to have a name and an +association with a specific user, but that's out of scope of this guide. + +Paste the following code into your main Swift file to define the models: + +Because Sync does not automatically include linked objects, we must add +``ownerId`` to both objects. You can omit ``ownerId`` if you only want to use +a non-synced database. + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.flexible-sync-models.swift + :language: swift + +Views and Observed Objects +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The entrypoint of the app is the ``ContentView`` class that derives from +``SwiftUI.App``. For now, this always displays the +``LocalOnlyContentView``. Later, this will show the ``SyncContentView`` +when Device Sync is enabled. + +.. literalinclude:: /examples/generated/swiftui/local/SwiftUIFlexSyncExampleApp.snippet.content-view.swift + :language: swift + +.. tip:: + + You can use a database other than the default database by passing + an environment object from higher in the View hierarchy: + + .. code-block:: swift + + LocalOnlyContentView() + .environment(\.realmConfiguration, Realm.Configuration( /* ... */ )) + +The LocalOnlyContentView has an :swift-sdk:`@ObservedResults +` itemGroups. This implicitly uses the default +database to load all itemGroups when the view appears. + +This app only expects there to ever be one itemGroup. If there is an itemGroup +in the database, the LocalOnlyContentView renders an ``ItemsView`` for +that itemGroup. + +If there is no itemGroup already in the database, then the +LocalOnlyContentView displays a ProgressView while it adds one. Because +the view observes the itemGroups thanks to the ``@ObservedResults`` property +wrapper, the view immediately refreshes upon adding that first itemGroup and +displays the ItemsView. + +.. literalinclude:: /examples/generated/swiftui/local/SwiftUIFlexSyncExampleApp.snippet.local-only-content-view.swift + :language: swift + +.. tip:: + + Starting in SDK version 10.12.0, you can use an optional key path parameter + with ``@ObservedResults`` to filter change notifications to only those + occurring on the provided key path or key paths. For example: + + .. code-block:: + + @ObservedResults(MyObject.self, keyPaths: ["myList.property"]) + +The ItemsView receives the itemGroup from the parent view and stores it in +an :swift-sdk:`@ObservedRealmObject ` +property. This allows the ItemsView to "know" when the object has +changed regardless of where that change happened. + +The ItemsView iterates over the itemGroup's items and passes each item to an +``ItemRow`` for rendering as a list. + +To define what happens when a user deletes or moves a row, we pass the +``remove`` and ``move`` methods of the SDK +:swift-sdk:`List ` as the handlers of the respective +remove and move events of the SwiftUI List. Thanks to the +``@ObservedRealmObject`` property wrapper, we can use these methods +without explicitly opening a write transaction. The property wrapper +automatically opens a write transaction as needed. + +.. literalinclude:: /examples/generated/swiftui/local/SwiftUIFlexSyncExampleApp.snippet.items-view.swift + :language: swift + +Finally, the ``ItemRow`` and ``ItemDetailsView`` classes use the +``@ObservedRealmObject`` property wrapper with the item passed in from +above. These classes demonstrate a few more examples of how to use the +property wrapper to display and update properties. + +.. literalinclude:: /examples/generated/swiftui/local/SwiftUIFlexSyncExampleApp.snippet.item-row-and-details.swift + :language: swift + +.. tip:: + + ``@ObservedRealmObject`` is a frozen object. If you want to :ref:`modify + the properties ` of an ``@ObservedRealmObject`` + directly in a write transaction, you must ``.thaw()`` it first. + +At this point, you have everything you need to work with Atlas Device SDK and +SwiftUI on a device. Test it out and see if everything is working as expected. +Read on to learn how to integrate this app with Device Sync. + +.. _swiftui-integrate-with-sync: + +Integrate Atlas Device Sync +--------------------------- + +Now that we have a working app, we can optionally integrate with Device Sync. +Sync allows you to you see the changes you make across devices. Before you can +add sync to this app, make sure to: + +- :ref:`Create an App Services App `. +- :ref:`Enable anonymous authentication `. +- :ref:`Enable Device Sync `. + + 1. Specify a cluster and database. + #. Turn on Development Mode. + #. Use ``ownerId`` as the queryable field. + #. Enable Sync. + +- :ref:`Define the rules ` that determine which + permissions users have when using Device Sync. For this example, we assign + a default role, which applies to any collection that does not have a + collection-specific role. In this example, a user can read and write data + where the ``user.id`` of the logged-in user matches the ``ownerId`` of the + object: + + .. literalinclude:: /includes/swiftui-tutorial-default-role.json + :language: json + +Now, deploy your application updates. + +.. tip:: + + The Sync version of this app changes the app flow a bit. The first + screen becomes the ``LoginView``. When you press the :guilabel:`Log + in` button, the app navigates to the ItemsView, where you see the + synced list of items in a single itemGroup. + +At the top of the source file, initialize an SDK :swift-sdk:`App +` with :ref:`your App ID `: + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.mongodb-realm.swift + :language: swift + +.. tip:: + + You can change the app reference to ``nil`` to switch back to + non-Device Sync mode. + +Let's update the main ContentView to show the ``SyncContentView`` if the +app reference is not ``nil``: + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.content-view.swift + :language: swift + +We define the SyncContentView below. + +The SyncContentView observes the SDK app instance. The app instance is +the interface to the App Services backend, which provides the user +authentication required for Sync. By observing the app instance, the +SyncContentView can react when a user logs in or out. + +This view has two possible states: + +- If the SDK app does not have a currently logged-in user, show the ``LoginView``. +- If the app does have a logged-in user, show the ``OpenSyncedRealmView``. + +In this view, after confirming we have a user, we create a +:swift-sdk:`flexibleSyncConfiguration() +` +that includes the ``initialSubscriptions`` parameter. We can use this +parameter to :ref:`subscribe to queryable fields +`. These initial subscriptions +search for data that matches the queries, and syncs that data to the +realm. If no data matches the queries, the realm opens with an initial +empty state. + +Your client application can only write objects that match the +subscription query to a realm opened with a ``flexibleSyncConfiguration``. +Trying to write objects that don't match the query causes the app to +perform a compensating write to undo the illegal write operation. + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.flex-sync-content-view.swift + :language: swift + +In our subscriptions, we're querying for ``ItemGroup`` and ``Item`` objects +where the ``ownerId`` matches the logged-in user's ``user.id``. +Together with the permissions we used when we enabled Device Sync +above, this means that the user can only read and write their own +data. + +Device Sync does not automatically provide access to linked objects. +Because of this, we must add subscriptions for both the ``ItemGroup`` and +``Item`` objects - we can't just query for one or the other and get +the related objects. + +From here, we pass the flexibleSyncConfiguration to the +OpenSyncedRealmView as a ``realmConfiguration`` using an environment +object. This is the view responsible for opening a database and working +with the data. The SDK uses this configuration to search for data +that should sync to the database. + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.realm-config-environment-object.swift + :language: swift + +Once logged in, we open the database asynchronously with the +:swift-sdk:`AsyncOpen ` property wrapper. + +Because we've injected a ``flexibleSyncConfiguration()`` into the +view as an environment value, the property wrapper uses this +configuration to initiate Sync and download any matching data before +opening the database. If we had not provided a configuration, the property +wrapper would create a default ``flexibleSyncConfiguration()`` for us, +and we could :ref:`subscribe to queries ` +in ``.onAppear``. + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.flex-sync-property-wrapper.swift + :language: swift + +The OpenSyncedRealmView switches on the :swift-sdk:`AsyncOpenState +enum `, which lets us show different views +based on the state. In our example, we show a ``ProgressView`` while we're +connecting to the App and the database is syncing. We then open the +database, passing the ``itemGroup`` to the ``ItemsView``, or show an +``ErrorView`` if we can't open the database. + +.. tip:: + + When opening a synced database, use the :swift-sdk:`AsyncOpen + ` property wrapper to always download synced changes + before opening the database, or the :swift-sdk:`AutoOpen + ` property wrapper to open a database while syncing + in the background. ``AsyncOpen`` requires the user to be online, + while ``AutoOpen`` opens a database even if the user is offline. + +This view has a few different states: + +- While connecting or waiting for login, show a ``ProgressView``. +- While downloading changes to the database, show a ``ProgressView`` with a + progress indicator. +- When the database opens, check for an itemGroup object. If one does not exist + yet, create one. Then, show the ItemsView for the itemGroup in the database. + Provide a ``LogoutButton`` that the ItemsView can display on the top left + of the navigation bar. +- If there is an error loading the database, show an error view containing + the error. + +When you run the app and see the main UI, there are no items in the view. +That's because we're using anonymous login, so this is the first time this +specific user logs in. + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.open-realm-view-flex-sync.swift + :language: swift + +In our subscriptions, we're querying for ``ItemGroup`` and ``Item`` objects +where the ``ownerId`` matches the logged-in user's ``user.id``. +Together with the permissions we used when we created the Sync app above, this +means that the user can only read and write their own data. + +Sync does not automatically provide access to linked objects. +Because of this, we must add subscriptions for both the ``ItemGroup`` and +``Item`` objects - we can't just query for one or the other and get +the related objects. + +With this in mind, we must also update the view here where we are +creating a ``ItemGroup`` object. We must set the ``ownerId`` as the ``user.id`` +of the logged-in user. + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.add-ownerid-to-group.swift + :language: swift + +And we must also update the ``ItemsView`` to add ``ownerId`` when we +create ``Item`` objects: + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.add-ownerid-to-create-button-code.swift + :language: swift + +Authenticate Users with Atlas App Services +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The LoginView maintains some state in order to display an activity +indicator or error. It uses a reference to the app instance passed +in from above to log in when the :guilabel:`Log in anonymously` button +is clicked. + +.. tip:: + + In the LoginView, you can implement :ref:`email/password + authentication ` or :ref:`another + authentication provider `. For simplicity, + this example uses Anonymous authentication. + +Once login is complete, the LoginView itself doesn't need to do anything +more. Because the parent view is observing the app, it notices +when the user authentication state has changed and shows +something other than the LoginView. + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.login-view.swift + :language: swift + +The LogoutButton works just like the LoginView, but logs out instead of +logging in: + +.. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.logout-button.swift + :language: swift + +Once logged in, the app follows the same flow as the non-Sync version. + +.. _swiftui-complete-code: + +Complete Code +------------- + +If you would like to copy and paste or examine the complete code with or +without Device Sync, see below. + +.. tabs:: + + .. tab:: Without Sync + :tabid: local + + .. literalinclude:: /examples/generated/swiftui/local/SwiftUIFlexSyncExampleApp.snippet.complete-swiftui-flex-sync-quickstart.swift + :language: swift + + .. tab:: With Flexible Sync + :tabid: flex-sync + + .. literalinclude:: /examples/generated/swiftui/flex-sync/SwiftUIFlexSyncExampleApp.snippet.complete-swiftui-flex-sync-quickstart.swift + :language: swift diff --git a/source/includes/api-details/cpp/quick-start/quick-start-close-database-description.rst b/source/includes/api-details/cpp/quick-start/quick-start-close-database-description.rst new file mode 100644 index 0000000000..a301a9efdd --- /dev/null +++ b/source/includes/api-details/cpp/quick-start/quick-start-close-database-description.rst @@ -0,0 +1,2 @@ +To close a database and release all underlying resources, call ``db::close()``. +Closing the database invalidates any remaining objects. diff --git a/source/includes/api-details/cpp/quick-start/quick-start-define-your-object-model-description.rst b/source/includes/api-details/cpp/quick-start/quick-start-define-your-object-model-description.rst new file mode 100644 index 0000000000..28b630e0a4 --- /dev/null +++ b/source/includes/api-details/cpp/quick-start/quick-start-define-your-object-model-description.rst @@ -0,0 +1,8 @@ +This quick start includes ``ownerId``, which is used when we add +Device Sync in a later step. +You can remove this property if you are not using Device Sync. + +.. important:: Define SDK Models within the realm namespace + + The C++ SDK requires you to define the object models that you want to store + in the database within the ``realm`` namespace. diff --git a/source/includes/api-details/cpp/quick-start/quick-start-import-realm-description.rst b/source/includes/api-details/cpp/quick-start/quick-start-import-realm-description.rst new file mode 100644 index 0000000000..b1df5087ff --- /dev/null +++ b/source/includes/api-details/cpp/quick-start/quick-start-import-realm-description.rst @@ -0,0 +1,2 @@ +Make the C++ SDK available in your code by including the +``cpprealm/sdk.hpp`` header in the translation unit where you want to use it: diff --git a/source/includes/api-details/cpp/quick-start/quick-start-open-database-description.rst b/source/includes/api-details/cpp/quick-start/quick-start-open-database-description.rst new file mode 100644 index 0000000000..8034837014 --- /dev/null +++ b/source/includes/api-details/cpp/quick-start/quick-start-open-database-description.rst @@ -0,0 +1,4 @@ +When you open a database, you must specify a :cpp-sdk:`db_config +`. You can +optionally open a database at a specific path, or provide a ``sync_config`` +to open a synced database. diff --git a/source/includes/api-details/cpp/quick-start/quick-start-open-synced-database-description.rst b/source/includes/api-details/cpp/quick-start/quick-start-open-synced-database-description.rst new file mode 100644 index 0000000000..3208130bac --- /dev/null +++ b/source/includes/api-details/cpp/quick-start/quick-start-open-synced-database-description.rst @@ -0,0 +1,5 @@ +Once you have enabled Device Sync and authenticated a user, you can create +a :cpp-sdk:`sync_configuration +` object and +open the database. You can then add a Sync subscription that determines what +data the database can read and write. diff --git a/source/includes/api-details/cpp/quick-start/quick-start-write-to-synced-db.rst b/source/includes/api-details/cpp/quick-start/quick-start-write-to-synced-db.rst new file mode 100644 index 0000000000..56c87e4850 --- /dev/null +++ b/source/includes/api-details/cpp/quick-start/quick-start-write-to-synced-db.rst @@ -0,0 +1,3 @@ +In this example, we store the ``user.identifier()`` of the logged-in user in +the ``ownerId`` property of the ``Todo`` item. We then use this property +in subscription queries and the Device Sync permissions. diff --git a/source/includes/api-details/csharp/quick-start/quick-start-close-database-description.rst b/source/includes/api-details/csharp/quick-start/quick-start-close-database-description.rst new file mode 100644 index 0000000000..3d1c6d345a --- /dev/null +++ b/source/includes/api-details/csharp/quick-start/quick-start-close-database-description.rst @@ -0,0 +1,13 @@ +The database instance implements ``IDisposable`` to ensure native resources are +freed up. You should dispose of a database object immediately after use, +especially on background threads. The simplest way to do this is by declaring +the database object with a ``using`` statement, or wrapping the code that +interacts with a database in a ``using (...)`` statement: + +.. literalinclude:: /examples/generated/dotnet/OpenARealmExamples.snippet.scope.cs + :language: csharp + +If you require a database object to be shared outside of a single method, you +can manage its state manually. Call the +:dotnet-sdk:`Dispose() ` +method to release the reference: diff --git a/source/includes/api-details/csharp/quick-start/quick-start-define-your-object-model-description.rst b/source/includes/api-details/csharp/quick-start/quick-start-define-your-object-model-description.rst new file mode 100644 index 0000000000..c5922bdcd8 --- /dev/null +++ b/source/includes/api-details/csharp/quick-start/quick-start-define-your-object-model-description.rst @@ -0,0 +1,7 @@ +.. include:: /includes/dotnet-implement-interface.rst + +The following code shows how to define an object model for an ``Item`` object. +In this example, we have marked the ``Id`` field as the Primary Key and marked +the ``Status`` property as optional. We've also chosen to use the ``MapTo`` +attribute; properties will be stored in lower case on the server, but can use +.NET-friendly casing on our property names when using Device Sync. diff --git a/source/includes/api-details/csharp/quick-start/quick-start-import-realm-description.rst b/source/includes/api-details/csharp/quick-start/quick-start-import-realm-description.rst new file mode 100644 index 0000000000..3bff9b4832 --- /dev/null +++ b/source/includes/api-details/csharp/quick-start/quick-start-import-realm-description.rst @@ -0,0 +1 @@ +Add the following line to the top of your source files to use the SDK: diff --git a/source/includes/api-details/csharp/quick-start/quick-start-open-database-description.rst b/source/includes/api-details/csharp/quick-start/quick-start-open-database-description.rst new file mode 100644 index 0000000000..0ffd36bc4b --- /dev/null +++ b/source/includes/api-details/csharp/quick-start/quick-start-open-database-description.rst @@ -0,0 +1,6 @@ +Open a database with either the +:dotnet-sdk:`Realm.GetInstance() ` or +:dotnet-sdk:`Realm.GetInstanceAsync() ` +method. Which method you use depends entirely on if and how you are using `asynchronous +patterns `_ in your app. +The following code shows how to use ``GetInstance()``: diff --git a/source/includes/api-details/csharp/quick-start/quick-start-open-synced-database-description.rst b/source/includes/api-details/csharp/quick-start/quick-start-open-synced-database-description.rst new file mode 100644 index 0000000000..1573a7d767 --- /dev/null +++ b/source/includes/api-details/csharp/quick-start/quick-start-open-synced-database-description.rst @@ -0,0 +1,5 @@ +Once you have enabled Device Sync and authenticated a user, you can +open a synced database. Use a ``FlexibleSyncConfiguration`` object to define +the specifics of how your application synchronizes data with App Services. +Then, add a Sync subscription that determines what data the user can read and +write. diff --git a/source/includes/api-details/dart/quick-start/quick-start-close-database-description.rst b/source/includes/api-details/dart/quick-start/quick-start-close-database-description.rst new file mode 100644 index 0000000000..7f5b1e7c49 --- /dev/null +++ b/source/includes/api-details/dart/quick-start/quick-start-close-database-description.rst @@ -0,0 +1 @@ +Once you've finished working with a database, close it to prevent memory leaks. diff --git a/source/includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst b/source/includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst new file mode 100644 index 0000000000..64812df3dc --- /dev/null +++ b/source/includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst @@ -0,0 +1,37 @@ +Your application's **data model** defines the structure of data stored within +the database. You can define your application's data model via Dart +classes in your application code with an SDK object schema. +You then have to generate the :flutter-sdk:`RealmObjectBase ` +class that's used within your application. + +For more information, refer to :ref:`Define an Object Schema +`. + +**Create a Model Class** + +Add an SDK model class. Give your class a private name +(starting with ``_``), such as a file ``car.dart`` with a class +``_Car``. + +**Generate an SDK Object Class** + +Generate a RealmObject class ``Car`` from the data model class ``_Car``: + +.. code-block:: + + dart run realm_dart generate + +Running this creates a ``Car`` class in a ``car.realm.dart`` file +located in the directory where you defined the model class. This ``Car`` +class is public and part of the same library as the ``_Car`` data model +class. The generated ``Car`` class is what's used throughout your +application. + +**Watch for Changes to the Model (Optional)** + +You can watch your data model class to generate a new ``Car`` class +whenever there's a change to ``_Car``: + +.. code-block:: + + dart run realm_dart generate --watch diff --git a/source/includes/api-details/dart/quick-start/quick-start-import-realm-description.rst b/source/includes/api-details/dart/quick-start/quick-start-import-realm-description.rst new file mode 100644 index 0000000000..9fb096c63f --- /dev/null +++ b/source/includes/api-details/dart/quick-start/quick-start-import-realm-description.rst @@ -0,0 +1,8 @@ +.. tip:: Standalone Dart or Flutter Project? + + This quick start contains information for using the SDK with a standalone + Dart project. The package that you import, and the way you create object + models, differs if you are using the SDK in a Flutter project. For a quick + start using Flutter, refer to :ref:`frameworks-flutter-quick-start`. + +Import the package into any files where you use it. diff --git a/source/includes/api-details/dart/quick-start/quick-start-open-database-description.rst b/source/includes/api-details/dart/quick-start/quick-start-open-database-description.rst new file mode 100644 index 0000000000..cbffb4975e --- /dev/null +++ b/source/includes/api-details/dart/quick-start/quick-start-open-database-description.rst @@ -0,0 +1,7 @@ +Use the :flutter-sdk:`Configuration ` class +to define the specifics of the database instance, including schema and whether +the database is non-synced or synced. + +Pass your configuration to the +:flutter-sdk:`database constructor ` to generate an +instance of that database: diff --git a/source/includes/api-details/dart/quick-start/quick-start-open-synced-database-description.rst b/source/includes/api-details/dart/quick-start/quick-start-open-synced-database-description.rst new file mode 100644 index 0000000000..0bbb5eb23c --- /dev/null +++ b/source/includes/api-details/dart/quick-start/quick-start-open-synced-database-description.rst @@ -0,0 +1,17 @@ +Once you have enabled Device Sync and authenticated a user, +create a :flutter-sdk:`Configuration.flexibleSync() ` +object. Then, pass the configuration to :flutter-sdk:`Realm() ` +to open an instance of the database. The synced database **must** have a +different :flutter-sdk:`Configuration.path ` +from other opened non-synced databases. + +.. literalinclude:: /examples/generated/flutter/quick_start_sync_test.snippet.open-sync-realm.dart + :language: dart + +Now create a subscription to synchronize data with Atlas using Device Sync. +Add the subscription within the :flutter-sdk:`SubscriptionSet.update() ` +callback function. + +The update block callback function includes a :flutter-sdk:`MutableSubscriptionSet() +` object as an argument. +Use ``MutableSubscriptionSet.add()`` to add a new subscription. diff --git a/source/includes/api-details/javascript/quick-start/quick-start-close-database-js-ts-description.rst b/source/includes/api-details/javascript/quick-start/quick-start-close-database-js-ts-description.rst new file mode 100644 index 0000000000..18be7432f5 --- /dev/null +++ b/source/includes/api-details/javascript/quick-start/quick-start-close-database-js-ts-description.rst @@ -0,0 +1,2 @@ +Call the :js-sdk:`realm.close() ` method when done +with a database instance to avoid memory leaks. diff --git a/source/includes/api-details/javascript/quick-start/quick-start-define-your-object-model-js-ts-description.rst b/source/includes/api-details/javascript/quick-start/quick-start-define-your-object-model-js-ts-description.rst new file mode 100644 index 0000000000..023ea614ee --- /dev/null +++ b/source/includes/api-details/javascript/quick-start/quick-start-define-your-object-model-js-ts-description.rst @@ -0,0 +1,12 @@ +To define an SDK object type, create a schema object that specifies the type's +``name`` and ``properties``. The type name must be unique among object types in +the database. + +The following code shows how to define an object model for a ``Task`` object. +In this example: + +- The ``primaryKey`` is the ``_id`` of type ``int``. Another common type used + for primary keys is ``ObjectId``. +- The ``name`` field is required. +- The ``status`` and ``owner_id`` fields are optional, denoted by the question + mark immediately after the data type. diff --git a/source/includes/api-details/javascript/quick-start/quick-start-import-realm-js-ts-description.rst b/source/includes/api-details/javascript/quick-start/quick-start-import-realm-js-ts-description.rst new file mode 100644 index 0000000000..c00d1a27e0 --- /dev/null +++ b/source/includes/api-details/javascript/quick-start/quick-start-import-realm-js-ts-description.rst @@ -0,0 +1,2 @@ +At the top of your source files where you want to use the SDK, add +the following line: diff --git a/source/includes/api-details/javascript/quick-start/quick-start-open-database-js-ts-description.rst b/source/includes/api-details/javascript/quick-start/quick-start-open-database-js-ts-description.rst new file mode 100644 index 0000000000..35f1522e71 --- /dev/null +++ b/source/includes/api-details/javascript/quick-start/quick-start-open-database-js-ts-description.rst @@ -0,0 +1,3 @@ +To open a database, pass a :js-sdk:`Realm.BaseConfiguration +` object to :js-sdk:`Realm.open() +`. diff --git a/source/includes/api-details/javascript/quick-start/quick-start-open-synced-database-js-ts-description.rst b/source/includes/api-details/javascript/quick-start/quick-start-open-synced-database-js-ts-description.rst new file mode 100644 index 0000000000..202e5bfb06 --- /dev/null +++ b/source/includes/api-details/javascript/quick-start/quick-start-open-synced-database-js-ts-description.rst @@ -0,0 +1,14 @@ +After you have initialized your App, authenticated a user, and +defined your object model, you can create a :js-sdk:`SyncConfiguration +`. + +To open a synced database, call :js-sdk:`Realm.open() `. +Pass in a :js-sdk:`BaseConfiguration ` +object, which must include the ``sync`` property defining a +:js-sdk:`SyncConfiguration ` object. +In the ``SyncConfiguration``, you must include include a ``user`` and set +``flexible: true``. + +Additionally, you need at least one subscription before you can read from or +write to the database. Use ``Configuration.sync.initialSubscriptions`` to +define the initial subscription set when the database file is first opened. diff --git a/source/includes/api-details/kotlin/quick-start/quick-start-close-database-description.rst b/source/includes/api-details/kotlin/quick-start/quick-start-close-database-description.rst new file mode 100644 index 0000000000..0a21062cf8 --- /dev/null +++ b/source/includes/api-details/kotlin/quick-start/quick-start-close-database-description.rst @@ -0,0 +1,4 @@ +To close a database and release all underlying resources, call +:kotlin-sdk:`realm.close() `. The +``close()`` method blocks until all write transactions on the database +have completed. diff --git a/source/includes/api-details/kotlin/quick-start/quick-start-define-your-object-model-description.rst b/source/includes/api-details/kotlin/quick-start/quick-start-define-your-object-model-description.rst new file mode 100644 index 0000000000..9718fc9a31 --- /dev/null +++ b/source/includes/api-details/kotlin/quick-start/quick-start-define-your-object-model-description.rst @@ -0,0 +1,3 @@ +To define your application's data model, add a class definition to your +application code. The example below illustrates the creation of an ``Item`` +model that represents Todo items in a Todo list app. diff --git a/source/includes/api-details/kotlin/quick-start/quick-start-import-realm-description.rst b/source/includes/api-details/kotlin/quick-start/quick-start-import-realm-description.rst new file mode 100644 index 0000000000..a4cb7d53b6 --- /dev/null +++ b/source/includes/api-details/kotlin/quick-start/quick-start-import-realm-description.rst @@ -0,0 +1,8 @@ +.. note:: Using this Quick Start with KMP + + If you're following this quick start in a fresh Kotlin Multiplatform (KMP) template + project, you can copy and paste the snippets into the :file:`Greeting.greeting()` + method in the :file:`commonMain` module. + +At the top of your source files where you want to use the SDK, add +the appropriate imports. For this quick start, we use these imports: diff --git a/source/includes/api-details/kotlin/quick-start/quick-start-open-database-description.rst b/source/includes/api-details/kotlin/quick-start/quick-start-open-database-description.rst new file mode 100644 index 0000000000..601c9407c7 --- /dev/null +++ b/source/includes/api-details/kotlin/quick-start/quick-start-open-database-description.rst @@ -0,0 +1,10 @@ +Use +:kotlin-sdk:`RealmConfiguration.create() +` +to open a database using default parameters. Pass your configuration to the +:kotlin-sdk:`factory constructor ` +to generate an instance of that database. + +You can optionally define additional :kotlin-sdk:`RealmConfiguration +` details, such as name, +location, schema version, and more. diff --git a/source/includes/api-details/kotlin/quick-start/quick-start-open-synced-database-description.rst b/source/includes/api-details/kotlin/quick-start/quick-start-open-synced-database-description.rst new file mode 100644 index 0000000000..c187e82ba6 --- /dev/null +++ b/source/includes/api-details/kotlin/quick-start/quick-start-open-synced-database-description.rst @@ -0,0 +1,26 @@ +Once you have initialized your Atlas App Services App, authenticated a user, and +defined your object model, you can create a :kotlin-sync-sdk:`SyncConfiguration +`. + +If you have opened a non-synced database following the **Open a Database** +section on this page, replace the :kotlin-sdk:`RealmConfiguration +` with +the ``SyncConfiguration`` described below. + +Pass the authenticated user and the ``Item`` class to the +:kotlin-sync-sdk:`SyncConfiguration.Builder +` +function to create ``SyncConfiguration``. + +.. important:: Initial Subscriptions + + You need at least one subscription before you can read from or write to the + database. Use :kotlin-sync-sdk:`initialSubscriptions + ` + to define the initial subscription set when you first open the database file. + Pass the query you wish to subscribe to and a name for the subscription to + the :kotlin-sync-sdk:`add() + ` function. + +The example below specifies a subscription named "User's Items" with +all ``Item`` objects. diff --git a/source/includes/api-details/swift/quick-start/quick-start-close-database-description.rst b/source/includes/api-details/swift/quick-start/quick-start-close-database-description.rst new file mode 100644 index 0000000000..1a308b0fd6 --- /dev/null +++ b/source/includes/api-details/swift/quick-start/quick-start-close-database-description.rst @@ -0,0 +1,5 @@ +Unlike the other SDKs, there is no need to manually close a database in Swift +or Objective-C. When a database goes out of scope and is removed from memory +due to `ARC +`__, +the database is automatically closed. diff --git a/source/includes/api-details/swift/quick-start/quick-start-define-your-object-model-description.rst b/source/includes/api-details/swift/quick-start/quick-start-define-your-object-model-description.rst new file mode 100644 index 0000000000..db6437ec5f --- /dev/null +++ b/source/includes/api-details/swift/quick-start/quick-start-define-your-object-model-description.rst @@ -0,0 +1,3 @@ +This quick start includes ``ownerId``, which is used when we add +Device Sync in a later step. +You can remove this property if you are not using Device Sync. diff --git a/source/includes/api-details/swift/quick-start/quick-start-import-realm-description.rst b/source/includes/api-details/swift/quick-start/quick-start-import-realm-description.rst new file mode 100644 index 0000000000..df0efe1292 --- /dev/null +++ b/source/includes/api-details/swift/quick-start/quick-start-import-realm-description.rst @@ -0,0 +1,7 @@ +.. tip:: + + If your app uses SwiftUI, check out the :ref:`SwiftUI Quick Start + `. + +Near the top of any Swift file that uses the SDK, add the following import +statement: diff --git a/source/includes/api-details/swift/quick-start/quick-start-open-database-description.rst b/source/includes/api-details/swift/quick-start/quick-start-open-database-description.rst new file mode 100644 index 0000000000..4d159e67b1 --- /dev/null +++ b/source/includes/api-details/swift/quick-start/quick-start-open-database-description.rst @@ -0,0 +1,7 @@ +In a non-synced database, the simplest option to open the database +is to use the default database with no configuration parameter, as shown in +the example below. + +You can also specify a :swift-sdk:`Realm.Configuration ` +parameter to open a database at a specific file URL, in-memory, or with a +subset of classes. diff --git a/source/includes/api-details/swift/quick-start/quick-start-open-synced-database-description.rst b/source/includes/api-details/swift/quick-start/quick-start-open-synced-database-description.rst new file mode 100644 index 0000000000..6908fc9525 --- /dev/null +++ b/source/includes/api-details/swift/quick-start/quick-start-open-synced-database-description.rst @@ -0,0 +1,7 @@ +Once you have enabled Device Sync and authenticated a user, you can create +a :swift-sdk:`Configuration ` object and +open the database. You can then add a the Sync subscription that determines +what data the database can read and write. + +Once you have a database with a subscription, this example passes the database +and the user to another function where you can use the database. diff --git a/source/includes/dotnet-implement-interface.rst b/source/includes/dotnet-implement-interface.rst index 1b59486362..e036cdc995 100644 --- a/source/includes/dotnet-implement-interface.rst +++ b/source/includes/dotnet-implement-interface.rst @@ -1,18 +1,18 @@ .. important:: Inheritance - All Realm objects inherit from the + All SDK objects inherit from the :dotnet-sdk:`IRealmObject `, :dotnet-sdk:`IEmbeddedObject `, or :dotnet-sdk:`IAsymmetricObject ` interface and must be declared ``partial`` classes. - In versions of the .NET SDK older than 10.18.0, objects derive from + In versions of the .NET SDK v10.18.0 and earlier, objects derive from :dotnet-sdk:`RealmObject `, :dotnet-sdk:`EmbeddedObject `, or :dotnet-sdk:`AsymmetricObject ` - base classes. This approach to Realm model definition is still supported, but + base classes. This approach to SDK model definition is still supported, but does not include new features such as the :ref:`nullability annotations - `. In a future SDK release, the - base classes will become deprecated. You should use the interfaces for any + `. These base classes will be + deprecated in a future SDK release. You should use the interfaces for any new classes that you write and should consider migrating your existing classes. \ No newline at end of file diff --git a/source/includes/sdk-examples/quick-start/quick-start-authenticate-user.rst b/source/includes/sdk-examples/quick-start/quick-start-authenticate-user.rst new file mode 100644 index 0000000000..90bf2b5cc1 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-authenticate-user.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.authenticate-user.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.anon-login.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/quick_start_sync_test.snippet.log-in.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-authenticate.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.authenticate-user.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.anonymous-login.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-close-database.rst b/source/includes/sdk-examples/quick-start/quick-start-close-database.rst new file mode 100644 index 0000000000..fcc40e3ac5 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-close-database.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/close-realm.snippet.close-realm.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/OpenARealmExamples.snippet.dispose.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/open_realm_test.snippet.close-realm.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-close-realm.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.close-a-realm.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-create-objects.rst b/source/includes/sdk-examples/quick-start/quick-start-create-objects.rst new file mode 100644 index 0000000000..d8aab442ec --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-create-objects.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.create-todo.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.create.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/quick_start_test.snippet.create-realm-object.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-create.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.create-todo.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.create-modify-delete.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-define-your-object-model.rst b/source/includes/sdk-examples/quick-start/quick-start-define-your-object-model.rst new file mode 100644 index 0000000000..772a057897 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-define-your-object-model.rst @@ -0,0 +1,46 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.model.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Task.snippet.item-model.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/car.snippet.define-model-dart.dart + :language: dart + :caption: car.dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.define-an-object-model.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-model.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.model.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.define-an-object-model.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-delete-objects.rst b/source/includes/sdk-examples/quick-start/quick-start-delete-objects.rst new file mode 100644 index 0000000000..ec666b8422 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-delete-objects.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.delete.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.delete-one-item.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/quick_start_test.snippet.delete-one-realm-object.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-delete.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.delete.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-filter-objects.rst b/source/includes/sdk-examples/quick-start/quick-start-filter-objects.rst new file mode 100644 index 0000000000..53f6991e7c --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-filter-objects.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.filter.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.read-open-items.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/quick_start_test.snippet.query-realm-objects-with-filter.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-read-filtered.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.filter.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-import-realm.rst b/source/includes/sdk-examples/quick-start/quick-start-import-realm.rst new file mode 100644 index 0000000000..e0bc3d6bf7 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-import-realm.rst @@ -0,0 +1,46 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.include-header.cpp + :language: cpp + + - id: csharp + content: | + + .. code-block:: csharp + + using Realms; + + - id: dart + content: | + + .. code-block:: dart + + import 'package:realm_dart/realm.dart'; + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.import-realm.ts + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/LocalOnlyCompleteQuickStart.snippet.import-realmswift.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.import-realm.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-initialize-app.rst b/source/includes/sdk-examples/quick-start/quick-start-initialize-app.rst new file mode 100644 index 0000000000..2f6b75be2f --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-initialize-app.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.connect-to-backend.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.initialize-realm.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/quick_start_sync_test.snippet.init-app.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-initialize-app.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.connect-to-backend.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.initialize.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-open-database.rst b/source/includes/sdk-examples/quick-start/quick-start-open-database.rst new file mode 100644 index 0000000000..6ea9045fe1 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-open-database.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.realm-open.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Program.snippet.get-instance.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/open_realm_test.snippet.open-realm.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.open-a-realm.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-open-a-local-realm.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/LocalOnlyCompleteQuickStart.snippet.quick-start-local-open-realm-without-config-param.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.open-a-realm.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-open-synced-database.rst b/source/includes/sdk-examples/quick-start/quick-start-open-synced-database.rst new file mode 100644 index 0000000000..634edc1343 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-open-synced-database.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.open-synced-realm.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.bootstrap-a-subscription.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/quick_start_sync_test.snippet.add-sync-subscription.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.open-realm-with-subscriptions.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-open-a-synced-realm.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.open-synced-realm.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.open-realm-with-subscriptions.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-react-to-changes.rst b/source/includes/sdk-examples/quick-start/quick-start-react-to-changes.rst new file mode 100644 index 0000000000..a2237a40e4 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-react-to-changes.rst @@ -0,0 +1,46 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.watch-for-changes.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/WorkWithRealm.snippet.notifications.cs + :language: csharp + :emphasize-lines: 2 + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/react_to_changes_test.snippet.query-change-listener.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.watch-a-collection.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-watch-for-changes.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/LocalOnlyCompleteQuickStart.snippet.quick-start-local-set-notification-token.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.watch-a-collection.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-read-objects.rst b/source/includes/sdk-examples/quick-start/quick-start-read-objects.rst new file mode 100644 index 0000000000..8faf5756de --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-read-objects.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.get-all-todos.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.read-all.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/quick_start_test.snippet.query-all-realm-objects.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-read.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.get-all-todos.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/quickstart.snippet.find-sort-and-filter-objects.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-update-object-properties.rst b/source/includes/sdk-examples/quick-start/quick-start-update-object-properties.rst new file mode 100644 index 0000000000..05d7819153 --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-update-object-properties.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.modify-write-block.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.upsert.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/quick_start_test.snippet.update-realm-object.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/QuickStartTest.snippet.quick-start-update.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/QuickStartFlexSync.snippet.modify-write-block.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/quick-start/quick-start-write-to-synced-db.rst b/source/includes/sdk-examples/quick-start/quick-start-write-to-synced-db.rst new file mode 100644 index 0000000000..43d553c73d --- /dev/null +++ b/source/includes/sdk-examples/quick-start/quick-start-write-to-synced-db.rst @@ -0,0 +1,44 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.write-to-synced-realm.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sync-memory-performance.rst b/source/includes/sync-memory-performance.rst index 46b66c19be..b8129679ee 100644 --- a/source/includes/sync-memory-performance.rst +++ b/source/includes/sync-memory-performance.rst @@ -1,5 +1,5 @@ Every write transaction for a subscription set has a performance cost. If you -need to make multiple updates to a Realm object during a session, consider +need to make multiple updates to a database object during a session, consider keeping edited objects in memory until all changes are complete. This -improves sync performance by only writing the complete and updated object to your -realm instead of every change. \ No newline at end of file +improves sync performance by only writing the complete and updated object to +your database instead of every change. diff --git a/source/includes/tip-library-name-reflects-former-realm-naming.rst b/source/includes/tip-library-name-reflects-former-realm-naming.rst new file mode 100644 index 0000000000..d83dd5f7c1 --- /dev/null +++ b/source/includes/tip-library-name-reflects-former-realm-naming.rst @@ -0,0 +1,4 @@ +.. tip:: + + Atlas Device SDK was previously named Realm. The SDK library names still + reflect Realm naming. To import Atlas Device SDK, you import Realm. diff --git a/source/platforms.txt b/source/platforms.txt index e7e415ab08..8da0a2109c 100644 --- a/source/platforms.txt +++ b/source/platforms.txt @@ -17,6 +17,7 @@ Build for Platforms Apple IoT Linux + Unity Web Windows @@ -27,5 +28,6 @@ with Atlas Device SDK: - :ref:`sdks-build-for-apple` - :ref:`sdks-build-for-iot` - :ref:`sdks-build-for-linux` +- :ref:`dotnet-unity` - :ref:`sdks-build-for-web` - :ref:`sdks-build-for-windows` diff --git a/source/platforms/unity.txt b/source/platforms/unity.txt new file mode 100644 index 0000000000..8caa8f1e94 --- /dev/null +++ b/source/platforms/unity.txt @@ -0,0 +1,276 @@ +.. _dotnet-unity: + +================================ +Quick Start for Unity - .NET SDK +================================ + +.. meta:: + :description: Get started using Atlas Device SDK for .NET with a Unity project. + :keywords: Realm, .NET SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: csharp + +.. contents:: On this page + :local: + :backlinks: none + :depth: 1 + :class: singlecol + +This quick start demonstrates how to install and integrate Atlas Device SDK +for .NET into your Unity project. + +Prerequisites +------------- + +- Create a Unity project using `2020.3.12f1 (LTS) `_ + +.. note:: + + The .NET SDK may be compatible + with other versions of Unity, but ``2020.3.12f1 (LTS)`` is the version that + the SDK team uses for testing and development. We recommend + using this version to ensure your project works with the SDK and + that the install steps match the steps below since Unity's UI often changes + between versions. + +.. _unity-install-realm: + +Install the SDK +--------------- + +You could install the SDK manually with a tarball. However, we recommend +installing the .NET SDK through npm since it provides `notifications of version +updates through Unity's package manager +`_. + +.. tabs:: + + .. tab:: Install with NPM + :tabid: npm + + .. procedure:: + + .. step:: Add NPM as a Scoped Registry + + + Before you can download and use the sDK within your Unity project, you + must add :npm:`NPM <>` as a `scoped registry + `_. Adding NPM as a scoped + registry configures Unity to communicate with NPM, allowing you to install + packages, such as the .NET SDK. + + Open the `Unity package manager + `_ by clicking the + :guilabel:`Window` tab on the top of the Unity menu. Click :guilabel:`Package + Manager` from the :guilabel:`Window dropdown`. Then, click the gear icon on + the right-hand corner. Select the :guilabel:`Advanced Project + Settings` option from the dropdown. + + .. figure:: /images/unity-open-advanced-project-settings.png + :alt: Select "Advanced Project Settings" + + Fill out the scoped registry form with the details below and click the save + button. + + .. code-block:: none + + name = NPM + URL = https://registry.npmjs.org + Scope(s) = io.realm.unity + + .. figure:: /images/unity-add-scoped-registry-form.png + :alt: Download the latest release of the .NET SDK + + + .. step:: Add the SDK to the Project Manifest + + + Now that Unity can install the .NET SDK from NPM, you need + to add the SDK as a dependency in your project's `manifest file + `_. Open + "Packages/manifest.json" file in `Visual Studio + `_ or another text editor. At + the bottom of the dependency's object, add the field, "io.realm.unity" and + its value, the .NET SDK version number you want to use in quotes. + + .. code-block:: none + + "io.realm.unity": "" + + Remember to replace the ```` above with the actual version + number. You can find the latest release version at the + `realm-dotnet GitHub repo `__. + Your full manifest file should look something like the following: + + .. code-block:: none + + { + "dependencies": { + ... + "io.realm.unity": "10.21.0" + }, + "scopedRegistries": [ + { + "name": "NPM", + "url": "https://registry.npmjs.org/", + "scopes": [ + "io.realm.unity" + ] + } + ] + } + + When you save this file, Unity downloads the specified version of + the .NET SDK package from the NPM registry. + + .. step:: Verify the SDK Dependency and Check for Updates + + To verify that the SDK package has been downloaded from NPM, + open your Unity package manager by clicking the :guilabel:`Window` tab on the + top of the Unity menu. Click :guilabel:`Package Manager` from the + :guilabel:`Window` dropdown. You should see the SDK on the :guilabel:`"Packages: In + Project"` tab. + + .. figure:: /images/unity-realm-is-installed.png + :alt: Unity Realm Installed + + If you see a green check icon next to the version number of the + SDK package, that means your package is up-to-date. However, if + you see the up arrow icon, a new version of the package is available. Clicking + it gives you the option to upgrade to the latest release. + + + .. tab:: Manually Install a Tarball + :tabid: tarball + + .. procedure:: + + .. step:: Download the Latest .NET SDK Release + + + Before you begin using within your Unity project, you must + download the .NET SDK. + + Navigate to the :github:`realm-dotnet repository releases + ` page, and scroll down to the release you want + to use in your project. If you are unsure of which release to use, you can use + the one labeled **"latest release"** on the left row. + + .. figure:: /images/unity-find-latest-dotnet-release.png + :alt: Find the latest release of the .NET SDK + + Scroll down to the **"Assets"** dropdown of the release and click the link + labeled **"io.realm.unity-.tgz"** to download the SDK. + + .. figure:: /images/unity-download-tgz.png + :alt: Download the latest release of the .NET SDK + + + .. step:: Add the Tarball to Your Projects Package Manager + + + Move your downloaded .NET SDK tarball inside of your + project. You can do this by dragging and dropping the file into your project's + folder. Copying the tarball to your project folder and committing it to version + control ensures other developers working on the project can just clone the + repository and build without manually downloading the SDK dependency. + + Next, you must load the tarball into your project using the `Unity package manager + `_. + + To open the package manager, click the :guilabel:`Window` tab on the top of + the Unity menu. Click :guilabel:`Package Manager` from the :guilabel:`Window + dropdown`. Once the package manager model opens, click the :guilabel:`+` icon + in the top left corner of the model. Select the :guilabel:`Add package from + tarball...` option. + + .. figure:: /images/add-package-from-tar-unity.png + :alt: Add package from tarball Unity UI + + Select your **"io.realm.unity-bundled-.tgz"** file to + begin importing your project. + +.. _unity-integration-guide-import-realm: + +Import the SDK +-------------- + +.. include:: /includes/tip-library-name-reflects-former-realm-naming.rst + +`Create a C# script +`_ or use a C# +script you have already created. Open that script in `Visual Studio +`_ or another text editor and add +the following line to import your SDK package: + +.. code-block:: csharp + + using Realms; + +.. _unity-integration-guide-using-realm-in-project: + +Using the SDK in Your Unity Project +----------------------------------- + +When developing with .NET SDK, the API +methods are the same regardless of whether you use Unity or another platform. +However, since Unity has some `scripting restrictions +`_, you should keep +the following additional considerations in mind when developing your project: + +Managed Code Stripping +~~~~~~~~~~~~~~~~~~~~~~ + +Unity performs `managed code stripping `_, +discarding any unused code from a build to reduce binary size. This may lead to issues when +deserializing :manual:`BSON ` into C# classes. For platforms +that use `IL2CPP `_, such as iOS, +managed code stripping is enabled by default. When working with BSON, use +the `[Preserve] attribute `_ +to prevent managed code stripping on types properties that are only populated by +the serializer. Since those properties use +`reflection `_, +Unity cannot statically infer that the property setter is used. This means that +unless you apply the ``[Preserve] attribute``, Unity will strip those properties +away. For examples of when you may perform BSON deserialization, check out the +:ref:`Access MongoDB ` and :ref:`Call a Function +` documentation. + +Using the SDK While the Application is Quitting +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The .NET SDK cannot be accessed within the +`AppDomain.DomainUnload Event `_ or +the `Application.quitting `_ event. +This means you cannot write data to a database while the player application is quitting. +If you need to store some data just before the app exits, consider using the +`Application.wantsToQuit `_ +event instead. + +.. important:: Known Issue When Developing With Unity on Windows + + On Windows, if you are using Device Sync, your project may crash when running + multiple instances of your project since multiple processes are attempting to + access the same synced database. If you are using a non-synced database, + you are able to run multiple instances of your project without crashes. + +Additional Examples +------------------- + +Check out the examples below for community-authored projects that +demonstrate using the .NET SDK with Unity! + +.. note:: + + The MongoDB Documentation team does not directly maintain these examples. + +- `MongoDB Devhub: Unity with Realm Articles `_ +- `MongoDB Youtube Channel: Getting Started with the SDK for Unity `_ +- `MongoDB Youtube Channel: Build an Infinite Runner Game with Unity and the SDK `_ +- `dodoTV42 Youtube Channel: How to SAVE and LOAD data in Unity3D with the SDK `_ diff --git a/source/sdk/crud/query-engines.txt b/source/sdk/crud/query-engines.txt index e03c337c8d..4339163c25 100644 --- a/source/sdk/crud/query-engines.txt +++ b/source/sdk/crud/query-engines.txt @@ -1,5 +1,3 @@ -.. _sdks-query-engines: - ============= Query Engines ============= diff --git a/source/sdk/crud/read.txt b/source/sdk/crud/read.txt index c8686404fc..de16c41b6f 100644 --- a/source/sdk/crud/read.txt +++ b/source/sdk/crud/read.txt @@ -19,3 +19,25 @@ Read Objects :class: singlecol Placeholder page for content related to reading realm objects. + +.. _sdks-read-results: + +SDK Results Collections +----------------------- + +Placeholder. Add some concept information about results being a special SDK +auto-updating collection type for read operations (except in Kotlin, where it's +frozen). + +.. _sdks-query-engines: + +Filter Data +----------- + +Placeholder. Add some concept information about the SDK having query engines, +and the one you use varying depending on the SDK you're using. i.e.: + +- RQL (C++ (subset only), C#, Dart, JS, Kotlin, TS, maybe also Java/Java Kotlin?) +- LINQ (C#) +- Swift SDK (Swift & Objective-C Type-Safe queries and NS Predicate queries) +- Java (Java & Kotlin, Fluent Interface) diff --git a/source/sdk/crud/threading.txt b/source/sdk/crud/threading.txt index e88063645a..2bf6b1d9e1 100644 --- a/source/sdk/crud/threading.txt +++ b/source/sdk/crud/threading.txt @@ -16,3 +16,8 @@ Threading :backlinks: none :depth: 2 :class: singlecol + +.. _sdks-modify-frozen-object: + +Update a Frozen Object +~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/model-data/object-models.txt b/source/sdk/model-data/object-models.txt index a25708ff63..1de0ac8170 100644 --- a/source/sdk/model-data/object-models.txt +++ b/source/sdk/model-data/object-models.txt @@ -10,10 +10,15 @@ Define an SDK Object Model :depth: 3 :class: singlecol +.. _sdks-define-object-schema: + +Define an SDK Object Schema +--------------------------- + .. _sdks-define-objects: -Define an SDK Object --------------------- +Define an SDK Object Model +-------------------------- Placeholder page for defining an object model. @@ -45,3 +50,8 @@ Define Special Property Types Define a Full-Text Search Property ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-required-optional-property: + +Placeholder for .NET nullability info, and any other SDKs with similar +APIs/requirements diff --git a/source/sdk/quick-start.txt b/source/sdk/quick-start.txt index 9cc61012de..eb855cd9aa 100644 --- a/source/sdk/quick-start.txt +++ b/source/sdk/quick-start.txt @@ -4,10 +4,435 @@ Quick Start =========== +.. meta:: + :description: Get started quickly using Atlas Device SDK. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, javascript/typescript, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for quick start content. +.. tabs-selector:: drivers + +This quick start demonstrates how to use Atlas Device SDK. +If you'd prefer a guided quick start experience using a +:ref:`template app `, check out our +:ref:`Device Sync tutorials `. + +Before You Begin +---------------- + +Before you can get started, you must :ref:`Install the SDK `. + +Import the SDK +--------------- + +.. include:: /includes/tip-library-name-reflects-former-realm-naming.rst + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/quick-start/quick-start-import-realm-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/quick-start/quick-start-import-realm-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/quick-start/quick-start-import-realm-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-import-realm-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/quick-start/quick-start-import-realm-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/quick-start/quick-start-import-realm-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-import-realm-js-ts-description.rst + +.. include:: /includes/sdk-examples/quick-start/quick-start-import-realm.rst + +Define Your Object Model +------------------------ + +You can define your :ref:`object model ` directly in code. +If you want to use Device Sync, your client +object models also require a matching schema in Atlas. For more details, refer to +:ref:`sdks-model-data-device-sync`. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/quick-start/quick-start-define-your-object-model-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/quick-start/quick-start-define-your-object-model-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-define-your-object-model-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/quick-start/quick-start-define-your-object-model-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/quick-start/quick-start-define-your-object-model-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-define-your-object-model-js-ts-description.rst + +.. include:: /includes/sdk-examples/quick-start/quick-start-define-your-object-model.rst + +.. _sdks-quick-start-open-database: + +Open a Database +--------------- + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/quick-start/quick-start-open-database-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/quick-start/quick-start-open-database-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/quick-start/quick-start-open-database-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-open-database-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/quick-start/quick-start-open-database-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/quick-start/quick-start-open-database-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-open-database-js-ts-description.rst + +.. include:: /includes/sdk-examples/quick-start/quick-start-open-database.rst + +For more information, refer to :ref:`sdks-configure-and-open-database`. + +Create, Read, Update, and Delete Objects +---------------------------------------- + +Once you have opened a database, you can modify it and its objects in a +:ref:`write transaction ` block. + +Create +~~~~~~ + +To instantiate a new object and add it to the database in a write block: + +.. include:: /includes/sdk-examples/quick-start/quick-start-create-objects.rst + +For more information, refer to :ref:`sdks-crud-create`. + +Read and Filter +~~~~~~~~~~~~~~~ + +To retrieve a :ref:`results collection ` of +all objects of a given type in the database: + +.. include:: /includes/sdk-examples/quick-start/quick-start-read-objects.rst + +For more information, refer to :ref:`sdks-crud-read`. + +To filter that same results collection: + +.. include:: /includes/sdk-examples/quick-start/quick-start-filter-objects.rst + +For more information about the SDK query engines, refer to +:ref:`sdks-query-engines`. + +Update +~~~~~~ + +To modify an object, update its properties in a write transaction block: + +.. include:: /includes/sdk-examples/quick-start/quick-start-update-object-properties.rst + +For more information, refer to :ref:`sdks-crud-update`. + +Delete +~~~~~~ + +To delete an object from the database: + +.. include:: /includes/sdk-examples/quick-start/quick-start-delete-objects.rst + +For more information, refer to :ref:`sdks-crud-delete`. + +Watch for Changes +----------------- + +You can watch a database, a collection, or an object for changes: + +.. include:: /includes/sdk-examples/quick-start/quick-start-react-to-changes.rst + +For more information about reacting to changes, including details about +unregistering the listener to stop watching and free up resources, refer to +:ref:`sdks-react-to-changes`. + +Close a Database +---------------- + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/quick-start/quick-start-close-database-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/quick-start/quick-start-close-database-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/quick-start/quick-start-close-database-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-close-database-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/quick-start/quick-start-close-database-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/quick-start/quick-start-close-database-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-close-database-js-ts-description.rst + +.. include:: /includes/sdk-examples/quick-start/quick-start-close-database.rst + +Add Device Sync +--------------- + +If you want to sync data across devices with the SDK, you can enable Device Sync in Atlas. +For more information on Device Sync, refer to :ref:`sync` in the App Services documentation. + +Prerequisites +~~~~~~~~~~~~~ + +Before you can sync device data, you must: + +- :ref:`Create an App Services App ` +- :ref:`Enable anonymous authentication ` +- :ref:`Enable Device Sync ` with :ref:`Development Mode + ` toggled to ``On``. +- :ref:`Define the rules ` that determine which + permissions users have when using Device Sync. + +.. _cpp-quick-start-init-app: + +Initialize the App +~~~~~~~~~~~~~~~~~~ + +The SDK uses an ``App`` to connect to Atlas, manage users, and report certain +types of errors. + +.. include:: /includes/access-app-id.rst + +To initialize the ``App`` connection: + +.. include:: /includes/sdk-examples/quick-start/quick-start-initialize-app.rst + +For more details about configuring and initializing the App connection, refer +to :ref:`sdks-connect-to-atlas`. + +.. _cpp-quick-start-authenticate: + +Authenticate a User +~~~~~~~~~~~~~~~~~~~ + +This quick start uses :ref:`anonymous authentication ` +to log in users without requiring them to provide any identifying information. +After authenticating the user, you can open a database for that user. + +.. include:: /includes/sdk-examples/quick-start/quick-start-authenticate-user.rst + +The SDK provides additional ways to authenticate, register, and link +users. For other authentication providers, refer to +:ref:`sdks-authenticate-users`. + +Open a Synced Database +~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/quick-start/quick-start-open-synced-database-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/quick-start/quick-start-open-synced-database-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/quick-start/quick-start-open-synced-database-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-open-synced-database-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/quick-start/quick-start-open-synced-database-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/quick-start/quick-start-open-synced-database-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/quick-start/quick-start-open-synced-database-js-ts-description.rst + +.. include:: /includes/sdk-examples/quick-start/quick-start-open-synced-database.rst + +For more details about opening a synced database, refer to +:ref:`sdks-configure-and-open-synced-database`. + +For more details about Sync subscriptions, refer to +:ref:`sdks-manage-sync-subscriptions`. + +Read, Write, and React to Changes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The syntax to :ref:`read `, :ref:`write +`, and :ref:`watch for changes ` +on a synced database is identical to the syntax for non-synced databases above. + +However, reads and writes to a synced databases have the following additional +constraints: + +- Sync permissions that determine whether users can read or write. +- Sync subscriptions that determine what data the synced database + can read or write. + +In the following example, we set Sync permissions to ``Users can only +read and write their own data``, and add a property that lets us +subscribe to only the current user's todos. +``Users can only read and write their own data``. + +For more information about Device Sync permissions, refer to :ref:`sync-permissions` in the App Services documentation. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/quick-start/quick-start-write-to-synced-db.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + +.. include:: /includes/sdk-examples/quick-start/quick-start-write-to-synced-db.rst + +While you work with local data, a background thread efficiently integrates, +uploads, and downloads changesets. + +.. include:: /includes/sync-memory-performance.rst + +Next: Check out Demos and Example Projects +------------------------------------------ + +Check out the :ref:`template apps ` to see an implementation of +a platform-specific Atlas Device SDK application. Each SDK has an application +that integrates Atlas Device SDK and Atlas Device Sync in a platform-idiomatic +todo app. + +Check out our list of curated :ref:`realm-examples` to browse example applications +for specific use cases and implementations. diff --git a/templates/consolidated-page.rst b/templates/consolidated-page.rst index 3fb572f40a..2c5d93510a 100644 --- a/templates/consolidated-page.rst +++ b/templates/consolidated-page.rst @@ -6,7 +6,7 @@ Page Title .. meta:: :description: Provide a short description of the consolidated page. This is critical for SEO. - :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, Node.js SDK, Swift SDK, code example + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example .. facet:: :name: genre From c33fc2223168a938e8bbd52c7c91630e68bfa0e0 Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 18 Jun 2024 15:10:38 -0400 Subject: [PATCH 24/63] (DOCSP-39525): Consolidate Create and Delete Users page (#3289) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39525 *Staged Page* - [Create, Delete, and Remove Users](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39525/sdk/users/create-and-delete-users/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [Flutter: Delete a User](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/delete-user/) - [Java: Create and Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/users/create-delete-users/) - [Kotlin: Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/users/delete-users/) - [.NET: Create and Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/manage-users/create-and-delete-users/) - [Node.js: Create and Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/users/create-delete-users/) - [Swift: Create and Delete Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/users/create-and-delete-users/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --- ...elete-users-delete-users-not-supported.rst | 5 + ...elete-users-remove-users-not-supported.rst | 3 + ...-delete-users-delete-users-description.rst | 3 + ...-delete-users-remove-users-description.rst | 3 + ...-delete-users-delete-users-description.rst | 2 + ...-delete-users-remove-users-description.rst | 2 + ...elete-users-delete-users-not-supported.rst | 5 + ...-delete-users-remove-users-description.rst | 5 + ...e-users-delete-users-js-ts-description.rst | 3 + ...e-users-remove-users-js-ts-description.rst | 4 + ...-delete-users-delete-users-description.rst | 3 + ...-delete-users-remove-users-description.rst | 3 + ...-delete-users-delete-users-description.rst | 5 + ...-delete-users-remove-users-description.rst | 5 + ...-delete-users-delete-users-description.rst | 5 + ...-delete-users-remove-users-description.rst | 4 + ...e-delete-users-delete-users-from-atlas.rst | 71 ++++ ...-delete-users-remove-users-from-device.rst | 62 ++++ source/sdk/users.txt | 2 +- source/sdk/users/authenticate-users.txt | 5 + source/sdk/users/create-and-delete-users.txt | 315 +++++++++++++++++- .../sdk/users/manage-email-password-users.txt | 11 + 22 files changed, 522 insertions(+), 4 deletions(-) create mode 100644 source/includes/api-details/cpp/users/create-delete-users-delete-users-not-supported.rst create mode 100644 source/includes/api-details/cpp/users/create-delete-users-remove-users-not-supported.rst create mode 100644 source/includes/api-details/csharp/users/create-delete-users-delete-users-description.rst create mode 100644 source/includes/api-details/csharp/users/create-delete-users-remove-users-description.rst create mode 100644 source/includes/api-details/dart/users/create-delete-users-delete-users-description.rst create mode 100644 source/includes/api-details/dart/users/create-delete-users-remove-users-description.rst create mode 100644 source/includes/api-details/java/users/create-delete-users-delete-users-not-supported.rst create mode 100644 source/includes/api-details/java/users/create-delete-users-remove-users-description.rst create mode 100644 source/includes/api-details/javascript/users/create-delete-users-delete-users-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/create-delete-users-remove-users-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/users/create-delete-users-delete-users-description.rst create mode 100644 source/includes/api-details/kotlin/users/create-delete-users-remove-users-description.rst create mode 100644 source/includes/api-details/objectivec/users/create-delete-users-delete-users-description.rst create mode 100644 source/includes/api-details/objectivec/users/create-delete-users-remove-users-description.rst create mode 100644 source/includes/api-details/swift/users/create-delete-users-delete-users-description.rst create mode 100644 source/includes/api-details/swift/users/create-delete-users-remove-users-description.rst create mode 100644 source/includes/sdk-examples/users/create-delete-users-delete-users-from-atlas.rst create mode 100644 source/includes/sdk-examples/users/create-delete-users-remove-users-from-device.rst diff --git a/source/includes/api-details/cpp/users/create-delete-users-delete-users-not-supported.rst b/source/includes/api-details/cpp/users/create-delete-users-delete-users-not-supported.rst new file mode 100644 index 0000000000..76e79d2a86 --- /dev/null +++ b/source/includes/api-details/cpp/users/create-delete-users-delete-users-not-supported.rst @@ -0,0 +1,5 @@ +The C++ SDK does not have the ability to delete users through the SDK. +You can delete users from the server using the :ref:`App Services +Admin API ` ``delete a user`` endpoints. You could optionally +create an :ref:`Atlas Function ` that uses the Admin API to +delete a user, and :ref:`call the function from the SDK `. diff --git a/source/includes/api-details/cpp/users/create-delete-users-remove-users-not-supported.rst b/source/includes/api-details/cpp/users/create-delete-users-remove-users-not-supported.rst new file mode 100644 index 0000000000..2ae6514771 --- /dev/null +++ b/source/includes/api-details/cpp/users/create-delete-users-remove-users-not-supported.rst @@ -0,0 +1,3 @@ +The C++ SDK does not have the ability to remove users through the SDK. +Instead, you could :ref:`log out the user `, and then manually +delete the user's synced database and cached app files from the filesystem. diff --git a/source/includes/api-details/csharp/users/create-delete-users-delete-users-description.rst b/source/includes/api-details/csharp/users/create-delete-users-delete-users-description.rst new file mode 100644 index 0000000000..18c9421e7e --- /dev/null +++ b/source/includes/api-details/csharp/users/create-delete-users-delete-users-description.rst @@ -0,0 +1,3 @@ +To delete a user, call the :dotnet-sdk:`DeleteUserFromServerAsync(User) +` +method. diff --git a/source/includes/api-details/csharp/users/create-delete-users-remove-users-description.rst b/source/includes/api-details/csharp/users/create-delete-users-remove-users-description.rst new file mode 100644 index 0000000000..03f764a83d --- /dev/null +++ b/source/includes/api-details/csharp/users/create-delete-users-remove-users-description.rst @@ -0,0 +1,3 @@ +Call the :dotnet-sdk:`RemoveUserAsync(User) +` +method to remove the user and their data from the device. diff --git a/source/includes/api-details/dart/users/create-delete-users-delete-users-description.rst b/source/includes/api-details/dart/users/create-delete-users-delete-users-description.rst new file mode 100644 index 0000000000..d5354a7a9f --- /dev/null +++ b/source/includes/api-details/dart/users/create-delete-users-delete-users-description.rst @@ -0,0 +1,2 @@ +Call the :flutter-sdk:`App.deleteUser() ` +on a user object to delete the user's account from your App Services App. diff --git a/source/includes/api-details/dart/users/create-delete-users-remove-users-description.rst b/source/includes/api-details/dart/users/create-delete-users-remove-users-description.rst new file mode 100644 index 0000000000..a82945170d --- /dev/null +++ b/source/includes/api-details/dart/users/create-delete-users-remove-users-description.rst @@ -0,0 +1,2 @@ +Call the :flutter-sdk:`App.removeUser() ` +on a user object to remove the user and their data from the device. diff --git a/source/includes/api-details/java/users/create-delete-users-delete-users-not-supported.rst b/source/includes/api-details/java/users/create-delete-users-delete-users-not-supported.rst new file mode 100644 index 0000000000..32734c0fa5 --- /dev/null +++ b/source/includes/api-details/java/users/create-delete-users-delete-users-not-supported.rst @@ -0,0 +1,5 @@ +The Java SDK does not have the ability to delete users through the SDK. +You can delete users from the server using the :ref:`App Services +Admin API ` ``delete a user`` endpoints. You could optionally +create an :ref:`Atlas Function ` that uses the Admin API to +delete a user, and :ref:`call the function from the SDK `. diff --git a/source/includes/api-details/java/users/create-delete-users-remove-users-description.rst b/source/includes/api-details/java/users/create-delete-users-remove-users-description.rst new file mode 100644 index 0000000000..6e90949246 --- /dev/null +++ b/source/includes/api-details/java/users/create-delete-users-remove-users-description.rst @@ -0,0 +1,5 @@ +To remove a ``User`` object from your client app, call the +:java-sdk:`User.remove() ` or +:java-sdk:`User.removeAsync() +` +method. diff --git a/source/includes/api-details/javascript/users/create-delete-users-delete-users-js-ts-description.rst b/source/includes/api-details/javascript/users/create-delete-users-delete-users-js-ts-description.rst new file mode 100644 index 0000000000..5d9ffa41cc --- /dev/null +++ b/source/includes/api-details/javascript/users/create-delete-users-delete-users-js-ts-description.rst @@ -0,0 +1,3 @@ +Call the :js-sdk:`App.deleteUser() ` method with a +user object to delete the user from your App Services App. This deletes the +object from the server in addition to clearing data from the device. diff --git a/source/includes/api-details/javascript/users/create-delete-users-remove-users-js-ts-description.rst b/source/includes/api-details/javascript/users/create-delete-users-remove-users-js-ts-description.rst new file mode 100644 index 0000000000..ba64373f3c --- /dev/null +++ b/source/includes/api-details/javascript/users/create-delete-users-remove-users-js-ts-description.rst @@ -0,0 +1,4 @@ +Call the :js-sdk:`App.removeUser() +` +method with a user object to remove the user from the device. This clears user +data from the device, but does not delete the user from Atlas. diff --git a/source/includes/api-details/kotlin/users/create-delete-users-delete-users-description.rst b/source/includes/api-details/kotlin/users/create-delete-users-delete-users-description.rst new file mode 100644 index 0000000000..8d828e6b4e --- /dev/null +++ b/source/includes/api-details/kotlin/users/create-delete-users-delete-users-description.rst @@ -0,0 +1,3 @@ +To permanently delete a ``User`` object from both your client app +*and* the Atlas App Services App, call the :kotlin-sync-sdk:`delete +` method on a logged-in user: diff --git a/source/includes/api-details/kotlin/users/create-delete-users-remove-users-description.rst b/source/includes/api-details/kotlin/users/create-delete-users-remove-users-description.rst new file mode 100644 index 0000000000..35f9a1eaaa --- /dev/null +++ b/source/includes/api-details/kotlin/users/create-delete-users-remove-users-description.rst @@ -0,0 +1,3 @@ +To remove a ``User`` object from your client app, call the +:kotlin-sync-sdk:`remove ` +method on a user: diff --git a/source/includes/api-details/objectivec/users/create-delete-users-delete-users-description.rst b/source/includes/api-details/objectivec/users/create-delete-users-delete-users-description.rst new file mode 100644 index 0000000000..0e6af241bd --- /dev/null +++ b/source/includes/api-details/objectivec/users/create-delete-users-delete-users-description.rst @@ -0,0 +1,5 @@ +You can call the :objc-sdk:`-deleteWithCompletion +` +method on a :objc-sdk:`RLMUser object ` to delete the +user object from your App Services App. This deletes the object from the +server in addition to clearing data from the device. diff --git a/source/includes/api-details/objectivec/users/create-delete-users-remove-users-description.rst b/source/includes/api-details/objectivec/users/create-delete-users-remove-users-description.rst new file mode 100644 index 0000000000..6a5cca2a2a --- /dev/null +++ b/source/includes/api-details/objectivec/users/create-delete-users-remove-users-description.rst @@ -0,0 +1,5 @@ +You can call the :objc-sdk:`-removeWithCompletion +` +method on a :objc-sdk:`RLMUser object ` to remove the +user from the device. This clears user data from the device, but does not +delete the user from Atlas. diff --git a/source/includes/api-details/swift/users/create-delete-users-delete-users-description.rst b/source/includes/api-details/swift/users/create-delete-users-delete-users-description.rst new file mode 100644 index 0000000000..3172f9349e --- /dev/null +++ b/source/includes/api-details/swift/users/create-delete-users-delete-users-description.rst @@ -0,0 +1,5 @@ +You can call the :swift-sdk:`delete +` +method on a user object to delete the user object from your App Services App. +This deletes the object from the server in addition to clearing data from the +device. diff --git a/source/includes/api-details/swift/users/create-delete-users-remove-users-description.rst b/source/includes/api-details/swift/users/create-delete-users-remove-users-description.rst new file mode 100644 index 0000000000..9aced36e2d --- /dev/null +++ b/source/includes/api-details/swift/users/create-delete-users-remove-users-description.rst @@ -0,0 +1,4 @@ +You can call the :swift-sdk:`remove +` +method on a user object to remove the user from the device. This clears user +data from the device, but does not delete the user from Atlas. diff --git a/source/includes/sdk-examples/users/create-delete-users-delete-users-from-atlas.rst b/source/includes/sdk-examples/users/create-delete-users-delete-users-from-atlas.rst new file mode 100644 index 0000000000..48575abb72 --- /dev/null +++ b/source/includes/sdk-examples/users/create-delete-users-delete-users-from-atlas.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/WorkWithRealm.snippet.delete-user.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.delete-user.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.delete-user.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.delete-user.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + + - id: swift + content: | + + **Async/Await** + + .. literalinclude:: /examples/generated/code/start/DeleteUsers.snippet.async-await-delete-user.swift + :language: swift + :copyable: false + + **Closure-Style** + + .. literalinclude:: /examples/generated/code/start/DeleteUsers.snippet.closure-delete-user.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.delete-user.js + :language: typescript diff --git a/source/includes/sdk-examples/users/create-delete-users-remove-users-from-device.rst b/source/includes/sdk-examples/users/create-delete-users-remove-users-from-device.rst new file mode 100644 index 0000000000..82017f7308 --- /dev/null +++ b/source/includes/sdk-examples/users/create-delete-users-remove-users-from-device.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.remove-user.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/sdk/users.txt b/source/sdk/users.txt index b3e4a12a79..c059ed53b7 100644 --- a/source/sdk/users.txt +++ b/source/sdk/users.txt @@ -13,7 +13,7 @@ Manage Users .. toctree:: :titlesonly: - Create and Delete Users + Create, Delete, & Remove Users Authenticate Users Custom User Data User Metadata diff --git a/source/sdk/users/authenticate-users.txt b/source/sdk/users/authenticate-users.txt index dc83c98b78..43f43425c3 100644 --- a/source/sdk/users/authenticate-users.txt +++ b/source/sdk/users/authenticate-users.txt @@ -21,3 +21,8 @@ Offline Login Refresh Token Expiration ------------------------ + +.. _sdks-logout: + +Log a User Out +-------------- \ No newline at end of file diff --git a/source/sdk/users/create-and-delete-users.txt b/source/sdk/users/create-and-delete-users.txt index dc4a3c90b6..5fa93c551a 100644 --- a/source/sdk/users/create-and-delete-users.txt +++ b/source/sdk/users/create-and-delete-users.txt @@ -1,11 +1,320 @@ .. _sdks-create-and-delete-users: -======================= -Create and Delete Users -======================= +================================ +Create, Delete, and Remove Users +================================ + +.. meta:: + :description: Use Atlas Device SDK methods to create, delete, and remove application users. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol + +.. tabs-selector:: drivers + +Atlas Device SDK provides built-in functionality to manage application users, +both on the device and in Atlas. Your application can take advantage of +role-based data access rules to determine the read and write permissions of a +given user. When combined with Sync subscription queries, these features +determine what data a user can :ref:`read and write from a synced database +`. + +The SDK also provides functionality to extend a user object, and manage +multiple users or identities: + +- You can associate :ref:`metadata ` or + :ref:`custom data ` with user accounts. +- Users can have multiple identities. For more information, refer to + :ref:`sdks-link-user-identities`. +- Your app can manage multiple users on a device. For more information, refer + to :ref:`sdks-multi-user-applications`. + +For more information about authentication providers, identities, and user +sessions, refer to :ref:`Authenticate & Manage Users ` +in the App Services documentation. + +.. _sdks-device-sdk-users-vs-other-users: + +Atlas Device SDK Users vs. Other User Types +------------------------------------------- + +Atlas Device SDK users are distinct from :ref:`database users ` +or :ref:`Atlas account users `. SDK users are bounded by the +App Services App where they are registered, and only have access to +resources you provide through the App. Your application can let SDK users: + +- :ref:`Read and write from a synced database ` +- :ref:`Call an Atlas Function ` +- Call :ref:`Data API ` or :ref:`custom HTTPS endpoints ` +- Read and write from specified collections and databases in MongoDB Atlas + through :ref:`the MongoClient API ` + +SDK users do not have direct Atlas database access, or direct Atlas account +access. It is your responsibility to manage these application users, +including complying with data retention or deletion policies and regulatory +requirements where you publish your applications. + +.. _sdks-create-users: + +Create Users +------------ + +For most :ref:`authentication methods `, Atlas App Services +automatically creates a :ref:`user object ` the first time +a user authenticates. The only exception is email/password authentication. +When you use email/password authentication, you must :ref:`register +` and :ref:`confirm +` a user before the user can +authenticate to an App Services App. + +Automatically Create Users +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you authenticate a user with one of the following authentication +providers, this automatically creates a user object for the user: + +- Anonymous authentication +- OAuth 2.0 through Facebook, Google, and Apple ID +- Custom JWT +- Custom Function + +If your app uses email/password authentication, you must manually create +users either in the client code or in Atlas. + +If you are adding a secondary authentication method, such as adding a +OAuth credential for a user created through anonymous authentication, +you may want to link user identities instead of creating a new user. For +more details about how to link these identities, refer to +:ref:`sdks-link-user-identities`. + +Manually Create Users +~~~~~~~~~~~~~~~~~~~~~ + +If your app uses email/password authentication, your app must explicitly +register a user to create the user object in App Services. This method is +independent of authenticating a user. For more information about registering +email/password users, refer to :ref:`sdks-email-password-user-register`. + +You can also manually create email/password users through App Services. For +more information about manually creating users through the UI, App Services +Admin API, or App Services CLI, refer to :ref:`create-email-password-user` in +the App Services documentation. + +Account Deletion Requirements +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you distribute your application through some app stores or in some +regions, an app that requires users to create an account also requires +you to give users the option to delete their account and any associated user +data or metadata. The SDK provides a method you can call from the client code +to comply with these deletion requirements. However, this method only deletes +the user account; it does not delete any associated user data or metadata. + +Following is a resource that provides some details about these account deletion +requirements for distribution through the Apple and Google app stores. This +is not intended to be a comprehensive list of resources related to account +deletion requirements. Consult your distribution agreements and any relevant +regulations in the regions where you plan to distribute your application to +ensure you comply with all applicable account and data deletion policies. + +.. tabs:: + + .. tab:: Apple App Store Requirements + :tabid: apple + + Apple :apple:`requires that applications listed through its App Store + ` must give any user who creates + an account the option to delete the account. Whether you use an + authentication method where you must manually register a user, such as + email/password authentication, or one that that automatically creates a + user, such as Sign-In with Apple, you must implement user account deletion. + + .. tab:: Google Play Store Requirements + :tabid: google + + Google requires that applications listed through its Google Play store + must give any user who creates an account `an in-app path to delete the + account and its associated data + `__. + Whether you use an authentication method where you must manually register a + user, such as email/password authentication, or one that that automatically + creates a user, such as Sign-In with Google, you must implement user account + deletion. + +.. _sdks-delete-users: + +Delete Users from Atlas +----------------------- + +The SDK provides a method you can call from an application to delete the +user object. This sends a request to Atlas to delete the user from the +server. + +.. important:: + + Deleting a user only deletes the user object, which may contain associated + :ref:`metadata `. This does not delete :ref:`custom + user data ` or user-entered data from your + application. If you collect additional user data, you must implement your + own methods or processes to delete that data. + + You can use the :ref:`Authentication Trigger DELETE event + ` to programmatically clean up other + data when you delete a user. For example, you can delete the user's data + from your custom user data collection or another service. + +Calling the user delete method performs the following: + +- Deletes synced databases associated with the user from the device. +- Deletes the ``User`` object from the Atlas App Services server. +- Sets the user state on the device to removed. + +Because this method deletes any synced databases owned by the user, you +should only call this method after closing the user's databases. + +If the deleted user wants to use your app in the future, the user must +sign up for a new account. They can use the same credentials +(depending on the authentication provider), +but the new account does not have the same user ID or links to custom user data +as their deleted account. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/create-delete-users-delete-users-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/create-delete-users-delete-users-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/create-delete-users-delete-users-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/create-delete-users-delete-users-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/create-delete-users-delete-users-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/create-delete-users-delete-users-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/create-delete-users-delete-users-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/users/create-delete-users-delete-users-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/create-delete-users-delete-users-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/create-delete-users-delete-users-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/create-delete-users-delete-users-from-atlas.rst + +.. _sdks-remove-users: + +Remove Users from Device +------------------------ + +In some cases, you may not want to delete a user entirely, but may want to +remove them from the device. In this scenario, users continue to exist in +Atlas. You may want to force users to re-authenticate under some circumstances, +such as when a paid subscription expires. Or you may want to temporarily +persist a user on the server to allow for account recovery. + +Removing a user: + +- *Does not* delete the ``User`` object from the Atlas App Services App. +- :ref:`Logs the user ` out if they are logged in. +- Deletes synced databases associated with the user from the device. +- Sets the user's state to removed. + +Because removing a user deletes any synced databases owned by the user, you +should only call this method after closing the user's databases. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/create-delete-users-remove-users-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/create-delete-users-remove-users-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/create-delete-users-remove-users-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/create-delete-users-remove-users-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/create-delete-users-remove-users-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/create-delete-users-remove-users-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/create-delete-users-remove-users-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/users/create-delete-users-remove-users-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/create-delete-users-remove-users-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/create-delete-users-remove-users-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/create-delete-users-remove-users-from-device.rst diff --git a/source/sdk/users/manage-email-password-users.txt b/source/sdk/users/manage-email-password-users.txt index bcc39ed5fa..4d1182c500 100644 --- a/source/sdk/users/manage-email-password-users.txt +++ b/source/sdk/users/manage-email-password-users.txt @@ -11,3 +11,14 @@ Manage Email/Password Users :class: singlecol Placeholder page for information about managing email/password users. + +.. _sdks-email-password-user-register: + +Register an New User Account +---------------------------- + +.. _sdks-email-password-user-confirm: + +Confirm a New User's Email Address +---------------------------------- + From 7cf0f51309b4660fcdb2806421eb4f5153e06916 Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 18 Jun 2024 15:58:52 -0400 Subject: [PATCH 25/63] (DOCSP-39526): Consolidate Authenticate Users page (#3281) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39526 *Staged Page* - [Authenticate Users](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39526/sdk/users/authenticate-users/) - [Manage User Tokens](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39526/sdk/users/manage-user-tokens/): New page that moves the user access token info off the "Authenticate" page. This is currently [a separate page in Flutter](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/access-token/). As devs shouldn't have to handle this manually for most use cases, _and_ the OTP is getting super long, I thought it made sense to move the info off to a separate page. *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Authenticate Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/users/authenticate-users/) - [Flutter: Authenticate Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/authenticate/) - [Flutter: Get an Access Token](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/access-token/) - [Java: Authenticate Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/users/authenticate-users/) - [Kotlin: Autenticate Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/users/authenticate-users/) - [.NET: Authenticate Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/manage-users/authenticate/) - [Node.js: Authenticate Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/users/authenticate-users/) - [Swift: Authenticate Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/users/authenticate-users/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: Kyle Rollins <115574589+krollins-mdb@users.noreply.github.com> --- .github/workflows/bluehawk.yml | 2 +- ...henticate-get-current-user-description.rst | 1 + .../users/authenticate-google-description.rst | 8 + .../authenticate-log-in-user-description.rst | 14 + ...-observe-authentication-changes-no-api.rst | 8 + ...er-create-new-user-account-description.rst | 7 + ...kens-get-user-access-token-description.rst | 6 + ...ually-refresh-access-token-description.rst | 3 + ...henticate-get-current-user-description.rst | 3 + .../authenticate-log-in-user-description.rst | 23 + .../authenticate-log-user-out-description.rst | 1 + ...rve-authentication-changes-description.rst | 8 + ...er-create-new-user-account-description.rst | 8 + .../authenticate-anonymous-description.rst | 11 + .../authenticate-api-key-description.rst | 3 + .../users/authenticate-apple-description.rst | 3 + ...thenticate-custom-function-description.rst | 3 + .../authenticate-custom-jwt-description.rst | 3 + ...uthenticate-email-password-description.rst | 4 + .../authenticate-facebook-description.rst | 3 + ...henticate-get-current-user-description.rst | 3 + .../users/authenticate-google-description.rst | 10 + .../authenticate-log-in-user-description.rst | 21 + .../authenticate-log-user-out-description.rst | 2 + ...-observe-authentication-changes-no-api.rst | 5 + ...er-create-new-user-account-description.rst | 8 + ...kens-get-user-access-token-description.rst | 2 + ...ually-refresh-access-token-description.rst | 9 + .../authenticate-anonymous-description.rst | 4 + .../authenticate-api-key-description.rst | 4 + .../users/authenticate-apple-description.rst | 4 + ...thenticate-custom-function-description.rst | 23 + .../authenticate-custom-jwt-description.rst | 4 + ...uthenticate-email-password-description.rst | 4 + .../authenticate-facebook-description.rst | 7 + .../users/authenticate-google-description.rst | 72 ++ .../authenticate-log-in-user-description.rst | 36 + .../authenticate-log-user-out-description.rst | 3 + ...er-create-new-user-account-description.rst | 8 + ...thenticate-anonymous-js-ts-description.rst | 1 + ...authenticate-api-key-js-ts-description.rst | 2 + .../authenticate-apple-js-ts-description.rst | 5 + ...cate-custom-function-js-ts-description.rst | 2 + ...henticate-custom-jwt-js-ts-description.rst | 2 + ...icate-email-password-js-ts-description.rst | 2 + ...uthenticate-facebook-js-ts-description.rst | 4 + .../users/authenticate-google-description.rst | 42 + ...enticate-log-in-user-js-ts-description.rst | 21 + ...nticate-log-user-out-js-ts-description.rst | 1 + ...ate-new-user-account-js-ts-description.rst | 8 + .../authenticate-anonymous-description.rst | 14 + .../authenticate-api-key-description.rst | 6 + .../users/authenticate-apple-description.rst | 11 + ...thenticate-custom-function-description.rst | 11 + .../authenticate-custom-jwt-description.rst | 6 + ...uthenticate-email-password-description.rst | 6 + .../authenticate-facebook-description.rst | 21 + ...henticate-get-current-user-description.rst | 2 + .../users/authenticate-google-description.rst | 15 + .../authenticate-log-in-user-description.rst | 38 + .../authenticate-log-user-out-description.rst | 3 + ...rve-authentication-changes-description.rst | 15 + ...er-create-new-user-account-description.rst | 8 + ...kens-get-user-access-token-description.rst | 3 + ...ually-refresh-access-token-description.rst | 3 + .../authenticate-facebook-description.rst | 6 + .../users/authenticate-google-description.rst | 17 + ...enticate-log-in-user-async-description.rst | 9 + .../authenticate-log-in-user-description.rst | 15 + ...er-create-new-user-account-description.rst | 8 + ...kens-get-user-access-token-description.rst | 5 + ...ually-refresh-access-token-description.rst | 5 + .../authenticate-google-missing-example.rst | 5 + ...authorization-appleidcredential-string.rst | 5 - .../includes/log-out-queries-in-progress.rst | 2 +- source/includes/note-enable-facebook-auth.rst | 5 - source/includes/offline-login.rst | 10 - source/includes/refresh-token-expiry.rst | 11 +- .../users/authenticate-anonymous.rst | 59 ++ .../users/authenticate-api-key.rst | 58 ++ .../sdk-examples/users/authenticate-apple.rst | 58 ++ .../users/authenticate-custom-function.rst | 58 ++ .../users/authenticate-custom-jwt.rst | 58 ++ .../users/authenticate-email-password.rst | 58 ++ .../users/authenticate-facebook.rst | 60 ++ .../users/authenticate-get-current-user.rst | 56 ++ .../users/authenticate-google.rst | 65 ++ .../users/authenticate-log-in-offline.rst | 58 ++ .../users/authenticate-log-in-user.rst | 56 ++ .../users/authenticate-log-user-out.rst | 58 ++ ...nticate-observe-authentication-changes.rst | 56 ++ ...nage-user-tokens-get-user-access-token.rst | 58 ++ ...r-tokens-manually-refresh-access-token.rst | 56 ++ source/includes/swift-async-await-support.rst | 6 +- source/sdk/users.txt | 2 + source/sdk/users/authenticate-users.txt | 843 +++++++++++++++++- source/sdk/users/manage-user-tokens.txt | 148 +++ 97 files changed, 2539 insertions(+), 38 deletions(-) create mode 100644 source/includes/api-details/cpp/users/authenticate-get-current-user-description.rst create mode 100644 source/includes/api-details/cpp/users/authenticate-google-description.rst create mode 100644 source/includes/api-details/cpp/users/authenticate-log-in-user-description.rst create mode 100644 source/includes/api-details/cpp/users/authenticate-observe-authentication-changes-no-api.rst create mode 100644 source/includes/api-details/cpp/users/authenticate-register-create-new-user-account-description.rst create mode 100644 source/includes/api-details/cpp/users/manage-user-tokens-get-user-access-token-description.rst create mode 100644 source/includes/api-details/cpp/users/manage-user-tokens-manually-refresh-access-token-description.rst create mode 100644 source/includes/api-details/csharp/users/authenticate-get-current-user-description.rst create mode 100644 source/includes/api-details/csharp/users/authenticate-log-in-user-description.rst create mode 100644 source/includes/api-details/csharp/users/authenticate-log-user-out-description.rst create mode 100644 source/includes/api-details/csharp/users/authenticate-observe-authentication-changes-description.rst create mode 100644 source/includes/api-details/csharp/users/authenticate-register-create-new-user-account-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-anonymous-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-api-key-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-apple-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-custom-function-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-custom-jwt-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-email-password-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-facebook-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-get-current-user-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-google-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-log-in-user-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-log-user-out-description.rst create mode 100644 source/includes/api-details/dart/users/authenticate-observe-authentication-changes-no-api.rst create mode 100644 source/includes/api-details/dart/users/authenticate-register-create-new-user-account-description.rst create mode 100644 source/includes/api-details/dart/users/manage-user-tokens-get-user-access-token-description.rst create mode 100644 source/includes/api-details/dart/users/manage-user-tokens-manually-refresh-access-token-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-anonymous-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-api-key-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-apple-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-custom-function-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-custom-jwt-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-email-password-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-facebook-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-google-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-log-in-user-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-log-user-out-description.rst create mode 100644 source/includes/api-details/java/users/authenticate-register-create-new-user-account-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-anonymous-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-api-key-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-apple-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-custom-function-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-custom-jwt-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-email-password-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-facebook-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-google-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-log-in-user-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-log-user-out-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/authenticate-register-create-new-user-account-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-anonymous-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-api-key-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-apple-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-custom-function-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-custom-jwt-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-email-password-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-facebook-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-get-current-user-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-google-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-log-in-user-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-log-user-out-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-observe-authentication-changes-description.rst create mode 100644 source/includes/api-details/kotlin/users/authenticate-register-create-new-user-account-description.rst create mode 100644 source/includes/api-details/kotlin/users/manage-user-tokens-get-user-access-token-description.rst create mode 100644 source/includes/api-details/kotlin/users/manage-user-tokens-manually-refresh-access-token-description.rst create mode 100644 source/includes/api-details/swift/users/authenticate-facebook-description.rst create mode 100644 source/includes/api-details/swift/users/authenticate-google-description.rst create mode 100644 source/includes/api-details/swift/users/authenticate-log-in-user-async-description.rst create mode 100644 source/includes/api-details/swift/users/authenticate-log-in-user-description.rst create mode 100644 source/includes/api-details/swift/users/authenticate-register-create-new-user-account-description.rst create mode 100644 source/includes/api-details/swift/users/manage-user-tokens-get-user-access-token-description.rst create mode 100644 source/includes/api-details/swift/users/manage-user-tokens-manually-refresh-access-token-description.rst create mode 100644 source/includes/api-details/typescript/users/authenticate-google-missing-example.rst delete mode 100644 source/includes/authorization-appleidcredential-string.rst delete mode 100644 source/includes/note-enable-facebook-auth.rst delete mode 100644 source/includes/offline-login.rst create mode 100644 source/includes/sdk-examples/users/authenticate-anonymous.rst create mode 100644 source/includes/sdk-examples/users/authenticate-api-key.rst create mode 100644 source/includes/sdk-examples/users/authenticate-apple.rst create mode 100644 source/includes/sdk-examples/users/authenticate-custom-function.rst create mode 100644 source/includes/sdk-examples/users/authenticate-custom-jwt.rst create mode 100644 source/includes/sdk-examples/users/authenticate-email-password.rst create mode 100644 source/includes/sdk-examples/users/authenticate-facebook.rst create mode 100644 source/includes/sdk-examples/users/authenticate-get-current-user.rst create mode 100644 source/includes/sdk-examples/users/authenticate-google.rst create mode 100644 source/includes/sdk-examples/users/authenticate-log-in-offline.rst create mode 100644 source/includes/sdk-examples/users/authenticate-log-in-user.rst create mode 100644 source/includes/sdk-examples/users/authenticate-log-user-out.rst create mode 100644 source/includes/sdk-examples/users/authenticate-observe-authentication-changes.rst create mode 100644 source/includes/sdk-examples/users/manage-user-tokens-get-user-access-token.rst create mode 100644 source/includes/sdk-examples/users/manage-user-tokens-manually-refresh-access-token.rst create mode 100644 source/sdk/users/manage-user-tokens.txt diff --git a/.github/workflows/bluehawk.yml b/.github/workflows/bluehawk.yml index 456726a93a..685678bdb0 100644 --- a/.github/workflows/bluehawk.yml +++ b/.github/workflows/bluehawk.yml @@ -10,5 +10,5 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v1 with: - node-version: 15.x + node-version: 18.x - run: npx bluehawk check -i "*.md" -i "*.properties" -i "*.lock" examples tutorial diff --git a/source/includes/api-details/cpp/users/authenticate-get-current-user-description.rst b/source/includes/api-details/cpp/users/authenticate-get-current-user-description.rst new file mode 100644 index 0000000000..c212b410e6 --- /dev/null +++ b/source/includes/api-details/cpp/users/authenticate-get-current-user-description.rst @@ -0,0 +1 @@ +You can get the current user with ``app::get_current_user()``: diff --git a/source/includes/api-details/cpp/users/authenticate-google-description.rst b/source/includes/api-details/cpp/users/authenticate-google-description.rst new file mode 100644 index 0000000000..3503dd905b --- /dev/null +++ b/source/includes/api-details/cpp/users/authenticate-google-description.rst @@ -0,0 +1,8 @@ +To log in with a Google authentication code, pass a Google authentication code to +:cpp-sdk:`credentials::google_auth_code() `. + +.. literalinclude:: /examples/generated/cpp/authentication.snippet.google-auth-code.cpp + :language: cpp + +To log in with a Google ID token, pass a Google ID token to +:cpp-sdk:`credentials::google_id_token() `. diff --git a/source/includes/api-details/cpp/users/authenticate-log-in-user-description.rst b/source/includes/api-details/cpp/users/authenticate-log-in-user-description.rst new file mode 100644 index 0000000000..99e6c5f717 --- /dev/null +++ b/source/includes/api-details/cpp/users/authenticate-log-in-user-description.rst @@ -0,0 +1,14 @@ +To authenticate and log users in to your :cpp-sdk:`App +`, first instantiate a +:cpp-sdk:`credentials ` +object containing the credentials associated with the authentication provider. +Then, pass it to the ``login()`` function. + +Each authentication provider corresponds to a :cpp-sdk:`static function +` +used to instantiate ``credentials`` objects for that authentication provider. + +If successful, ``app::login()`` returns a :cpp-sdk:`user +` object. In the event of a failure, +``app::login()`` throws an exception of type :cpp-sdk:`app_error +`. diff --git a/source/includes/api-details/cpp/users/authenticate-observe-authentication-changes-no-api.rst b/source/includes/api-details/cpp/users/authenticate-observe-authentication-changes-no-api.rst new file mode 100644 index 0000000000..7ae12db86f --- /dev/null +++ b/source/includes/api-details/cpp/users/authenticate-observe-authentication-changes-no-api.rst @@ -0,0 +1,8 @@ +C++ does not provide a dedicated API to observe authentication changes. However, +you can check the user's :cpp-sdk:`state +`, which is +an enum whose possible values are: + +- ``logged_out`` +- ``logged_in`` +- ``removed`` diff --git a/source/includes/api-details/cpp/users/authenticate-register-create-new-user-account-description.rst b/source/includes/api-details/cpp/users/authenticate-register-create-new-user-account-description.rst new file mode 100644 index 0000000000..b50470127d --- /dev/null +++ b/source/includes/api-details/cpp/users/authenticate-register-create-new-user-account-description.rst @@ -0,0 +1,7 @@ +When a user registers or successfully authenticates to your App, Atlas App +Services automatically creates a :cpp-sdk:`user +` object, which contains a unique +identifier and user state information. You can optionally configure +:ref:`custom user data ` if your app needs to store +additional user data. To learn more about the user object that App Services +provides, refer to :ref:`` in the App Services documentation. diff --git a/source/includes/api-details/cpp/users/manage-user-tokens-get-user-access-token-description.rst b/source/includes/api-details/cpp/users/manage-user-tokens-get-user-access-token-description.rst new file mode 100644 index 0000000000..09b8299327 --- /dev/null +++ b/source/includes/api-details/cpp/users/manage-user-tokens-get-user-access-token-description.rst @@ -0,0 +1,6 @@ +You can call :cpp-sdk:`.refresh_custom_user_data() +` +on a logged-in user to refresh the user's auth session. Then, get the +:cpp-sdk:`.access_token() ` +as a string you can use in your code. You might use code similar to this to +fetch an access token: diff --git a/source/includes/api-details/cpp/users/manage-user-tokens-manually-refresh-access-token-description.rst b/source/includes/api-details/cpp/users/manage-user-tokens-manually-refresh-access-token-description.rst new file mode 100644 index 0000000000..9958ea93e3 --- /dev/null +++ b/source/includes/api-details/cpp/users/manage-user-tokens-manually-refresh-access-token-description.rst @@ -0,0 +1,3 @@ +You can call :cpp-sdk:`.refresh_custom_user_data() +` +on a logged-in user to refresh the user's auth session. diff --git a/source/includes/api-details/csharp/users/authenticate-get-current-user-description.rst b/source/includes/api-details/csharp/users/authenticate-get-current-user-description.rst new file mode 100644 index 0000000000..034c5dfce7 --- /dev/null +++ b/source/includes/api-details/csharp/users/authenticate-get-current-user-description.rst @@ -0,0 +1,3 @@ +Once you have an authenticated user, you can retrieve the User object with the +:dotnet-sdk:`App.CurrentUser ` +property. diff --git a/source/includes/api-details/csharp/users/authenticate-log-in-user-description.rst b/source/includes/api-details/csharp/users/authenticate-log-in-user-description.rst new file mode 100644 index 0000000000..b91ea30ecb --- /dev/null +++ b/source/includes/api-details/csharp/users/authenticate-log-in-user-description.rst @@ -0,0 +1,23 @@ +To authenticate and log users in to your :dotnet-sdk:`App +`, first instantiate a +:dotnet-sdk:`Credentials ` +object containing the credentials associated with the authentication provider. +Then, pass it to :dotnet-sdk:`LogInAsync() +`. + +Each authentication provider corresponds to a :dotnet-sdk:`factory method +` +used to instantiate ``Credentials`` objects for that authentication provider. + +If successful, ``LogInAsync()`` returns a :dotnet-sdk:`User +` object. In the event of a failure, +``LogInAsync()`` throws an exception of type :dotnet-sdk:`AppException +`. + +.. tip:: + + You can get the authentication provider type used to log in a user + through the :dotnet-sdk:`UserIdentity.Provider + ` + property. If the user is currently logged out, the most recent provider + used to log in the user is returned. diff --git a/source/includes/api-details/csharp/users/authenticate-log-user-out-description.rst b/source/includes/api-details/csharp/users/authenticate-log-user-out-description.rst new file mode 100644 index 0000000000..a56ce6975a --- /dev/null +++ b/source/includes/api-details/csharp/users/authenticate-log-user-out-description.rst @@ -0,0 +1 @@ +Once logged in, you can log out by calling the ``LogOutAsync()`` method: diff --git a/source/includes/api-details/csharp/users/authenticate-observe-authentication-changes-description.rst b/source/includes/api-details/csharp/users/authenticate-observe-authentication-changes-description.rst new file mode 100644 index 0000000000..8ec8b1edee --- /dev/null +++ b/source/includes/api-details/csharp/users/authenticate-observe-authentication-changes-description.rst @@ -0,0 +1,8 @@ +.. versionadded:: v11.6.0 + +You can observe a flow of authentication change events by calling +:dotnet-sdk:`User.Changed() ` +on a valid user object. + +Currently, ``User.Changed()`` triggers on all user events and you should add a +handler to ensure your responses to events are idempotent. diff --git a/source/includes/api-details/csharp/users/authenticate-register-create-new-user-account-description.rst b/source/includes/api-details/csharp/users/authenticate-register-create-new-user-account-description.rst new file mode 100644 index 0000000000..96a7fe9a90 --- /dev/null +++ b/source/includes/api-details/csharp/users/authenticate-register-create-new-user-account-description.rst @@ -0,0 +1,8 @@ +When a user registers or successfully authenticates to your App, Atlas App +Services automatically creates a :dotnet-sdk:`User +` object, which contains a unique +identifier and provider-specific :ref:`user metadata `. +You can optionally configure :ref:`custom user data ` +if your app needs to store additional user data. To learn more about the +user object that App Services provides, refer to :ref:`` in the +App Services documentation. diff --git a/source/includes/api-details/dart/users/authenticate-anonymous-description.rst b/source/includes/api-details/dart/users/authenticate-anonymous-description.rst new file mode 100644 index 0000000000..6db6d11cc4 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-anonymous-description.rst @@ -0,0 +1,11 @@ +To log in with anonymous +authentication, create an anonymous credential by calling +:flutter-sdk:`Credentials.anonymous() ` +and then pass the generated credential to +``app.logIn``. + +.. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.anonymous-credentials.dart + :language: dart + +If you want more than one anonymous user, set ``reuseCredentials: false`` +when creating additional anonymous credentials. diff --git a/source/includes/api-details/dart/users/authenticate-api-key-description.rst b/source/includes/api-details/dart/users/authenticate-api-key-description.rst new file mode 100644 index 0000000000..f490f14c4e --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-api-key-description.rst @@ -0,0 +1,3 @@ +To log in with API key authentication, create an :flutter-sdk:`ApiKey ` +credential by calling :flutter-sdk:`Credentials.apiKey() ` +on an API key string. Then pass the credential to ``app.logIn()``. diff --git a/source/includes/api-details/dart/users/authenticate-apple-description.rst b/source/includes/api-details/dart/users/authenticate-apple-description.rst new file mode 100644 index 0000000000..a8a209a3e9 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-apple-description.rst @@ -0,0 +1,3 @@ +To log in with Apple authentication, pass an Apple access token to +:flutter-sdk:`Credentials.apple() `. +Then pass the credential to ``app.logIn``. diff --git a/source/includes/api-details/dart/users/authenticate-custom-function-description.rst b/source/includes/api-details/dart/users/authenticate-custom-function-description.rst new file mode 100644 index 0000000000..7dd6910a7a --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-custom-function-description.rst @@ -0,0 +1,3 @@ +To log in with Custom Function authentication, pass a stringified JSON with +your custom arguments to :flutter-sdk:`Credentials.function() `. +Then pass the credential to ``app.logIn``. diff --git a/source/includes/api-details/dart/users/authenticate-custom-jwt-description.rst b/source/includes/api-details/dart/users/authenticate-custom-jwt-description.rst new file mode 100644 index 0000000000..5388201a41 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-custom-jwt-description.rst @@ -0,0 +1,3 @@ +To log in with Custom JWT authentication, create a JWT credential by calling +:flutter-sdk:`Credentials.jwt() ` +on a JWT string. Then pass the credential to ``app.logIn``. diff --git a/source/includes/api-details/dart/users/authenticate-email-password-description.rst b/source/includes/api-details/dart/users/authenticate-email-password-description.rst new file mode 100644 index 0000000000..76eb83d4ba --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-email-password-description.rst @@ -0,0 +1,4 @@ +To log in with email/password authentication, create an +email/password credential by calling :flutter-sdk:`Credentials.emailPassword() ` +with the user's email and password. +Then pass the credential to ``app.logIn``. diff --git a/source/includes/api-details/dart/users/authenticate-facebook-description.rst b/source/includes/api-details/dart/users/authenticate-facebook-description.rst new file mode 100644 index 0000000000..3b2124c738 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-facebook-description.rst @@ -0,0 +1,3 @@ +To log in with Facebook authentication, pass a Facebook access token to +:flutter-sdk:`Credentials.facebook() `. +Then pass the credential to ``app.logIn``. diff --git a/source/includes/api-details/dart/users/authenticate-get-current-user-description.rst b/source/includes/api-details/dart/users/authenticate-get-current-user-description.rst new file mode 100644 index 0000000000..3360becf5a --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-get-current-user-description.rst @@ -0,0 +1,3 @@ +Once you have an authenticated user, you can retrieve the User object with the +:flutter-sdk:`App.currentUser ` +property. diff --git a/source/includes/api-details/dart/users/authenticate-google-description.rst b/source/includes/api-details/dart/users/authenticate-google-description.rst new file mode 100644 index 0000000000..acb21e3f03 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-google-description.rst @@ -0,0 +1,10 @@ +To log in with a Google authentication code, pass a Google authentication code to +:flutter-sdk:`Credentials.googleAuthCode() `. +Then pass the credential to ``app.logIn``. + +.. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.google-auth-code-credentials.dart + :language: dart + +To log in with a Google ID token, pass a Google ID token to +:flutter-sdk:`Credentials.googleIdToken() `. +Then pass the credential to ``app.logIn``. diff --git a/source/includes/api-details/dart/users/authenticate-log-in-user-description.rst b/source/includes/api-details/dart/users/authenticate-log-in-user-description.rst new file mode 100644 index 0000000000..59f3f8eb17 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-log-in-user-description.rst @@ -0,0 +1,21 @@ +To authenticate and log users in to your :flutter-sdk:`App +`, first instantiate a +:flutter-sdk:`Credentials ` +object containing the credentials associated with the authentication provider. +Then, pass it to :flutter-sdk:`App.logIn() `. + +Each authentication provider corresponds to a :flutter-sdk:`Credentials +constructor ` used to instantiate ``Credentials`` +objects for that authentication provider. + +If successful, ``App.logIn()`` returns a :flutter-sdk:`User +` object. In the event of a failure, ``App.logIn()`` +throws an exception of type :flutter-sdk:`AppException +`. + +.. tip:: + + You can get the authentication provider type used to log in a user + through the :flutter-sdk:`UserIdentity.provider + ` property. If the user is currently logged + out, the most recent provider used to log in the user is returned. diff --git a/source/includes/api-details/dart/users/authenticate-log-user-out-description.rst b/source/includes/api-details/dart/users/authenticate-log-user-out-description.rst new file mode 100644 index 0000000000..da8b852d54 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-log-user-out-description.rst @@ -0,0 +1,2 @@ +You can log out any user, regardless of the authentication provider used +to log in, using :flutter-sdk:`User.logOut() `. diff --git a/source/includes/api-details/dart/users/authenticate-observe-authentication-changes-no-api.rst b/source/includes/api-details/dart/users/authenticate-observe-authentication-changes-no-api.rst new file mode 100644 index 0000000000..b685357360 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-observe-authentication-changes-no-api.rst @@ -0,0 +1,5 @@ +Dart does not provide a dedicated API to observe authentication changes. However, +you can check the user's :flutter-sdk:`state +`, whose value is an enum of type +:flutter-sdk:`UserState `. This can give you information +about whether the user is logged in, logged out, or removed from the device. diff --git a/source/includes/api-details/dart/users/authenticate-register-create-new-user-account-description.rst b/source/includes/api-details/dart/users/authenticate-register-create-new-user-account-description.rst new file mode 100644 index 0000000000..f467da98d5 --- /dev/null +++ b/source/includes/api-details/dart/users/authenticate-register-create-new-user-account-description.rst @@ -0,0 +1,8 @@ +When a user registers or successfully authenticates to your App, Atlas App +Services automatically creates a :flutter-sdk:`User +` object, which contains a unique +identifier and provider-specific :ref:`user metadata `. +You can optionally configure :ref:`custom user data ` +if your app needs to store additional user data. To learn more about the +user object that App Services provides, refer to :ref:`` in the +App Services documentation. diff --git a/source/includes/api-details/dart/users/manage-user-tokens-get-user-access-token-description.rst b/source/includes/api-details/dart/users/manage-user-tokens-get-user-access-token-description.rst new file mode 100644 index 0000000000..8a364e4237 --- /dev/null +++ b/source/includes/api-details/dart/users/manage-user-tokens-get-user-access-token-description.rst @@ -0,0 +1,2 @@ +You can get the access token with the :flutter-sdk:`User.accessToken +` property. diff --git a/source/includes/api-details/dart/users/manage-user-tokens-manually-refresh-access-token-description.rst b/source/includes/api-details/dart/users/manage-user-tokens-manually-refresh-access-token-description.rst new file mode 100644 index 0000000000..a458c7cbdf --- /dev/null +++ b/source/includes/api-details/dart/users/manage-user-tokens-manually-refresh-access-token-description.rst @@ -0,0 +1,9 @@ +Refresh an access token with :flutter-sdk:`User.refreshCustomData() `. + +.. literalinclude:: /examples/generated/flutter/access_token_test.snippet.refresh-access-token.dart + :language: dart + +You can also periodically refresh the access token +with `Timer.periodic() `__ +from the ``dart:async`` library. Wrap the call to ``User.refreshCustomData()`` +with the timer's callback function. diff --git a/source/includes/api-details/java/users/authenticate-anonymous-description.rst b/source/includes/api-details/java/users/authenticate-anonymous-description.rst new file mode 100644 index 0000000000..deb27db55f --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-anonymous-description.rst @@ -0,0 +1,4 @@ +To log in with anonymous +authentication, create an anonymous credential by calling +``Credentials.anonymous()`` and then pass the generated credential to +``app.login()`` or ``app.loginAsync()``. diff --git a/source/includes/api-details/java/users/authenticate-api-key-description.rst b/source/includes/api-details/java/users/authenticate-api-key-description.rst new file mode 100644 index 0000000000..613aefa51f --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-api-key-description.rst @@ -0,0 +1,4 @@ +To log in with API Key authentication, create an +API Key credential by calling ``Credentials.apiKey()`` +with an API Key. Then pass the generated credential +to ``app.login()`` or ``app.loginAsync()``. diff --git a/source/includes/api-details/java/users/authenticate-apple-description.rst b/source/includes/api-details/java/users/authenticate-apple-description.rst new file mode 100644 index 0000000000..240ed28e8b --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-apple-description.rst @@ -0,0 +1,4 @@ +To log in with Sign-in with Apple authentication, create a +Sign-in with Apple credential by calling ``Credentials.apple()`` +with the token provided by Apple. Then pass the generated credential +to ``app.login()`` or ``app.loginAsync()``. diff --git a/source/includes/api-details/java/users/authenticate-custom-function-description.rst b/source/includes/api-details/java/users/authenticate-custom-function-description.rst new file mode 100644 index 0000000000..dfcf011980 --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-custom-function-description.rst @@ -0,0 +1,23 @@ +To log in with custom function authentication, create a credential by calling +``Credentials.customFunction()``. The :java-sdk:`customFunction() +` method expects a +Document that contains the properties and values used by the Atlas auth function. +For example, suppose the backend function expects the input parameter to include +a field named ``username``, like this: + +.. code-block:: js + :copyable: false + + exports = async function(loginPayload) { + const { username } = loginPayload; + ... + } + +The document you pass to ``Credentials.customFunction()`` might look like this: + +.. code-block:: java + :copyable: false + + Document("username", "bob") + +You then pass the generated credential to ``app.login()`` or ``app.loginAsync()``. diff --git a/source/includes/api-details/java/users/authenticate-custom-jwt-description.rst b/source/includes/api-details/java/users/authenticate-custom-jwt-description.rst new file mode 100644 index 0000000000..053a56dcfb --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-custom-jwt-description.rst @@ -0,0 +1,4 @@ +To log in with custom JWT authentication, create a +custom JWT credential by calling ``Credentials.jwt()`` +with your custom JWT. Then pass the generated credential +to ``app.login()`` or ``app.loginAsync()``. diff --git a/source/includes/api-details/java/users/authenticate-email-password-description.rst b/source/includes/api-details/java/users/authenticate-email-password-description.rst new file mode 100644 index 0000000000..2a0c21ee62 --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-email-password-description.rst @@ -0,0 +1,4 @@ +To log in with email/password authentication, create an +email/password credential by calling ``Credentials.emailPassword()`` +with the user's email and password. Then pass the generated credential +to ``app.login()`` or ``app.loginAsync()``. diff --git a/source/includes/api-details/java/users/authenticate-facebook-description.rst b/source/includes/api-details/java/users/authenticate-facebook-description.rst new file mode 100644 index 0000000000..d4a7230f31 --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-facebook-description.rst @@ -0,0 +1,7 @@ +Follow the official :facebook:`Facebook Login for Android Quickstart +` to set up the authentication flow for your +application. In the login completion handler, get the logged in user's access +token from the Facebook :facebook:`LoginResult +`. Use the access token to +create a Facebook credential for Atlas Device SDK, and then log the user into +your app. diff --git a/source/includes/api-details/java/users/authenticate-google-description.rst b/source/includes/api-details/java/users/authenticate-google-description.rst new file mode 100644 index 0000000000..8ca3233184 --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-google-description.rst @@ -0,0 +1,72 @@ +Use Google's official :google:`Sign-In for Android ` to authenticate Google +users in your Android application: + +.. note:: Code Example Below + + For an implementation of these instructions, check out the code block + below. + +1. Add the Google Sign-In for Android dependency to the ``dependencies`` + block of your application level ``build.gradle``: + + .. code-block:: groovy + :copyable: false + + com.google.android.gms:play-services-auth:19.2.0 + +#. Create a :google:`GoogleSignInOptions + ` + with the following builder options: + + - :google:`default sign in + ` + - an :google:`ID token request + ` + -- pass your OAuth 2.0 client ID as the ``serverClientId``. + +#. Use the ``GoogleSignInOptions`` to create a ``GoogleSignInClient`` + with :google:`GoogleSignIn.getClient() + ` + +#. Use the ``GoogleSignInClient`` to create an ``Intent`` capable of + triggering Google Sign-In. + +#. Use :android:`registerForActivityResult() + ` + to configure a callback. Your callback should use :google:`GoogleSignIn.getSignedInAccountFromIntent() + ` + to access the result of Google Sign-In: a ``Task``. + +#. Use the :android:`launch() + ` + method of the :android:`ActivityResultLauncher + ` + returned in the previous step to start Google Sign-In. Pass the + ``launch()`` method your Google Sign-In ``Intent``. + +#. Use ``isSuccessful()`` to handle Google Sign-In errors. + +#. Access the result of the task (a :google:`GoogleSignInAccount + `) + with ``getResult()``. + +#. Access the ID token for the ``GoogleSignInAccount`` with ``getIdToken()``. + +#. Create a Realm ``Credentials`` object with :java-sdk:`Credentials.google() + `. + Pass the ID token as the first parameter, and :java-sdk:`GoogleAuthType.ID_TOKEN + ` as the second parameter. + +#. Use the :java-sdk:`app.loginAsync() + ` + or :java-sdk:`app.login() ` + methods to authenticate with the Atlas App Services backend using the token. + +.. seealso:: + + To learn more about Google Sign-In for Android, check out the + official :google:`Google Sign-In for Android Integration Guide + `. + +The following code implements this flow, starting with a method call to +``loginWithGoogle()``: diff --git a/source/includes/api-details/java/users/authenticate-log-in-user-description.rst b/source/includes/api-details/java/users/authenticate-log-in-user-description.rst new file mode 100644 index 0000000000..0f3d086715 --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-log-in-user-description.rst @@ -0,0 +1,36 @@ +To authenticate and log users in to your :java-sdk:`App +`, first instantiate a +:java-sdk:`Credentials ` object containing +the credentials associated with the authentication provider. +Then, pass it to :java-sdk:`App.login() +` or +:java-sdk:`App.loginAsync() `. + +While the ``app.login()`` method blocks +code execution in the calling thread until the supplied credentials have +either succeeded or failed to authenticate a user, the +``app.loginAsync()`` method allows execution to continue, handling +success or failure with a callback function that is guaranteed to +execute on the same thread that called ``app.loginAsync()``. + +Each authentication provider corresponds to a :java-sdk:`static helper method +` used to instantiate ``Credentials`` +objects for that authentication provider. + +If successful, ``App.login()`` returns a :java-sdk:`User ` +object. In the event of a failure, ``App.login()`` throws an +exception of type :java-sdk:`AppException `. + +Pass a callback to the ``App.loginAsync()`` method to handle success or +failure. This callback accepts a single parameter of type +``App.Result``. The ``isSuccess()`` method of the ``App.Result`` object +passed to the callback returns a boolean that indicates whether the +operation succeeded. In the event of a failure, you can view the +error that caused the failure using the ``getError()`` method. + +.. tip:: + + You can get the authentication provider type used to log in a user + through the :java-sdk:`UserIdentity.getProvider() + ` method. If the user is currently + logged out, the most recent provider used to log in the user is returned. diff --git a/source/includes/api-details/java/users/authenticate-log-user-out-description.rst b/source/includes/api-details/java/users/authenticate-log-user-out-description.rst new file mode 100644 index 0000000000..3de604767f --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-log-user-out-description.rst @@ -0,0 +1,3 @@ +You can log out any user, regardless of the authentication provider used +to log in, using the ``user.logOut()`` or ``user.logOutAsync()`` +methods. diff --git a/source/includes/api-details/java/users/authenticate-register-create-new-user-account-description.rst b/source/includes/api-details/java/users/authenticate-register-create-new-user-account-description.rst new file mode 100644 index 0000000000..bfb428b7f4 --- /dev/null +++ b/source/includes/api-details/java/users/authenticate-register-create-new-user-account-description.rst @@ -0,0 +1,8 @@ +When a user registers or successfully authenticates to your App, Atlas App +Services automatically creates a :java-sdk:`User +` object, which contains a unique +identifier and provider-specific :ref:`user metadata `. +You can optionally configure :ref:`custom user data ` +if your app needs to store additional user data. To learn more about the +user object that App Services provides, refer to :ref:`` in the +App Services documentation. diff --git a/source/includes/api-details/javascript/users/authenticate-anonymous-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-anonymous-js-ts-description.rst new file mode 100644 index 0000000000..f77e18f9a5 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-anonymous-js-ts-description.rst @@ -0,0 +1 @@ +To log in, create an anonymous credential and pass it to ``App.logIn()``: diff --git a/source/includes/api-details/javascript/users/authenticate-api-key-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-api-key-js-ts-description.rst new file mode 100644 index 0000000000..33393a54a8 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-api-key-js-ts-description.rst @@ -0,0 +1,2 @@ +To log in with an API key, create an API Key credential with a server or user +API key and pass it to ``App.logIn()``: diff --git a/source/includes/api-details/javascript/users/authenticate-apple-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-apple-js-ts-description.rst new file mode 100644 index 0000000000..67ba80b901 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-apple-js-ts-description.rst @@ -0,0 +1,5 @@ +You can use the :apple:`official Sign in with Apple JS SDK +` to handle the user +authentication and redirect flow from a client application. Once authenticated, +the Apple JS SDK returns an ID token that you can send to your app and +use to finish logging the user in to your app. diff --git a/source/includes/api-details/javascript/users/authenticate-custom-function-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-custom-function-js-ts-description.rst new file mode 100644 index 0000000000..c22f0c1e8d --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-custom-function-js-ts-description.rst @@ -0,0 +1,2 @@ +To log in with the custom function provider, create a Custom Function credential +with a payload object and pass it to ``App.logIn()``: diff --git a/source/includes/api-details/javascript/users/authenticate-custom-jwt-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-custom-jwt-js-ts-description.rst new file mode 100644 index 0000000000..f8f71ea0d2 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-custom-jwt-js-ts-description.rst @@ -0,0 +1,2 @@ +To log in, create a Custom JWT credential with a JWT from the external system +and pass it to ``App.logIn()``: diff --git a/source/includes/api-details/javascript/users/authenticate-email-password-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-email-password-js-ts-description.rst new file mode 100644 index 0000000000..1ca3418102 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-email-password-js-ts-description.rst @@ -0,0 +1,2 @@ +To log in, create an email/password credential with the user's email address and +password and pass it to ``App.logIn()``: diff --git a/source/includes/api-details/javascript/users/authenticate-facebook-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-facebook-js-ts-description.rst new file mode 100644 index 0000000000..25ed810bd8 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-facebook-js-ts-description.rst @@ -0,0 +1,4 @@ +You can use the :facebook:`official Facebook SDK ` +to handle the user authentication and redirect flow from a client application. +Once authenticated, the Facebook SDK returns an access token that you can send +to your app and use to finish logging the user in to your app. diff --git a/source/includes/api-details/javascript/users/authenticate-google-description.rst b/source/includes/api-details/javascript/users/authenticate-google-description.rst new file mode 100644 index 0000000000..1d34349de6 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-google-description.rst @@ -0,0 +1,42 @@ +.. _example-auth-google-node-server: + +.. example:: Authenticate with Google on a Node.js Server + + Refer to `the code for an example Node.js server `_ + that implements Sign in With Google. + All of the Google OAuth 2.0 implementation is in the ``server.js`` file. + + The example uses `Express `_ for routing and the + Google Auth Library for Node.js. + + You might want to authenticate with Google on a Node.js server + to perform server-side operations on behalf of a user, like call an + Atlas Function with a user's credentials. + +Use the official `Google Auth Library for Node.js `_ +to handle the user authentication and redirect flow from a Node.js client application: + +#. Install the Realm and Google APIs npm packages. + + .. code-block:: + + npm install realm googleapis + +#. Import the packages into your project. + + .. literalinclude:: /examples/generated/node/server.snippet.import-npm-packages.js + :language: javascript + +#. Create configuration for Google OAuth 2.0 client and the SDK. + + .. literalinclude:: /examples/generated/node/server.snippet.google-oauth-realm-config.js + :language: javascript + +#. Generate an OAuth login link, and pass it to the application client. + + .. literalinclude:: /examples/generated/node/server.snippet.generate-log-in.js + :language: javascript + +#. Process the request from the the Google authentication server, which includes + an access code in the query string using the Google OAuth 2.0 client's ``getToken()`` + method. In the callback function, sign in to your App using the ``id_token``. diff --git a/source/includes/api-details/javascript/users/authenticate-log-in-user-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-log-in-user-js-ts-description.rst new file mode 100644 index 0000000000..f4b0ecbf1d --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-log-in-user-js-ts-description.rst @@ -0,0 +1,21 @@ +To authenticate and log users in to your :js-sdk:`App +`, first instantiate a +:js-sdk:`Credentials ` object containing the +credentials associated with the authentication provider. +Then, pass it to :js-sdk:`App.logIn() `. + +Each authentication provider corresponds to a :js-sdk:`Credentials +method ` used to instantiate ``Credentials`` +objects for that authentication provider. + +If successful, ``App.logIn()`` returns a :js-sdk:`User +` object. In the event of a failure, ``App.logIn()`` +throws an exception. + +.. tip:: + + You can get the authentication provider type used to log in a user + through the :js-sdk:`UserIdentity.providerType + `. If the user is + currently logged out, the most recent provider used to log in the user is + returned. diff --git a/source/includes/api-details/javascript/users/authenticate-log-user-out-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-log-user-out-js-ts-description.rst new file mode 100644 index 0000000000..a417e04f50 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-log-user-out-js-ts-description.rst @@ -0,0 +1 @@ +To log any user out, call the ``User.logOut()`` on their user instance. diff --git a/source/includes/api-details/javascript/users/authenticate-register-create-new-user-account-js-ts-description.rst b/source/includes/api-details/javascript/users/authenticate-register-create-new-user-account-js-ts-description.rst new file mode 100644 index 0000000000..7704e4c074 --- /dev/null +++ b/source/includes/api-details/javascript/users/authenticate-register-create-new-user-account-js-ts-description.rst @@ -0,0 +1,8 @@ +When a user registers or successfully authenticates to your App, Atlas App +Services automatically creates a :js-sdk:`User +` object, which contains a unique +identifier and provider-specific :ref:`user metadata `. +You can optionally configure :ref:`custom user data ` +if your app needs to store additional user data. To learn more about the +user object that App Services provides, refer to :ref:`` in the +App Services documentation. diff --git a/source/includes/api-details/kotlin/users/authenticate-anonymous-description.rst b/source/includes/api-details/kotlin/users/authenticate-anonymous-description.rst new file mode 100644 index 0000000000..98ef7b054b --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-anonymous-description.rst @@ -0,0 +1,14 @@ +To log in with anonymous authentication, create an anonymous credential +by calling :kotlin-sync-sdk:`Credentials.anonymous() +`, +and then pass the generated credential to +:kotlin-sync-sdk:`app.login() +`: + +.. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.anonymous-authentication.kt + :language: kotlin + +By default, the Kotlin SDK reuses the same anonymous user +if that user has not logged out. If you want to create more than +one anonymous user, set ``reuseExisting = false`` when logging in +with additional anonymous credentials: diff --git a/source/includes/api-details/kotlin/users/authenticate-api-key-description.rst b/source/includes/api-details/kotlin/users/authenticate-api-key-description.rst new file mode 100644 index 0000000000..471fcb4880 --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-api-key-description.rst @@ -0,0 +1,6 @@ +To log in with API key authentication, create an API Key credential +by calling :kotlin-sync-sdk:`Credentials.apiKey() +` +with the user's API key, and then passing the +generated credential to :kotlin-sync-sdk:`app.login() +`: diff --git a/source/includes/api-details/kotlin/users/authenticate-apple-description.rst b/source/includes/api-details/kotlin/users/authenticate-apple-description.rst new file mode 100644 index 0000000000..a74ebc8f19 --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-apple-description.rst @@ -0,0 +1,11 @@ +To log in with Apple authentication, create an +Apple credential by calling :kotlin-sync-sdk:`Credentials.apple() +` +with the user's token, and then pass the generated credential +to :kotlin-sync-sdk:`app.login() +`: + +Kotlin Multiplatform (KMP) supports many environments, but this example shows +sign-in on the Android platform. For information about signing in with Apple +on Apple platforms, switch the language selector on this page to +:guilabel:`Swift`. diff --git a/source/includes/api-details/kotlin/users/authenticate-custom-function-description.rst b/source/includes/api-details/kotlin/users/authenticate-custom-function-description.rst new file mode 100644 index 0000000000..306de035d3 --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-custom-function-description.rst @@ -0,0 +1,11 @@ +To log in with Custom Function authentication, pass your custom arguments +as a payload to :kotlin-sync-sdk:`Credentials.customFunction() +`, +and then pass the generated credential to :kotlin-sync-sdk:`app.login() +`. + +.. versionadded:: 1.9.0 + +You can serialize data for a Custom Function credential using an +EJSON encoder. For more information, including examples, refer to +:ref:`sdks-serialization`. diff --git a/source/includes/api-details/kotlin/users/authenticate-custom-jwt-description.rst b/source/includes/api-details/kotlin/users/authenticate-custom-jwt-description.rst new file mode 100644 index 0000000000..85fe790cd7 --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-custom-jwt-description.rst @@ -0,0 +1,6 @@ +To log in with JWT authentication, create a +JWT credential by calling :kotlin-sync-sdk:`Credentials.jwt() +` +with the user's JWT, and then pass the generated credential +to :kotlin-sync-sdk:`app.login() +`: diff --git a/source/includes/api-details/kotlin/users/authenticate-email-password-description.rst b/source/includes/api-details/kotlin/users/authenticate-email-password-description.rst new file mode 100644 index 0000000000..f4e321408a --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-email-password-description.rst @@ -0,0 +1,6 @@ +To log in with email/password authentication, create an +email/password credential by calling :kotlin-sync-sdk:`Credentials.emailPassword() +` +with the user's registered email and password, and then pass the +generated credential to :kotlin-sync-sdk:`app.login() +`: diff --git a/source/includes/api-details/kotlin/users/authenticate-facebook-description.rst b/source/includes/api-details/kotlin/users/authenticate-facebook-description.rst new file mode 100644 index 0000000000..e00156c9c3 --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-facebook-description.rst @@ -0,0 +1,21 @@ +Before you can authenticate users with Facebook, you must set up +the authentication flow for your application by following the +official :facebook:`Facebook Login for Android Quickstart +`. + +In the login completion handler, get the logged in user's access +token from the Facebook +:facebook:`LoginResult `. +Use the access token to create a Facebook credential by calling +:kotlin-sync-sdk:`Credentials.facebook() +` +with the user's access token, and then pass the generated credential +to :kotlin-sync-sdk:`app.login() +`. + +.. include:: /includes/note-facebook-profile-picture-url.rst + +Kotlin Multiplatform (KMP) supports many environments, but this example shows +sign-in on the Android platform. For information about signing into a Facebook +account on Apple platforms, switch the language selector on this page to +:guilabel:`Swift`. diff --git a/source/includes/api-details/kotlin/users/authenticate-get-current-user-description.rst b/source/includes/api-details/kotlin/users/authenticate-get-current-user-description.rst new file mode 100644 index 0000000000..ed4c543af7 --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-get-current-user-description.rst @@ -0,0 +1,2 @@ +To retrieve the currently logged-in user with the :kotlin-sync-sdk:`App.currentUser +` property: diff --git a/source/includes/api-details/kotlin/users/authenticate-google-description.rst b/source/includes/api-details/kotlin/users/authenticate-google-description.rst new file mode 100644 index 0000000000..9569cb959e --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-google-description.rst @@ -0,0 +1,15 @@ +Use Google's official :google:`Sign-In for Android ` +to authenticate Google users in your Android application. The following +code implements this flow, starting with a method call to +``loginWithGoogle()``. + +.. tip:: + + To learn more about Google Sign-In for Android, check out the + official :google:`Google Sign-In for Android Integration Guide + `. + +Kotlin Multiplatform (KMP) supports many environments, but this example shows +sign-in on the Android platform. For information about signing into a Google +account on Apple platforms, switch the language selector on this page to +:guilabel:`Swift`. diff --git a/source/includes/api-details/kotlin/users/authenticate-log-in-user-description.rst b/source/includes/api-details/kotlin/users/authenticate-log-in-user-description.rst new file mode 100644 index 0000000000..07d002302f --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-log-in-user-description.rst @@ -0,0 +1,38 @@ +To authenticate and log users in to your :kotlin-sync-sdk:`App +`, first instantiate a +:kotlin-sync-sdk:`Credentials ` +object containing the credentials associated with the authentication provider. +Then, pass it to :kotlin-sync-sdk:`app.login() +`. + +Each authentication provider corresponds to a :kotlin-sync-sdk:`static helper method +` +used to instantiate ``Credentials`` objects for that authentication provider. + +If successful, ``app.login()`` returns a :kotlin-sync-sdk:`User +` object. In the event of a failure, +``app.login()`` throws one of three exception types, depending on the error: + +- :kotlin-sync-sdk:`AuthException + `: the + top-level or "catch-all" for problems related to user account actions. Prefer + catching sub-types for granular error handling. +- :kotlin-sync-sdk:`InvalidCredentialsException + `: + the provided credentials were not correct. Only email/password, API Key, + and JWT providers can throw this exception. Other providers throw + ``AuthException``. +- :kotlin-sync-sdk:`ServiceException + `: the + top-level or "catch-all" for problems related to HTTP requests made to + App Services. This covers HTTP transport problems, problems passing JSON, or + the server considering the request invalid. Prefer catching sub-types for + more granular error handling. + +.. tip:: + + You can get the authentication provider type used to log in a user + through the :kotlin-sync-sdk:`UserIdentity.provider + ` property. If the + user is currently logged out, the most recent provider used to log in the + user is returned. diff --git a/source/includes/api-details/kotlin/users/authenticate-log-user-out-description.rst b/source/includes/api-details/kotlin/users/authenticate-log-user-out-description.rst new file mode 100644 index 0000000000..d4188cbc7a --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-log-user-out-description.rst @@ -0,0 +1,3 @@ +You can log out any user, regardless of the authentication provider used +to log in, using :kotlin-sync-sdk:`user.logOut() +`: diff --git a/source/includes/api-details/kotlin/users/authenticate-observe-authentication-changes-description.rst b/source/includes/api-details/kotlin/users/authenticate-observe-authentication-changes-description.rst new file mode 100644 index 0000000000..4fdfb03474 --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-observe-authentication-changes-description.rst @@ -0,0 +1,15 @@ +.. versionadded:: 10.8.0 + +You can observe a flow of authentication change events by calling +:kotlin-sync-sdk:`App.authenticationChangeAsFlow() +`. +This flow emits :kotlin-sync-sdk:`AuthenticationChange +` +events of three possible states, represented as subclasses: + +- ``LoggedIn``: A user logs into the app. +- ``LoggedOut``: A a user logs out of the app. +- ``Removed``: A user is removed from the app, which also logs them out. + +These events contain a ``user`` property that provides a reference to the +``User`` object that has logged in, logged out, or been removed. diff --git a/source/includes/api-details/kotlin/users/authenticate-register-create-new-user-account-description.rst b/source/includes/api-details/kotlin/users/authenticate-register-create-new-user-account-description.rst new file mode 100644 index 0000000000..dd69ceee00 --- /dev/null +++ b/source/includes/api-details/kotlin/users/authenticate-register-create-new-user-account-description.rst @@ -0,0 +1,8 @@ +When a user registers or successfully authenticates to your App, Atlas App +Services automatically creates a :kotlin-sync-sdk:`User +` object, which contains a unique +identifier and provider-specific :ref:`user metadata `. +You can optionally configure :ref:`custom user data ` +if your app needs to store additional user data. To learn more about the +user object that App Services provides, refer to :ref:`` in the +App Services documentation. diff --git a/source/includes/api-details/kotlin/users/manage-user-tokens-get-user-access-token-description.rst b/source/includes/api-details/kotlin/users/manage-user-tokens-get-user-access-token-description.rst new file mode 100644 index 0000000000..7edaa8b3ac --- /dev/null +++ b/source/includes/api-details/kotlin/users/manage-user-tokens-get-user-access-token-description.rst @@ -0,0 +1,3 @@ +You can get the current access token for a logged-in user with the +:kotlin-sync-sdk:`user.accessToken ` +property: diff --git a/source/includes/api-details/kotlin/users/manage-user-tokens-manually-refresh-access-token-description.rst b/source/includes/api-details/kotlin/users/manage-user-tokens-manually-refresh-access-token-description.rst new file mode 100644 index 0000000000..e14533c89a --- /dev/null +++ b/source/includes/api-details/kotlin/users/manage-user-tokens-manually-refresh-access-token-description.rst @@ -0,0 +1,3 @@ +You can get the current refresh token for a logged-in user with the +:kotlin-sync-sdk:`user.refreshToken ` +property, which you can use to request a new access token: diff --git a/source/includes/api-details/swift/users/authenticate-facebook-description.rst b/source/includes/api-details/swift/users/authenticate-facebook-description.rst new file mode 100644 index 0000000000..80b3da2463 --- /dev/null +++ b/source/includes/api-details/swift/users/authenticate-facebook-description.rst @@ -0,0 +1,6 @@ +Follow the official :facebook:`Facebook Login for iOS Quickstart +` to set up the authentication +flow for your application. In the login completion handler, create an +App Services Facebook credential with the logged in user's +:facebook:`access token string ` and +log the user into your App Services app. diff --git a/source/includes/api-details/swift/users/authenticate-google-description.rst b/source/includes/api-details/swift/users/authenticate-google-description.rst new file mode 100644 index 0000000000..76e4fd59ba --- /dev/null +++ b/source/includes/api-details/swift/users/authenticate-google-description.rst @@ -0,0 +1,17 @@ +Follow the official :google:`Google Sign-In for iOS Integration Guide +` to set up the authentication flow for +your application. In the sign-in completion handler, create an App Services +Google credential and log the user into your App Services app. + +The value that you pass to the credential depends on whether or not you have +:ref:`enabled OpenID Connect ` for the provider: + +- If OpenID Connect is enabled, pass the ``id_token`` + :google:`included in the Google OAuth response + ` to :swift-sdk:`Credentials.googleId(token:) + `. + +- If OpenID Connect is not enabled, pass the user's :google:`server auth code + ` to + :swift-sdk:`Credentials.google(serverAuthCode:) + `. diff --git a/source/includes/api-details/swift/users/authenticate-log-in-user-async-description.rst b/source/includes/api-details/swift/users/authenticate-log-in-user-async-description.rst new file mode 100644 index 0000000000..61368a30a8 --- /dev/null +++ b/source/includes/api-details/swift/users/authenticate-log-in-user-async-description.rst @@ -0,0 +1,9 @@ +.. versionadded:: 10.15.0 + +The async/await version of the :swift-sdk:`App.login ` +method asynchronously returns a User or Error. + +.. literalinclude:: /examples/generated/code/start/Authenticate.snippet.async-await.swift + :language: swift + +.. include:: /includes/swift-async-await-support.rst diff --git a/source/includes/api-details/swift/users/authenticate-log-in-user-description.rst b/source/includes/api-details/swift/users/authenticate-log-in-user-description.rst new file mode 100644 index 0000000000..e636a255b3 --- /dev/null +++ b/source/includes/api-details/swift/users/authenticate-log-in-user-description.rst @@ -0,0 +1,15 @@ +To authenticate and log users in to your :swift-sdk:`App +`, first instantiate a +:swift-sdk:`Credentials ` +object containing the credentials associated with the authentication provider. +Then, pass it to :flutter-sdk:`App.logIn() `. + +Each authentication provider corresponds to a :swift-sdk:`Credentials helper +method ` used to instantiate ``Credentials`` +objects for that authentication provider. + +If successful, ``App.login()`` returns a :swift-sdk:`User +` object. In the event of a failure, ``App.login()`` +throws an exception of type :swift-sdk:`AppError +`, which is a type alias for the +underlying :objc-sdk:`RLMAppError `. diff --git a/source/includes/api-details/swift/users/authenticate-register-create-new-user-account-description.rst b/source/includes/api-details/swift/users/authenticate-register-create-new-user-account-description.rst new file mode 100644 index 0000000000..d73afec133 --- /dev/null +++ b/source/includes/api-details/swift/users/authenticate-register-create-new-user-account-description.rst @@ -0,0 +1,8 @@ +When a user registers or successfully authenticates to your App, Atlas App +Services automatically creates a :swift-sdk:`User +` object, which contains a unique +identifier and provider-specific :ref:`user metadata `. +You can optionally configure :ref:`custom user data ` +if your app needs to store additional user data. To learn more about the +user object that App Services provides, refer to :ref:`` in the +App Services documentation. diff --git a/source/includes/api-details/swift/users/manage-user-tokens-get-user-access-token-description.rst b/source/includes/api-details/swift/users/manage-user-tokens-get-user-access-token-description.rst new file mode 100644 index 0000000000..72148976c7 --- /dev/null +++ b/source/includes/api-details/swift/users/manage-user-tokens-get-user-access-token-description.rst @@ -0,0 +1,5 @@ +You can call :swift-sdk:`.refreshCustomData() +` +on a logged-in user to refresh the user's auth session. Then, return the +``.accessToken`` as a string you can use in your code. You might use a +function similar to this to fetch an access token: diff --git a/source/includes/api-details/swift/users/manage-user-tokens-manually-refresh-access-token-description.rst b/source/includes/api-details/swift/users/manage-user-tokens-manually-refresh-access-token-description.rst new file mode 100644 index 0000000000..72148976c7 --- /dev/null +++ b/source/includes/api-details/swift/users/manage-user-tokens-manually-refresh-access-token-description.rst @@ -0,0 +1,5 @@ +You can call :swift-sdk:`.refreshCustomData() +` +on a logged-in user to refresh the user's auth session. Then, return the +``.accessToken`` as a string you can use in your code. You might use a +function similar to this to fetch an access token: diff --git a/source/includes/api-details/typescript/users/authenticate-google-missing-example.rst b/source/includes/api-details/typescript/users/authenticate-google-missing-example.rst new file mode 100644 index 0000000000..015d588e2a --- /dev/null +++ b/source/includes/api-details/typescript/users/authenticate-google-missing-example.rst @@ -0,0 +1,5 @@ +The documentation does not contain a TypeScript example for authentication +with Google. + +Instead, refer to the JavaScript example. Select :guilabel:`JavaScript` from +the programming language selector on this page to see the JavaScript example. diff --git a/source/includes/authorization-appleidcredential-string.rst b/source/includes/authorization-appleidcredential-string.rst deleted file mode 100644 index 7931623208..0000000000 --- a/source/includes/authorization-appleidcredential-string.rst +++ /dev/null @@ -1,5 +0,0 @@ -.. tip:: - - If you get a ``Login failed`` error saying that the ``token contains - an invalid number of segments``, verify that you're passing a UTF-8-encoded - string version of the JWT. \ No newline at end of file diff --git a/source/includes/log-out-queries-in-progress.rst b/source/includes/log-out-queries-in-progress.rst index 0f0448f0ab..8188aeee72 100644 --- a/source/includes/log-out-queries-in-progress.rst +++ b/source/includes/log-out-queries-in-progress.rst @@ -1,7 +1,7 @@ .. warning:: When a user logs out, you can no longer read or write data in any - synced realms that the user opened. As a result, any operation + synced databases that the user opened. As a result, any operation that has not yet completed before the initiating user logs out cannot complete successfully and will likely result in an error. Any data in a write operation that fails in this way will be lost. diff --git a/source/includes/note-enable-facebook-auth.rst b/source/includes/note-enable-facebook-auth.rst deleted file mode 100644 index 2f9e0c3bdf..0000000000 --- a/source/includes/note-enable-facebook-auth.rst +++ /dev/null @@ -1,5 +0,0 @@ -.. important:: Enable the Facebook Auth Provider - - To log a user in with their existing Facebook account, you must configure and - enable the :ref:`Facebook authentication provider ` - for your application. diff --git a/source/includes/offline-login.rst b/source/includes/offline-login.rst deleted file mode 100644 index 5f640a0644..0000000000 --- a/source/includes/offline-login.rst +++ /dev/null @@ -1,10 +0,0 @@ -When your Realm application authenticates a user, it caches the user's -credentials. You can check for existing user credentials to bypass the -login flow and access the cached user. Use this to open a realm offline. - -.. note:: Initial login requires a network connection - - When a user signs up for your app, or logs in for the first time with an - existing account on a client, the client must have a network connection. - Checking for cached user credentials lets you open a realm offline, but - only if the user has previously logged in while online. \ No newline at end of file diff --git a/source/includes/refresh-token-expiry.rst b/source/includes/refresh-token-expiry.rst index 73b7174724..3a72d1d882 100644 --- a/source/includes/refresh-token-expiry.rst +++ b/source/includes/refresh-token-expiry.rst @@ -2,11 +2,10 @@ Refresh tokens expire after a set period of time. When the refresh token expires, the access token can no longer be refreshed and the user must log in again. -If the refresh token expires after the realm is open, the device will not -be able to sync until the user logs in again. -Your sync error handler should implement logic that catches a token expired -error when attempting to sync, then redirect users to a -login flow. +If the refresh token expires after the database is open, the device cannot +sync until the user logs in again. Your sync error handler should implement +logic that catches a token expired error when attempting to sync, then redirect +users to a login flow. For information on configuring refresh token expiration, refer to -:ref:`` in the App Services documentation. +:ref:`refresh-token-expiration` in the App Services documentation. diff --git a/source/includes/sdk-examples/users/authenticate-anonymous.rst b/source/includes/sdk-examples/users/authenticate-anonymous.rst new file mode 100644 index 0000000000..0115bec835 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-anonymous.rst @@ -0,0 +1,59 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.anonymous-login.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_anon.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.multiple-anonymous-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.anonymous.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.anonymous.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.anonymous-login.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.anonymous-authentication-reuse-existing.kt + :language: kotlin + :emphasize-lines: 6-7 + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.anonymous.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.anonymous-login.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-api-key.rst b/source/includes/sdk-examples/users/authenticate-api-key.rst new file mode 100644 index 0000000000..525efb399f --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-api-key.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.api-key.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_API.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.api-key-auth.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.api-key.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.api-key.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.server-api-key-login.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.api-key-authentication.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.api-key.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.server-api-key-login.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-apple.rst b/source/includes/sdk-examples/users/authenticate-apple.rst new file mode 100644 index 0000000000..a91e521e3b --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-apple.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.apple.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_apple.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.apple-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.apple.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.apple.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/web/authentication-log-in-and-out.test.snippet.apple-sdk-oauth.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.apple-authentication.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.apple.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-custom-function.rst b/source/includes/sdk-examples/users/authenticate-custom-function.rst new file mode 100644 index 0000000000..b0322f97f9 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-custom-function.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.custom-function.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_Function.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.custom-function-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.custom-function.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.custom-function.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.custom-function-login.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.custom-function-authentication.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.function.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.custom-function-login.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-custom-jwt.rst b/source/includes/sdk-examples/users/authenticate-custom-jwt.rst new file mode 100644 index 0000000000..e4a58d1409 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-custom-jwt.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.custom-jwt.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_JWT.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.custom-jwt-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.custom-jwt.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.custom-jwt.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.custom-jwt-login.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.jwt-authentication.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.jwt.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.custom-jwt-login.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-email-password.rst b/source/includes/sdk-examples/users/authenticate-email-password.rst new file mode 100644 index 0000000000..139f227d3a --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-email-password.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.log-user-in.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_EP.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.email-password-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.email-password.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.email-password.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.email-password-login.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.email-password-authentication.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.email-password.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.email-password-login.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-facebook.rst b/source/includes/sdk-examples/users/authenticate-facebook.rst new file mode 100644 index 0000000000..0af2ca4f54 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-facebook.rst @@ -0,0 +1,60 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.facebook.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_fb.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.facebook-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.facebook.java + :language: java + :emphasize-lines: 10-17 + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.facebook.kt + :language: kotlin + :emphasize-lines: 10-21 + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/web/authentication-log-in-and-out.test.snippet.facebook-sdk-oauth.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/MainActivity.snippet.facebook-authentication.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.facebook.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-get-current-user.rst b/source/includes/sdk-examples/users/authenticate-get-current-user.rst new file mode 100644 index 0000000000..1bd795f1f0 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-get-current-user.rst @@ -0,0 +1,56 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.get-current-user.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.retrieve-current-user.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.retrieve-current-user.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-google.rst b/source/includes/sdk-examples/users/authenticate-google.rst new file mode 100644 index 0000000000..6fae9b5f49 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-google.rst @@ -0,0 +1,65 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.google-id-token.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_google.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.google-id-token-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthActivity.snippet.google.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthActivity.snippet.google.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/server.snippet.login-with-token.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/MainActivity.snippet.google-authentication.kt + :language: kotlin + + - id: swift + content: | + + **ID Token** + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.google-with-googleId.swift + :language: swift + + **Server Auth Code** + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.google-with-serverAuthCode.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-log-in-offline.rst b/source/includes/sdk-examples/users/authenticate-log-in-offline.rst new file mode 100644 index 0000000000..f920afbc79 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-log-in-offline.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.offline.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.offline.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.open-realm-offline.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.offline-login.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-log-in-user.rst b/source/includes/sdk-examples/users/authenticate-log-in-user.rst new file mode 100644 index 0000000000..d96f3b6f52 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-log-in-user.rst @@ -0,0 +1,56 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.anonymous-login.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_anon.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.multiple-anonymous-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.anonymous.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.anonymous.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.anonymous-login.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.create-new-user.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.anonymous.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.anonymous-login.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-log-user-out.rst b/source/includes/sdk-examples/users/authenticate-log-user-out.rst new file mode 100644 index 0000000000..d6ee1d544d --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-log-user-out.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.log-user-out.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.logout.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.log-out.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.log-out.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.log-out.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.logout-current-user.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.log-out.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.logout.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/authenticate-observe-authentication-changes.rst b/source/includes/sdk-examples/users/authenticate-observe-authentication-changes.rst new file mode 100644 index 0000000000..5b6a8bd6e8 --- /dev/null +++ b/source/includes/sdk-examples/users/authenticate-observe-authentication-changes.rst @@ -0,0 +1,56 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/WorkWithRealm.snippet.observe-auth-change.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.auth-change-listener.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/manage-user-tokens-get-user-access-token.rst b/source/includes/sdk-examples/users/manage-user-tokens-get-user-access-token.rst new file mode 100644 index 0000000000..ec97ba4526 --- /dev/null +++ b/source/includes/sdk-examples/users/manage-user-tokens-get-user-access-token.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.get-user-access-token.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.get_user_token.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/access_token_test.snippet.get-access-token.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.get-valid-access-token.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AuthenticationTest.snippet.get-valid-access-token.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.get-user-access-token.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.access-token-get.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.refresh-user-access-token-function.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.get-user-access-token.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/manage-user-tokens-manually-refresh-access-token.rst b/source/includes/sdk-examples/users/manage-user-tokens-manually-refresh-access-token.rst new file mode 100644 index 0000000000..55d5dd87fe --- /dev/null +++ b/source/includes/sdk-examples/users/manage-user-tokens-manually-refresh-access-token.rst @@ -0,0 +1,56 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/authentication.snippet.get-user-access-token.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/access_token_test.snippet.periodic-refresh-access-token.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.access-token-refresh.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.refresh-user-access-token-function.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/swift-async-await-support.rst b/source/includes/swift-async-await-support.rst index 6151d3a831..a29cb3a5be 100644 --- a/source/includes/swift-async-await-support.rst +++ b/source/includes/swift-async-await-support.rst @@ -1,5 +1,5 @@ -Starting with Realm Swift SDK Versions 10.15.0 and 10.16.0, many of the -Realm APIs support the Swift async/await syntax. Projects must +Starting with Swift SDK Versions 10.15.0 and 10.16.0, many of the +SDK's APIs support the Swift async/await syntax. Projects must meet these requirements: .. list-table:: @@ -19,5 +19,5 @@ meet these requirements: - Swift 5.5 - iOS 15.x -If your app accesses Realm in an ``async/await`` context, mark the code +If your app accesses the SDK in an ``async/await`` context, mark the code with ``@MainActor`` to avoid threading-related crashes. diff --git a/source/sdk/users.txt b/source/sdk/users.txt index c059ed53b7..dba749b85e 100644 --- a/source/sdk/users.txt +++ b/source/sdk/users.txt @@ -15,6 +15,7 @@ Manage Users Create, Delete, & Remove Users Authenticate Users + Manage User Tokens Custom User Data User Metadata Manage Email/Password Users @@ -26,6 +27,7 @@ The following pages contain information about how to create, delete, and manage users in Atlas Device SDK: - :ref:`sdks-create-and-delete-users` +- :ref:`sdks-manage-user-tokens` - :ref:`sdks-authenticate-users` - :ref:`sdks-custom-user-data` - :ref:`sdks-user-metadata` diff --git a/source/sdk/users/authenticate-users.txt b/source/sdk/users/authenticate-users.txt index 43f43425c3..69e9012d16 100644 --- a/source/sdk/users/authenticate-users.txt +++ b/source/sdk/users/authenticate-users.txt @@ -4,25 +4,854 @@ Authenticate Users ================== +.. meta:: + :description: Learn how to use Atlas Device SDK authentication providers in client code, including anonymous auth, custom JWT, Sign-in with Apple, and Google authentication. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for authenticate users content. +.. tabs-selector:: drivers -.. _sdks-offline-login: +After you :ref:`initialize an Atlas app connection `, +you must authenticate a user with an authentication provider. This page +describes how to authenticate App Services App users with Atlas Device SDK. +Refer to :ref:`` in the App Services documentation +for more information. + +Atlas App Services provides the following built-in authentication providers +to log users in and out of a client app: + +- Anonymous users +- Email/password authentication +- API key authentication +- OAuth 2.0 through Facebook, Google, and Apple ID +- Custom JWT +- Custom Function + +Upon successful login, App Services begins a **user session** for the user. +App Services manages sessions with access tokens and refresh tokens. The SDK +automatically supplies the logic to manage tokens and provide them with requests. +For more information on managing user sessions and tokens, refer to +:ref:`sdks-manage-user-tokens`. + +Once you have a logged-in user, you can: + +- :ref:`Open a synced database ` + with the user's configuration object +- :ref:`Call an Atlas Function ` as the logged-in user +- Log the user out (refer to the :ref:`` section) +- :ref:`Remove or delete the user's account ` + +You can also log multiple users in to an app simultaneously on a +single device. Refer to :ref:`sdks-multi-user-applications` for +more information. -Offline Login +Prerequisites ------------- -.. _sdks-refresh-token-expiry: +To authenticate users through Atlas App Services, you must have an +App Services App with one or more authentication providers enabled. + +To set up an App Services App with authentication providers, +complete the following: + +#. :ref:`Connect your app to Atlas App Services ` +#. Enable and configure one or more authentication providers. For more + information, refer to :ref:`authentication-providers` in the App Services + documentation. + +.. tip:: + + You can enable multiple authentication providers. + If a user authenticates using more than one method, + you can :ref:`link the user identities ` + for each method to a single user account. + +.. _sdks-register-new-user: + +Register and Create a New User Account +-------------------------------------- + +Atlas App Services registers a user differently depending on the +authentication provider: + +- If you are using email/password authentication, users must + first :ref:`register and confirm their email and password + ` before they can authenticate. +- If you are using Google, Facebook, Apple, or Custom JWT, + registration is handled by these third-party services. +- If you are using anonymous authentication, those users do *not* require + registration. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/authenticate-register-create-new-user-account-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/authenticate-register-create-new-user-account-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-register-create-new-user-account-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-register-create-new-user-account-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-register-create-new-user-account-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-register-create-new-user-account-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-register-create-new-user-account-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/authenticate-register-create-new-user-account-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-register-create-new-user-account-js-ts-description.rst + +.. include:: /includes/tip-acct-deletion-reqs.rst + +.. _kotlin-login: + +Log In a User +------------- + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/authenticate-log-in-user-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/authenticate-log-in-user-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-log-in-user-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-log-in-user-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-log-in-user-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-log-in-user-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-log-in-user-description.rst + + .. tab:: + :tabid: swift + + **Async/Await** + + .. include:: /includes/api-details/swift/users/authenticate-log-in-user-async-description.rst + + **Callback** + + .. include:: /includes/api-details/swift/users/authenticate-log-in-user-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-log-in-user-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-log-in-user.rst + +.. _sdks-anonymous-login: + +Anonymous +~~~~~~~~~ + +Anonymous authentication enables users to log in to your +application with short-term accounts that store no persistent +personal information. You might use this to allow users to try your +app before they sign up for an account or while developing +and testing your app. Anonymous users do *not* require +registration. Refer to :ref:`anonymous-authentication` in +the App Services documentation for more information. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-anonymous-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-anonymous-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-anonymous-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-anonymous-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-anonymous-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-log-in-user-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-anonymous.rst + +.. _sdks-email-password-login: + +Email/Password +~~~~~~~~~~~~~~ + +The email/password authentication provider enables users to log in to +your application with an email username and a password. Refer to +:ref:`email-password-authentication` in the App Services +documentation for more information. + +.. important:: Email/Password Users Require Registration + + Email/password authentication requires that you register + and then confirm the user-provided email and password *before* + the user can authenticate to an App Services App. Learn how to + :ref:`register email/password users + `. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-email-password-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-email-password-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-email-password-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-email-password-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-email-password-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-email-password-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-email-password.rst + +.. _sdks-login-jwt: + +Custom JWT +~~~~~~~~~~ + +The Custom JWT authentication provider enables users to log in to +your application with a custom JSON Web Token (JWT). Registration +for JWT authentication is handled by the JWT provider. Refer to +:ref:`custom-jwt-authentication` in the +App Services documentation for more information. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-custom-jwt-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-custom-jwt-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-custom-jwt-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-custom-jwt-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-custom-jwt-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-custom-jwt-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-custom-jwt.rst + +.. _sdks-login-api-key: + +API Key +~~~~~~~ + +The API Key authentication provider enables authenticated +non-anonymous users to log in to your application with an API key. +Refer to :ref:`api-key-authentication` in the App Services +documentation for more information. + +User API keys are generated automatically and managed by the SDK. +Learn how to :ref:`sdks-manage-user-api-keys`. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-api-key-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-api-key-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-api-key-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-api-key-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-api-key-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-api-key-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-api-key.rst + +.. _sdks-login-custom-function: + +Custom Function +~~~~~~~~~~~~~~~ + +The Custom Function authentication provider enables users to log in +to your application using custom authentication logic handled by an +Atlas Function. Refer to :ref:`custom-function-authentication` in the +App Services documentation for more information. + +.. tabs-drivers:: -Refresh Token Expiration ------------------------- + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-custom-function-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-custom-function-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-custom-function-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-custom-function-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-custom-function-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-custom-function-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-custom-function.rst + +.. _sdks-login-google: + +Google +~~~~~~ + +The Google authentication provider allows you to authenticate +users through their existing Google account using an OAuth 2.0 +token. Refer to :ref:`google-authentication` in the App Services +documentation for more information. + +Before you can authenticate users with Google, you must set up your +application for Google User authentication: + +#. In the `Google Cloud Platform console + `__, create an + OAuth 2.0 client ID of type "Web application". +#. Configure your backend App to use that client ID and the associated + client secret. +#. Enable OpenID Connect on the backend. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/authenticate-google-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-google-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-google-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-google-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-google-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-google-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/authenticate-google-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/users/authenticate-google-missing-example.rst + +.. include:: /includes/sdk-examples/users/authenticate-google.rst + +.. _sdks-login-facebook: + +Facebook +~~~~~~~~ + +The Facebook authentication provider allows +you to authenticate users through a Facebook app using their +existing Facebook account. Refer to :ref:`facebook-authentication` in the +App Services documentation for more information. + +.. include:: /includes/note-facebook-profile-picture-url.rst + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-facebook-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-facebook-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-facebook-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-facebook-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-facebook-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/authenticate-facebook-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-facebook-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-facebook.rst + +.. _sdks-login-apple: + +Apple +~~~~~ + +The Sign-in with Apple authentication provider enables users to +log in to your application with a custom token provided +by Apple. Refer to :ref:`apple-id-authentication` in the App Services +documentation for more information. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-apple-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-apple-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-apple-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-apple-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-apple-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-apple-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-apple.rst + +.. tip:: + + If you get a ``Login failed`` error saying that the ``token contains + an invalid number of segments``, verify that you're passing a UTF-8-encoded + string version of the JWT. + +.. _sdks-offline-login: + +Log In Offline +~~~~~~~~~~~~~~ + +When your application authenticates a user, it caches the user's +credentials. You can check for existing user credentials to bypass the +login flow and access the cached user. Use this to open a synced database +offline. + +.. note:: Initial login requires a network connection + + When a user signs up for your app, or logs in for the first time with an + existing account on a client, the device must have a network connection. + Checking for cached user credentials lets you open a synced database + offline, but only if the user has previously logged in on the device while + online. + +.. include:: /includes/sdk-examples/users/authenticate-log-in-offline.rst .. _sdks-logout: Log a User Out --------------- \ No newline at end of file +-------------- + +.. include:: /includes/log-out-queries-in-progress.rst + +The log out method: + +- Deletes locally stored user credentials from the device. +- Immediately halts any synchronization to and from the user's synced databases. +- For anonymous users, :ref:`removes the user `. + +Because logging out halts synchronization, you should only log out after +all synced database updates have uploaded to the server. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/authenticate-log-user-out-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-log-user-out-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/authenticate-log-user-out-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/authenticate-log-user-out-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/authenticate-log-user-out-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-log-user-out-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/authenticate-log-user-out-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/authenticate-log-user-out.rst + +.. _sdks-authentication-change-listener: + +Observe Authentication Changes +------------------------------ + +Some SDKs provide platform-idiomatic APIs to observe authentication changes. +In other SDKs, you can use platform or language-specific architecture to +achieve a similar result without a dedicated API. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/authenticate-observe-authentication-changes-no-api.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/authenticate-observe-authentication-changes-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-observe-authentication-changes-no-api.rst + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-observe-authentication-changes-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/users/authenticate-observe-authentication-changes.rst + +.. _sdks-get-the-current-user: + +Get the Current User +-------------------- + +When a user logs in through an ``App`` on a device, we cache that App and user +information on the device. You can retrieve the currently logged-in user to +perform app operations without having to log the user in again. + +You can continue to work with the current user until the user session expires. +When the session expires, the SDK automatically uses a refresh token to start +a new session. When the refresh token expires, the SDK cannot start a new +session and the user must log in again. You can configure refresh token +expiration time in Atlas. For more information, refer to +:ref:`refresh-token-expiration` in the App Services documentation. + +If you have multiple users logged in to your app, retrieving a current user +returns the last valid user that logged in. It returns null or nil, depending +on the language, if there are no logged-in users. Refer to +:ref:`sdks-multi-user-applications` for more information. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/authenticate-get-current-user-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/authenticate-get-current-user-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/authenticate-get-current-user-description.rst + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/authenticate-get-current-user-description.rst + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/users/authenticate-get-current-user.rst diff --git a/source/sdk/users/manage-user-tokens.txt b/source/sdk/users/manage-user-tokens.txt new file mode 100644 index 0000000000..5df4c3eda6 --- /dev/null +++ b/source/sdk/users/manage-user-tokens.txt @@ -0,0 +1,148 @@ +.. _sdks-manage-user-tokens: + +================== +Manage User Tokens +================== + +.. meta:: + :description: Learn how to manage user access tokens and refresh tokens when performing operations outside of Atlas Device SDK. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. tabs-selector:: drivers + +The SDK manages two types of user tokens: + +- **User access token**: a token sent with each request to Atlas. Without a + valid access token, the app can't perform server-related functionality on the + user's behalf. +- **Refresh token**: a token used to refresh the access token. The SDK uses + this to automatically rotate the access token, up to the period when the + refresh token expires. + +Once the refresh token expires, the app can't perform operations that involve +the server until the user logs in again. + +Tokens are removed after the user logs out. + +.. important:: The SDK Automatically Handles User Access Tokens for Most Functionality + + The SDK automatically handles user access tokens for operations that it + performs, such as calling a Function or syncing the device database. It + sends the access token with each request, and automatically handles + refreshing it. When a refresh token expires, your app code must redirect + users to login again. + + If you send requests outside of the SDK, you must include the user's access + token with each request and manually refresh the token when it expires. + You must manually manage this token when calling :ref:`data-api` endpoints + from your client code, for example. + +For more information on user session access and refresh tokens, +refer to :ref:`user-sessions` in the App Services documentation. + +Get a User Access Token +~~~~~~~~~~~~~~~~~~~~~~~ + +Access tokens expire 30 minutes after a user logs in. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/manage-user-tokens-get-user-access-token-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/manage-user-tokens-get-user-access-token-description.rst + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/manage-user-tokens-get-user-access-token-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/manage-user-tokens-get-user-access-token-description.rst + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/users/manage-user-tokens-get-user-access-token.rst + +Manually Refresh an Access Token +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can manually refresh an expired access token. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/manage-user-tokens-manually-refresh-access-token-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/manage-user-tokens-manually-refresh-access-token-description.rst + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/manage-user-tokens-manually-refresh-access-token-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/manage-user-tokens-manually-refresh-access-token-description.rst + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/users/manage-user-tokens-manually-refresh-access-token.rst + +Configure Refresh Token Expiration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/refresh-token-expiry.rst From bfa23dd8ae58264fa359c28d542603e103ac3616 Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 17 May 2024 15:12:29 -0400 Subject: [PATCH 26/63] (DOCSP-26313): Swift: Add a Handle Sync Errors page for SwiftUI (#2524) Moved the client reset handling details off the page so we can merge this PR. When PR #8109 in the realm-swift repository gets released, we can re-test and add the client reset handling details to the page. - https://jira.mongodb.org/browse/DOCSP-26313 - [Handle Sync Errors](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-26313/sdk/swift/swiftui/handle-sync-errors/) If your PR modifies the docs, you might need to also update some corresponding pages. Check if completed or N/A. - [x] Create Jira ticket for corresponding docs-app-services update(s), if any - [x] Checked/updated Admin API - [x] Checked/updated CLI reference - Swift SDK - SwiftUI/Handle Sync Errors: New page demonstrating how to set and use a sync error handler in SwiftUI. [REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md) --- .../RealmExamples.xcodeproj/project.pbxproj | 48 +++++++++- .../SwiftUICatalog/Views/Authenticate.swift | 56 ++++++++++++ .../Views/HandleSyncErrors.swift | 72 +++++++++++++++ ...-view-with-client-reset-handling.swift.rst | 52 +++++++++++ ...ippet.swiftui-app-with-error-handler.swift | 21 +++++ ...Errors.snippet.swiftui-error-handler.swift | 28 ++++++ ...e-app-and-error-handler-in-next-view.swift | 9 ++ .../swiftui-handle-client-reset-error.rst | 89 +++++++++++++++++++ temp/swift/swiftui.txt | 2 + temp/swift/swiftui/handle-sync-errors.txt | 61 +++++++++++++ 10 files changed, 437 insertions(+), 1 deletion(-) create mode 100644 examples/ios/SwiftUICatalog/Views/HandleSyncErrors.swift create mode 100644 source/examples/generated/swiftui/Authenticate.snippet.flexible-sync-view-with-client-reset-handling.swift.rst create mode 100644 source/examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-app-with-error-handler.swift create mode 100644 source/examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-error-handler.swift create mode 100644 source/examples/generated/swiftui/HandleSyncErrors.snippet.use-app-and-error-handler-in-next-view.swift create mode 100644 source/includes/swiftui-handle-client-reset-error.rst create mode 100644 temp/swift/swiftui/handle-sync-errors.txt diff --git a/examples/ios/RealmExamples.xcodeproj/project.pbxproj b/examples/ios/RealmExamples.xcodeproj/project.pbxproj index 4605463f25..4dd5cc12e5 100644 --- a/examples/ios/RealmExamples.xcodeproj/project.pbxproj +++ b/examples/ios/RealmExamples.xcodeproj/project.pbxproj @@ -102,6 +102,10 @@ 917E73E726B8A9F80068242A /* MongoDBRemoteAccess.swift in Sources */ = {isa = PBXBuildFile; fileRef = 917E73E526B8A9F80068242A /* MongoDBRemoteAccess.swift */; }; 917E73E826B8A9F80068242A /* MongoDBRemoteAccessAggregate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 917E73E626B8A9F80068242A /* MongoDBRemoteAccessAggregate.swift */; }; 9185DB1925E82C0300AF1389 /* LocalOnlyCompleteQuickStart.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9185DB1825E82C0300AF1389 /* LocalOnlyCompleteQuickStart.swift */; }; + 918F1FD62BF7C32E00F43489 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 918F1FD52BF7C32E00F43489 /* RealmSwift */; }; + 918F1FD82BF7C32E00F43489 /* RealmSwift in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 918F1FD52BF7C32E00F43489 /* RealmSwift */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; + 918F1FDA2BF7C3D100F43489 /* RealmSwift in Frameworks */ = {isa = PBXBuildFile; productRef = 918F1FD92BF7C3D100F43489 /* RealmSwift */; }; + 918F1FDC2BF7C3D100F43489 /* RealmSwift in Embed Frameworks */ = {isa = PBXBuildFile; productRef = 918F1FD92BF7C3D100F43489 /* RealmSwift */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 91AB031428981BF700A272E8 /* DeleteRealmFiles.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AB031328981BF700A272E8 /* DeleteRealmFiles.swift */; }; 91AB0316289965F800A272E8 /* CreateRealmObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AB0315289965F800A272E8 /* CreateRealmObjects.swift */; }; 91AB03182899660A00A272E8 /* ReadRealmObjects.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AB03172899660A00A272E8 /* ReadRealmObjects.swift */; }; @@ -110,6 +114,7 @@ 91AB031E289B1E9700A272E8 /* AddSyncToApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AB031D289B1E9700A272E8 /* AddSyncToApp.swift */; }; 91AE237728AFC7A40027C3AC /* SyncOrLocalRealm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AE237628AFC7A40027C3AC /* SyncOrLocalRealm.swift */; }; 91AE237828AFC7A40027C3AC /* SyncOrLocalRealm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91AE237628AFC7A40027C3AC /* SyncOrLocalRealm.swift */; }; + 91B4EBA32982CC4F0015FD7B /* HandleSyncErrors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91B4EBA22982CC4F0015FD7B /* HandleSyncErrors.swift */; }; 91B8A4D6278E24950018F72F /* TypeProjection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91B8A4D5278E24950018F72F /* TypeProjection.swift */; }; 91CEF5FE260E308100A029E0 /* Compacting.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91CEF5FD260E308100A029E0 /* Compacting.swift */; }; 91CEF606260E325000A029E0 /* Compacting.m in Sources */ = {isa = PBXBuildFile; fileRef = 91CEF605260E325000A029E0 /* Compacting.m */; }; @@ -139,6 +144,28 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ + 918F1FD72BF7C32E00F43489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 918F1FD82BF7C32E00F43489 /* RealmSwift in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; + 918F1FDB2BF7C3D100F43489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 918F1FDC2BF7C3D100F43489 /* RealmSwift in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; 91F04E9B2BE290A80082EB2B /* Embed Frameworks */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; @@ -248,6 +275,7 @@ 91AB031B2899663600A272E8 /* DeleteRealmObjects.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeleteRealmObjects.swift; sourceTree = ""; }; 91AB031D289B1E9700A272E8 /* AddSyncToApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddSyncToApp.swift; sourceTree = ""; }; 91AE237628AFC7A40027C3AC /* SyncOrLocalRealm.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncOrLocalRealm.swift; sourceTree = ""; }; + 91B4EBA22982CC4F0015FD7B /* HandleSyncErrors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HandleSyncErrors.swift; sourceTree = ""; }; 91B8A4D5278E24950018F72F /* TypeProjection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TypeProjection.swift; sourceTree = ""; }; 91C68804274D8AFE001A5DBE /* SwiftUIExamples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftUIExamples.app; sourceTree = BUILT_PRODUCTS_DIR; }; 91CEF5FD260E308100A029E0 /* Compacting.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Compacting.swift; sourceTree = ""; }; @@ -291,6 +319,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 918F1FD62BF7C32E00F43489 /* RealmSwift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -298,6 +327,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 918F1FDA2BF7C3D100F43489 /* RealmSwift in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -501,6 +531,7 @@ 91713B3028AC41B700519F9D /* Authenticate.swift */, 915B8EE429258B4300150F01 /* CreateObjects.swift */, 916E7D4528B57B6B00758A85 /* FilterData.swift */, + 91B4EBA22982CC4F0015FD7B /* HandleSyncErrors.swift */, 91713B2428AC3DF300519F9D /* OpenRealm.swift */, 91713B3428AD2B0E00519F9D /* PassObjectsToView.swift */, 916E7D4228B5693100758A85 /* Previews.swift */, @@ -594,6 +625,7 @@ 91713AF528AC3D8200519F9D /* Sources */, 91713AF628AC3D8200519F9D /* Frameworks */, 91713AF728AC3D8200519F9D /* Resources */, + 918F1FD72BF7C32E00F43489 /* Embed Frameworks */, ); buildRules = ( ); @@ -601,6 +633,7 @@ ); name = SwiftUICatalog; packageProductDependencies = ( + 918F1FD52BF7C32E00F43489 /* RealmSwift */, ); productName = SwiftUICatalog; productReference = 91713AF928AC3D8200519F9D /* SwiftUICatalog.app */; @@ -613,6 +646,7 @@ 91713B0E28AC3D8300519F9D /* Sources */, 91713B0F28AC3D8300519F9D /* Frameworks */, 91713B1028AC3D8300519F9D /* Resources */, + 918F1FDB2BF7C3D100F43489 /* Embed Frameworks */, ); buildRules = ( ); @@ -621,6 +655,7 @@ ); name = SwiftUICatalogUITests; packageProductDependencies = ( + 918F1FD92BF7C3D100F43489 /* RealmSwift */, ); productName = SwiftUICatalogUITests; productReference = 91713B1228AC3D8300519F9D /* SwiftUICatalogUITests.xctest */; @@ -888,6 +923,7 @@ 91713AFC28AC3D8200519F9D /* SwiftUICatalogApp.swift in Sources */, 916E7D4928B5863A00758A85 /* QuickWrite.swift in Sources */, 91713B3528AD2B0E00519F9D /* PassObjectsToView.swift in Sources */, + 91B4EBA32982CC4F0015FD7B /* HandleSyncErrors.swift in Sources */, 91713B2528AC3DF300519F9D /* OpenRealm.swift in Sources */, 916E7D4328B5693100758A85 /* Previews.swift in Sources */, 915B8EE529258B4300150F01 /* CreateObjects.swift in Sources */, @@ -1464,7 +1500,7 @@ repositoryURL = "https://github.com/realm/realm-swift.git"; requirement = { kind = exactVersion; - version = 10.50.0; + version = 10.49.3; }; }; 917CA79427ECADC200F9BDDC /* XCRemoteSwiftPackageReference "facebook-ios-sdk" */ = { @@ -1508,6 +1544,16 @@ package = 917CA79427ECADC200F9BDDC /* XCRemoteSwiftPackageReference "facebook-ios-sdk" */; productName = FacebookLogin; }; + 918F1FD52BF7C32E00F43489 /* RealmSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 91508B752BE57EFA00817DBC /* XCRemoteSwiftPackageReference "realm-swift" */; + productName = RealmSwift; + }; + 918F1FD92BF7C3D100F43489 /* RealmSwift */ = { + isa = XCSwiftPackageProductDependency; + package = 91508B752BE57EFA00817DBC /* XCRemoteSwiftPackageReference "realm-swift" */; + productName = RealmSwift; + }; /* End XCSwiftPackageProductDependency section */ }; rootObject = 48DBFACE25101C3100391E2B /* Project object */; diff --git a/examples/ios/SwiftUICatalog/Views/Authenticate.swift b/examples/ios/SwiftUICatalog/Views/Authenticate.swift index e562566ec7..938489d272 100644 --- a/examples/ios/SwiftUICatalog/Views/Authenticate.swift +++ b/examples/ios/SwiftUICatalog/Views/Authenticate.swift @@ -55,6 +55,62 @@ struct FlexibleSyncContentView: View { } // :snippet-end: +// :snippet-start: flexible-sync-view-with-client-reset-handling +struct FlexSyncContentView: View { + // Observe the Realm App object in order to react to login state changes. + @ObservedObject var flexibleSyncApp: RealmSwift.App + // Use the error handler that you've injected into the environment + // to react to Device Sync errors. + // :uncomment-start: + //@EnvironmentObject var errorHandler: ErrorHandler + // :uncomment-end: + + var body: some View { + if let user = flexibleSyncApp.currentUser { + let config = user.flexibleSyncConfiguration( + // :emphasize-start: + clientResetMode: .recoverUnsyncedChanges( + beforeReset: { realm in + // A block called after a client reset error is detected, but before the + // client recovery process is executed. + // This block could be used for any custom logic, reporting, debugging etc. + // For more information, refer to: https://www.mongodb.com/docs/realm/sdk/swift/sync/handle-sync-errors/ + print("Before client reset block") + }, afterReset: { before,after in + // A block called after the client recovery process has executed. + // This block could be used for custom recovery, reporting, debugging etc. + // For SwiftUI, you might modify a @State variable to trigger views to reload + // or advise the user to restart the app. + // For more information, refer to: https://www.mongodb.com/docs/realm/sdk/swift/sync/handle-sync-errors/ + print("After client reset block") + }), + // :emphasize-end: + initialSubscriptions: { subs in + let peopleSubscriptionExists = subs.first(named: "people") + let dogSubscriptionExists = subs.first(named: "dogs") + // Check whether the subscription already exists. Adding it more + // than once causes an error. + if (peopleSubscriptionExists != nil) && (dogSubscriptionExists != nil) { + // Existing subscriptions found - do nothing + return + } else { + // Add queries for any objects you want to use in the app. + // Linked objects do not automatically get queried, so you + // must explicitly query for all linked objects you want to include. + subs.append(QuerySubscription(name: "people")) + subs.append(QuerySubscription(name: "dogs")) + } + } + ) + OpenFlexibleSyncRealmView() + .environment(\.realmConfiguration, config) + } else { + FlexibleSyncLoginView() + } + } +} +// :snippet-end: + struct PBSContentView: View { // Observe the Realm app object in order to react to login state changes. @ObservedObject var partitionBasedSyncApp: RealmSwift.App diff --git a/examples/ios/SwiftUICatalog/Views/HandleSyncErrors.swift b/examples/ios/SwiftUICatalog/Views/HandleSyncErrors.swift new file mode 100644 index 0000000000..5709346cc9 --- /dev/null +++ b/examples/ios/SwiftUICatalog/Views/HandleSyncErrors.swift @@ -0,0 +1,72 @@ +import SwiftUI +import RealmSwift +import Foundation + +// :snippet-start: swiftui-app-with-error-handler +let app = App(id: flexibleSyncAppId) + +// :uncomment-start: +// @main +// :uncomment-end: +struct realmSwiftUIApp: SwiftUI.App { + // Initialize the error handler + @StateObject var errorHandler = ErrorHandler(app: app) + + var body: some Scene { + WindowGroup { + NextView(app: app) + // Inject the error handler as an environment object + .environmentObject(errorHandler) + // Display an alert to the user containing the error when a Sync error occurs + .alert(Text("Error"), isPresented: .constant(errorHandler.error != nil)) { + Button("OK", role: .cancel) { errorHandler.error = nil } + } message: { + Text(errorHandler.error?.localizedDescription ?? "") + } + } + } +} +// :snippet-end: + +// :snippet-start: swiftui-error-handler +final class ErrorHandler: ObservableObject { + @Published var error: Swift.Error? + + init(app: RealmSwift.App) { + // Sync Manager listens for sync errors. + app.syncManager.errorHandler = { error, syncSession in + if let error = error as? SyncError { + /* Handle specific SyncError cases, or use a switch + * statement to handle all Sync error codes. + * In this case, ignore a .connectionFailed error and + * continue executing the app code. */ + if error.code == .connectionFailed { + return + } + self.error = error + } else if let error = error as? POSIXError { + /* The error handler may also report NSError types to + * allow for error handling in a platform-idiomatic way. + * In this case, handle a connection timeout error as + * an .ETIMEDOUT error in the POSIXError domain. */ + if error.code == .ETIMEDOUT { + return + } + self.error = error + } + } + } +} +// :snippet-end: + +// :snippet-start: use-app-and-error-handler-in-next-view +struct NextView: View { + @ObservedObject var app: RealmSwift.App + // Use the error handler that you injected into the environment + @EnvironmentObject var errorHandler: ErrorHandler + + var body: some View { + Text("You might log users in or handle errors in this view") + } +} +// :snippet-end: diff --git a/source/examples/generated/swiftui/Authenticate.snippet.flexible-sync-view-with-client-reset-handling.swift.rst b/source/examples/generated/swiftui/Authenticate.snippet.flexible-sync-view-with-client-reset-handling.swift.rst new file mode 100644 index 0000000000..bed4f0da17 --- /dev/null +++ b/source/examples/generated/swiftui/Authenticate.snippet.flexible-sync-view-with-client-reset-handling.swift.rst @@ -0,0 +1,52 @@ +.. code-block:: swift + :emphasize-lines: 11-25 + + struct FlexSyncContentView: View { + // Observe the Realm App object in order to react to login state changes. + @ObservedObject var app: RealmSwift.App + // Use the error handler that you've injected into the environment + // to react to Device Sync errors. + @EnvironmentObject var errorHandler: ErrorHandler + + var body: some View { + if let user = app.currentUser { + let config = user.flexibleSyncConfiguration( + clientResetMode: .recoverUnsyncedChanges( + beforeReset: { realm in + // A block called after a client reset error is detected, but before the + // client recovery process is executed. + // This block could be used for any custom logic, reporting, debugging etc. + // For more information, refer to: https://www.mongodb.com/docs/realm/sdk/swift/sync/handle-sync-errors/ + print("Before client reset block") + }, afterReset: { before,after in + // A block called after the client recovery process has executed. + // This block could be used for custom recovery, reporting, debugging etc. + // For SwiftUI, you might modify a @State variable to trigger views to reload + // or advise the user to restart the app. + // For more information, refer to: https://www.mongodb.com/docs/realm/sdk/swift/sync/handle-sync-errors/ + print("After client reset block") + }), + initialSubscriptions: { subs in + let peopleSubscriptionExists = subs.first(named: "people") + let dogSubscriptionExists = subs.first(named: "dogs") + // Check whether the subscription already exists. Adding it more + // than once causes an error. + if (peopleSubscriptionExists != nil) && (dogSubscriptionExists != nil) { + // Existing subscriptions found - do nothing + return + } else { + // Add queries for any objects you want to use in the app. + // Linked objects do not automatically get queried, so you + // must explicitly query for all linked objects you want to include. + subs.append(QuerySubscription(name: "people")) + subs.append(QuerySubscription(name: "dogs")) + } + } + ) + OpenFlexibleSyncRealmView() + .environment(\.realmConfiguration, config) + } else { + LoginView() + } + } + } diff --git a/source/examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-app-with-error-handler.swift b/source/examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-app-with-error-handler.swift new file mode 100644 index 0000000000..37943e6578 --- /dev/null +++ b/source/examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-app-with-error-handler.swift @@ -0,0 +1,21 @@ +let app = App(id: flexibleSyncAppId) + +@main +struct realmSwiftUIApp: SwiftUI.App { + // Initialize the error handler + @StateObject var errorHandler = ErrorHandler(app: app) + + var body: some Scene { + WindowGroup { + NextView(app: app) + // Inject the error handler as an environment object + .environmentObject(errorHandler) + // Display an alert to the user containing the error when a Sync error occurs + .alert(Text("Error"), isPresented: .constant(errorHandler.error != nil)) { + Button("OK", role: .cancel) { errorHandler.error = nil } + } message: { + Text(errorHandler.error?.localizedDescription ?? "") + } + } + } +} diff --git a/source/examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-error-handler.swift b/source/examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-error-handler.swift new file mode 100644 index 0000000000..230d05f1c2 --- /dev/null +++ b/source/examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-error-handler.swift @@ -0,0 +1,28 @@ +final class ErrorHandler: ObservableObject { + @Published var error: Swift.Error? + + init(app: RealmSwift.App) { + // Sync Manager listens for sync errors. + app.syncManager.errorHandler = { error, syncSession in + if let error = error as? SyncError { + /* Handle specific SyncError cases, or use a switch + * statement to handle all Sync error codes. + * In this case, ignore a .connectionFailed error and + * continue executing the app code. */ + if error.code == .connectionFailed { + return + } + self.error = error + } else if let error = error as? POSIXError { + /* The error handler may also report NSError types to + * allow for error handling in a platform-idiomatic way. + * In this case, handle a connection timeout error as + * an .ETIMEDOUT error in the POSIXError domain. */ + if error.code == .ETIMEDOUT { + return + } + self.error = error + } + } + } +} diff --git a/source/examples/generated/swiftui/HandleSyncErrors.snippet.use-app-and-error-handler-in-next-view.swift b/source/examples/generated/swiftui/HandleSyncErrors.snippet.use-app-and-error-handler-in-next-view.swift new file mode 100644 index 0000000000..016db35067 --- /dev/null +++ b/source/examples/generated/swiftui/HandleSyncErrors.snippet.use-app-and-error-handler-in-next-view.swift @@ -0,0 +1,9 @@ +struct NextView: View { + @ObservedObject var app: RealmSwift.App + // Use the error handler that you injected into the environment + @EnvironmentObject var errorHandler: ErrorHandler + + var body: some View { + Text("You might log users in or handle errors in this view") + } +} diff --git a/source/includes/swiftui-handle-client-reset-error.rst b/source/includes/swiftui-handle-client-reset-error.rst new file mode 100644 index 0000000000..9e8eda51ac --- /dev/null +++ b/source/includes/swiftui-handle-client-reset-error.rst @@ -0,0 +1,89 @@ +Handle Client Reset Errors +-------------------------- + +A client reset error is a specific type of Sync error that occurs when the +realm on the user's device can no longer sync with the App Services App. +For more information about the underlying error and recovery options, +refer to: :ref:`ios-client-reset`. + +Realm's SwiftUI property wrappers ``@AsyncOpen`` and ``@AutoOpen`` enable +you to handle a client reset error by adding a few things to your app: + +- Add client reset handling information to the :swift-sdk:`flexibleSyncConfiguration() + ` +- Force an ``@AsyncOpen`` or ``@AutoOpen`` view to reload after a client reset is complete + +Add Client Reset Handling Information to the Flexible Sync Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Swift SDK can handle a client reset with different behaviors depending +on the needs of your app. For a full list of client reset modes and behaviors, +refer to :ref:`ios-client-resets`. + +To automatically handle a client reset, set the ``clientResetMode`` parameter +in your :swift-sdk:`flexibleSyncConfiguration() +`. + +You can review the possible values and their behaviors in the +:swift-sdk:`ClientResetMode enum `. + +In this example, we set the ``clientResetMode`` to ``.recoverUnsyncedChanges``. +.. include:: /examples/generated/swiftui/Authenticate.snippet.flexible-sync-view-with-client-reset-handling.swift.rst + +Take Some Action after the Client Reset Completes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When the Sync error handler detects that a client reset must occur, the SDK +executes the client reset using the behavior you specify in the +``flexibleSyncConfiguration``'s ``clientResetMode`` parameter. However, the +SwiftUI ``@AsyncOpen`` and ``@AutoOpen`` property wrappers do not detect +that a client reset has occurred. An app that :ref:`opens a synced realm by +switching on @AsyncOpen or @AutoOpen property wrapper states +` displays a progress spinner indefinitely. +It never progresses past the ``.connecting`` state. The next time the user +opens the app, it loads without issue. + +You can perform additional logic in the ``afterClientReset`` block to handle +this in your app. You could set a ``@State`` variable, modify its value +in the ``afterClientResetBlock``, and use that to instruct the user to +re-open the app when a client reset occurs. Or you could force the +``@AsyncOpen`` or ``@AutoOpen`` view to reload using the updated realm. + +Verify Client Reset Works as Expected +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To test that your client reset implementation is working, you trigger +a client reset by terminating and re-enabling Device Sync. + +.. warning:: + + Test client reset handling in a development app that does not have + external users. Triggering a client reset using this method causes a + client reset for *all* app users. + +.. procedure:: + + .. step:: Run the App and Add Data + + Open your app on the device. Add some data to your app. Then, stop your + app. + + .. step:: Trigger a Client Reset + + Follow the instructions in the Device Sync documentation to + :ref:`terminating-realm-sync`. You should see a + ``TranslatorFatalError Error`` message in the App Services logs, + indicating that Sync has terminated. Then, :ref:`re-enable-realm-sync`. + + .. step:: Run and Test the App + + When you run the app on your device again, it should trigger a + client reset error. Verify that you see any relevant log messages + that you added to your code while implementing the client reset logic, + and that the device resets the realm and successfully loads fresh data + from the backend. + + .. step:: Iterate as Needed + + Repeat until you are satisfied with the client reset implementation in your + SwiftUI app. diff --git a/temp/swift/swiftui.txt b/temp/swift/swiftui.txt index 7c9937a0fb..f18e803d9a 100644 --- a/temp/swift/swiftui.txt +++ b/temp/swift/swiftui.txt @@ -20,6 +20,7 @@ SwiftUI - Swift SDK Pass Realm Data Between Views Write Data Filter Data + Handle Sync Errors Sync Data in the Background Use Realm with SwiftUI Previews @@ -36,6 +37,7 @@ This documentation provides an overview of those features. - :doc:`Pass Realm Data Between Views ` - :doc:`Write Data ` - :doc:`Filter Data ` +- :doc:`Handle Sync Errors ` - :doc:`Sync Data in the Background ` - :doc:`Use Realm with SwiftUI Previews ` diff --git a/temp/swift/swiftui/handle-sync-errors.txt b/temp/swift/swiftui/handle-sync-errors.txt new file mode 100644 index 0000000000..7a6707dffd --- /dev/null +++ b/temp/swift/swiftui/handle-sync-errors.txt @@ -0,0 +1,61 @@ +.. _swiftui-handle-sync-errors: + +=========================================== +Handle Sync Errors with SwiftUI - Swift SDK +=========================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. _swiftui-register-sync-error-handler: + +Handle Sync Errors +------------------ + +While developing an application that uses Device Sync, you should set an error +handler. This error handler will detect and respond to any failed sync-related +API calls. + +.. seealso:: + + For a complete example app with a working Sync error handler implementation, + :ref:`create a template app ` and check out + :ref:`the SwiftUI client `. The error handler + implementation is in the :file:`App.swift` file. + +For a SwiftUI-friendly implementation of a Sync error handler, create +an ``ObservableObject`` with an optional ``@Published`` variable to contain +a potential error. This handler uses the :swift-sdk:`SyncManager +` to listen for errors. +The ``SyncManager`` reports errors of the type ``SyncError``, and it also +reports other connection issues. + +For more information, refer to the underlying Objective-C :objc-sdk:`RLMSyncError +`. + +.. literalinclude:: /examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-error-handler.swift + :language: swift + +.. include:: /includes/sync-errors-in-app-services.rst + +Initialize the error handler as a ``@StateObject``. Inject it into the +view hierarchy as an environment object. In this example, we display an +``.alert`` to the user when a Sync error occurs. + +.. literalinclude:: /examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-app-with-error-handler.swift + :language: swift + +Then, in the view where you are observing the Realm ``App``, you can use the +error handler as an ``@EnvironmentObject`` to react to Sync errors. An +error that occurs here pops up an alert for the user, using the ``.alert`` +set in the view above. + +.. literalinclude:: /examples/generated/swiftui/HandleSyncErrors.snippet.use-app-and-error-handler-in-next-view.swift + :language: swift + +.. TODO: Re-test and add the section in the following file: +.. `includes/swiftui-handle-client-reset-error.rst` after realm-swift merges +.. this PR: https://github.com/realm/realm-swift/pull/8109 From b8d909b2422c112bd28bee43163949254bc9f8d6 Mon Sep 17 00:00:00 2001 From: lindseymoore <71525840+lindseymoore@users.noreply.github.com> Date: Mon, 20 May 2024 17:49:32 -0400 Subject: [PATCH 27/63] DOCSP-39161 .NET updateBaseURL (#3246) Jira ticket: https://jira.mongodb.org/browse/DOCSP-39161 - [Connect to App Services Backend](https://preview-mongodblindseymoore.gatsbyjs.io/realm/DOCSP-39161/sdk/dotnet/app-services/connect-to-app-services-backend/) - Note: Commented out failing tests. Fixing them will be a part of this ticket: https://jira.mongodb.org/browse/DOCSP-39638. Before merging your PR, make sure to check a few things. - [ ] Did you tag pages appropriately? - genre - meta.keywords - meta.description - [x] Describe your PR's changes in the Release Notes section - [ ] Create a Jira ticket for related docs-app-services work, if any - .NET SDK - Application Services/Connect to an App Services App: Add a section on updating the base URL during runtime. [REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md) --------- Co-authored-by: MongoCaleb --- temp/dotnet/app-services/connect-to-app-services-backend.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/temp/dotnet/app-services/connect-to-app-services-backend.txt b/temp/dotnet/app-services/connect-to-app-services-backend.txt index 12d0cfc9ea..384367109b 100644 --- a/temp/dotnet/app-services/connect-to-app-services-backend.txt +++ b/temp/dotnet/app-services/connect-to-app-services-backend.txt @@ -1,7 +1,6 @@ .. _dotnet-init-appclient: .. _connect-to-mongodb-realm-backend-app: - =================================================== Connect to an Atlas App Services Backend - .NET SDK =================================================== From a3d9c9a00096fb93f315cbacab15217a901b6445 Mon Sep 17 00:00:00 2001 From: lindseymoore <71525840+lindseymoore@users.noreply.github.com> Date: Thu, 23 May 2024 17:51:59 -0400 Subject: [PATCH 28/63] Review comments for DOCSP-39161 .NET baseurl (#3267) ## Pull Request Info - SDK Docs Consolidation Related to Jira ticket: https://jira.mongodb.org/browse/DOCSP-39161 *Staged Page* - [.NET Connect to App Services Backend](https://preview-mongodblindseymoore.gatsbyjs.io/realm/node-baseurl-additions/sdk/dotnet/app-services/connect-to-app-services-backend/#connect-to-a-specific-server) --- examples/dotnet/Examples/BaseURLChange.cs | 4 ---- .../dotnet/BaseURLChange.snippet.experimental-import.cs | 1 - .../app-services/connect-to-app-services-backend.txt | 7 +------ 3 files changed, 1 insertion(+), 11 deletions(-) delete mode 100644 source/examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs diff --git a/examples/dotnet/Examples/BaseURLChange.cs b/examples/dotnet/Examples/BaseURLChange.cs index d2350ec6b0..d6f4ff80de 100644 --- a/examples/dotnet/Examples/BaseURLChange.cs +++ b/examples/dotnet/Examples/BaseURLChange.cs @@ -8,10 +8,6 @@ using Realms.Logging; using System.Threading; -//:snippet-start: experimental-import -using System.Diagnostics.CodeAnalysis; -//:snippet-end: - namespace Examples { public class BaseURLChange diff --git a/source/examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs b/source/examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs deleted file mode 100644 index 0a69c43b19..0000000000 --- a/source/examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs +++ /dev/null @@ -1 +0,0 @@ -using System.Diagnostics.CodeAnalysis; diff --git a/temp/dotnet/app-services/connect-to-app-services-backend.txt b/temp/dotnet/app-services/connect-to-app-services-backend.txt index 384367109b..484c1b2e6a 100644 --- a/temp/dotnet/app-services/connect-to-app-services-backend.txt +++ b/temp/dotnet/app-services/connect-to-app-services-backend.txt @@ -83,12 +83,7 @@ method: This API is experimental. As seen above, you must use ``#pragma warning disable Rlm001`` and ``#pragma warning restore Rlm001`` to suppress the experimental errors, -where ``Rlm001`` is the experimental attributes's ``diagnosticId``. You must -also import the following namespace at the top of your file, which contains -the ``Experimental`` attribute: - -.. literalinclude:: /examples/generated/dotnet/BaseURLChange.snippet.experimental-import.cs - :language: csharp +where ``Rlm001`` is the experimental attributes's ``diagnosticId``. If you want to change the ``baseURL`` after you have logged in a user and have opened a synced database, the app must perform a From 6a10d8b16063642953185f8e80916fbf79a4a1b0 Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 17 May 2024 15:28:57 -0400 Subject: [PATCH 29/63] Add C++ template app and tutorial to SDK docs (#3263) ## Pull Request Info - SDK Docs Consolidation *Staged Pages* - [C++ Landing Page](https://preview-mongodbdacharyc.gatsbyjs.io/realm/add-cpp-template-app/sdk/cpp/): Add "Learning Paths" section with links to the C++ quick start, template app, and tutorial, similar to the other SDKs. - [Example Projects](https://preview-mongodbdacharyc.gatsbyjs.io/realm/add-cpp-template-app/example-projects/): Add C++ to the list of SDK example apps. ### Release Notes - C++ SDK - Landing Page: Add "Learning Paths" section with links to the C++ quick start, template app, and tutorial. - Example Projects: Add the C++ template app to the SDK template app list. --------- Co-authored-by: lindseymoore <71525840+lindseymoore@users.noreply.github.com> --- source/example-projects.txt | 3 ++- temp/cpp.txt | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/source/example-projects.txt b/source/example-projects.txt index b2eea0d780..8ad04d9497 100644 --- a/source/example-projects.txt +++ b/source/example-projects.txt @@ -38,7 +38,8 @@ Learn about the core features of the Atlas Device SDKs with Atlas Device Sync an - A todo list mobile app that syncs data with App Services using Device Sync. See the App Services :ref:`Getting Started page ` for more information and detailed tutorials. - - - `Flutter `__ + - - `C++ `__ + - `Flutter `__ - `Kotlin `__ - `.NET `__ - `React Native `__ diff --git a/temp/cpp.txt b/temp/cpp.txt index eda0e47941..8ae39d3acf 100644 --- a/temp/cpp.txt +++ b/temp/cpp.txt @@ -34,6 +34,45 @@ Atlas Device SDK for C++ Use Atlas Device SDK for C++ to write applications that access data stored locally on devices and sync data with Atlas. +.. kicker:: Learning Paths + +Get Started with the C++ SDK +----------------------------- + +.. card-group:: + :columns: 3 + :style: extra-compact + + .. card:: + :headline: Quick Start + :cta: See Code Examples + :url: https://www.mongodb.com/docs/realm/sdk/cpp/quick-start/ + :icon: /images/icons/branding_2022/Technical_ATLAS_Functions3x.png + :icon-alt: Functions Icon + + Minimal-explanation code examples of how to work with the C++ SDK, + write to the device database, and sync with other devices. + + .. card:: + :headline: Working Example App + :cta: Explore an Example App + :url: https://www.mongodb.com/docs/atlas/app-services/template-apps/ + :icon: /images/icons/branding_2022/Technical_REALM_Mobile3x.png + :icon-alt: Atlas Device SDK Mobile Icon + + Learn from a working terminal GUI client app that + uses the C++ SDK. + + .. card:: + :headline: Guided Tutorial + :cta: Follow the Tutorial + :url: https://mongodb.com/docs/atlas/app-services/tutorial/cpp/ + :icon: /images/icons/branding_2022/General_CONTENT_Tutorial3x.png + :icon-alt: Tutorial Icon + + Follow a guided tutorial to learn how to adapt the example app to + create your own working app. + .. kicker:: What You Can Do Develop Apps with the SDK From ba89df772c2ef4a5b7a2a9eec2c63a63de683a5f Mon Sep 17 00:00:00 2001 From: Kenneth Geisshirt Date: Fri, 24 May 2024 21:31:02 +0200 Subject: [PATCH 30/63] Realm Java cannot use RealmAny in new apps (#3274) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39924 *Staged Page* - [PAGE_NAME](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/BRANCH_NAME/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [PAGE_NAME](https://www.mongodb.com/docs/atlas/device-sdks/LIVE-DOCS-LINK) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [ ] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [ ] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [ ] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [ ] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [ ] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [ ] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [ ] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [ ] Shared code boxes have snippets or placeholders for all 9 languages - [ ] API description sections have API details or a generic placeholder for all 9 languages - [ ] Check related pages for relevant content to include - [ ] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: lindseymoore <71525840+lindseymoore@users.noreply.github.com> --- source/includes/note-java-and-realmany.rst | 5 +++++ temp/java/install.txt | 2 ++ temp/java/model-data.txt | 2 ++ temp/java/model-data/data-types/realmany.txt | 2 ++ temp/java/sync/configure-and-open-a-synced-realm.txt | 2 ++ 5 files changed, 13 insertions(+) create mode 100644 source/includes/note-java-and-realmany.rst diff --git a/source/includes/note-java-and-realmany.rst b/source/includes/note-java-and-realmany.rst new file mode 100644 index 0000000000..e52f65a38b --- /dev/null +++ b/source/includes/note-java-and-realmany.rst @@ -0,0 +1,5 @@ +.. note:: New apps cannot use ``RealmAny`` + + New :atlas:`App Services Apps ` + will not be able to synchronize data models with properties of type + ``RealmAny``. diff --git a/temp/java/install.txt b/temp/java/install.txt index 3af055b892..a25a243114 100644 --- a/temp/java/install.txt +++ b/temp/java/install.txt @@ -12,6 +12,8 @@ Install Realm - Java SDK .. include:: /includes/note-java-maintenance-mode.rst +.. include:: /includes/note-java-and-realmany.rst + Overview -------- diff --git a/temp/java/model-data.txt b/temp/java/model-data.txt index e1d724b023..f8607ae6c7 100644 --- a/temp/java/model-data.txt +++ b/temp/java/model-data.txt @@ -16,6 +16,8 @@ Model Data - Java SDK :depth: 2 :class: singlecol +.. include:: /includes/note-java-and-realmany.rst + .. _java-object-models-and-schemas: .. _java-schema-versions-and-migrations: diff --git a/temp/java/model-data/data-types/realmany.txt b/temp/java/model-data/data-types/realmany.txt index 0a3df1a0e6..7deefbce31 100644 --- a/temp/java/model-data/data-types/realmany.txt +++ b/temp/java/model-data/data-types/realmany.txt @@ -13,6 +13,8 @@ RealmAny - Java SDK .. versionadded:: 10.6.0 +.. include:: /includes/note-java-and-realmany.rst + You can use the :java-sdk:`RealmAny ` data type to create Realm object fields that can contain any of several underlying types. You can store multiple ``RealmAny`` instances in diff --git a/temp/java/sync/configure-and-open-a-synced-realm.txt b/temp/java/sync/configure-and-open-a-synced-realm.txt index ce3965386e..ddf3c80349 100644 --- a/temp/java/sync/configure-and-open-a-synced-realm.txt +++ b/temp/java/sync/configure-and-open-a-synced-realm.txt @@ -10,6 +10,8 @@ Configure a Synced Realm - Java SDK :depth: 2 :class: singlecol +.. include:: /includes/note-java-and-realmany.rst + Prerequisites ------------- From dd89a55dc0599dd950b81606184a9ac03112f626 Mon Sep 17 00:00:00 2001 From: osharaf-mdb Date: Wed, 5 Jun 2024 16:54:46 -0400 Subject: [PATCH 31/63] DOCSP-40104: Fixed typo in read.txt (#3284) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-40104 ### Reminder Checklist Before merging your PR, make sure to check a few things. - [ ] Did you tag pages appropriately? - genre - programming_language - meta.keywords - meta.description - [ ] Describe your PR's changes in the Release Notes section - [ ] Create a Jira ticket for related docs-realm work, if any ### Release Notes - **Kotlin SDK** - Realm Database > CRUD > read: fix typo ### Review Guidelines [REVIEWING.md](https://github.com/mongodb/docs-app-services/blob/master/REVIEWING.md) --- temp/kotlin/realm-database/crud/read.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/temp/kotlin/realm-database/crud/read.txt b/temp/kotlin/realm-database/crud/read.txt index 6bd8926769..e2d4ed3a28 100644 --- a/temp/kotlin/realm-database/crud/read.txt +++ b/temp/kotlin/realm-database/crud/read.txt @@ -160,8 +160,8 @@ To find objects stored within a database: - `find() <{+kotlin-local-prefix+}io.realm.kotlin.query/find.html>`__ for synchronous queries. Returns a collection of results. - - `asFlow() <{+kotlin-local-prefix+}io.realm.kotlin.query/-realm-element-query/as-flow.html>`__ f - or asynchronous queries. Subscribes to a ``Flow`` of results changes. + - `asFlow() <{+kotlin-local-prefix+}io.realm.kotlin.query/-realm-element-query/as-flow.html>`__ + for asynchronous queries. Subscribes to a ``Flow`` of results changes. .. tip:: Prefer ``asFlow()`` for Large Data Sets From 5a50133661c1227d02d4df5a524790a0aaf9f7c7 Mon Sep 17 00:00:00 2001 From: cbullinger <115956901+cbullinger@users.noreply.github.com> Date: Tue, 11 Jun 2024 11:18:57 -0400 Subject: [PATCH 32/63] DOCSP-36167: Update .NET compatibility with note on source generator model requirements (#3288) ## Pull Request Info Jira ticket: https://jira.mongodb.org/browse/DOCSP-36167 *Staged Page* - [Platform and Framework Compatibility - .NET SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-36167-compatibility/sdk/dotnet/compatibility/) ## Release Notes - **.NET SDK** - Compatibility: Added note with minimum framework requirements when using the new source model generator. --- source/includes/note-java-and-realmany.rst | 5 +- temp/dotnet/compatibility.txt | 103 ++++++++++++++------- 2 files changed, 71 insertions(+), 37 deletions(-) diff --git a/source/includes/note-java-and-realmany.rst b/source/includes/note-java-and-realmany.rst index e52f65a38b..a61fb11f79 100644 --- a/source/includes/note-java-and-realmany.rst +++ b/source/includes/note-java-and-realmany.rst @@ -1,5 +1,4 @@ -.. note:: New apps cannot use ``RealmAny`` +.. note:: New Java SDK apps cannot use ``RealmAny`` New :atlas:`App Services Apps ` - will not be able to synchronize data models with properties of type - ``RealmAny``. + will not be able to synchronize data models with properties of type ``RealmAny``. diff --git a/temp/dotnet/compatibility.txt b/temp/dotnet/compatibility.txt index 73ba28538a..b02dc26fdc 100644 --- a/temp/dotnet/compatibility.txt +++ b/temp/dotnet/compatibility.txt @@ -11,11 +11,18 @@ Platform and Framework Compatibility - .NET SDK :depth: 2 :class: singlecol -Compatibility -------------- +.. meta:: + :description: Compatibility information when developing with Atlas Device SDK for .NET. + +.. facet:: + :name: genre + :values: reference + +Target Platforms +---------------- The following table shows which .NET -version(s) you can use with Realm on your target platforms: +versions you can use with the SDK on your target platforms: .. list-table:: :header-rows: 1 @@ -32,7 +39,7 @@ version(s) you can use with Realm on your target platforms: * - Windows 8.1 or later - | .NET Core 2.0 or later (.NET 5.0 Framework or later) | .NET Framework 4.6.1 or later - | MAUI requires Windows 11 and Windows 10 version 1809 or higher, using + | MAUI requires Windows 11 and Windows 10 version 1809 or higher, using Windows UI Library (WinUI) 3. * - Universal Windows Platform (UWP) @@ -40,72 +47,100 @@ version(s) you can use with Realm on your target platforms: * - macOS - | .NET Core 2.0 or later (.NET 5.0 Framework or later) - | Xamarin.Mac for macOS 10.11 or later. + | Xamarin.Mac for macOS 10.11 or later. | MAUI requires macOS 10.15 or later, using Mac Catalyst. * - iOS - - | Xamarin.iOS for iOS 9 or later. + - | Xamarin.iOS for iOS 9 or later. | MAUI requires iOS 11 or later. * - Android - - | Xamarin.Android for Android 4.1 (API level 16) or later. + - | Xamarin.Android for Android 4.1 (API level 16) or later. | MAUI requires Android 5.0 (API level 21) or later. - + * - tvOS - - | Xamarin and Unity for tvOS 9.0 or later. + - | Xamarin and Unity for tvOS 9.0 or later. | For more information on developing for tvOS, see :ref:``. +.. note:: Compatibility with SDK Object Models + + The source generator models in .NET SDK v10.18.0 and later + require the following: + + - .NET Core 2.0 or later (.NET Framework 5.0 or later) + - C# 9.0 or later + + If you are targeting an older version of .NET Framework, your object models + must derive from the + :dotnet-sdk:`RealmObject `, + :dotnet-sdk:`EmbeddedObject `, or + :dotnet-sdk:`AsymmetricObject ` + base classes required by the old source generator. + + The following demonstrates how you can adjust your current object + models for compatibility with older .NET Frameworks: + + .. code-block:: csharp + + public partial class Person : IRealmObject // Current model + + public class Person : RealmObject // Adjusted to inherit from RealmObject + + For more information, refer to :ref:`dotnet-define-a-realm-object-schema`. + Development Environments ------------------------ -You can use the following development environments to build Realm apps with +You can use the following development environments to build apps with the .NET SDK: - Visual Studio 2015 Update 2 or higher for Windows - Visual Studio for Mac 7.0 or higher -- Unity `2020.3.12f1 (LTS) `__ +- Unity `2020.3.12f1 (LTS) `__ .. note:: - The :doc:`Realm .NET SDK ` may be compatible with - other versions of Unity, but ``2020.3.12f1 (LTS)`` is the version that the - Realm team uses for testing and development. We recommend using - this version to ensure your project works with Realm and that + The :doc:`.NET SDK ` may be compatible with + other versions of Unity, but ``2020.3.12f1 (LTS)`` is the version the + SDK team uses for testing and development. We recommend using + this version to ensure your project works with the .NET SDK and that the install steps match the :doc:`Integrate Realm with Unity ` documentation steps because Unity's UI - often changes between versions. + often changes between versions. Android Deployment ------------------ -Due to some instruction set limitations, Realm does not support -deploying Android apps to the ``armeabi`` ABI. Because default templates often -have different ABI settings for Debug and Release modes, your app may throw -a ``System.TypeInitializationException`` exception in Release mode but not when + +Due to some instruction set limitations, the SDK does not support +deploying Android apps to the ``armeabi`` ABI. Because default templates often +have different ABI settings for Debug and Release modes, your app may throw +a ``System.TypeInitializationException`` exception in Release mode but not when it was running in Debug mode. -To avoid this, verify the ABI settings for both Debug and Release modes. To check -and change the settings, follow the steps in the -`Visual Studio CPU Architectures `_ +To avoid this, verify the ABI settings for both Debug and Release modes. To check +and change the settings, follow the steps in the +`Visual Studio CPU Architectures `_ page. -Unless you have a good reason to avoid linking other ABIs, we recommend +Unless you have a good reason to avoid linking other ABIs, we recommend checking all of the settings other than ``armeabi``. -Limitations +Limitations ------------ -Realm has limits imposed to balance flexibility with performance. The SDK -throws an exception during app initialization if the following limits are + +The SDK has limits imposed to balance flexibility with performance. The SDK +throws an exception during app initialization if the following limits are exceeded: -- Class names can't exceed 57 bytes in length. -- Property names can't exceed 63 bytes in length. +- Class names can't exceed 57 bytes in length. +- Property names can't exceed 63 bytes in length. -In addition, for iOS apps, the total size of all open Realm files cannot be -larger than the amount of memory your application is allowed to map in iOS. This -varies per device, and depends on how fragmented the memory space on the device is. -If you need to store more data than is allowed, you can split your data into -multiple Realm files, open a realm only when needed, and close it when it is +In addition, for iOS apps, the total size of all open Realm files cannot be +larger than the amount of memory your application is allowed to map in iOS. This +varies per device, and depends on how fragmented the memory space on the device is. +If you need to store more data than is allowed, you can split your data into +multiple Realm files, open a realm only when needed, and close it when it is no longer needed. For more information, see `Open Radar 17119975 `_. From 96b31f08951248411df8b179cc90c188b7a16f97 Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 11 Jun 2024 10:33:40 -0400 Subject: [PATCH 33/63] (DOCSP-40014): Update Swift 'static' framework install instructions (#3291) ## Pull Request Info Jira ticket: https://jira.mongodb.org/browse/DOCSP-40014 *Staged Page* - [Install - Swift SDK](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-40014/sdk/swift/install/): Remove outdated information. Rename "Static Framework" install instructions to "Dynamic Framework." ## Release Notes - Swift SDK - Install: Remove outdated information. Rename "Static Framework" install instructions to "Dynamic Framework." --- temp/swift/install.txt | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/temp/swift/install.txt b/temp/swift/install.txt index acae84e2e9..b8bebef44e 100644 --- a/temp/swift/install.txt +++ b/temp/swift/install.txt @@ -253,11 +253,8 @@ Swift SDK to your project. :alt: Drag the xcframework files into the Xcode project. :lightbox: - .. tab:: Static Framework - :tabid: static-framework - - Installing the the Swift SDK as a static framework is only available - for iOS targets. + .. tab:: Dynamic Framework + :tabid: dynamic-framework .. procedure:: @@ -267,23 +264,12 @@ Swift SDK to your project. Download the `latest release of the Swift SDK `__ and extract the zip. - .. step:: Copy Framework(s) Into Your Project - Drag ``Realm.xcframework`` and ``RealmSwift.xcframework`` (if using) to the File Navigator of your Xcode project. Select the :guilabel:`Copy items if needed` checkbox and press :guilabel:`Finish`. - - .. step:: Link Binaries - - - Select your project in the Xcode File Navigator. Select your app's - target and go to the :guilabel:`Build Phases` tab. Under - :guilabel:`Link Binary with Libraries`, click :guilabel:`+` and add - ``libc++.tbd``, ``libz.tbd``, and ``libcompression.tbd``. - .. tip:: If using the Objective-C API within a Swift project, we From 6ca5b908219a258ee9a071e699db99a99c419819 Mon Sep 17 00:00:00 2001 From: cbullinger <115956901+cbullinger@users.noreply.github.com> Date: Mon, 17 Jun 2024 09:50:28 -0400 Subject: [PATCH 34/63] DOCSP-39924: Update eligible SDKs with collections in mixed info (#3293) ## Pull Request Info Jira ticket: https://jira.mongodb.org/browse/DOCSP-39924 For each of the following SDK pages: - Define data model: add `Model Unstructured Data` section to define data model page - Mixed data property: update with support for holding lists & dicts, and add `Collections as Mixed` subsection **Kotlin (v2.0.0):** - [Define an Object Model - Kotlin SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/kotlin/realm-database/schemas/define-realm-object-model/#model-unstructured-data) & [Supported Data Types - Kotlin SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/kotlin/realm-database/schemas/supported-types/#realmany--mixed-) **.NET (v12.22.0):** - [Define an Object Model - .NET SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/dotnet/model-data/define-object-model/#model-unstructured-data) & [RealmValue - .NET SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/dotnet/model-data/data-types/realm-value/) **Node.js (v12.9.0):** - [Define an Object Model - Node.js SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/node/model-data/define-object-model/#model-unstructured-data) & [Mixed - Node.js SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/node/model-data/data-types/mixed/#nested-collections-of-mixed) **React Native (v12.9.0):** - [Define an Object Model - React Native SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/react-native/model-data/define-object-model/#model-unstructured-data) & [Mixed - React Native SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/react-native/model-data/data-types/mixed/#nested-collections-of-mixed) **Swift (v10.15.0):** - [Define an Object Model - Swift SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/swift/model-data/object-models/#model-unstructured-data) & [Supported Types - Swift SDK](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-39924-unstructured-data/sdk/react-native/model-data/data-types/mixed/) ## Release Notes **Kotlin SDK** - Realm > Model Data > Define an Object Model: Add new "Define Unstructured Data" section outlining support for *Collections as Mixed* feature. - Realm > Model Data > Supported Data Types: Update ``RealmAny`` section to indicate support for holding lists and dictionaries, and add new "Mixed Collections" section. **.NET SDK** - Model Data > Define an Object Model: Add new "Model Unstructured Data" section outlining support for *Collections as Mixed* feature. - Model Data > Supported Data Types > RealmValue: Update page to indicate support for holding lists and dictionaries, and add new "Mixed Collections" section. **Node.js SDK** - Model Data > Define an Object Model: Add new "Model Unstructured Data" section outlining support for *Collections as Mixed* feature. - Model Data > Supported Data Types > Mixed: Update page to indicate support for holding lists and dictionaries, and add new "Mixed Collections" section. **React Native SDK** - Model Data > Define an Object Model: Add new "Define Unstructured Data" section outlining support for *Collections as Mixed* feature. - Model Data > Supported Data Types > Mixed: Update page to indicate support for holding lists and dictionaries, and add new "Mixed Collections" section. **Swift SDK** - Model Data > Define an Object Model: Add new "Model Unstructured Data" section outlining support for *Collections as Mixed* feature. - Model Data > Supported Types: Update ``AnyRealmValue`` section to indicate support for holding lists and dictionaries, and add new "Mixed Collections" section. --- .../model-data/data-types/realm-value.txt | 42 ++- .../dotnet/model-data/define-object-model.txt | 173 +++++---- .../realm-database/model-data/data-types.txt | 110 +++--- .../model-data/define-realm-object-schema.txt | 92 ++--- .../schemas/define-realm-object-model.txt | 202 +++++++---- .../schemas/supported-types.txt | 340 ++++++++++-------- temp/node/model-data.txt | 12 +- temp/node/model-data/data-types/mixed.txt | 43 ++- .../define-a-realm-object-model.txt | 128 ++++--- temp/react-native/model-data.txt | 6 +- .../model-data/data-types/mixed.txt | 53 ++- .../define-a-realm-object-model.txt | 92 +++-- temp/swift/model-data.txt | 114 +++--- temp/swift/model-data/object-models.txt | 176 +++++---- temp/swift/model-data/supported-types.txt | 282 ++++++++------- 15 files changed, 1106 insertions(+), 759 deletions(-) diff --git a/temp/dotnet/model-data/data-types/realm-value.txt b/temp/dotnet/model-data/data-types/realm-value.txt index 12a076a944..8d643445e0 100644 --- a/temp/dotnet/model-data/data-types/realm-value.txt +++ b/temp/dotnet/model-data/data-types/realm-value.txt @@ -10,29 +10,49 @@ RealmValue - .NET SDK :depth: 2 :class: singlecol -.. versionadded:: 10.2.0 +.. versionchanged:: 12.2.0 -Overview --------- + ``RealmValue`` can hold lists and dictionaries of mixed data. -The ``RealmValue`` data type is a mixed data type, and can represent any -other valid Realm data type except a collection. You can create collections -(lists, sets, and dictionaries) of type ``RealmValue``, but a ``RealmValue`` -itself cannot be a collection: +The ``RealmValue`` data type is a mixed data type, and can represent any +other valid Realm data type except an embedded object or a set. You can create collections +(lists, sets, and dictionaries) of type ``RealmValue``: .. literalinclude:: /examples/generated/dotnet/DataTypesSectionExamples.snippet.realmValues.cs :language: csharp -.. note:: +.. note:: You cannot create a nullable ``RealmValue``. However, if you want a - ``RealmValue`` property to contain a null value, you can + ``RealmValue`` property to contain a null value, you can use the special ``RealmValue.Null`` property. -The following code demonstrates creating a ``RealmValue`` property in a class -that inherits from ``IRealmObject`` and then setting and getting the value of +Create a RealmValue Property +---------------------------- + +The following code demonstrates creating a ``RealmValue`` property in a class +that inherits from ``IRealmObject`` and then setting and getting the value of that property: .. literalinclude:: /examples/generated/dotnet/DataTypesSectionExamples.snippet.realmvalue.cs :language: csharp +.. _dotnet-nested-collections-realm-value: + +Collections as Mixed +-------------------- + +In version 12.22.0 and later, a ``RealmValue`` data type can hold collections +(a list or dictionary, but *not* a set) of ``RealmValue`` elements. You can use +mixed collections to model unstructured or variable data. For more information, +refer to :ref:``. + +- You can nest mixed collections up to 100 levels. +- You can query mixed collection properties and + :ref:`register a listener for changes `, + as you would a normal collection. +- You can find and update individual mixed collection elements +- You *cannot* store sets or embedded objects in mixed collections. + +To use mixed collections, define the ``RealmValue`` type property in your data model. +Then, set the property as a list or dictionary. diff --git a/temp/dotnet/model-data/define-object-model.txt b/temp/dotnet/model-data/define-object-model.txt index 85639f13bf..f1ea0eb1f8 100644 --- a/temp/dotnet/model-data/define-object-model.txt +++ b/temp/dotnet/model-data/define-object-model.txt @@ -24,19 +24,19 @@ Realm classes are regular C# classes that define the Realm schema. Object Schema ~~~~~~~~~~~~~ -An **object schema** is a configuration object that defines the properties and -relationships of a Realm object. Realm client -applications define object schemas with the native class implementation in their +An **object schema** is a configuration object that defines the properties and +relationships of a Realm object. Realm client +applications define object schemas with the native class implementation in their respective language using the Object Schema. Object schemas specify constraints on object properties such as the data -type of each property and whether or not a property is required. Schemas can -also define :ref:`relationships ` between object +type of each property and whether or not a property is required. Schemas can +also define :ref:`relationships ` between object types in a realm. Every App has a :ref:`App Services Schema ` composed of a list of object schemas for each type of object that the -realms in that application may contain. Realm guarantees that all +realms in that application may contain. Realm guarantees that all objects in a realm conform to the schema for their object type and validates objects whenever they're created, modified, or deleted. @@ -46,8 +46,8 @@ created, modified, or deleted. Property Annotations -------------------- -Schema properties are standard C# properties on a ``RealmObject``. There are -several property annotations that you can use to more finely define how a Realm +Schema properties are standard C# properties on a ``RealmObject``. There are +several property annotations that you can use to more finely define how a Realm handles a specific property. .. _dotnet-primary-key-example: @@ -68,20 +68,20 @@ create a primary key with any of the following types (or their nullable counterp - ``int`` - ``long`` -You may define a primary key on a **single property** for an +You may define a primary key on a **single property** for an object type as part of the :ref:`object schema `. Realm automatically indexes primary key properties, which allows you to efficiently read and modify objects based on their primary -key. +key. If an object type has a primary key, then all objects of that type must include the primary key property with a value that is unique among objects of the same type in a realm. .. note:: - + Once you assign a property as a primary key, you cannot change it. - + The following example demonstrates how to designate a primary key in an object schema: .. literalinclude:: /examples/generated/dotnet/Objects.snippet.primary-key.cs @@ -98,9 +98,9 @@ The following example demonstrates how to designate a primary key in an object s Indexes ~~~~~~~ -**Indexes** significantly improve query times in a Realm. Without -indexes, Realm scans every document in a collection to select the documents -that match the given query. However, if an applicable index exists for a query, +**Indexes** significantly improve query times in a Realm. Without +indexes, Realm scans every document in a collection to select the documents +that match the given query. However, if an applicable index exists for a query, Realm uses the index to limit the number of documents that it must inspect. You can index properties with the following types: @@ -124,38 +124,38 @@ You can index properties with the following types: by your realm file. Each index entry is a minimum of 12 bytes. To index a property, use the :dotnet-sdk:`Indexed ` -attribute. With the ``Indexed`` attribute, you can specify the type of index -on the property by using the :dotnet-sdk:`IndexType ` -enum. In the following example, we have a default ("General") index on the ``Name`` +attribute. With the ``Indexed`` attribute, you can specify the type of index +on the property by using the :dotnet-sdk:`IndexType ` +enum. In the following example, we have a default ("General") index on the ``Name`` property: .. literalinclude:: /examples/generated/dotnet/Objects.snippet.index.cs :language: csharp :emphasize-lines: 3-4 -.. note:: +.. note:: - When you create an index, you are creating it on the local realm and not - on an Atlas collection. If you need to query an Atlas collection directly - and want to improve performance, refer to + When you create an index, you are creating it on the local realm and not + on an Atlas collection. If you need to query an Atlas collection directly + and want to improve performance, refer to `Create, View, Drop, and Hide Indexes `__. - + .. _dotnet-fts-indexes: Full-Text Search Indexes ~~~~~~~~~~~~~~~~~~~~~~~~ -In addition to standard indexes, Realm also supports Full-Text Search (FTS) indexes -on ``string`` properties. While you can query a string field with or without a -standard index, an FTS index enables searching for multiple words and phrases and -excluding others. +In addition to standard indexes, Realm also supports Full-Text Search (FTS) indexes +on ``string`` properties. While you can query a string field with or without a +standard index, an FTS index enables searching for multiple words and phrases and +excluding others. -For more information on querying full-text indexes, see :ref:`Full Text Search +For more information on querying full-text indexes, see :ref:`Full Text Search (LINQ) ` and :ref:`Full Text Search (RQL) `. To index an FTS property, use the :dotnet-sdk:`Indexed ` -attribute with the :dotnet-sdk:`IndexType.FullText ` -enum. In the following example, we have a ``FullText`` index on the +attribute with the :dotnet-sdk:`IndexType.FullText ` +enum. In the following example, we have a ``FullText`` index on the ``Biography`` property: .. literalinclude:: /examples/generated/dotnet/Objects.snippet.index.cs @@ -167,11 +167,11 @@ enum. In the following example, we have a ``FullText`` index on the Default Field Values ~~~~~~~~~~~~~~~~~~~~ -You can use the built-in language features to assign a default value to a property. -In C#, you can assign a default value on primitives in the property declaration. -You cannot set a default value on a collection, except to set it to ``null!``. -Even if you set a collection to ``null!``, collections are always initialized on -first access, so will never be null. +You can use the built-in language features to assign a default value to a property. +In C#, you can assign a default value on primitives in the property declaration. +You cannot set a default value on a collection, except to set it to ``null!``. +Even if you set a collection to ``null!``, collections are always initialized on +first access, so will never be null. .. literalinclude:: /examples/generated/dotnet/Objects.snippet.default.cs :language: csharp @@ -190,7 +190,7 @@ Ignore a Property ~~~~~~~~~~~~~~~~~ If you don't want to save a property in your model to a realm, you can -ignore that property. A property is ignored by default if it is not autoimplemented or +ignore that property. A property is ignored by default if it is not autoimplemented or does not have a setter. Ignore a property from a Realm object model with the @@ -249,16 +249,58 @@ attribute to rename a class: Custom Setters ~~~~~~~~~~~~~~ -Realm will not store a property with a custom setter. To use a custom setter, -store the property value in a private property and then -map that value to a public property with the custom setter. Realm will store the +Realm will not store a property with a custom setter. To use a custom setter, +store the property value in a private property and then +map that value to a public property with the custom setter. Realm will store the private property, while you modify its value via the public property. -In the following code, the private ``email`` property is stored in the realm, +In the following code, the private ``email`` property is stored in the realm, but the public ``Email`` property, which provides validation, is not persisted: .. literalinclude:: /examples/generated/dotnet/Objects.snippet.custom-setter.cs :language: csharp +.. _dotnet-model-unstructured-data: + +Define Unstructured Data +----------------------- + +.. versionadded:: 12.22.0 + +Starting in SDK version 12.22.0, you can store :ref:`collections of mixed data ` +within a ``RealmValue`` property. You can use this feature to model complex data +structures, such as JSON or MongoDB documents, without having to define a +strict data model. + +**Unstructured data** is data that doesn't easily conform to an expected +schema, making it difficult or impractical to model to individual +data classes. For example, your app might have highly variable data or dynamic +data whose structure is unknown at runtime. + +Storing collections in a mixed property offers flexibility without sacrificing +functionality, including performant synchronization when using Device Sync. And +you can work with them the same way you would a non-mixed +collection: + +- You can nest mixed collections up to 100 levels. +- You can query on and :ref:`react to changes + ` on mixed collections. +- You can find and update individual mixed collection elements. + +However, storing data in mixed collections is less performant than using a structured +schema or serializing JSON blobs into a single string property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`RealmValue ` types. You can then +set these ``RealmValue`` properties as a :ref:`list ` or a +:ref:`dictionary ` of ``RealmValue`` elements. +Note that ``RealmValue`` *cannot* represent a set or an embedded +object. + +.. tip:: + + - Use a map of mixed data types when the type is unknown but each value will have a unique identifier. + - Use a list of mixed data types when the type is unknown but the order of objects is meaningful. + .. _dotnet-omit-classes-from-schema: .. _dotnet-provide-subset-classes-schema: @@ -266,7 +308,7 @@ Omit Classes from your Realm Schema ----------------------------------- By default, your application's Realm Schema includes all -classes that implement ``IRealmObject`` or ``IEmbeddedObject``. +classes that implement ``IRealmObject`` or ``IEmbeddedObject``. If you only want to include a subset of these classes in your Realm Schema, you can update your configuration to include the specific classes you want: @@ -281,41 +323,41 @@ Schema, you can update your configuration to include the specific classes you wa Required and Optional Properties -------------------------------- -In C#, value types, such as ``int`` and ``bool``, are implicitly non-nullable. -However, they can be made optional by using the question mark (``?``) `notation +In C#, value types, such as ``int`` and ``bool``, are implicitly non-nullable. +However, they can be made optional by using the question mark (``?``) `notation `__. -Beginning with C# 8.0, nullable reference types were introduced. If your project -is using C# 8.0 or later, you can also declare reference types, such as ``string`` -and ``byte[]``, as nullable with ``?``. +Beginning with C# 8.0, nullable reference types were introduced. If your project +is using C# 8.0 or later, you can also declare reference types, such as ``string`` +and ``byte[]``, as nullable with ``?``. -.. note:: +.. note:: - Beginning with .NET 6.0, the nullable context is enabled by default for new - projects. For older projects, you can manually enable it. For more information, + Beginning with .NET 6.0, the nullable context is enabled by default for new + projects. For older projects, you can manually enable it. For more information, refer to ``__. -The Realm .NET SDK fully supports the nullable-aware context and uses nullability -to determine whether a property is required or optional. The SDK has the +The Realm .NET SDK fully supports the nullable-aware context and uses nullability +to determine whether a property is required or optional. The SDK has the following rules: - Realm assumes that both value- and reference-type properties are required if - you do not designate them as nullable. If you designate them as nullable + you do not designate them as nullable. If you designate them as nullable by using ``?``, Realm considers them optional. - You must declare properties that are Realm object types as nullable. -- You cannot declare collections (list, sets, backlinks, and dictionaries) as +- You cannot declare collections (list, sets, backlinks, and dictionaries) as nullable, but their parameters may be nullable according to the following rules: - - For all types of collections, if the parameters are primitives + - For all types of collections, if the parameters are primitives (value- or reference-types), they can be required or nullable. - - - For lists, sets, and backlinks, if the parameters are Realm objects, they + + - For lists, sets, and backlinks, if the parameters are Realm objects, they **cannot** be nullable. - - For dictionaries with a value type of Realm object, you **must** declare - the value type parameter as nullable. + - For dictionaries with a value type of Realm object, you **must** declare + the value type parameter as nullable. The following code snippet demonstrates these rules: @@ -324,17 +366,18 @@ The following code snippet demonstrates these rules: .. note:: - If you are using the older schema type definition (your classes derive from - the ``RealmObject`` base class), or you do not have nullability enabled, you - will need to use the - :dotnet-sdk:`[Required] ` attribute + If you are using the older schema type definition (your classes derive from + the ``RealmObject`` base class), or you do not have nullability enabled, you + will need to use the + :dotnet-sdk:`[Required] ` attribute for any required ``string`` and ``byte[]`` property. Ignoring Nullability ~~~~~~~~~~~~~~~~~~~~ -You may prefer to have more flexibility in defining the nullability of properties -in your Realm objects. You can do so by setting ``realm.ignore_objects_nullability = true`` +You may prefer to have more flexibility in defining the nullability of properties +in your Realm objects. You can do so by setting ``realm.ignore_objects_nullability = true`` in a `global configuration file `__. If you enable ``realm.ignore_objects_nullability``, nullability annotations -will be ignored on Realm object properties, including collections of Realm objects. \ No newline at end of file +will be ignored on Realm object properties, including collections of Realm +objects. diff --git a/temp/flutter/realm-database/model-data/data-types.txt b/temp/flutter/realm-database/model-data/data-types.txt index 555110a0fd..45540860f9 100644 --- a/temp/flutter/realm-database/model-data/data-types.txt +++ b/temp/flutter/realm-database/model-data/data-types.txt @@ -4,7 +4,7 @@ Data Types - Flutter SDK ======================== -.. meta:: +.. meta:: :keywords: code example :description: Learn about the data types Atlas Device SDK for Flutter supports and how to use them. @@ -39,16 +39,16 @@ Realm supports the following Dart types: DateTime ~~~~~~~~ -When you use ``DateTime`` with the Realm Flutter SDK, you can declare +When you use ``DateTime`` with the Realm Flutter SDK, you can declare it in the model as you would any other Dart type: .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.datetime-model.dart :language: dart However, it is important to note that Realm stores ``DateTime`` in UTC. -When you use ``DateTime``, you must create it in UTC or convert it -with ``.toUtc()`` before you store it. If your application requires it, -you can convert it back to local or the desired time zone when reading +When you use ``DateTime``, you must create it in UTC or convert it +with ``.toUtc()`` before you store it. If your application requires it, +you can convert it back to local or the desired time zone when reading from Realm. .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.datetime-use.dart @@ -124,7 +124,7 @@ Work with a RealmList ````````````````````` .. versionchanged:: 2.0.0 - Get ``RealmList`` by property name with :flutter-sdk:`dynamic.getList() ` + Get ``RealmList`` by property name with :flutter-sdk:`dynamic.getList() ` The following example demonstrates some basic usage of ``RealmList``. For more information about all available methods, refer to the @@ -173,7 +173,7 @@ Work with a RealmSet ```````````````````` .. versionchanged:: 2.0.0 - Get ``RealmSet`` by property name with :flutter-sdk:`dynamic.getSet() ` + Get ``RealmSet`` by property name with :flutter-sdk:`dynamic.getSet() ` The following example demonstrates some basic usage of ``RealmSet``. For more information about all available methods, refer to the @@ -202,7 +202,7 @@ Add a RealmMap to a Schema `````````````````````````` You can add a ``RealmMap`` to your Realm Object schema by defining a property as -type ``RealmMap`` where ``T`` can be any :ref:`supported Realm data type +type ``RealmMap`` where ``T`` can be any :ref:`supported Realm data type ` (except other collections), in your Realm Object model. .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.map-model.dart @@ -212,7 +212,7 @@ Work with a RealmMap ```````````````````` .. versionchanged:: 2.0.0 - Get ``RealmMap`` by property name with :flutter-sdk:`dynamic.getMap() ` + Get ``RealmMap`` by property name with :flutter-sdk:`dynamic.getMap() ` The following example demonstrates some basic usage of ``RealmMap``. For more information about all available methods, refer to the @@ -339,8 +339,8 @@ such as ``Uuid.v4()``. Decimal128 ~~~~~~~~~~ -Dart doesn't have a native decimal type. You can use -`Decimal128 `__, +Dart doesn't have a native decimal type. You can use +`Decimal128 `__, which is a 128-bit implementation of :wikipedia:`IEEE-754 `. When defining a decimal type, use the ``Decimal128`` BSON type. @@ -362,31 +362,31 @@ RealmValue .. important:: Flutter SDK v2.0.0 Changes to ``RealmValue`` - Flutter SDK version 2.0.0 updates ``RealmValue`` to allow a ``List`` - or ``Map`` type of ``RealmValue``, which enables more flexibility - when modeling unstructured data. Refer to :ref:`flutter-model-unstructured-data` + Flutter SDK version 2.0.0 updates ``RealmValue`` to allow a ``List`` + or ``Map`` type of ``RealmValue``, which enables more flexibility + when modeling unstructured data. Refer to :ref:`flutter-model-unstructured-data` for more information. - - This update also includes the following breaking changes, which may affect - your app when upgrading to v2.0.0 or later: - + + This update also includes the following breaking changes, which may affect + your app when upgrading to v2.0.0 or later: + - ``RealmValue.type`` is now an enum of ``RealmValueType`` instead of ``Type``. - - ``RealmValue.uint8List`` is renamed to ``RealmValue.binary``. + - ``RealmValue.uint8List`` is renamed to ``RealmValue.binary``. - For more information on how to upgrade an existing app from an earlier - version to v2.0.0 or later, refer to :ref:`flutter-upgrade-v2`. + For more information on how to upgrade an existing app from an earlier + version to v2.0.0 or later, refer to :ref:`flutter-upgrade-v2`. The `RealmValue `__ -data type is a mixed data type that can represent any other valid -data type except embedded objects. In Flutter SDK v2.0.0 and later, ``RealmValue`` -can represent a ``List`` or ``Map``. +data type is a mixed data type that can represent any other valid +data type except embedded objects. In Flutter SDK v2.0.0 and later, ``RealmValue`` +can represent a ``List`` or ``Map``. Define a RealmValue Property ```````````````````````````` -To define a ``RealmValue`` property, set its type in your object model. -``RealmValue`` is indexable, but cannot be a primary key. You can also define -properties as collections (lists, sets, or maps) of type ``RealmValue``. +To define a ``RealmValue`` property, set its type in your object model. +``RealmValue`` is indexable, but cannot be a primary key. You can also define +properties as collections (lists, sets, or maps) of type ``RealmValue``. .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.realm-value-model.dart :language: dart @@ -397,7 +397,7 @@ properties as collections (lists, sets, or maps) of type ``RealmValue``. However, if you want a ``RealmValue`` property to contain a null value, you can use the special ``RealmValue.nullValue()`` property. -Create a RealmValue +Create a RealmValue ``````````````````` To add a ``RealmValue`` to a Realm object, call ``RealmValue.from()`` on the data or ``RealmValue.nullValue()`` to set a null value. @@ -407,7 +407,7 @@ To add a ``RealmValue`` to a Realm object, call ``RealmValue.from()`` on the dat .. _flutter-access-realm-value-type: -Access RealmValue Data Type +Access RealmValue Data Type ``````````````````````````` .. versionchanged:: 2.0.0 @@ -415,21 +415,21 @@ Access RealmValue Data Type ``RealmValueType`` enum replaces ``RealmValue.type``. ``RealmValue.binary`` replaces ``RealmValue.uint8List``. -To access the data stored in a ``RealmValue``, you can use: +To access the data stored in a ``RealmValue``, you can use: -- ``RealmValue.value``, which returns an ``Object?``. +- ``RealmValue.value``, which returns an ``Object?``. - ``RealmValue.as``, which fetches the data and casts it to a desired type. .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.realm-value-value.dart :language: dart :emphasize-lines: 4, 13 -You can check the type of data currently stored in a ``RealmValue`` property by -accessing the ``type`` property. Starting with Flutter SDK v2.0.0, this returns a -``RealmValueType`` enum. In earlier SDK versions, the SDK returned a -``RealmValue.value.runtimeType``. +You can check the type of data currently stored in a ``RealmValue`` property by +accessing the ``type`` property. Starting with Flutter SDK v2.0.0, this returns a +``RealmValueType`` enum. In earlier SDK versions, the SDK returned a +``RealmValue.value.runtimeType``. -The following example uses ``RealmValueType`` to run calculations based on the +The following example uses ``RealmValueType`` to run calculations based on the data type. .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.realm-value-type.dart @@ -438,25 +438,27 @@ data type. .. _flutter-nested-collections-realm-value: -Nested Collections of RealmValue -```````````````````````````````` +Collections as Mixed +```````````````````` -.. versionadded:: v2.0.0 +.. versionchanged:: 2.0.0 -Starting with Flutter SDK v2.0.0, a ``RealmValue`` data type can -contain collections (a list or map, but *not* a set) of ``RealmValue`` elements. + ``RealmValue`` properties can contain lists or maps of mixed data. -These collections of mixed data can be nested and can contain other -collections. They can also be :ref:`listened to for changes like a -normal collection `. +In version 2.0.0 and later, a mixed data type can hold collections (a list or +map, but *not* a set) of mixed elements. You can use mixed collections to +model unstructured or variable data. For more information, refer to +:ref:``. -You can leverage these nested collections to define unstructured -or variable data in your data model. For more information, refer to -:ref:``. +- You can nest mixed collections up to 100 levels. +- You can query mixed collection properties and + :ref:`register a listener for changes `, + as you would a normal collection. +- You can find and update individual mixed collection elements +- You *cannot* store sets or embedded objects in mixed collections. -To create nested collections of mixed data in your app, define the mixed type -property in your data model the same way you would any other ``RealmValue`` type. -Then, you can create the list or map collections using ``RealmValue.from()``. +To use mixed collections, define the mixed type property in your data model. +Then, create the list or map collections using ``RealmValue.from()``. .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.realm-value-nested-collections.dart :language: dart @@ -465,12 +467,12 @@ Uint8List ~~~~~~~~~ `Uint8List `__ -is a binary data type from `dart:typed_data -`__. +is a binary data type from `dart:typed_data +`__. You can use this data type in object models and property values. To define a property as ``Uint8List``, you must first import ``dart:typed_data``. -Then, set the object's type as ``Uint8List`` in your :ref:`object model +Then, set the object's type as ``Uint8List`` in your :ref:`object model `. .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.binary-model.dart @@ -511,7 +513,7 @@ The ``_Address`` model is embedded within the ``_Person`` model. :language: dart You can use the :flutter-sdk:`parent ` -property to access the parent of the embedded object. +property to access the parent of the embedded object. The following example shows the unique considerations when working with embedded objects. The example uses the ``Address`` embedded object generated from the ``_Address`` diff --git a/temp/flutter/realm-database/model-data/define-realm-object-schema.txt b/temp/flutter/realm-database/model-data/define-realm-object-schema.txt index 05af385eb2..44c38e1b85 100644 --- a/temp/flutter/realm-database/model-data/define-realm-object-schema.txt +++ b/temp/flutter/realm-database/model-data/define-realm-object-schema.txt @@ -4,7 +4,7 @@ Define a Realm Object Schema - Flutter SDK ========================================== -.. meta:: +.. meta:: :keywords: code example, android, ios, data modeling :description: Define the properties and relationships of database objects within your data model. @@ -62,8 +62,8 @@ Create Model .. step:: Create Generated File Part Directive .. versionchanged:: v2.0.0 - Generated files are named ``.realm.dart`` instead of ``.g.dart`` - + Generated files are named ``.realm.dart`` instead of ``.g.dart`` + Add a part directive to include the ``RealmObject`` file that you generate in step 4 in the same package as the file you're currently working on. @@ -96,13 +96,13 @@ Create Model .. literalinclude:: /examples/generated/flutter/schemas.snippet.create-realm-model.dart :language: dart :caption: schemas.dart - + .. include:: /includes/note-class-char-limit.rst .. step:: Generate RealmObject .. versionchanged:: v2.0.0 - Generated files are named ``.realm.dart`` instead of ``.g.dart`` + Generated files are named ``.realm.dart`` instead of ``.g.dart`` Generate the ``RealmObject``, which you'll use in your application: @@ -211,19 +211,19 @@ Map a Model or Class to a Different Name ---------------------------------------- You can use the `MapTo `__ -annotation to map a Realm object model or property to a different stored +annotation to map a Realm object model or property to a different stored name in Realm. This can be useful in the following scenarios. For example: -- To make it easier to work across platforms where naming conventions - differ. For example, if your Device Sync schema property names use snake +- To make it easier to work across platforms where naming conventions + differ. For example, if your Device Sync schema property names use snake case, while your project uses camel case. - To change a class or field name without forcing a migration. - To support multiple model classes with the same name in different packages. -- To use a class name that is longer than the 57-character limit enforced +- To use a class name that is longer than the 57-character limit enforced by Realm. -If you're using Atlas Device Sync, the name that you specify in the -``MapTo`` annotation is used as the persisted :ref:`App Services Schema +If you're using Atlas Device Sync, the name that you specify in the +``MapTo`` annotation is used as the persisted :ref:`App Services Schema ` name. .. tabs:: @@ -244,40 +244,48 @@ If you're using Atlas Device Sync, the name that you specify in the .. _flutter-model-unstructured-data: -Model Unstructured Data +Model Unstructured Data ----------------------- .. versionadded:: 2.0.0 -Starting in Flutter SDK version 2.0.0, you can -:ref:`define nested collections -of mixed data ` -within a ``RealmValue`` property. - -The ability to nest collections of mixed data enables you to define data -that doesn't otherwise conform to an expected schema, including data with -variable structure or data whose shape or type is not known at runtime. -For example, you might have highly variable user-created objects, event logs, -or survey response data that are collected and stored in a variety of JSON -formats. This approach allows you to :ref:`react to changes ` -in the nested data and to update specific elements, but it is less -performant than using a structured schema or serializing JSON blobs -into a single string property. - -To model unstructured data in your schema using collections of mixed type, -define the appropriate properties in your schema as -:ref:`RealmValue ` types. You can then set these -``RealmValue`` properties as a :ref:`RealmList ` or a -:ref:`RealmMap ` collection of ``RealmValue`` elements. +Starting in Flutter SDK version 2.0.0, you can store +:ref:`collections of mixed data ` +within a ``RealmValue`` property. You can use this feature to model complex +data structures, such as JSON or MongoDB documents, without having to define a +strict data model. + +**Unstructured data** is data that doesn't easily conform to an expected +schema, making it difficult or impractical to model to individual +data classes. For example, your app might have highly variable data or dynamic +data whose structure is unknown at runtime. + +Storing collections in a mixed property offers flexibility without sacrificing +functionality, including performant synchronization when using Device Sync. And +you can work with them the same way you would a non-mixed +collection: + +- You can nest mixed collections up to 100 levels. +- You can query on and :ref:`react to changes ` + on mixed collections. +- You can find and update individual mixed collection elements. + +However, storing data in mixed collections is less performant than using a structured +schema or serializing JSON blobs into a single string property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`RealmValue ` types. You can then set +these ``RealmValue`` properties as a :ref:`RealmList ` or a +:ref:`RealmMap ` collection of ``RealmValue`` elements. Note that ``RealmValue`` *cannot* represent a ``RealmSet`` or an embedded object. -For example, you might use a ``RealmValue`` that contains a map of mixed -data when modeling a variable event log object: +For example, you might use a ``RealmValue`` that contains a map of mixed +data when modeling a variable event log object: .. literalinclude:: /examples/generated/flutter/define_realm_model_test.snippet.unstructured-data-model.dart :language: dart :emphasize-lines: 10 - :caption: Data model + :caption: Data model .. io-code-block:: :copyable: true @@ -286,7 +294,7 @@ data when modeling a variable event log object: .. input:: /examples/generated/flutter/define_realm_model_test.snippet.create-unstructured-data-example.dart :language: dart - .. output:: + .. output:: :language: shell Event Type: purchase @@ -298,9 +306,9 @@ data when modeling a variable event log object: items: RealmValue([RealmValue({id: RealmValue(1), name: RealmValue(Laptop), price: RealmValue(1200.0)}), RealmValue({id: RealmValue(2), name: RealmValue(Mouse), price: RealmValue(49.99)})]) total: RealmValue(1249.99) -.. tip:: +.. tip:: - - Use a map of mixed data types when the type is unknown but each value will have a unique identifier. + - Use a map of mixed data types when the type is unknown but each value will have a unique identifier. - Use a list of mixed data types when the type is unknown but the order of objects is meaningful. .. _flutter-generate-realm-object: @@ -309,10 +317,10 @@ Generate the RealmObject ------------------------ .. versionchanged:: v2.0.0 - Generated files are named ``.realm.dart`` instead of ``.g.dart`` + Generated files are named ``.realm.dart`` instead of ``.g.dart`` Once you've completed your Realm model, you must generate the -:flutter-sdk:`RealmObject ` class to use +:flutter-sdk:`RealmObject ` class to use it in your application. Run the following command to generate ``RealmObjects``: @@ -410,7 +418,7 @@ Asymmetric objects require Flexible Sync. To define an asymmetric object, pass In Flutter SDK versions 1.5.0 and earlier, you cannot link from ``asymmetricObject`` types to ``RealmObjects``. In SDK versions 1.6.0 and -later, ``asymmetricObject`` types can link to ``RealmObjects`` in +later, ``asymmetricObject`` types can link to ``RealmObjects`` in addition to :ref:`embedded object types `. .. note:: Attempting to Read Asymmetric Objects @@ -419,5 +427,5 @@ addition to :ref:`embedded object types `. object, you will get the following error: "Error: You can't query an asymmetric class.". -To learn more about Data Ingest, refer to :ref:`Stream Data to Atlas +To learn more about Data Ingest, refer to :ref:`Stream Data to Atlas `. diff --git a/temp/kotlin/realm-database/schemas/define-realm-object-model.txt b/temp/kotlin/realm-database/schemas/define-realm-object-model.txt index cd2c35cc51..f37b0a4367 100644 --- a/temp/kotlin/realm-database/schemas/define-realm-object-model.txt +++ b/temp/kotlin/realm-database/schemas/define-realm-object-model.txt @@ -5,8 +5,9 @@ Define a Realm Object Model - Kotlin SDK ======================================== -.. meta:: +.. meta:: :keywords: code example, android, kmm, kmp, ios, data modeling + :description: Define your object data model using Atlas Device SDK for Kotlin. .. facet:: :name: genre @@ -18,18 +19,18 @@ Define a Realm Object Model - Kotlin SDK :depth: 2 :class: singlecol -This page describes Realm object types and how to define Realm objects as part of +This page describes Realm object types and how to define Realm objects as part of your application's data model. After you define your object model, you can -:ref:`open a realm ` with a schema that includes your -defined objects and work with them in the realm. +:ref:`open a realm ` with a schema that includes your +defined objects and work with them in the realm. -The Kotlin SDK memory maps Realm objects directly to native Kotlin -objects, so there's no need to use a special data access library. +The Kotlin SDK memory maps Realm objects directly to native Kotlin +objects, so there's no need to use a special data access library. You define your application's data model via regular Kotlin classes declared -in your application code object. +in your application code object. To learn about how to make changes to your Realm objects after -defining your Realm object model, refer to +defining your Realm object model, refer to :ref:`Change an Object Model `. .. note:: Define Data Model with Device Sync @@ -44,28 +45,28 @@ defining your Realm object model, refer to Realm Objects ------------- -**Realm objects** are uniquely named instances of Kotlin classes that you can work with -as you would any other class instance. +**Realm objects** are uniquely named instances of Kotlin classes that you can work with +as you would any other class instance. -Each object class represents an **object type**. Objects of the same type share -an **object schema**, which defines the properties and relationships for objects -of that type. The SDK guarantees that all objects in a realm conform to the -schema for their object type and validates objects whenever they are created, +Each object class represents an **object type**. Objects of the same type share +an **object schema**, which defines the properties and relationships for objects +of that type. The SDK guarantees that all objects in a realm conform to the +schema for their object type and validates objects whenever they are created, modified, or deleted. However, note that Realm objects have the following constraints: -- Realm objects *must* inherit from the ``RealmObject`` class or its - subclasses: ``EmbeddedRealmObject`` or ``AsymmetricRealmObject``. - The Kotlin SDK does *not* support inheritance from custom base classes. -- The Kotlin SDK requires that Realm objects have an empty constructor. +- Realm objects *must* inherit from the ``RealmObject`` class or its + subclasses: ``EmbeddedRealmObject`` or ``AsymmetricRealmObject``. + The Kotlin SDK does *not* support inheritance from custom base classes. +- The Kotlin SDK requires that Realm objects have an empty constructor. Refer to the :ref:`workaround example ` noted in the next section. -- Class names are limited to a maximum of 57 UTF-8 characters. +- Class names are limited to a maximum of 57 UTF-8 characters. Additionally, the Kotlin SDK does *not* support using Kotlin -`data classes `__ to model -data. This is because data classes are typically used for immutable data, +`data classes `__ to model +data. This is because data classes are typically used for immutable data, which goes against how the Realm Kotlin SDK models data. .. _kotlin-define-a-new-object-type: @@ -73,41 +74,41 @@ which goes against how the Realm Kotlin SDK models data. Define a New Object Type ------------------------ -To define a new object type, you must create a uniquely named Kotlin -class that implements either the ``RealmObject``, -``EmbeddedRealmObject``, or ``AsymmetricRealmObject`` interface. +To define a new object type, you must create a uniquely named Kotlin +class that implements either the ``RealmObject``, +``EmbeddedRealmObject``, or ``AsymmetricRealmObject`` interface. .. include:: /includes/note-class-char-limit.rst Then, you specify your object's properties, including: -- The :ref:`data type ` for each property. - The Kotlin SDK supports the following data types: +- The :ref:`data type ` for each property. + The Kotlin SDK supports the following data types: - `Kotlin primitive types `__ - a limited subset of `BSON `__ types - - :ref:`Realm-specific types `, - which you can use for unique identifiers, timestamps, counters, and + - :ref:`Realm-specific types `, + which you can use for unique identifiers, timestamps, counters, and collections -- Any :ref:`property annotations `, which add - functionality to properties in your Realm objects. You can use annotations to: +- Any :ref:`property annotations `, which add + functionality to properties in your Realm objects. You can use annotations to: - Designate a property as a primary key - Mark a property as indexable - - Ignore a property - - Map a property or class name to another name + - Ignore a property + - Map a property or class name to another name -- Any :ref:`relationships ` with other Realm objects. +- Any :ref:`relationships ` with other Realm objects. -After you've defined your Realm object model, you can pass the set of object -classes to the realm's configuration when you :ref:`open a realm +After you've defined your Realm object model, you can pass the set of object +classes to the realm's configuration when you :ref:`open a realm `, and then work with those objects in the realm. .. _kotlin-single-primary-constructor: .. important:: Realm Requires an Empty Constructor - + The Realm Kotlin SDK does *not* support having a single primary constructor. The SDK requires an empty constructor to create objects. As a workaround, you can do something similar to the following: @@ -124,16 +125,16 @@ classes to the realm's configuration when you :ref:`open a realm Define a Realm Object Type ~~~~~~~~~~~~~~~~~~~~~~~~~~ -To define a Realm object type, create a Kotlin class that implements the -`RealmObject -<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-object/index.html>`__ +To define a Realm object type, create a Kotlin class that implements the +`RealmObject +<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-object/index.html>`__ interface: .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-realm-object.kt :language: kotlin -You can then use the :ref:`object as a property ` -to :ref:`define relationships ` with other Realm objects. +You can then use the :ref:`object as a property ` +to :ref:`define relationships ` with other Realm objects. .. _kotlin-define-embedded-object: .. _kotlin-embedded-objects: @@ -141,45 +142,45 @@ to :ref:`define relationships ` with other Realm objects. Define an Embedded Object Type ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -An ``EmbeddedRealmObject`` is a special type of Realm object that models -complex data about a specific object. Realm treats each embedded object as -nested data inside of a single specific parent object. +An ``EmbeddedRealmObject`` is a special type of Realm object that models +complex data about a specific object. Realm treats each embedded object as +nested data inside of a single specific parent object. -Because of this, embedded objects have the following constraints: +Because of this, embedded objects have the following constraints: -- An embedded object requires a parent object and *cannot* exist as an - independent Realm object. If the parent object no longer references the +- An embedded object requires a parent object and *cannot* exist as an + independent Realm object. If the parent object no longer references the embedded object, the embedded object is automatically deleted. -- An embedded object inherits the lifecycle of its parent object. For +- An embedded object inherits the lifecycle of its parent object. For example, if you delete the parent object, the embedded object is also - deleted. + deleted. - Embedded objects have strict ownership with their parent object. - You *cannot* reassign an embedded object to a different parent object, or + You *cannot* reassign an embedded object to a different parent object, or share an embedded object between multiple parent objects. -- Embedded objects *cannot* have a :ref:`primary key `. - -.. tip:: - - If you need to manually manage the lifecycle of a referenced object or - want the referenced objects to persist after the deletion of the parent - object, use a regular Realm object with a :ref:`to-one relationship - ` instead. +- Embedded objects *cannot* have a :ref:`primary key `. + +.. tip:: + + If you need to manually manage the lifecycle of a referenced object or + want the referenced objects to persist after the deletion of the parent + object, use a regular Realm object with a :ref:`to-one relationship + ` instead. For more information, refer to :ref:``. -To define an embedded object type, create a Kotlin class that implements the -`EmbeddedRealmObject +To define an embedded object type, create a Kotlin class that implements the +`EmbeddedRealmObject <{+kotlin-local-prefix+}io.realm.kotlin.types/-embedded-realm-object/index.html>`__ interface: -.. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-embedded-object.kt +.. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-embedded-object.kt :language: kotlin -Embedded object types are reusable and composable. You can use the -same embedded object type in multiple parent object types inside -other embedded object types. +Embedded object types are reusable and composable. You can use the +same embedded object type in multiple parent object types inside +other embedded object types. -After you define your embedded object type, you must define a relationship -with a parent object in your data model. To learn how, refer to +After you define your embedded object type, you must define a relationship +with a parent object in your data model. To learn how, refer to :ref:``. .. _kotlin-asymmetric-objects: @@ -189,21 +190,21 @@ Define an Asymmetric Object Type .. versionadded:: 1.10.0 -An ``AsymmetricRealmObject`` is an insert-only object intended to be used with +An ``AsymmetricRealmObject`` is an insert-only object intended to be used with the Atlas Device Sync feature Data Ingest. For information on how to set up Data Ingest with your application, refer to :ref:`kotlin-stream-data-to-atlas`. .. include:: /includes/kotlin-asymmetric-object.rst -To define an asymmetric object type, create a Kotlin class that implements the `AsymmetricRealmObject +To define an asymmetric object type, create a Kotlin class that implements the `AsymmetricRealmObject <{+kotlin-sync-prefix+}io.realm.kotlin.types/-asymmetric-realm-object/index.html>`__ interface: -.. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-asymmetric-model.kt +.. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-asymmetric-model.kt :language: kotlin In Kotlin SDK versions 1.11.1 and earlier, you cannot link from -``AsymmetricRealmObject`` types to ``RealmObject`` types. In SDK versions +``AsymmetricRealmObject`` types to ``RealmObject`` types. In SDK versions 1.12.0 and later, ``AsymmetricRealmObject`` types can link to ``RealmObject`` types in addition to ``EmbeddedRealmObject`` types. @@ -212,23 +213,23 @@ types in addition to ``EmbeddedRealmObject`` types. Define Collection Properties ---------------------------- -A collection is an object that contains zero or more instances of a supported -data type. Realm collections are homogenous (all objects in a collection are +A collection is an object that contains zero or more instances of a supported +data type. Realm collections are homogenous (all objects in a collection are of the same type) and are backed by their corresponding built-in Kotlin classes. For more information on the collection types used in the Kotlin SDK and their supported data types, refer to :ref:``. -The Kotlin SDK offers several collection types that you can use as -properties in your data model: ``RealmList``, ``RealmSet``, and +The Kotlin SDK offers several collection types that you can use as +properties in your data model: ``RealmList``, ``RealmSet``, and ``RealmDictionary``. Collections also let you define to-many relationships between Realm objects. Refer to :ref:`` for more information. .. important:: Initialize Collection Properties - - Collection types are non-null. When you define a collection property, - you *must* initialize it. + + Collection types are non-null. When you define a collection property, + you *must* initialize it. Define a RealmList ~~~~~~~~~~~~~~~~~~ @@ -248,7 +249,7 @@ Define a RealmSet To define a property as a :ref:`RealmSet `, specify its type within the object schema as ``RealmSet`` and initialize the -default value using `realmSetOf() +default value using `realmSetOf() <{+kotlin-local-prefix+}io.realm.kotlin.ext/realm-set-of.html>`__: .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-a-realm-set.kt @@ -259,7 +260,7 @@ default value using `realmSetOf() Define a RealmDictionary/RealmMap ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To define a property as a :ref:`RealmDictionary `, specify its +To define a property as a :ref:`RealmDictionary `, specify its type within the object schema as a ``RealmDictionary`` and initialize the the default value using `realmDictionaryOf() <{+kotlin-local-prefix+}io.realm.kotlin.ext/realm-dictionary-of.html>`__: @@ -271,3 +272,46 @@ the default value using `realmDictionaryOf() .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.percent-encode-disallowed-characters.kt :language: kotlin + +.. _kotlin-model-unstructured-data: + +Define Unstructured Data +------------------------ + +.. versionadded:: 2.0.0 + +Starting in Kotlin SDK version 2.0.0, you can store +:ref:`collections of mixed data ` +within a ``RealmAny`` property. You can use this feature to model complex data +structures, such as JSON or MongoDB documents, without having to define a +strict data model. + +**Unstructured data** is data that doesn't easily conform to an expected +schema, making it difficult or impractical to model to individual +data classes. For example, your app might have highly variable data or dynamic +data whose structure is unknown at runtime. + +Storing collections in a mixed property offers flexibility without sacrificing +functionality, including performant synchronization when using Device Sync. And +you can work with them the same way you would a non-mixed +collection: + +- You can nest mixed collections up to 100 levels. +- You can query on and :ref:`react to changes + ` on mixed collections. +- You can find and update individual mixed collection elements. + +However, storing data in mixed collections is less performant than using a structured +schema or serializing JSON blobs into a single string property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`RealmAny ` types. You can then set these +``RealmAny`` properties as a :ref:`kotlin-realm-list` or a +:ref:`RealmDictionary ` collection of ``RealmAny`` elements. +Note that ``RealmAny`` *cannot* represent a ``RealmSet`` or an embedded object. + +.. tip:: + + - Use a map of mixed data types when the type is unknown but each value will have a unique identifier. + - Use a list of mixed data types when the type is unknown but the order of + objects is meaningful. diff --git a/temp/kotlin/realm-database/schemas/supported-types.txt b/temp/kotlin/realm-database/schemas/supported-types.txt index 87f26747ce..72ac14e5cd 100644 --- a/temp/kotlin/realm-database/schemas/supported-types.txt +++ b/temp/kotlin/realm-database/schemas/supported-types.txt @@ -11,8 +11,8 @@ Supported Types - Kotlin SDK :depth: 2 :class: singlecol -This page describes the supported data types that you can use to define -properties in your object model. For more information on how to define +This page describes the supported data types that you can use to define +properties in your object model. For more information on how to define your object model, refer to :ref:`Define an Object Model `. .. include:: /includes/map-to-bson-type.rst @@ -22,42 +22,42 @@ your object model, refer to :ref:`Define an Object Model `__, -`BSON `__ types, and -Realm-specific types, which you can use for unique +`BSON `__ types, and +Realm-specific types, which you can use for unique identifiers, timestamps, counters, and collections. -The Kotlin SDK does *not* natively support: +The Kotlin SDK does *not* natively support: -- user-defined enumeration properties. Refer to the :ref:`Enums ` +- user-defined enumeration properties. Refer to the :ref:`Enums ` section for more information on how to use enums in your Realm objects. -- Kotlin's built-in ``Date`` or ``Instant``. Refer to the - :ref:`RealmInstant ` section for more information on +- Kotlin's built-in ``Date`` or ``Instant``. Refer to the + :ref:`RealmInstant ` section for more information on how to use timestamps in your Realm objects. .. _kotlin-optional: -Realm object properties *must* be mutable and initialized when declared. -The Kotlin SDK does not currently support abstract properties. You -can declare properties optional (nullable) using the built-in -``?`` Kotlin operator, or you can assign a default value to a property +Realm object properties *must* be mutable and initialized when declared. +The Kotlin SDK does not currently support abstract properties. You +can declare properties optional (nullable) using the built-in +``?`` Kotlin operator, or you can assign a default value to a property when you declare it. -.. note:: - - Realm stores all non-decimal numeric types as ``Long`` +.. note:: + + Realm stores all non-decimal numeric types as ``Long`` values and all decimal numeric types as ``Double`` values. .. _kotlin-types-table: **Kotlin Data Types** -The following table lists the supported Kotlin data types and examples of +The following table lists the supported Kotlin data types and examples of how to declare them as required or optional properties in your object model. -.. list-table:: +.. list-table:: :header-rows: 1 :stub-columns: 1 :widths: 20 40 40 @@ -68,7 +68,7 @@ how to declare them as required or optional properties in your object model. * - ``String`` - .. literalinclude:: /examples/generated/kotlin/DataTypes.snippet.string-required.kt - :language: kotlin + :language: kotlin - .. literalinclude:: /examples/generated/kotlin/DataTypes.snippet.string-optional.kt :language: kotlin @@ -124,12 +124,12 @@ how to declare them as required or optional properties in your object model. **MongoDB BSON Types** -The following table lists the supported MongoDB BSON data types and examples +The following table lists the supported MongoDB BSON data types and examples of how to declare them as required or optional properties in your object model. -To use these types, you must import them from the +To use these types, you must import them from the :github:`org.mongodb.kbson ` package. -.. list-table:: +.. list-table:: :header-rows: 1 :stub-columns: 1 :widths: 20 40 40 @@ -154,11 +154,11 @@ To use these types, you must import them from the **Realm-Specific Types** -The following table lists the supported Realm-specific data types and -examples of how to declare them as required or optional properties in +The following table lists the supported Realm-specific data types and +examples of how to declare them as required or optional properties in your object model. -.. list-table:: +.. list-table:: :header-rows: 1 :stub-columns: 1 :widths: 20 40 40 @@ -218,8 +218,8 @@ your object model. Unique Identifiers ------------------ -The Kotlin SDK supports :wikipedia:`UUID ` -and ``ObjectId`` as unique identifiers for Realm objects. +The Kotlin SDK supports :wikipedia:`UUID ` +and ``ObjectId`` as unique identifiers for Realm objects. .. include:: /includes/note-using-uuid-instead-of-objectid.rst @@ -228,19 +228,19 @@ and ``ObjectId`` as unique identifiers for Realm objects. ObjectId ~~~~~~~~ -``ObjectId`` is a MongoDB-specific BSON type. It is a -12-byte, globally unique value that you can use as an identifier for objects. -It is nullable, :ref:`indexable `, and can +``ObjectId`` is a MongoDB-specific BSON type. It is a +12-byte, globally unique value that you can use as an identifier for objects. +It is nullable, :ref:`indexable `, and can be used as a :ref:`primary key `. You can initialize an ``ObjectId`` using ``ObjectId()``. .. important:: io.realm.kotlin.types.ObjectId Deprecated in v1.5.0 - In Realm Kotlin SDK version 1.5.0 and newer, - `io.realm.kotlin.types.ObjectId - <{+kotlin-local-prefix+}io.realm.kotlin.types/-object-id/index.html>`__ - is deprecated. You must import ``ObjectId`` from + In Realm Kotlin SDK version 1.5.0 and newer, + `io.realm.kotlin.types.ObjectId + <{+kotlin-local-prefix+}io.realm.kotlin.types/-object-id/index.html>`__ + is deprecated. You must import ``ObjectId`` from :github:`org.mongodb.kbson.ObjectId ` instead. .. _kotlin-uuid: @@ -248,18 +248,18 @@ You can initialize an ``ObjectId`` using ``ObjectId()``. RealmUUID ~~~~~~~~~ -``UUID`` (Universal Unique Identifier) is a 16-byte unique value -that you can use as an identifier for objects. It is nullable, -:ref:`indexable `, and can be used as a :ref:`primary key `. +``UUID`` (Universal Unique Identifier) is a 16-byte unique value +that you can use as an identifier for objects. It is nullable, +:ref:`indexable `, and can be used as a :ref:`primary key `. -Realm creates UUIDs with the `RealmUUID -<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-u-u-i-d/index.html>`__ -type that conform to `RFC 4122 version 4 `_ -and are created with random bytes. +Realm creates UUIDs with the `RealmUUID +<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-u-u-i-d/index.html>`__ +type that conform to `RFC 4122 version 4 `_ +and are created with random bytes. -You can generate a random ``RealmUUID`` using `RealmUUID.random() -<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-u-u-i-d/-companion/random.html>`__ -or pass a UUID-formatted string to `RealmUUID.from() +You can generate a random ``RealmUUID`` using `RealmUUID.random() +<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-u-u-i-d/-companion/random.html>`__ +or pass a UUID-formatted string to `RealmUUID.from() <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-u-u-i-d/-companion/from.html>`__: .. literalinclude:: /examples/generated/kotlin/DataTypes.snippet.create-uuid.kt @@ -270,34 +270,34 @@ or pass a UUID-formatted string to `RealmUUID.from() MutableRealmInt (Counter) ------------------------- -The Kotlin SDK offers `MutableRealmInt -<{+kotlin-local-prefix+}io.realm.kotlin.types/-mutable-realm-int/index.html>`__ -as a special integer type that you can use as a logical counter to accurately -synchronize numeric changes across multiple distributed clients. -It behaves like a ``Long`` but also supports ``increment`` and ``decrement`` -methods that implement a -:wikipedia:`conflict-free replicated data type `. -This ensures that numeric updates can be executed regardless of order to +The Kotlin SDK offers `MutableRealmInt +<{+kotlin-local-prefix+}io.realm.kotlin.types/-mutable-realm-int/index.html>`__ +as a special integer type that you can use as a logical counter to accurately +synchronize numeric changes across multiple distributed clients. +It behaves like a ``Long`` but also supports ``increment`` and ``decrement`` +methods that implement a +:wikipedia:`conflict-free replicated data type `. +This ensures that numeric updates can be executed regardless of order to converge to the same value. -A ``MutableRealmInt`` property: +A ``MutableRealmInt`` property: - *cannot* be used as a :ref:`primary key ` -- *cannot* store null values, but it can be declared nullable +- *cannot* store null values, but it can be declared nullable (``MutableRealmInt?``) -Additionally, ``MutableRealmInt`` fields: +Additionally, ``MutableRealmInt`` fields: -- are backed by Kotlin's - `numeric types `__, +- are backed by Kotlin's + `numeric types `__, so no migration is required when changing a numeric field to ``MutableRealmInt``. -- can use operators and infix functions similar to those provided by ``Long``. - However, note that any operations *other than* ``set``, ``increment``, and +- can use operators and infix functions similar to those provided by ``Long``. + However, note that any operations *other than* ``set``, ``increment``, and ``decrement`` do not mutate the instance on which they are executed. Instead, - they create a new, unmanaged ``MutableRealmInt`` instance with the updated + they create a new, unmanaged ``MutableRealmInt`` instance with the updated value. -Learn how to :ref:`` and +Learn how to :ref:`` and :ref:``. .. _kotlin-timestamps: @@ -305,11 +305,11 @@ Learn how to :ref:`` and RealmInstant (Timestamp) ------------------------ -You cannot store Kotlin's built-in ``Date`` or ``Instant`` types in Realm. +You cannot store Kotlin's built-in ``Date`` or ``Instant`` types in Realm. -Instead, the Kotlin SDK uses the `RealmInstant -<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-instant/index.html>`__ -type to store time information as a :wikipedia:`Unix epoch ` +Instead, the Kotlin SDK uses the `RealmInstant +<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-instant/index.html>`__ +type to store time information as a :wikipedia:`Unix epoch ` timestamp. If you need timestamp data in a form other than ``RealmInstant``, you @@ -324,36 +324,40 @@ example: RealmAny (Mixed) ---------------- -`RealmAny <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-any/index.html>`__ -represents a non-nullable mixed data type. It behaves like the value type +.. versionchanged:: 2.0.0 + + ``RealmAny`` can hold lists and dictionaries of mixed data. + +`RealmAny <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-any/index.html>`__ +represents a non-nullable mixed data type. It behaves like the value type that it contains. ``RealmAny`` can hold: -- :ref:`supported Kotlin data types ` (note that - ``Byte``, ``Char``, ``Int``, ``Long``, and ``Short`` values are converted - internally to ``int64_t`` values) +- :ref:`supported Kotlin data types ` (note that + ``Byte``, ``Char``, ``Int``, ``Long``, and ``Short`` values are converted + internally to ``int64_t`` values) - :ref:`supported BSON types ` -- the following Realm-specific types: +- ``RealmList`` and ``RealmDictionary`` collections of mixed data +- the following Realm-specific types: - RealmInstant - RealmUUID - RealmObject (holds a reference to the object, not a copy of it) -``RealmAny`` *cannot* hold ``EmbeddedRealmObject`` types, -collection types (``RealmList``, ``RealmSet``, ``RealmDictionary``), -or another ``RealmAny``. +``RealmAny`` *cannot* hold ``EmbeddedRealmObject`` types, ``RealmSet``, or +another ``RealmAny``. -``RealmAny`` properties: +``RealmAny`` properties: -- are :ref:`indexable ` but *cannot* be used as a +- are :ref:`indexable ` but *cannot* be used as a :ref:`primary key ` - must be declared nullable (``RealmAny?``), but they *cannot* store null values -- can be :ref:`aggregated ` with +- can be :ref:`aggregated ` with `RealmQuery.max <{+kotlin-local-prefix+}io.realm.kotlin.query/-realm-query/max.html>`__, `RealmQuery.min <{+kotlin-local-prefix+}io.realm.kotlin.query/-realm-query/min.html>`__, and `RealmQuery.sum <{+kotlin-local-prefix+}io.realm.kotlin.query/-realm-query/sum.html>`__. - can be :ref:`sorted `. Sort order from highest to lowest: - + #. ``Boolean`` #. ``Byte``, ``Double``, ``Decimal128``, ``Int``, ``Float``, ``Long``, ``Short`` #. ``byte[]``, ``String`` @@ -362,29 +366,51 @@ or another ``RealmAny``. #. ``UUID`` #. ``RealmObject`` -You can store multiple ``RealmAny`` instances in ``RealmList``, -``RealmDictionary``, or ``RealmSet`` fields. +You can store multiple ``RealmAny`` instances in ``RealmList``, +``RealmDictionary``, or ``RealmSet`` fields. .. tip:: Handle Polymorphism with Conditional Expressions - Because you must know the stored type to extract its value, we - recommend using a ``when`` expression to handle the + Because you must know the stored type to extract its value, we + recommend using a ``when`` expression to handle the ``RealmAny`` type and its possible inner value class. +.. _kotlin-nested-collections-realmany: + +Collections as Mixed +~~~~~~~~~~~~~~~~~~~~ + +In version 2.0.0 and later, a ``RealmAny`` data type can +hold collections (a list or dictionary, but *not* a set) of ``RealmAny`` +elements. You can use mixed collections to +model unstructured or variable data. For more information, refer to +:ref:``. + +- You can nest mixed collections up to 100 levels. +- You can query mixed collection properties and + :ref:`register a listener for changes `, + as you would a normal collection. +- You can find and update individual mixed collection elements +- You *cannot* store sets or embedded objects in mixed collections. + +To use mixed collections in your app, define the mixed type +property in your data model the same way you would any other ``RealmAny`` type. +Then, create the list or dictionary collections using ``RealmAny.create()``. + .. _kotlin-collection-types: Collection Types ---------------- -The Kotlin SDK offers several collection types that you can use as -properties in your data model. A collection is an object -that contains zero or more instances of one supported data type. -Realm collections are homogenous (all objects in a collection are of the +The Kotlin SDK offers several collection types that you can use as +properties in your data model. A collection is an object +that contains zero or more instances of one supported data type. +Realm collections are homogenous (all objects in a collection are of the same type) and are backed by their corresponding built-in Kotlin classes. -Collection types are non-null. When you define a collection property, you must -initialize it. -For more information, refer to :ref:`Create a Collection `. +Collection types are non-null. When you define a collection property, you must +initialize it. +For more information, refer to :ref:`Create a Collection `. .. _kotlin-realm-list: @@ -392,25 +418,25 @@ RealmList ~~~~~~~~~ The `RealmList <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-list/index.html>`__ -type implements Kotlin's -`List `__ -interface. :ref:`Unmanaged ` lists -behave like Kotlin's `MutableList +type implements Kotlin's +`List `__ +interface. :ref:`Unmanaged ` lists +behave like Kotlin's `MutableList `__. -A ``RealmList`` represents a :ref:`to-many relationship ` -containing: +A ``RealmList`` represents a :ref:`to-many relationship ` +containing: -- any of the :ref:`supported Kotlin data types ` +- any of the :ref:`supported Kotlin data types ` - any of the :ref:`supported BSON types ` -- a `RealmObject +- a `RealmObject <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-object/index.html>`__ -- an `EmbeddedRealmObject +- an `EmbeddedRealmObject <{+kotlin-local-prefix+}io.realm.kotlin.types/-embedded-realm-object/index.html>`__ -``RealmList`` is a non-null type, where: +``RealmList`` is a non-null type, where: -- lists of ``RealmObject`` or ``EmbeddedRealmObject`` elements *cannot* +- lists of ``RealmObject`` or ``EmbeddedRealmObject`` elements *cannot* be nullable - lists of any other supported elements can be nullable (``RealmList``) @@ -419,20 +445,20 @@ containing: RealmSet ~~~~~~~~ -The `RealmSet -<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-set/index.html>`__ -type implements Kotlin's -`Set `__ -interface. :ref:`Unmanaged ` sets behave -like Kotlin's `MutableSet -`__. +The `RealmSet +<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-set/index.html>`__ +type implements Kotlin's +`Set `__ +interface. :ref:`Unmanaged ` sets behave +like Kotlin's `MutableSet +`__. -A ``RealmSet`` represents a :ref:`to-many relationship ` -containing distinct values of: +A ``RealmSet`` represents a :ref:`to-many relationship ` +containing distinct values of: - any of the :ref:`supported Kotlin data types ` - any of the :ref:`supported BSON types ` -- a `RealmObject +- a `RealmObject <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-object/index.html>`__ You cannot use ``EmbeddedRealmObject`` elements in a ``RealmSet``. @@ -447,83 +473,83 @@ You cannot use ``EmbeddedRealmObject`` elements in a ``RealmSet``. RealmMap/RealmDictionary ~~~~~~~~~~~~~~~~~~~~~~~~ -The `RealmMap <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-map/index.html>`__ -type implements Kotlin's `Map -`__ -interface and is an associative array that contains key-value ``String`` pairs -with unique keys. -`RealmDictionary -<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-dictionary/index.html>`__ +The `RealmMap <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-map/index.html>`__ +type implements Kotlin's `Map +`__ +interface and is an associative array that contains key-value ``String`` pairs +with unique keys. +`RealmDictionary +<{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-dictionary/index.html>`__ is a specialized ``RealmMap`` that accepts a ``String`` key and non-string values. -:ref:`Unmanaged ` dictionaries behave -like Kotlin's `LinkedHashMap +:ref:`Unmanaged ` dictionaries behave +like Kotlin's `LinkedHashMap `__. -``RealmDictionary`` values can be: +``RealmDictionary`` values can be: - any of the :ref:`supported Kotlin data types ` - any of the :ref:`supported BSON types ` - a `RealmObject <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-object/index.html>`__ -- an `EmbeddedRealmObject +- an `EmbeddedRealmObject <{+kotlin-local-prefix+}io.realm.kotlin.types/-embedded-realm-object/index.html>`__ -``RealmDictionary`` is a non-null type, where: +``RealmDictionary`` is a non-null type, where: - keys must be strings -- ``RealmObject`` or ``EmbeddedRealmObject`` values *must* be nullable +- ``RealmObject`` or ``EmbeddedRealmObject`` values *must* be nullable (``RealmDictionary``) -- any other supported element values can be nullable +- any other supported element values can be nullable .. _kotlin-realm-objects-as-properties: RealmObjects as Properties -------------------------- -You can use ``RealmObject`` and any subclasses, *except* +You can use ``RealmObject`` and any subclasses, *except* ``AsymmetricRealmObject`` as properties in your object model. -.. important:: +.. important:: - ``AsymmetricRealmObject`` *cannot* be used as properties. - For more information, refer to :ref:`Asymmetric Objects - `. + ``AsymmetricRealmObject`` *cannot* be used as properties. + For more information, refer to :ref:`Asymmetric Objects + `. RealmObjects ~~~~~~~~~~~~ -A `RealmObject +A `RealmObject <{+kotlin-local-prefix+}io.realm.kotlin.types/-realm-object/index.html>`__ type represents a custom object that you can use as a property. -``RealmObject`` properties: +``RealmObject`` properties: - must be declared nullable -- can be used as elements in collections +- can be used as elements in collections - can be held as a ``RealmAny`` value - *cannot* be used as a :ref:`primary key ` -You can also reference one or more Realm objects from another through -to-one and to-many relationships. -For more information, refer to the :ref:`Relationships ` +You can also reference one or more Realm objects from another through +to-one and to-many relationships. +For more information, refer to the :ref:`Relationships ` page. Backlinks ~~~~~~~~~ -A backlink represents an inverse, to-many relationship between a -``RealmObject`` and one or more ``RealmObject`` or between a ``RealmObject`` +A backlink represents an inverse, to-many relationship between a +``RealmObject`` and one or more ``RealmObject`` or between a ``RealmObject`` and an ``EmbeddedRealmObject``. Backlinks cannot be null. -Backlinks implement: +Backlinks implement: -- the `BacklinksDelegate - <{+kotlin-local-prefix+}io.realm.kotlin.types/-backlinks-delegate/index.html>`__ +- the `BacklinksDelegate + <{+kotlin-local-prefix+}io.realm.kotlin.types/-backlinks-delegate/index.html>`__ type for ``RealmObject`` backlinks -- the `EmbeddedBacklinksDelegate - <{+kotlin-local-prefix+}io.realm.kotlin.types/-embedded-backlinks-delegate/index.html>`__ +- the `EmbeddedBacklinksDelegate + <{+kotlin-local-prefix+}io.realm.kotlin.types/-embedded-backlinks-delegate/index.html>`__ type for ``EmbeddedRealmObject`` backlinks -For more information, refer to :ref:`Inverse Relationships +For more information, refer to :ref:`Inverse Relationships `. .. _kotlin-embedded-objects-as-properties: @@ -531,16 +557,16 @@ For more information, refer to :ref:`Inverse Relationships EmbeddedRealmObject ~~~~~~~~~~~~~~~~~~~ -An `EmbeddedRealmObject +An `EmbeddedRealmObject <{+kotlin-local-prefix+}io.realm.kotlin.types/-embedded-realm-object/index.html>`__ -is a special type of ``RealmObject``. +is a special type of ``RealmObject``. -``EmbeddedRealmObject`` properties: +``EmbeddedRealmObject`` properties: -- must be nullable objects within the parent object +- must be nullable objects within the parent object - must be nullable values within a dictionary -- *cannot* be nullable elements within a list -- *cannot* be used as a :ref:`primary key ` +- *cannot* be nullable elements within a list +- *cannot* be used as a :ref:`primary key ` - can be properties within an asymmetric object For more information, refer to :ref:`Embedded Objects `. @@ -560,12 +586,12 @@ The Kotlin SDK supports geospatial queries using the following data types: .. important:: Cannot Persist Geospatial Data Types - Currently, geospatial data types *cannot* be persisted. For example, you can't - declare a property that is of type ``GeoBox``. - + Currently, geospatial data types *cannot* be persisted. For example, you can't + declare a property that is of type ``GeoBox``. + These types can only be used as arguments for geospatial queries. -For more information on querying with geospatial data, refer to +For more information on querying with geospatial data, refer to :ref:`Geospatial Data `. .. _kotlin-enums: @@ -573,11 +599,11 @@ For more information on querying with geospatial data, refer to Enums ----- -The Kotlin SDK does not natively support enumerations, or enums. To use -enums in a Realm object class, define a field with a type matching the -underlying data type of your enum. +The Kotlin SDK does not natively support enumerations, or enums. To use +enums in a Realm object class, define a field with a type matching the +underlying data type of your enum. -Then, create getters and setters for the field that convert the field +Then, create getters and setters for the field that convert the field value between the underlying value and the enum type. .. literalinclude:: /examples/generated/kotlin/DataTypes.snippet.enum-workaround.kt diff --git a/temp/node/model-data.txt b/temp/node/model-data.txt index c19e6648b6..83f2d96d29 100644 --- a/temp/node/model-data.txt +++ b/temp/node/model-data.txt @@ -36,7 +36,7 @@ to native JavaScript objects, which means there's no need to use a special data access library, such as an :wikipedia:`ORM `. Instead, you can work with Realm objects as you would any other object. -The following class contains a schema that defines a ``Car`` object type with +The following class contains a schema that defines a ``Car`` object type with ``id``, ``make``, ``model``, and ``miles`` properties. It also defines a primary key. .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-object-properties.js @@ -75,7 +75,7 @@ in the :ref:`property schema `. Relationships are direct references to other objects in a realm. You don't need bridge tables or create joins to define a relationship like you -would in a relational database. +would in a relational database. Instead you can access related objects by reading and writing to the property that defines the relationship. @@ -89,22 +89,22 @@ There are three primary types of relationships between objects: - :ref:`Inverse Relationship ` .. note:: Realm vs Other Databases - + Objects often contain direct references to other objects. When working with objects and references, you often copy from database storage into application memory. This situation leaves the developer with a choice of what to copy into memory: - + - You can copy the entire referenced object ahead of time. This means that all referenced data is always available quickly, but can use up a lot of resources. Depending on the amount of available memory this may not be viable. - + - You can copy only a foreign key value for each object ahead of time that you can use to query the full object if it's needed. These referenced lookups are memory-efficient. However, they require more query code and too many lookups can slow your application down. - + Realm's query architecture avoids the tradeoff between memory usage and computational overhead. Instead, Realm queries can directly reference :ref:`related objects ` and their properties on disk. diff --git a/temp/node/model-data/data-types/mixed.txt b/temp/node/model-data/data-types/mixed.txt index 0707c709b7..cac603c76a 100644 --- a/temp/node/model-data/data-types/mixed.txt +++ b/temp/node/model-data/data-types/mixed.txt @@ -10,15 +10,17 @@ Mixed - Node.js SDK :depth: 2 :class: singlecol +.. versionchanged:: 12.9.0 + + Mixed properties can contain lists or dictionaries of mixed data. + .. versionadded:: 10.5.0 -Overview --------- -The mixed data type is a realm property type that can hold any valid Realm data type except a collection. -You can create collections (lists, sets, and dictionaries) of type ``mixed``, but a ``mixed`` itself -cannot be a collection. Properties using the mixed data type can also hold null values. +The mixed data type is a realm property type that can hold any valid Realm data +type except an embedded object or a set. +You can create collections (lists, sets, and dictionaries) of type ``mixed``. Properties using the mixed data type can also hold null values. -.. note:: +.. note:: The mixed data type is indexable, but you can't use it as a primary key. Because null is a permitted value, you can't declare a Mixed property as @@ -27,7 +29,7 @@ cannot be a collection. Properties using the mixed data type can also hold null Realm Object Models ------------------- To :ref:`set a property of your object model -` as ``Mixed``, set the property's type to +` as mixed, set the property's type to "``mixed``". .. literalinclude:: /examples/generated/node/data-types.snippet.define-mixed-in-schema.js @@ -41,12 +43,33 @@ Create an object with a mixed value by running the :js-sdk:`realm.create() .. literalinclude:: /examples/generated/node/data-types.snippet.create-objects-with-mixed-values.js :language: javascript +.. _node-nested-collections-mixed: + +Collections as Mixed +~~~~~~~~~~~~~~~~~~~~ + +In SDK v12.9.0 and later, a mixed data type can hold collections (a list or +dictionary, but *not* a set) of mixed elements. You can use mixed collections to +model unstructured or variable data. For more information, refer to +:ref:``. + +- You can nest mixed collections up to 100 levels. +- You can query mixed collection properties and + :ref:`register a listener for changes `, as you + would a normal collection. + +- You can find and update individual mixed collection elements +- You *cannot* store sets or embedded objects in mixed collections. + +To use mixed collections, define the mixed type property in your data model. +Then, create the list or dictionary collection. + Query for Objects with a Mixed Value ------------------------------------ Query for objects with a mixed value by running the -:js-sdk:`Collection.filtered() ` -method and passing in a :ref:`filter ` for a non-mixed -field. You can then print the value of the mixed property or the entire +:js-sdk:`Collection.filtered() ` +method and passing in a :ref:`filter ` for a non-mixed +field. You can then print the value of the mixed property or the entire object itself. .. literalinclude:: /examples/generated/node/data-types.snippet.query-objects-with-mixed-values.js diff --git a/temp/node/model-data/define-a-realm-object-model.txt b/temp/node/model-data/define-a-realm-object-model.txt index 014c3bb69c..5122268923 100644 --- a/temp/node/model-data/define-a-realm-object-model.txt +++ b/temp/node/model-data/define-a-realm-object-model.txt @@ -4,7 +4,7 @@ Define a Realm Object Model- Node.js SDK ======================================== -.. meta:: +.. meta:: :keywords: code example, data modeling .. facet:: @@ -27,7 +27,7 @@ To define a Realm object type, create a schema object that specifies the type's a realm. For details on how to define specific properties, see :ref:`Define Object Properties `. -You can define your schemas with JavaScript classes (like most of the examples on +You can define your schemas with JavaScript classes (like most of the examples on this page), but you can also define them as JavaScript objects. .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-schema-as-object.js @@ -39,15 +39,15 @@ Define Realm Object Types with JavaScript Classes ------------------------------------------------- You can define Realm object types with JavaScript classes. To use a class as an -object type, define the object schema on the static property ``schema``. +object type, define the object schema on the static property ``schema``. .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-a-realm-object-schema-define-js-classes.js :language: javascript .. include:: /includes/note-class-char-limit.rst - + Pass the class itself to the schema property of the :js-sdk:`Realm.Configuration -` object when opening a realm. You can then +` object when opening a realm. You can then read and write data normally. .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-a-realm-object-schema-js-classes-open-and-access-properties.js @@ -83,7 +83,7 @@ Define Object Properties To define a property for an object type, create a key-value pair representing the name and data type of the property under the ``properties`` field. - + The following schema defines a ``Car`` type that has these properties: ``_id`` ``make``, ``model``, and ``miles``. @@ -98,7 +98,7 @@ Specify an Optional Property ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To mark a property as optional, append a question mark ``?`` to its type. - + The following ``Car`` schema defines an optional ``miles`` property of type ``int``. .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-object-properties.js @@ -115,22 +115,22 @@ To specify a property as an object type's primary key, set the schema's ``primaryKey`` field to the property name. .. note:: - + A **primary key** is a property that uniquely identifies an object. Realm automatically :ref:`indexes ` primary key properties, which allows you to efficiently read and modify objects based on their primary key. - + If an object type has a primary key, then all objects of that type must include the primary key property with a value that is unique among objects of the same type in a realm. An object type may have at most one primary key. You cannot change the primary key property for an object type after any object of that type is added to a realm and you cannot modify an object's primary key value. - + The following ``Car`` object schema specifies the ``_id`` property as its primary key. - + .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-object-properties.js :language: javascript :emphasize-lines: 10 @@ -151,14 +151,14 @@ properties. To define an index for a given property, set ``indexed`` to the cost of slightly slower write times and additional storage and memory overhead. Realm stores indexes on disk, which makes your realm files larger. Each index entry is a minimum of 12 bytes. The ordering of the index - entries supports efficient equality matches and range-based query operations. - + entries supports efficient equality matches and range-based query operations. + It's best to only add indexes when optimizing the read performance for specific situations. - + The following ``Car`` object schema defines an index on the ``_id`` property. - + .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-advanced-properties.js :language: javascript :emphasize-lines: 5 @@ -169,14 +169,14 @@ Set a Full-Text Search Index ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition to standard indexes, Realm also supports Full-Text Search (FTS) -indexes on string properties. While you can query a string field with or without -a standard index, an FTS index enables searching for multiple words and phrases +indexes on string properties. While you can query a string field with or without +a standard index, an FTS index enables searching for multiple words and phrases and excluding others. For more information on querying FTS indexes, see :ref:`Filter with Full-Text Search `. -To create an FTS index, set the `indexed `__ -type to ``'full-text'``. This enables full-text queries on the property. In the +To create an FTS index, set the `indexed `__ +type to ``'full-text'``. This enables full-text queries on the property. In the following example, we set the indexed type for the ``name`` property to ``'full-text'``: .. literalinclude:: /examples/generated/node/v12/full-text-search.test.snippet.node-fts-annotation.ts @@ -205,23 +205,23 @@ the ``miles`` property: Map a Property or Class to a Different Name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -By default, Realm uses the name defined in the model class to represent -classes and fields internally. In some cases, you might want to change +By default, Realm uses the name defined in the model class to represent +classes and fields internally. In some cases, you might want to change this behavior. For example: -- To make it easier to work across platforms where naming conventions - differ. For example, if your Device Sync schema property names use snake +- To make it easier to work across platforms where naming conventions + differ. For example, if your Device Sync schema property names use snake case, while your project uses camel case. - To change a class or field name without forcing a migration. - To support multiple model classes with the same name in different packages. -- To use a class name that is longer than the 57-character limit enforced +- To use a class name that is longer than the 57-character limit enforced by Realm. You can map a class or property name in your code to a different name to -store in a realm. If you write to a synced realm, the Sync schema sees the +store in a realm. If you write to a synced realm, the Sync schema sees the values stored using the persisted class or property name. -Note that migrations must use the persisted class or property name, and +Note that migrations must use the persisted class or property name, and any schema errors reported also use the persisted name. .. tabs:: @@ -237,21 +237,21 @@ any schema errors reported also use the persisted name. #. Use the **class** name in the Realm configuration's ``schema`` property when you :ref:`open the realm `. - #. Use the mapped name for performing CRUD operations or when defining + #. Use the mapped name for performing CRUD operations or when defining Flexible Sync Subscriptions. - In the following example, Realm stores objects created with the + In the following example, Realm stores objects created with the ``Task`` class as ``Todo_Item``. .. tabs-realm-languages:: .. tab:: :tabid: typescript - + .. literalinclude:: /examples/generated/node/v12/define-a-realm-object-schema.test.snippet.remap-class-name.ts :language: typescript :emphasize-lines: 9, 22, 31, 43, 51 - + .. tab:: :tabid: javascript @@ -265,9 +265,9 @@ any schema errors reported also use the persisted name. To use a different property name in your code than is stored in a realm, set ``mapTo`` to the name of the property as it appears in your code. - - In the following ``Car`` object schema, Realm stores the car's - model name with the snake case ``model_name`` property. The schema maps the property + + In the following ``Car`` object schema, Realm stores the car's + model name with the snake case ``model_name`` property. The schema maps the property to ``modelName`` for objects used in client code. .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-advanced-properties.js @@ -314,7 +314,7 @@ number of cars as a to-many relationship. To define a to-many relationship property, specify the related object type name as a list. - + An application could use the following object schemas to indicate that a ``Manufacturer`` may make multiple ``Car`` objects by including them in its ``cars`` property: @@ -335,14 +335,14 @@ set the value of an inverse relationship property. To define an inverse relationship property, set the property type to ``linkingObjects`` and specify the object type and property name that define the relationship to invert. - + An application could use the following object schemas to indicate that a ``Manufacturer`` may make many ``Car`` objects and that each ``Car`` should automatically keep track of which ``Manufacturer`` makes it. - The ``Manufacturer`` object's ``cars`` property is defined as a to-many relationship with ``Car`` objects and contains all of a given manufacturer's cars. - + - The ``Car`` object's ``assignee`` property inverts the relationship and automatically updates to refer back to any ``Manufacturer`` object that contains the car in its ``cars`` property. @@ -358,7 +358,7 @@ Define an Embedded Object Property To define a Realm object model with an embedded object (nested Realm object), set ``embedded`` to ``true``. - + An **embedded object** exists as nested data inside of a single, specific parent object. It inherits the lifecycle of its parent object and cannot exist as an independent Realm object. Realm automatically deletes embedded @@ -367,10 +367,10 @@ embedded object instance. Embedded objects cannot have a primary key. You can reference an embedded object type from parent object types in the same way as a relationship. - + The following example requires two parent schemas, ``Manufacturer`` and -``Car``. The application requires an embedded child schema ``Warranty``. -A ``Manufacturer`` object can embed a list of ``Warranty`` objects, whereas a +``Car``. The application requires an embedded child schema ``Warranty``. +A ``Manufacturer`` object can embed a list of ``Warranty`` objects, whereas a ``Car`` object can only embed a single ``Warranty`` object. .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-embedded-property.js @@ -392,11 +392,11 @@ on your object schema. .. tab:: :tabid: typescript - + .. literalinclude:: /examples/generated/node/asymmetric-sync.snippet.asymmetric-sync-object.ts :language: typescript :emphasize-lines: 12 - + .. tab:: :tabid: javascript @@ -405,7 +405,7 @@ on your object schema. :emphasize-lines: 6 In Node.js SDK versions 12.2.0 and earlier, you cannot link from -asymmetric objects to ``Realm.Object`` types. In SDK versions +asymmetric objects to ``Realm.Object`` types. In SDK versions 12.2.1 and later, asymmetric objects can link to ``Realm.Object`` types in addition to embedded objects. @@ -415,3 +415,45 @@ types in addition to embedded objects. will get the following error: "Error: You cannot query an asymmetric class.". To learn more about Data Ingest, read :ref:`Optimize Sync with Data Ingest `. + +.. _node-model-unstructured-data: + +Define Unstructured Data +----------------------- + +.. versionadded:: 12.9.0 + +Starting in Node.js SDK version 12.9.0, you can store +:ref:`collections +of mixed data ` +within a ``mixed`` property. You can use this feature to model complex data +structures, such as JSON or MongoDB documents, without having to define a +strict data model. + +**Unstructured data** is data that doesn't easily conform to an expected +schema, making it difficult or impractical to model to individual +data classes. For example, your app might have highly variable data or dynamic +data whose structure is unknown at runtime. + +Storing collections in a mixed property offers flexibility without sacrificing +functionality, including performant synchronization when using Device Sync. And +you can work with them the same way you would a non-mixed +collection: + +- You can nest mixed collections up to 100 levels. +- You can query on and :ref:`react to changes ` on mixed collections. +- You can find and update individual mixed collection elements. + +However, storing data in mixed collections is less performant than using a structured +schema or serializing JSON blobs into a single string property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`mixed ` types. You can then set these +``mixed`` properties as a :ref:`list ` or a +:ref:`dictionary ` collection of mixed elements. +Note that ``mixed`` *cannot* represent a set or an embedded object. + +.. tip:: + + - Use a map of mixed data types when the type is unknown but each value will have a unique identifier. + - Use a list of mixed data types when the type is unknown but the order of objects is meaningful. diff --git a/temp/react-native/model-data.txt b/temp/react-native/model-data.txt index 541b6f9465..5c4d302d0a 100644 --- a/temp/react-native/model-data.txt +++ b/temp/react-native/model-data.txt @@ -83,18 +83,18 @@ There are three primary types of relationships between objects: - :ref:`Inverse Relationship ` .. note:: Realm vs Other Databases - + Objects often contain direct references to other objects. When working with objects and references, you typically copy data from database storage into application memory. This situation leaves the developer with a choice of what to copy into memory: - + - You can copy all referenced objects into memory ahead of time. This means that all referenced data is always available quickly but can use up a lot of resources. If a system has limited memory, this may not be viable. - + - You can copy just a foreign key value for each object. Later, you can use the key to look up the full object when you need it. These "lazy" lookups are more memory-efficient than copying all diff --git a/temp/react-native/model-data/data-types/mixed.txt b/temp/react-native/model-data/data-types/mixed.txt index c1b18cdab6..b77012b678 100644 --- a/temp/react-native/model-data/data-types/mixed.txt +++ b/temp/react-native/model-data/data-types/mixed.txt @@ -3,18 +3,22 @@ ======================== Mixed - React Native SDK ======================== + .. contents:: On this page :local: :backlinks: none :depth: 1 :class: singlecol +.. versionchanged:: ``realm@12.9.0`` + + Mixed properties can contain lists or dictionaries of mixed data. + .. versionadded:: ``realm@10.5.0`` The Mixed data type is a realm property type that can hold any valid Realm data -type except a collection. You can create collections (lists, sets, and -dictionaries) of type ``mixed``, but a ``mixed`` type itself cannot be a -collection. +type except an embedded object or a set. +You can create collections (lists, sets, and dictionaries) of type ``mixed``. Properties using the mixed data type can also hold null values. The Mixed type is indexable, but you can't use it as a primary key. @@ -43,6 +47,25 @@ To :ref:`set a property of your object model .. literalinclude:: /examples/generated/react-native/js/Cat.snippet.js-cat-schema.js :language: javascript +.. _react-native-nested-collections-mixed: + +Collections as Mixed +~~~~~~~~~~~~~~~~~~~~ + +In version ``realm@12.9.0`` and later, a mixed data type can hold collections (a list or +dictionary, but *not* a set) of mixed elements. You can use mixed collections to +model unstructured or variable data. For more information, refer to +:ref:``. + +- You can nest mixed collections up to 100 levels. +- You can query mixed collection properties and + :ref:`register a listener for changes `, + as you would a normal collection. +- You can find and update individual mixed collection elements +- You *cannot* store sets or embedded objects in mixed collections. + +To use mixed collections, define the mixed type property in your data model. +Then, create the list or dictionary collection. Create an Object With a Mixed Value ----------------------------------- @@ -55,21 +78,21 @@ Example ~~~~~~~ In the following ``CreateCatsInput`` example, we create several ``Cat`` realm -objects with a Mixed type for the ``birthDate`` field. +objects with a Mixed type for the ``birthDate`` field. The ``CreateCatsInput`` component does the following: -- Get access to the opened realm instance by calling the ``useRealm()`` hook. +- Get access to the opened realm instance by calling the ``useRealm()`` hook. - Use React's `useEffect `__ hook - to call an anonymous function only once with ``useEffect`` and an - empty dependency array. + to call an anonymous function only once with ``useEffect`` and an + empty dependency array. - Within the anonymous function, we create four different ``Cat`` objects by - using the ``new`` operator to create a new realm object within a write - transaction. Each of the ``Cat`` objects uses a different data type for the - ``birthDate`` property. + using the ``new`` operator to create a new realm object within a write + transaction. Each of the ``Cat`` objects uses a different data type for the + ``birthDate`` property. - Use the ``useQuery()`` hook to retrieve all ``Cat`` objects. - `Map `__ through the cats to render - a list of ``Text`` components displaying each cat's ``name`` and ``birthDate``. + a list of ``Text`` components displaying each cat's ``name`` and ``birthDate``. .. tabs-realm-languages:: @@ -91,7 +114,7 @@ The ``CreateCatsInput`` component does the following: Query for Objects with a Mixed Value ------------------------------------ -To query for objects with a Mixed value, run the +To query for objects with a Mixed value, run the :js-sdk:`Collection.filtered() ` method and pass in a :ref:`filter ` for a non-Mixed field. You can then print the value of the Mixed property or the entire object itself. @@ -104,8 +127,8 @@ cat's name. The ``CatInfoCard`` component does the following: -- Get all ``Cat`` objects by passing the ``Cat`` class to the ``useQuery()`` hook, and then use ``filtered()`` to filter the results to receive only the cats whose names match the name passed as a prop. We then get the first matching cat and store it as a const variable. -- Use dot notation to retrieve the Mixed property, ``birthDate``. +- Get all ``Cat`` objects by passing the ``Cat`` class to the ``useQuery()`` hook, and then use ``filtered()`` to filter the results to receive only the cats whose names match the name passed as a prop. We then get the first matching cat and store it as a const variable. +- Use dot notation to retrieve the Mixed property, ``birthDate``. - Display the cat's name and birthdate in the render method if Realm finds the cat. If there is no cat that matches the name passed into the component as a prop, we render text that says "Cat not found". .. tabs-realm-languages:: @@ -138,4 +161,4 @@ checking. .. literalinclude:: /examples/generated/react-native/ts/mixed-test.snippet.type-check.tsx :language: javascript - :emphasize-lines: 22-24 \ No newline at end of file + :emphasize-lines: 22-24 diff --git a/temp/react-native/model-data/define-a-realm-object-model.txt b/temp/react-native/model-data/define-a-realm-object-model.txt index 0c73675a0c..86dc5147de 100644 --- a/temp/react-native/model-data/define-a-realm-object-model.txt +++ b/temp/react-native/model-data/define-a-realm-object-model.txt @@ -5,7 +5,7 @@ Define a Realm Object Model - React Native SDK =============================================== -.. meta:: +.. meta:: :keywords: code example, android, ios, data modeling .. facet:: @@ -23,8 +23,8 @@ Define a Realm Object Model - React Native SDK Define an Object Type --------------------- -To define a Realm object type, create a class that extends ``Realm.Object``. -Define the type's ``name`` and ``properties`` in a static property called ``schema``. +To define a Realm object type, create a class that extends ``Realm.Object``. +Define the type's ``name`` and ``properties`` in a static property called ``schema``. The type's name must be unique among object types in a realm. .. tabs-realm-languages:: @@ -56,7 +56,7 @@ value or a list of values. To specify that a field contains a list of a primitive value type, append ``[]`` to the type name. -For a list of supported property types, see :ref:`Property Types +For a list of supported property types, see :ref:`Property Types ` .. _react-native-define-a-property: @@ -66,7 +66,7 @@ Define Object Properties To define a property for an object type, create a key-value pair representing the name and data type of the property under the ``properties`` field. - + The following schema defines a ``Car`` type that has these properties: ``_id`` ``make``, ``model``, and ``miles``. @@ -96,12 +96,12 @@ To specify a property as an object type's primary key, set the schema's ``primaryKey`` field to the property name. .. note:: - + A **primary key** is a property that uniquely identifies an object. Realm automatically :ref:`indexes ` primary key properties, which allows you to read and modify objects based on their primary key efficiently. - + If an object type has a primary key, then all objects of that type must include the primary key property with a unique value among objects of the same type in a realm. An object type can have only one primary @@ -136,10 +136,10 @@ the primary key. Index a Property ~~~~~~~~~~~~~~~~ -If you frequently run :ref:`read operations ` -based on a specific property, you can index the property to optimize -performance. Realm supports indexing for string, integer, boolean, ``Date``, -``UUID``, and ``ObjectId`` properties. +If you frequently run :ref:`read operations ` +based on a specific property, you can index the property to optimize +performance. Realm supports indexing for string, integer, boolean, ``Date``, +``UUID``, and ``ObjectId`` properties. .. note:: @@ -147,13 +147,13 @@ performance. Realm supports indexing for string, integer, boolean, ``Date``, the cost of slightly slower write times and additional storage and memory overhead. Realm stores indexes on disk, which makes your realm files larger. Each index entry is a minimum of 12 bytes. The ordering of the index - entries supports efficient equality matches and range-based query operations. + entries supports efficient equality matches and range-based query operations. To index a given property, set the property's ``indexed`` field to ``true``. In the following example of a ``Book`` class, we define an index on the ``name`` property. - + .. tabs-realm-languages:: .. tab:: @@ -178,14 +178,14 @@ Set a Full-Text Search Index ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In addition to standard indexes, Realm also supports Full-Text Search (FTS) -indexes on string properties. While you can query a string field with or without -a standard index, an FTS index enables searching for multiple words and phrases +indexes on string properties. While you can query a string field with or without +a standard index, an FTS index enables searching for multiple words and phrases and excluding others. For more information on querying FTS indexes, see :ref:`Filter with Full-Text Search `. -To create an FTS index, set the `indexed `__ -type to ``'full-text'``. This enables full-text queries on the property. In the +To create an FTS index, set the `indexed `__ +type to ``'full-text'``. This enables full-text queries on the property. In the following example, we set the indexed type for the ``name`` property to ``'full-text'``: .. include:: /examples/generated/react-native/v12/FtsQuery.snippet.rn-fts-annotation.tsx.rst @@ -200,7 +200,7 @@ To define a default value, set the value of the property to an object with a ``type`` field and a ``default`` field. In the following example of a ``Car`` class, we define a ``miles`` property with -a default value of ``0``. +a default value of ``0``. .. versionadded:: 11.1.0 @@ -236,7 +236,7 @@ Realm, set ``mapTo`` to the name of the property as it appears in your code. In the following example of an ``Employee`` class, we remap the ``first_name`` -property to ``firstName``. +property to ``firstName``. .. tabs-realm-languages:: @@ -264,28 +264,28 @@ Define an Asymmetric Object If you are using Flexible Sync and need to sync a collection unidirectionally from your decive to your Atlas database, you can set the ``asymmetric`` property -on your object schema. +on your object schema. .. tabs-realm-languages:: .. tab:: :tabid: javascript - .. literalinclude:: /examples/generated/react-native/js/data-ingest.test.snippet.data-ingest-object.jsx + .. literalinclude:: /examples/generated/react-native/js/data-ingest.test.snippet.data-ingest-object.jsx :language: javascript :emphasize-lines: 6 .. tab:: :tabid: typescript - .. literalinclude:: /examples/generated/react-native/ts/data-ingest.test.snippet.data-ingest-object.tsx + .. literalinclude:: /examples/generated/react-native/ts/data-ingest.test.snippet.data-ingest-object.tsx :language: typescript :emphasize-lines: 12 .. versionchanged:: ``realm@12.2.1`` In JS SDK versions 12.2.0 and earlier, you cannot link from -asymmetric objects to ``Realm.Object`` types. In SDK versions +asymmetric objects to ``Realm.Object`` types. In SDK versions 12.2.1 and later, asymmetric objects can link to ``Realm.Object`` types in addition to embedded objects. @@ -296,10 +296,52 @@ types in addition to embedded objects. To learn more about Data Ingest, read :ref:`Stream Data to Atlas `. +.. _react-native-model-unstructured-data: + +Define Unstructured Data +----------------------- + +.. versionadded:: ``realm@12.9.0`` + +Starting in SDK version 12.9.0, you can store :ref:`collections of mixed data ` +within a ``mixed`` property. You can use this feature to model complex data +structures, such as JSON or MongoDB documents, without having to define a +strict data model. + +**Unstructured data** is data that doesn't easily conform to an expected +schema, making it difficult or impractical to model to individual +data classes. For example, your app might have highly variable data or dynamic +data whose structure is unknown at runtime. + +Storing collections in a mixed property offers flexibility without sacrificing +functionality, including performant synchronization when using Device Sync. And +you can work with them the same way you would a non-mixed +collection: + +- You can nest mixed collections up to 100 levels. +- You can query on and :ref:`react to changes + ` on mixed collections. +- You can find and update individual mixed collection elements. + +However, storing data in mixed collections is less performant than using a structured +schema or serializing JSON blobs into a single string property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`mixed ` types. You can then +set these ``mixed`` properties as a :ref:`list ` or a +:ref:`dictionary ` collection of mixed +elements. Note that a ``mixed`` property *cannot* hold a set or an embedded +object. + +.. tip:: + + - Use a map of mixed data types when the type is unknown but each value will have a unique identifier. + - Use a list of mixed data types when the type is unknown but the order of objects is meaningful. + TypeScript and Required Properties ---------------------------------- -We recommend :ref:`creating Realm objects ` +We recommend :ref:`creating Realm objects ` with :realm-react-sdk:`Realm.create() `, but you can also use the ``new`` operator for your object model's class. @@ -310,4 +352,4 @@ fields are not defined. .. literalinclude:: /examples/generated/react-native/ts/BookReqProperties.snippet.book-model-req-properties.ts :language: javascript - :emphasize-lines: 1 \ No newline at end of file + :emphasize-lines: 1 diff --git a/temp/swift/model-data.txt b/temp/swift/model-data.txt index 0c51613888..85d43f435f 100644 --- a/temp/swift/model-data.txt +++ b/temp/swift/model-data.txt @@ -38,17 +38,17 @@ a special data access library, such as an :wikipedia:`ORM as you would any other class instance. Every Realm object conforms to a specific **object type**, which is -essentially a class that defines the :ref:`properties ` -and :ref:`relationships ` for objects of that type. -Realm guarantees that all objects in a realm conform to -the schema for their object type and validates objects whenever they're +essentially a class that defines the :ref:`properties ` +and :ref:`relationships ` for objects of that type. +Realm guarantees that all objects in a realm conform to +the schema for their object type and validates objects whenever they're created, modified, or deleted. .. example:: - + The following schema defines a ``Dog`` object type with a string name, optional string breed, date of birth, and primary key ID. - + .. tabs-realm-languages:: .. tab:: @@ -78,7 +78,7 @@ that derive from :objc-sdk:`RLMObject ` or realm schema. .. tip:: Configure Your Realm Schema - + To control which classes Realm adds to a realm schema, see :ref:`ios-provide-a-subset-of-classes-to-a-realm`. @@ -88,7 +88,7 @@ schema was provided for its type and that it meets all of the constraints specified in the schema. .. tip:: Learn How to Work With a Realm - + For code examples that show how to configure and open a realm in the Swift SDK, see :ref:`ios-configure-and-open-a-realm`. @@ -113,9 +113,9 @@ does not allow you to: .. versionadded:: 10.10.0 While you can't mix ``@Persisted`` and ``@objc dynamic`` property declarations - within a class, you can mix the notation styles across base and subclasses. - For example, a base class could have a ``@Persisted var foo: Int`` property, - and a subclass could have an ``@objc dynamic var bar = 0`` property, with + within a class, you can mix the notation styles across base and subclasses. + For example, a base class could have a ``@Persisted var foo: Int`` property, + and a subclass could have an ``@objc dynamic var bar = 0`` property, with both persisted. However, the ``@objc dynamic`` property would be ignored if the ``@Persisted`` property were within the same base or subclass. @@ -124,12 +124,12 @@ does not allow you to: Swift Structs ~~~~~~~~~~~~~ -Realm does not support Swift structs as models for a variety of -reasons. Realm's design focuses on "live" objects. -This concept is not compatible with value type structs. By design, -Realm provides features that are incompatible with these +Realm does not support Swift structs as models for a variety of +reasons. Realm's design focuses on "live" objects. +This concept is not compatible with value type structs. By design, +Realm provides features that are incompatible with these semantics, such as: - + - :ref:`Live data ` - :ref:`Reactive APIs ` - Low memory footprint of data @@ -138,12 +138,12 @@ semantics, such as: - Lack of data serialization/deserialization - :ref:`Keeping potentially complex object graphs synchronized ` -That said, it is sometimes useful to detach objects from their backing -realm. This typically isn't an ideal design decision. Instead, -developers use this as a workaround for temporary limitations in our +That said, it is sometimes useful to detach objects from their backing +realm. This typically isn't an ideal design decision. Instead, +developers use this as a workaround for temporary limitations in our library. -You can use key-value coding to initialize an unmanaged object as a copy of +You can use key-value coding to initialize an unmanaged object as a copy of a managed object. Then, you can work with that unmanaged object like any other :apple:`NSObject `. @@ -164,13 +164,13 @@ each property: - Whether Realm should store or ignore the property - Whether the property is a primary key or should be indexed -Properties are also the mechanism for establishing :ref:`relationships +Properties are also the mechanism for establishing :ref:`relationships ` between Realm object types. The Realm Swift SDK uses reflection to determine the properties -in your models at runtime. Your project must not set -``SWIFT_REFLECTION_METADATA_LEVEL = none``, or Realm cannot discover -children of types, such as properties and enum cases. Reflection is enabled +in your models at runtime. Your project must not set +``SWIFT_REFLECTION_METADATA_LEVEL = none``, or Realm cannot discover +children of types, such as properties and enum cases. Reflection is enabled by default if your project does not specifically set a level for this setting. .. _ios-build-view-models-with-realm: @@ -180,16 +180,16 @@ View Models with Realm .. versionadded:: 10.21.0 -You can work with a subset of your Realm object's properties -by creating a class projection. A class projection is a class that passes -through or transforms some or all of your Realm object's -properties. Class projection enables you to build view models that use an -abstraction of your object model. This simplifies using and :ref:`testing -` Realm objects +You can work with a subset of your Realm object's properties +by creating a class projection. A class projection is a class that passes +through or transforms some or all of your Realm object's +properties. Class projection enables you to build view models that use an +abstraction of your object model. This simplifies using and :ref:`testing +` Realm objects in your application. -With class projection, you can use a subset of your object's properties -directly in the UI or transform them. When you use a class projection for +With class projection, you can use a subset of your object's properties +directly in the UI or transform them. When you use a class projection for this, you get all the benefits of Realm's live objects: - The class-projected object live updates @@ -206,11 +206,11 @@ this, you get all the benefits of Realm's live objects: Relationships ------------- -Realm doesn't use bridge tables or explicit joins to define +Realm doesn't use bridge tables or explicit joins to define relationships as you would in a relational database. Realm -handles relationships through embedded objects or reference properties to -other Realm objects. You read from and write to these -properties directly. This makes querying relationships as performant as +handles relationships through embedded objects or reference properties to +other Realm objects. You read from and write to these +properties directly. This makes querying relationships as performant as querying against any other property. Realm supports **to-one**, **to-many**, and **inverse** @@ -221,10 +221,10 @@ relationships. To-One Relationship ~~~~~~~~~~~~~~~~~~~ -A **to-one** relationship means that an object relates to one other object. -You define a to-one relationship for an object type in its object -schema. Specify a property where the type is the related Realm -object type. For example, a dog might have a to-one relationship with +A **to-one** relationship means that an object relates to one other object. +You define a to-one relationship for an object type in its object +schema. Specify a property where the type is the related Realm +object type. For example, a dog might have a to-one relationship with a favorite toy. .. tip:: @@ -238,8 +238,8 @@ a favorite toy. To-Many Relationship ~~~~~~~~~~~~~~~~~~~~ -A **to-many** relationship means that an object relates to more than one -other object. In Realm, a to-many relationship is a list of +A **to-many** relationship means that an object relates to more than one +other object. In Realm, a to-many relationship is a list of references to other objects. For example, a person might have many dogs. A :swift-sdk:`List ` represents the :ref:`to-many @@ -259,10 +259,10 @@ query and are usually declared as a property of an object model. Inverse Relationship ~~~~~~~~~~~~~~~~~~~~ -Relationship definitions in Realm are unidirectional. An -**inverse relationship** links an object back to an object that refers -to it. You must explicitly define a property in the object's model as an -inverse relationship. Inverse relationships can link back to objects in +Relationship definitions in Realm are unidirectional. An +**inverse relationship** links an object back to an object that refers +to it. You must explicitly define a property in the object's model as an +inverse relationship. Inverse relationships can link back to objects in a to-one or to-many relationship. A :swift-sdk:`LinkingObjects ` collection @@ -270,26 +270,26 @@ represents the :ref:`inverse relationship ` between two Realm types. You cannot directly add or remove items from a LinkingObjects collection. -Inverse relationships automatically update themselves with corresponding -backlinks. You can find the same set of Realm objects with a -manual query, but the inverse relationship field reduces boilerplate query +Inverse relationships automatically update themselves with corresponding +backlinks. You can find the same set of Realm objects with a +manual query, but the inverse relationship field reduces boilerplate query code and capacity for error. -For example, consider a task tracker with the to-many relationship "User has -many Tasks". This does not automatically create the inverse relationship -"Task belongs to User". To create the inverse relationship, add a User -property on the Task that points back to the task's owner. When you specify -the inverse relationship from task to user, you can query on that. If you -don't specify the inverse relationship, you must run a separate query to +For example, consider a task tracker with the to-many relationship "User has +many Tasks". This does not automatically create the inverse relationship +"Task belongs to User". To create the inverse relationship, add a User +property on the Task that points back to the task's owner. When you specify +the inverse relationship from task to user, you can query on that. If you +don't specify the inverse relationship, you must run a separate query to look up the user to whom the task is assigned. .. important:: You cannot manually set the value of an inverse relationship property. - Instead, Realm updates implicit relationships when you add + Instead, Realm updates implicit relationships when you add or remove an object in the relationship. -Relationships can be many-to-one or many-to-many. So following inverse +Relationships can be many-to-one or many-to-many. So following inverse relationships can result in zero, one, or many objects. .. tip:: diff --git a/temp/swift/model-data/object-models.txt b/temp/swift/model-data/object-models.txt index 865c14e622..8cd97838f8 100644 --- a/temp/swift/model-data/object-models.txt +++ b/temp/swift/model-data/object-models.txt @@ -55,10 +55,10 @@ Declare Properties ------------------ When you declare the property attributes of a class, you can specify whether -or not those properties should be managed by the realm. **Managed properties** +or not those properties should be managed by the realm. **Managed properties** are stored or updated in the database. **Ignored properties** are not -stored to the database. You can mix managed and ignored properties -within a class. +stored to the database. You can mix managed and ignored properties +within a class. The syntax to mark properties as managed or ignored varies depending on which version of the SDK you use. @@ -69,24 +69,24 @@ Persisted Property Attributes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionadded:: 10.10.0 - The ``@Persisted`` declaration style replaces the ``@objc dynamic``, - ``RealmOptional``, and ``RealmProperty`` declaration notations from older - versions of the SDK. For an older version of the SDK, see: + The ``@Persisted`` declaration style replaces the ``@objc dynamic``, + ``RealmOptional``, and ``RealmProperty`` declaration notations from older + versions of the SDK. For an older version of the SDK, see: :ref:`Objective-C Dynamic Property Attributes `. -Declare model properties that you want to store to the database as +Declare model properties that you want to store to the database as ``@Persisted``. This enables them to access the underlying database data. -When you declare any properties as ``@Persisted`` within a class, the other +When you declare any properties as ``@Persisted`` within a class, the other properties within that class are automatically ignored. If you mix ``@Persisted`` and ``@objc dynamic`` property declarations within -a class definition, any property attributes marked as ``@objc dynamic`` will +a class definition, any property attributes marked as ``@objc dynamic`` will be ignored. .. seealso:: - Our :ref:`Supported Property Types ` + Our :ref:`Supported Property Types ` page contains a property declaration cheatsheet. .. _objc-dynamic-property-attributes: @@ -94,20 +94,20 @@ be ignored. Objective-C Dynamic Property Attributes ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .. versionchanged:: 10.10.0 - This property declaration information is for versions of the SDK before - 10.10.0. + This property declaration information is for versions of the SDK before + 10.10.0. Declare dynamic Realm model properties in the Objective-C runtime. This -enables them to access the underlying database data. +enables them to access the underlying database data. You can either: - Use ``@objc dynamic var`` to declare individual properties -- Use ``@objcMembers`` to declare a class. Then, declare individual - properties with ``dynamic var``. +- Use ``@objcMembers`` to declare a class. Then, declare individual + properties with ``dynamic var``. -Use ``let`` to declare ``LinkingObjects``, ``List``, ``RealmOptional`` and -``RealmProperty``. The Objective-C runtime cannot represent these +Use ``let`` to declare ``LinkingObjects``, ``List``, ``RealmOptional`` and +``RealmProperty``. The Objective-C runtime cannot represent these generic properties. .. versionchanged:: 10.8.0 @@ -115,7 +115,7 @@ generic properties. .. seealso:: - Our :ref:`Supported Property Types ` + Our :ref:`Supported Property Types ` page contains a property declaration cheatsheet. .. tip:: @@ -128,8 +128,8 @@ generic properties. .. tab:: Swift :tabid: swift - When declaring non-generic properties, use the ``@Persisted`` annotation. - The ``@Persisted`` attribute turns Realm model properties into accessors + When declaring non-generic properties, use the ``@Persisted`` annotation. + The ``@Persisted`` attribute turns Realm model properties into accessors for the underlying database data. .. tab:: Objective C @@ -137,7 +137,7 @@ generic properties. Declare properties on your object type as you would on a normal Objective-C interface. - + In order to use your interface in a Realm array, pass your interface name to the ``RLM_COLLECTION_TYPE()`` macro. You can put this at the bottom of your interface's header file. The @@ -146,7 +146,7 @@ generic properties. .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.array-declaration.m :language: objectivec - + .. tab:: Swift pre-10.10.0 :tabid: swift-pre-10.10.0 @@ -176,7 +176,7 @@ Specify an Optional/Required Property .. tab:: Swift :tabid: swift - You can declare properties as optional or required (non-optional) using + You can declare properties as optional or required (non-optional) using standard Swift syntax. .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.optional-required-properties.swift @@ -192,7 +192,7 @@ Specify an Optional/Required Property .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.optional-required-properties.m :language: objectivec - + .. tab:: Swift pre-10.10.0 :tabid: swift-pre-10.10.0 @@ -203,7 +203,7 @@ Specify an Optional/Required Property :swift-sdk:`ObjectId ` properties as optional or required (non-optional) using standard Swift syntax. Declare optional numeric types using the :swift-sdk:`RealmProperty - ` + ` type. .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.optional-required-properties-objc-dynamic.swift @@ -296,7 +296,7 @@ Realm supports indexing for string, integer, boolean, ``Date``, ``UUID``, .. tab:: Swift :tabid: swift - To index a property, declare the property with + To index a property, declare the property with :swift-sdk:`indexed:true ` on the ``@Persisted`` notation. @@ -345,14 +345,14 @@ observe them using :apple:`KVO .. tab:: Swift :tabid: swift - .. deprecated:: 10.10.0 + .. deprecated:: 10.10.0 ``ignoredProperties()`` If you don't want to save a field in your model to its realm, leave the ``@Persisted`` notation off the property attribute. - Additionally, if you mix ``@Persisted`` and ``@objc dynamic`` - property declarations within a class, the ``@objc dynamic`` + Additionally, if you mix ``@Persisted`` and ``@objc dynamic`` + property declarations within a class, the ``@objc dynamic`` properties will be ignored. .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.ignore-a-property.swift @@ -390,12 +390,12 @@ Declare Enum Properties .. tab:: Swift :tabid: swift - .. versionchanged:: 10.10.0 + .. versionchanged:: 10.10.0 Protocol is now ``PersistableEnum`` rather than ``RealmEnum``. You can use enums with ``@Persisted`` by marking them as complying with the - :swift-sdk:`PersistableEnum ` - protocol. A ``PersistableEnum`` can be any ``RawRepresentable`` enum + :swift-sdk:`PersistableEnum ` + protocol. A ``PersistableEnum`` can be any ``RawRepresentable`` enum whose raw type is a type that :ref:`Realm supports `. .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.realm-object-enum.swift @@ -421,19 +421,19 @@ Remap a Property Name .. versionadded:: 10.33.0 You can map the public name of a property in your object model to a different -private name to store in the realm. You might want to do this if your -Device Sync schema property names use snake case, for example, while your +private name to store in the realm. You might want to do this if your +Device Sync schema property names use snake case, for example, while your project uses Swift-idiomatic camel case. -Declare the name you want to use in your project as the ``@Persisted`` -property on the object model. Then, pass a dictionary containing the -public and private values for the property names via the +Declare the name you want to use in your project as the ``@Persisted`` +property on the object model. Then, pass a dictionary containing the +public and private values for the property names via the ``propertiesMapping()`` function. -In this example, ``firstName`` is the public property name we use in the code +In this example, ``firstName`` is the public property name we use in the code throughout the project to perform CRUD operations. Using the ``propertiesMapping()`` -function, we map that to store values using the private property name -``first_name`` in the realm. If we write to a synced realm, the Sync +function, we map that to store values using the private property name +``first_name`` in the realm. If we write to a synced realm, the Sync schema sees the values stored using the private property name ``first_name``. .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.rename-a-property.swift @@ -450,9 +450,9 @@ Define a Class Projection About These Examples ~~~~~~~~~~~~~~~~~~~~ -The examples in this section use a simple data set. The two Realm object -types are ``Person`` and an embedded object ``Address``. A ``Person`` has -a first and last name, an optional ``Address``, and a list of friends +The examples in this section use a simple data set. The two Realm object +types are ``Person`` and an embedded object ``Address``. A ``Person`` has +a first and last name, an optional ``Address``, and a list of friends consisting of other ``Person`` objects. An ``Address`` has a city and country. See the schema for these two classes, ``Person`` and ``Address``, below: @@ -467,17 +467,17 @@ How to Define a Class Projection .. versionadded:: 10.21.0 -Define a class projection by creating a class of type :swift-sdk:`Projection -`. Specify the :swift-sdk:`Object ` +Define a class projection by creating a class of type :swift-sdk:`Projection +`. Specify the :swift-sdk:`Object ` or :swift-sdk:`EmbeddedObject ` base whose -properties you want to use in the class projection. Use the ``@Projected`` -property wrapper to declare a property that you want to project from a +properties you want to use in the class projection. Use the ``@Projected`` +property wrapper to declare a property that you want to project from a ``@Persisted`` property on the base object. .. note:: - When you use a :ref:`List ` or a :ref:`MutableSet - ` in a class projection, the type in the + When you use a :ref:`List ` or a :ref:`MutableSet + ` in a class projection, the type in the class projection should be :swift-sdk:`ProjectedCollection <>`. .. literalinclude:: /examples/generated/code/start/ClassProjection.snippet.declare-class-projection.swift @@ -487,18 +487,18 @@ When you define a class projection, you can transform the original ``@Persisted` property in several ways: - Passthrough: the property is the same name and type as the original object -- Rename: the property has the same type as the original object, but a +- Rename: the property has the same type as the original object, but a different name - Keypath resolution: use keypath resolution to access properties of the - original object, including embedded object properties -- Collection mapping: Project :ref:`lists ` or - :ref:`mutable sets ` of ``Object`` s or + original object, including embedded object properties +- Collection mapping: Project :ref:`lists ` or + :ref:`mutable sets ` of ``Object`` s or ``EmbeddedObject`` s as a collection of primitive values -- Exclusion: when you use a class projection, the underlying object's - properties that are not ``@Projected`` through the class projection are - excluded. This enables you to watch for changes to a class projection - and not see changes for properties that are not part of the class - projection. +- Exclusion: when you use a class projection, the underlying object's + properties that are not ``@Projected`` through the class projection are + excluded. This enables you to watch for changes to a class projection + and not see changes for properties that are not part of the class + projection. .. _swift-define-asymmetric-object: @@ -507,10 +507,10 @@ Define an Asymmetric Object .. versionadded:: 10.29.0 -If your app uses Flexible Sync, you can use :ref:`Data Ingest +If your app uses Flexible Sync, you can use :ref:`Data Ingest ` to sync an object unidirectionally -from your device to the database linked to your Atlas App Services App. -Define an asymmetric object by inheriting from :swift-sdk:`AsymmetricObject +from your device to the database linked to your Atlas App Services App. +Define an asymmetric object by inheriting from :swift-sdk:`AsymmetricObject `. .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.asymmetric-model.swift @@ -518,7 +518,7 @@ Define an asymmetric object by inheriting from :swift-sdk:`AsymmetricObject .. versionchanged:: 10.42.4 Asymmetric objects can link to non-embedded objects. -``AsymmetricObject`` broadly supports the same property types as ``Object``, +``AsymmetricObject`` broadly supports the same property types as ``Object``, with a few exceptions: - Asymmetric objects can only link to embedded objects @@ -527,18 +527,62 @@ with a few exceptions: asymmetric objects can link to non-embedded objects. - ``EmbeddedObject`` and ``List`` are supported. -You cannot link to an ``AsymmetricObject`` from within an ``Object``. Doing so +You cannot link to an ``AsymmetricObject`` from within an ``Object``. Doing so throws an error. -Asymmetric objects do not function in the same way as other Realm Objects. +Asymmetric objects do not function in the same way as other Realm Objects. You cannot: - Add an asymmetric object to a realm - Remove an asymmetric object from a realm - Query an asymmetric object -You can only create an Asymmetric object, which then syncs unidirectionally +You can only create an Asymmetric object, which then syncs unidirectionally to the Atlas database linked to your App with Device Sync. -For more information, see: :ref:`Create an Asymmetric Object +For more information, see: :ref:`Create an Asymmetric Object `. + + +.. _ios-model-unstructured-data: + +Define Unstructured Data +----------------------- + +.. versionadded:: 10.15.0 + +Starting in SDK version 10.15.0, you can store :ref:`collections of mixed data ` +within a ``AnyRealmValue`` property. You can use this feature to model complex data +structures, such as JSON or MongoDB documents, without having to define a +strict data model. + +**Unstructured data** is data that doesn't easily conform to an expected +schema, making it difficult or impractical to model to individual +data classes. For example, your app might have highly variable data or dynamic +data whose structure is unknown at runtime. + +Storing collections in a mixed property offers flexibility without sacrificing +functionality, including performant synchronization when using Device Sync. And +you can work with them the same way you would a non-mixed +collection: + +- You can nest mixed collections up to 100 levels. +- You can query on and :ref:`react to changes + ` on mixed collections. +- You can find and update individual mixed collection elements. + +However, storing data in mixed collections is less performant than using a structured +schema or serializing JSON blobs into a single string property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`AnyRealmValue ` types. You can then +set these ``AnyRealmValue`` properties as a list or a +dictionary collection of ``AnyRealmValue`` elements. +Note that ``AnyRealmValue`` *cannot* represent a ``MutableSet`` or an embedded +object. + +.. tip:: + + - Use a map of mixed data types when the type is unknown but each value will have a unique identifier. + - Use a list of mixed data types when the type is unknown but the order of + objects is meaningful. diff --git a/temp/swift/model-data/supported-types.txt b/temp/swift/model-data/supported-types.txt index 8fd44c29f5..1663eb2179 100644 --- a/temp/swift/model-data/supported-types.txt +++ b/temp/swift/model-data/supported-types.txt @@ -4,7 +4,7 @@ Supported Types - Swift SDK =========================== -.. meta:: +.. meta:: :description: Atlas Device SDK for Swift supports a range of primitive data types, as well as collections and geospatial data. :keywords: code example @@ -53,8 +53,8 @@ operate on any Realm collection: Results and Sectioned Results ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -The Swift SDK :swift-sdk:`Results ` collection is -a class representing objects retrieved from queries. A +The Swift SDK :swift-sdk:`Results ` collection is +a class representing objects retrieved from queries. A :swift-sdk:`Results ` collection represents the lazily-evaluated results of a query operation. Results are immutable: you cannot add or remove elements to or from the results collection. @@ -62,14 +62,14 @@ Results have an associated query that determines their contents. The Swift SDK also provides :swift-sdk:`SectionedResults `, a type-safe collection which holds ``ResultsSection`` as its elements. -Each :swift-sdk:`ResultSection ` is a results +Each :swift-sdk:`ResultSection ` is a results collection that contains only objects that belong to a given section key. For example, an app that includes a contact list might use SectionedResults -to display a list of contacts divided into sections, where each section +to display a list of contacts divided into sections, where each section contains all the contacts whose first name starts with the given letter. The ``ResultsSection`` whose key is "L" would contain "Larry", "Liam", -and "Lisa". +and "Lisa". .. seealso:: @@ -78,16 +78,16 @@ and "Lisa". Collections as Properties ~~~~~~~~~~~~~~~~~~~~~~~~~ -The Swift SDK also offers several collection types you can use as properties +The Swift SDK also offers several collection types you can use as properties in your data model: -#. :swift-sdk:`List `, a class representing +#. :swift-sdk:`List `, a class representing :ref:`to-many relationships ` in models. -#. :swift-sdk:`LinkingObjects `, a class +#. :swift-sdk:`LinkingObjects `, a class representing :ref:`inverse relationships ` in models. -#. :ref:`MutableSet `, a class representing +#. :ref:`MutableSet `, a class representing a :ref:`to-many relationship `. -#. :ref:`Map `, a class representing an associative array of key-value +#. :ref:`Map `, a class representing an associative array of key-value pairs with unique keys. #. :swift-sdk:`AnyRealmCollection `, a :wikipedia:`type-erased ` class that can forward calls to a concrete Realm collection like Results, List or LinkingObjects. @@ -133,7 +133,7 @@ Supported Property Types You can use the following types to define your object model properties. -.. include:: /includes/map-to-bson-type.rst +.. include:: /includes/map-to-bson-type.rst See also :ref:``. @@ -152,7 +152,7 @@ Property Cheat Sheet :header-rows: 1 :stub-columns: 1 :widths: 20 40 40 - + * - Type - Required - Optional @@ -231,12 +231,12 @@ Property Cheat Sheet :language: swift :copyable: false - N/A - * - :ref:`MutableSet ` + * - :ref:`MutableSet ` - .. literalinclude:: /examples/generated/code/start/SupportedTypes.snippet.mutableSet-required.swift :language: swift :copyable: false - N/A - * - :ref:`Map ` + * - :ref:`Map ` - .. literalinclude:: /examples/generated/code/start/SupportedTypes.snippet.map-required.swift :language: swift :copyable: false @@ -267,31 +267,31 @@ Property Cheat Sheet ``CGFloat`` properties are discouraged, as the type is not platform independent. - To use Key-Value Coding with a user-defined object in the ``@Persisted`` + To use Key-Value Coding with a user-defined object in the ``@Persisted`` syntax, add the ``@objc`` attribute: ``@Persisted @objc var myObject: MyClass?`` Setting Default Values `````````````````````` - With the ``@Persisted`` property declaration syntax, you may see a - performance impact when setting default values for: - + With the ``@Persisted`` property declaration syntax, you may see a + performance impact when setting default values for: + - ``List`` - - ``MutableSet`` + - ``MutableSet`` - ``Dictionary`` - ``Decimal128`` - ``UUID`` - - ``ObjectId`` - - ``@Persisted var listProperty: List`` and ``@Persisted var - listProperty = List()`` are both valid, and are functionally - equivalent. However, the second declaration will result in poorer - performance. - - This is because the List is created when the parent object is - created, rather than lazily as needed. For most types, this is - a difference so small you can't measure it. For the types listed - here, you may see a performance impact when using the second + - ``ObjectId`` + + ``@Persisted var listProperty: List`` and ``@Persisted var + listProperty = List()`` are both valid, and are functionally + equivalent. However, the second declaration will result in poorer + performance. + + This is because the List is created when the parent object is + created, rather than lazily as needed. For most types, this is + a difference so small you can't measure it. For the types listed + here, you may see a performance impact when using the second declaration style. .. tab:: Objective-C @@ -301,7 +301,7 @@ Property Cheat Sheet :header-rows: 1 :stub-columns: 1 :widths: 20 40 40 - + * - Type - Required - Optional @@ -418,7 +418,7 @@ Property Cheat Sheet :header-rows: 1 :stub-columns: 1 :widths: 20 40 40 - + * - Type - Required - Optional @@ -429,7 +429,7 @@ Property Cheat Sheet @objc dynamic var value = false - .. code-block:: swift :copyable: false - + let value = RealmProperty() * - Int, Int8, Int16, Int32, Int64 - .. code-block:: swift @@ -438,111 +438,111 @@ Property Cheat Sheet @objc dynamic var value = 0 - .. code-block:: swift :copyable: false - + let value = RealmProperty() * - Float - .. code-block:: swift :copyable: false - + @objc dynamic var value: Float = 0.0 - .. code-block:: swift :copyable: false - + let value = RealmProperty() * - Double - .. code-block:: swift :copyable: false - + @objc dynamic var value: Double = 0.0 - .. code-block:: swift :copyable: false - + let value = RealmProperty() * - String - .. code-block:: swift :copyable: false - + @objc dynamic var value = "" - .. code-block:: swift :copyable: false - + @objc dynamic var value: String? = nil * - Data - .. code-block:: swift :copyable: false - + @objc dynamic var value = Data() - .. code-block:: swift :copyable: false - + @objc dynamic var value: Data? = nil * - Date - .. code-block:: swift :copyable: false - + @objc dynamic var value = Date() - .. code-block:: swift :copyable: false - + @objc dynamic var value: Date? = nil * - Decimal128 - .. code-block:: swift :copyable: false - + @objc dynamic var decimal: Decimal128 = 0 - .. code-block:: swift :copyable: false - + @objc dynamic var decimal: Decimal128? * - :swift-sdk:`UUID ` - .. code-block:: swift :copyable: false - + @objc dynamic var uuid = UUID() - .. code-block:: swift :copyable: false - + @objc dynamic var uuidOpt: UUID? * - :swift-sdk:`ObjectId ` - .. code-block:: swift :copyable: false - + @objc dynamic var objectId = ObjectId.generate() - .. code-block:: swift :copyable: false - + @objc dynamic var objectId: ObjectId? * - :swift-sdk:`List ` - .. code-block:: swift :copyable: false - + let value = List() - - - * - :ref:`MutableSet ` + - + * - :ref:`MutableSet ` - .. code-block:: swift :copyable: false - + let value = MutableSet() - - - * - :ref:`Map ` + - + * - :ref:`Map ` - .. code-block:: swift :copyable: false - + let value = Map() - - + - * - :ref:`AnyRealmValue ` - .. code-block:: swift :copyable: false - + let value = RealmProperty() - N/A * - User-defined :swift-sdk:`Object ` - N/A - .. code-block:: swift :copyable: false - + @objc dynamic var value: MyClass? - + Additionally: - :swift-sdk:`EmbeddedObject `-derived types @@ -560,13 +560,13 @@ Unique Identifiers .. versionadded:: 10.8.0 ``UUID`` type -``ObjectId`` is a MongoDB-specific 12-byte unique value. ``UUID`` is a -16-byte globally-unique value. You can :ref:`index ` +``ObjectId`` is a MongoDB-specific 12-byte unique value. ``UUID`` is a +16-byte globally-unique value. You can :ref:`index ` both types, and use either as a :ref:`primary key `. .. note:: - When declaring default values for ``@Persisted`` UUID or ObjectId property + When declaring default values for ``@Persisted`` UUID or ObjectId property attributes, both of these syntax types are valid: - ``@Persisted var value: UUID`` @@ -576,10 +576,10 @@ both types, and use either as a :ref:`primary key `. latter creates a new identifier that is never used any time an object is read from the realm, while the former only creates them when needed. - ``@Persisted var id: ObjectId`` has equivalent behavior to ``@objc dynamic - var _id = ObjectId.generate()``. They both make random ObjectIds. - - ``@Persisted var _id = ObjectId()`` has equivalent behavior to ``@objc + ``@Persisted var id: ObjectId`` has equivalent behavior to ``@objc dynamic + var _id = ObjectId.generate()``. They both make random ObjectIds. + + ``@Persisted var _id = ObjectId()`` has equivalent behavior to ``@objc dynamic var _id = ObjectId()``. They both make zero-initialized ObjectIds. .. _ios-size-limitations: @@ -619,10 +619,10 @@ Mutable Set .. versionadded:: 10.8.0 -A :swift-sdk:`MutableSet ` -collection represents a :ref:`to-many relationship ` -containing distinct values. A ``MutableSet`` supports the following types -(and their optional versions): +A :swift-sdk:`MutableSet ` +collection represents a :ref:`to-many relationship ` +containing distinct values. A ``MutableSet`` supports the following types +(and their optional versions): - Bool - Data @@ -640,22 +640,22 @@ containing distinct values. A ``MutableSet`` supports the following types - String - UUID -Like Swift's :apple:`Set `, ``MutableSet`` is a -generic type that is parameterized on the type it stores. Unlike -:apple:`native Swift collections `, -Realm mutable sets are reference types, as opposed to value -types (structs). +Like Swift's :apple:`Set `, ``MutableSet`` is a +generic type that is parameterized on the type it stores. Unlike +:apple:`native Swift collections `, +Realm mutable sets are reference types, as opposed to value +types (structs). -You can only call the ``MutableSets`` mutation methods during a write -transaction. As a result, ``MutableSets`` are immutable if you open the -managing realm as a read-only realm. +You can only call the ``MutableSets`` mutation methods during a write +transaction. As a result, ``MutableSets`` are immutable if you open the +managing realm as a read-only realm. -You can filter and sort a ``MutableSet`` with the :ref:`same predicates +You can filter and sort a ``MutableSet`` with the :ref:`same predicates ` as :ref:`Results `. Like other -Realm collections, you can :ref:`register a change listener +Realm collections, you can :ref:`register a change listener ` on a ``MutableSet``. -For example, a ``Dog`` class model might contain a ``MutableSet`` for +For example, a ``Dog`` class model might contain a ``MutableSet`` for ``citiesVisited``: .. code-block:: swift @@ -669,14 +669,14 @@ For example, a ``Dog`` class model might contain a ``MutableSet`` for .. note:: - When declaring default values for ``@Persisted`` MutableSet property attributes, + When declaring default values for ``@Persisted`` MutableSet property attributes, both of these syntax types is valid: - ``@Persisted var value: MutableSet`` - ``@Persisted var value = MutableSet()`` However, the second will result in significantly worse performance. This is - because the MutableSet is created when the parent object is created, rather than + because the MutableSet is created when the parent object is created, rather than lazily as needed. .. _ios-map: @@ -704,7 +704,7 @@ You can declare a Map as a property of an object: class Dog: Object { @Persisted var name = "" @Persisted var currentCity = "" - + // Map of city name -> favorite park in that city @Persisted var favoriteParksByCity: Map } @@ -722,7 +722,7 @@ You can declare a Map as a property of an object: - ``@Persisted var value = Map()`` However, the second will result in significantly worse performance. This is - because the Map is created when the parent object is created, rather than + because the Map is created when the parent object is created, rather than lazily as needed. .. _ios-mixed-data-type: @@ -731,9 +731,13 @@ You can declare a Map as a property of an object: AnyRealmValue ~~~~~~~~~~~~~ +.. versionchanged:: 10.15.0 + + ``AnyRealmValue`` properties can hold lists or maps of mixed data. + .. versionadded:: 10.8.0 -``AnyRealmValue`` is a Realm property type that can hold different +``AnyRealmValue`` is a Realm property type that can hold different data types. Supported ``AnyRealmValue`` data types include: - Int @@ -746,11 +750,15 @@ data types. Supported ``AnyRealmValue`` data types include: - Date - Data - String +- List +- Map - Object -This :swift-sdk:`mixed data type ` -is :ref:`indexable `, but you can't use it as a -:ref:`primary key `. Because ``null`` is a +``AnyRealmValue`` *cannot* hold a ``MutableSet`` or embedded object. + +This :swift-sdk:`mixed data type ` +is :ref:`indexable `, but you can't use it as a +:ref:`primary key `. Because ``null`` is a permitted value, you can't declare an ``AnyRealmValue`` as optional. .. code-block:: swift @@ -759,10 +767,32 @@ permitted value, you can't declare an ``AnyRealmValue`` as optional. class Dog: Object { @Persisted var name = "" @Persisted var currentCity = "" - + @Persisted var companion: AnyRealmValue } +.. _ios-nested-collections-realmanyvalue: + +Collections as Mixed +```````````````````` + +In version 10.15.0 and later, a ``AnyRealmValue`` data type can +contain collections (a list or map, but *not* a set) of ``AnyRealmValue`` +elements. You can use mixed collections to +model unstructured or variable data. For more information, refer to +:ref:``. + +- You can nest mixed collections up to 100 levels. +- You can query mixed collection properties and + :ref:`register a listener for changes `, + as you would a normal collection. +- You can find and update individual mixed collection elements +- You *cannot* store sets or embedded objects in mixed collections. + +To use mixed collections in your app, define the ``AnyRealmValue`` type +property in your data model. +Then, you can create the list or map collections like any other mixed data value. + .. _swift-geospatial-data-type: Geospatial Data @@ -770,23 +800,23 @@ Geospatial Data .. versionadded:: 10.47.0 -Geospatial data, or "geodata", specifies points and geometric objects on -the Earth's surface. +Geospatial data, or "geodata", specifies points and geometric objects on +the Earth's surface. -If you want to persist geospatial data, it must conform to the -`GeoJSON spec `__. +If you want to persist geospatial data, it must conform to the +`GeoJSON spec `__. -To persist geospatial data with the Swift SDK, create a GeoJSON-compatible +To persist geospatial data with the Swift SDK, create a GeoJSON-compatible embedded class that you can use in your data model. -Your custom embedded object must contain the two fields required by the +Your custom embedded object must contain the two fields required by the GeoJSON spec: -- A field of type ``String`` property that maps to a ``type`` property with +- A field of type ``String`` property that maps to a ``type`` property with the value of ``"Point"``: ``@Persisted var type: String = "Point"`` -- A field of type ``List`` that maps to a ``coordinates`` - property containing a latitude/longitude pair: +- A field of type ``List`` that maps to a ``coordinates`` + property containing a latitude/longitude pair: ``@Persisted private var coordinates: List`` .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.custom-geopoint.swift @@ -800,10 +830,10 @@ Map Unsupported Types to Supported Types .. versionadded:: 10.20.0 -You can use Type Projection to persist unsupported types as supported types -in Realm. This enables you to work with Swift types that Realm -does not support, but store them as types that Realm does support. You could -store a URL as a ``String``, for example, but read it from +You can use Type Projection to persist unsupported types as supported types +in Realm. This enables you to work with Swift types that Realm +does not support, but store them as types that Realm does support. You could +store a URL as a ``String``, for example, but read it from Realm and use it in your application as though it were a URL. Declare Type Projections @@ -811,9 +841,9 @@ Declare Type Projections To use type projection with Realm: -1. Use one of Realm's custom type protocols to map an unsupported data type +1. Use one of Realm's custom type protocols to map an unsupported data type to a type that Realm supports -#. Use the projected types as @Persisted properties in the Realm object +#. Use the projected types as @Persisted properties in the Realm object model .. _ios-conform-to-type-projection-protocol: @@ -821,7 +851,7 @@ To use type projection with Realm: Conform to the Type Projection Protocol ``````````````````````````````````````` -You can map an unsupported data type to a :ref:`type that Realm supports +You can map an unsupported data type to a :ref:`type that Realm supports ` using one of the Realm type projection protocols. The Swift SDK provides two type projection protocols: @@ -829,18 +859,18 @@ The Swift SDK provides two type projection protocols: - CustomPersistable - FailableCustomPersistable -Use :swift-sdk:`CustomPersistable ` +Use :swift-sdk:`CustomPersistable ` when there is no chance the conversion can fail. -Use :swift-sdk:`FailableCustomPersistable ` -when it is possible for the conversion to fail. +Use :swift-sdk:`FailableCustomPersistable ` +when it is possible for the conversion to fail. .. literalinclude:: /examples/generated/code/start/TypeProjection.snippet.custom-persistable-protocols.swift :language: swift .. seealso:: - These are protocols modeled after Swift's built-in :apple:`RawRepresentable + These are protocols modeled after Swift's built-in :apple:`RawRepresentable `. .. _ios-persisted-types: @@ -848,12 +878,12 @@ when it is possible for the conversion to fail. Supported PersistedTypes ++++++++++++++++++++++++ -The ``PersistedType`` can use any of the primitive types that the -:ref:`Swift SDK supports `. It can also be +The ``PersistedType`` can use any of the primitive types that the +:ref:`Swift SDK supports `. It can also be an :ref:`Embedded Object `. -``PersistedType`` cannot be an optional or a :ref:`collection -`. However you can use the mapped type as an +``PersistedType`` cannot be an optional or a :ref:`collection +`. However you can use the mapped type as an optional or collection property in your object model. .. code-block:: swift @@ -879,8 +909,8 @@ optional or collection property in your object model. Use Type Projection in the Model ```````````````````````````````` -A type that conforms to one of the type projection protocols can be used with -the ``@Persisted`` property declaration syntax introduced in Swift SDK +A type that conforms to one of the type projection protocols can be used with +the ``@Persisted`` property declaration syntax introduced in Swift SDK version 10.10.0. It does not work with the ``@objc dynamic`` syntax. You can use projected types for: @@ -891,16 +921,16 @@ You can use projected types for: When using a ``FailableCustomPersistable`` as a property, define it as an optional property. When it is optional, the ``FailableCustomPersistable`` -protocol maps invalid values to ``nil``. When it is a required property, it is -force-unwrapped. If you have a value that can't be converted to the projected +protocol maps invalid values to ``nil``. When it is a required property, it is +force-unwrapped. If you have a value that can't be converted to the projected type, reading that property throws an unwrapped fail exception. .. literalinclude:: /examples/generated/code/start/TypeProjection.snippet.use-type-projection-in-objects.swift :language: swift -When your model contains projected types, you can :ref:`create the object -` with values using the persisted type, or -by assigning to the field properties of an initialized object using the +When your model contains projected types, you can :ref:`create the object +` with values using the persisted type, or +by assigning to the field properties of an initialized object using the projected types. .. literalinclude:: /examples/generated/code/start/TypeProjection.snippet.create-objects-with-type-projection.swift @@ -910,9 +940,9 @@ Type Projection in the Schema +++++++++++++++++++++++++++++ When you declare your type as conforming to a type projection protocol, you -specify the type that should be persisted in realm. For example, if +specify the type that should be persisted in realm. For example, if you map a custom type ``URL`` to a persisted type of ``String``, a ``URL`` -property appears as a ``String`` in the schema, and dynamic access to the +property appears as a ``String`` in the schema, and dynamic access to the property acts on strings. The schema does not directly represent mapped types. Changing a property From a51fffba6263637196ed541bb08a28abab7aa235 Mon Sep 17 00:00:00 2001 From: osharaf-mdb Date: Wed, 12 Jun 2024 10:44:01 -0400 Subject: [PATCH 35/63] DOCSP-40232 formatting typo (#3294) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-40323 *Staged Page* - [Atlas Device SDKs](https://preview-mongodbosharafmdb.gatsbyjs.io/realm/DOCSP-40232-formatting-typo/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [ ] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [ ] Tag the consolidated page for: - genre - meta.keywords - meta.description --------- Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --- temp/react-native/app-services.txt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/temp/react-native/app-services.txt b/temp/react-native/app-services.txt index d7edf7b019..e562f5a371 100644 --- a/temp/react-native/app-services.txt +++ b/temp/react-native/app-services.txt @@ -5,6 +5,13 @@ App Services - React Native SDK =============================== +.. meta:: + :description: Overview of using Atlas App Services with the Atlas Device SDK for React Native. + +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -29,7 +36,7 @@ The App Client When using the SDK to access the App Services backend, you start with an App object. This object provides all other functionality related to -App Services. The``App`` object is +App Services. The ``App`` object is :ref:`initialized ` with the App ID, which you can :ref:`find in the App Services UI `. From 227206b8baa075fdacbcb360a482675f9b31b6db Mon Sep 17 00:00:00 2001 From: Brandon Ly Date: Mon, 24 Jun 2024 14:06:40 -0500 Subject: [PATCH 36/63] Create netlify.toml (#3309) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-NNNNN --- build.sh | 2 ++ netlify.toml | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 build.sh create mode 100644 netlify.toml diff --git a/build.sh b/build.sh new file mode 100644 index 0000000000..a69632987a --- /dev/null +++ b/build.sh @@ -0,0 +1,2 @@ +curl https://raw.githubusercontent.com/mongodb/docs-worker-pool/netlify-poc/scripts/build-site.sh -o build-site.sh +sh build-site.sh diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000000..d0c890406b --- /dev/null +++ b/netlify.toml @@ -0,0 +1,6 @@ +[[integrations]] +name = "snooty-cache-plugin" + +[build] +publish = "snooty/public" +command = ". ./build.sh" From 22a4cb83e6787b54642bc4cd41cc343791255c56 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Mon, 24 Jun 2024 17:37:35 -0400 Subject: [PATCH 37/63] Remove misplaced .NET file --- .../model-data/data-types/realm-value.txt | 58 ------------------- 1 file changed, 58 deletions(-) delete mode 100644 source/sdk/dotnet/model-data/data-types/realm-value.txt diff --git a/source/sdk/dotnet/model-data/data-types/realm-value.txt b/source/sdk/dotnet/model-data/data-types/realm-value.txt deleted file mode 100644 index 8d643445e0..0000000000 --- a/source/sdk/dotnet/model-data/data-types/realm-value.txt +++ /dev/null @@ -1,58 +0,0 @@ -.. _realmvalue: - -===================== -RealmValue - .NET SDK -===================== - -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol - -.. versionchanged:: 12.2.0 - - ``RealmValue`` can hold lists and dictionaries of mixed data. - -The ``RealmValue`` data type is a mixed data type, and can represent any -other valid Realm data type except an embedded object or a set. You can create collections -(lists, sets, and dictionaries) of type ``RealmValue``: - -.. literalinclude:: /examples/generated/dotnet/DataTypesSectionExamples.snippet.realmValues.cs - :language: csharp - -.. note:: - - You cannot create a nullable ``RealmValue``. However, if you want a - ``RealmValue`` property to contain a null value, you can - use the special ``RealmValue.Null`` property. - -Create a RealmValue Property ----------------------------- - -The following code demonstrates creating a ``RealmValue`` property in a class -that inherits from ``IRealmObject`` and then setting and getting the value of -that property: - -.. literalinclude:: /examples/generated/dotnet/DataTypesSectionExamples.snippet.realmvalue.cs - :language: csharp - -.. _dotnet-nested-collections-realm-value: - -Collections as Mixed --------------------- - -In version 12.22.0 and later, a ``RealmValue`` data type can hold collections -(a list or dictionary, but *not* a set) of ``RealmValue`` elements. You can use -mixed collections to model unstructured or variable data. For more information, -refer to :ref:``. - -- You can nest mixed collections up to 100 levels. -- You can query mixed collection properties and - :ref:`register a listener for changes `, - as you would a normal collection. -- You can find and update individual mixed collection elements -- You *cannot* store sets or embedded objects in mixed collections. - -To use mixed collections, define the ``RealmValue`` type property in your data model. -Then, set the property as a list or dictionary. From 451b40f02a3eaeefcbc2fcbc13293ebebed6c3cd Mon Sep 17 00:00:00 2001 From: osharaf-mdb Date: Tue, 25 Jun 2024 11:42:06 -0400 Subject: [PATCH 38/63] DOCSP-16785 the the typo (#3297) ## Pull Request Info Jira ticket: https://jira.mongodb.org/browse/DOCSP-16785 - [Many Pages Across docs-realm](https://preview-mongodbosharafmdb.gatsbyjs.io/realm/DOCSP-16785-the-the-typo/): changed "the the" typo and added metadata ### Reminder Checklist Before merging your PR, make sure to check a few things. - [ ] Did you tag pages appropriately? - genre - programming_language - meta.keywords - meta.description - [ ] Describe your PR's changes in the Release Notes section - [ ] Create a Jira ticket for related docs-realm work, if any ### Release Notes - **Across many docs-realm pages** - fixed "the the" typo and added meta data ### Review Guidelines [REVIEWING.md](https://github.com/mongodb/docs-app-services/blob/master/REVIEWING.md) --------- Co-authored-by: lindseymoore <71525840+lindseymoore@users.noreply.github.com> Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --- docs-release-notes.md | 2 +- .../com/mongodb/realm/examples/java/ClientResetTest.java | 2 +- .../com/mongodb/realm/examples/kotlin/ClientResetTest.kt | 2 +- .../legacy/__tests__/js/CRUD/update.test.jsx | 2 +- .../ClientResetTest.snippet.handle-manual-reset.java | 2 +- .../sync/ClientResetTest.snippet.handle-manual-reset.kt | 2 +- source/includes/aggregation-stages.rst | 2 +- temp/cpp/users/custom-user-data.txt | 8 +++++++- temp/dotnet/app-services/call-a-function.txt | 9 ++++++++- temp/dotnet/manage-users/custom-user-data.txt | 9 ++++++++- temp/flutter/sync/write-to-synced-realm.txt | 9 ++++++++- temp/flutter/users/custom-user-data.txt | 9 ++++++++- temp/java/quick-starts/livedata.txt | 9 ++++++++- temp/java/users/custom-user-data.txt | 4 ++-- temp/kotlin/users/custom-user-data.txt | 9 ++++++++- temp/node/users/authenticate-users.txt | 9 ++++++++- temp/swift/swiftui/swiftui-previews.txt | 9 ++++++++- temp/swift/sync/write-to-synced-realm.txt | 9 ++++++++- temp/swift/users/custom-user-data.txt | 9 ++++++++- 19 files changed, 96 insertions(+), 20 deletions(-) diff --git a/docs-release-notes.md b/docs-release-notes.md index 09cb219684..9f9f597816 100644 --- a/docs-release-notes.md +++ b/docs-release-notes.md @@ -1627,7 +1627,7 @@ Prepare docs for C++ GA release, including: - Model Data - Define an Object Model: Update info for C# nullable reference types and nullable-aware context, add a Bluehawked code example - Data Binding: Move a section about data binding and MVVM from Define an Object Model to Data Binding page -- React to Changes: Add a callout with info about binding data to the UI and a link to the the Data Binding page +- React to Changes: Add a callout with info about binding data to the UI and a link to the Data Binding page ## Node.js SDK diff --git a/examples/java/sync/app/src/androidTest/java/com/mongodb/realm/examples/java/ClientResetTest.java b/examples/java/sync/app/src/androidTest/java/com/mongodb/realm/examples/java/ClientResetTest.java index e9b9272fbc..c3b529ce44 100644 --- a/examples/java/sync/app/src/androidTest/java/com/mongodb/realm/examples/java/ClientResetTest.java +++ b/examples/java/sync/app/src/androidTest/java/com/mongodb/realm/examples/java/ClientResetTest.java @@ -238,7 +238,7 @@ public void handleManualReset(App app, SyncSession session, ClientResetRequiredE Log.w("EXAMPLE", "Opened a fresh instance of the realm."); - // Open the the realm backup -- as a dynamic realm + // Open the realm backup -- as a dynamic realm // (no formal schema; access all data through field lookups) DynamicRealm backupRealm = DynamicRealm.getInstance(error.getBackupRealmConfiguration()); Log.w("EXAMPLE", "Opened the backup realm."); diff --git a/examples/java/sync/app/src/androidTest/java/com/mongodb/realm/examples/kotlin/ClientResetTest.kt b/examples/java/sync/app/src/androidTest/java/com/mongodb/realm/examples/kotlin/ClientResetTest.kt index 7ce7d1e76c..99166eca80 100644 --- a/examples/java/sync/app/src/androidTest/java/com/mongodb/realm/examples/kotlin/ClientResetTest.kt +++ b/examples/java/sync/app/src/androidTest/java/com/mongodb/realm/examples/kotlin/ClientResetTest.kt @@ -265,7 +265,7 @@ class ClientResetTest : RealmTest() { } Log.w("EXAMPLE", "Opened a fresh instance of the realm.") - // Open the the realm backup -- as a dynamic realm + // Open the realm backup -- as a dynamic realm // (no formal schema; access all data through field lookups) val backupRealm = DynamicRealm.getInstance(error.backupRealmConfiguration) diff --git a/examples/react-native/legacy/__tests__/js/CRUD/update.test.jsx b/examples/react-native/legacy/__tests__/js/CRUD/update.test.jsx index 4209b0317c..605b716363 100644 --- a/examples/react-native/legacy/__tests__/js/CRUD/update.test.jsx +++ b/examples/react-native/legacy/__tests__/js/CRUD/update.test.jsx @@ -175,7 +175,7 @@ describe('Update Data Tests', () => { ); const carWashTask = assertionRealm.objectForPrimaryKey(Task, 1234); - // Test that the the 'Wash the car' task was upserted, and progressMinutesText is now displaying 5 minutes progressed + // Test that the 'Wash the car' task was upserted, and progressMinutesText is now displaying 5 minutes progressed expect(progressMinutesText.children.toString()).toBe('5'); expect(carWashTask.progressMinutes).toBe(5); }); diff --git a/source/examples/generated/java/sync/ClientResetTest.snippet.handle-manual-reset.java b/source/examples/generated/java/sync/ClientResetTest.snippet.handle-manual-reset.java index d5c380d07c..660e86a0a1 100644 --- a/source/examples/generated/java/sync/ClientResetTest.snippet.handle-manual-reset.java +++ b/source/examples/generated/java/sync/ClientResetTest.snippet.handle-manual-reset.java @@ -40,7 +40,7 @@ public void handleManualReset(App app, SyncSession session, ClientResetRequiredE Log.w("EXAMPLE", "Opened a fresh instance of the realm."); - // Open the the realm backup -- as a dynamic realm + // Open the realm backup -- as a dynamic realm // (no formal schema; access all data through field lookups) DynamicRealm backupRealm = DynamicRealm.getInstance(error.getBackupRealmConfiguration()); Log.w("EXAMPLE", "Opened the backup realm."); diff --git a/source/examples/generated/java/sync/ClientResetTest.snippet.handle-manual-reset.kt b/source/examples/generated/java/sync/ClientResetTest.snippet.handle-manual-reset.kt index 872cd89cf9..c683e47afe 100644 --- a/source/examples/generated/java/sync/ClientResetTest.snippet.handle-manual-reset.kt +++ b/source/examples/generated/java/sync/ClientResetTest.snippet.handle-manual-reset.kt @@ -39,7 +39,7 @@ fun handleManualReset(app: App, session: SyncSession?, error: ClientResetRequire } Log.w("EXAMPLE", "Opened a fresh instance of the realm.") - // Open the the realm backup -- as a dynamic realm + // Open the realm backup -- as a dynamic realm // (no formal schema; access all data through field lookups) val backupRealm = DynamicRealm.getInstance(error.backupRealmConfiguration) diff --git a/source/includes/aggregation-stages.rst b/source/includes/aggregation-stages.rst index 48daa2a6e6..6c0c59d798 100644 --- a/source/includes/aggregation-stages.rst +++ b/source/includes/aggregation-stages.rst @@ -208,7 +208,7 @@ but replaces the array value with the array element in each copy. #. Use ``$group`` stage with ``$addToSet`` to create new documents for each ``type`` with a new field ``colors`` that contains an array - of all the the colors for that flower type that occur in the collection. + of all the colors for that flower type that occur in the collection. #. Use ``$unwind`` stage to create separate documents for each combination of type and color. #. Use ``$sort`` stage to sort the results in alphabetical order. diff --git a/temp/cpp/users/custom-user-data.txt b/temp/cpp/users/custom-user-data.txt index 7662db5354..3564fa28fe 100644 --- a/temp/cpp/users/custom-user-data.txt +++ b/temp/cpp/users/custom-user-data.txt @@ -4,6 +4,12 @@ Custom User Data - C++ SDK ========================== +.. meta:: + :description: Learn how to create custom user data using the Atlas Device SDK for C++. +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -52,7 +58,7 @@ Create a User's Custom Data Document To create custom user data for a user, create a MongoDB document in the custom user data collection. The user ID field of the document should -contain the the user's user ID. +contain the user's user ID. .. tip:: diff --git a/temp/dotnet/app-services/call-a-function.txt b/temp/dotnet/app-services/call-a-function.txt index 3916be2939..fb21731190 100644 --- a/temp/dotnet/app-services/call-a-function.txt +++ b/temp/dotnet/app-services/call-a-function.txt @@ -4,6 +4,13 @@ Call a Function - .NET SDK ========================== +.. meta:: + :description: Learn how to call a function using the Atlas Device SDK for .NET. + +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -45,7 +52,7 @@ parameter and the arguments as the remaining parameters: .. note:: The ``CallAsync()`` method returns a single ``BsonValue`` object, which you can - deserialize after calling the function or by using the the generic + deserialize after calling the function or by using the generic overload. Both of these approaches to deserialization are shown in the code above. diff --git a/temp/dotnet/manage-users/custom-user-data.txt b/temp/dotnet/manage-users/custom-user-data.txt index 851a28bb91..2b508c4758 100644 --- a/temp/dotnet/manage-users/custom-user-data.txt +++ b/temp/dotnet/manage-users/custom-user-data.txt @@ -5,6 +5,13 @@ Custom User Data - .NET SDK =========================== +.. meta:: + :description: Learn how to create custom user data using the Atlas Device SDK for .NET. + +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -66,7 +73,7 @@ Create a User's Custom User Data Document To create custom user data for a user, create a MongoDB document in the custom user data collection. The user ID field of the document must -contain the the user's user ID. The following example uses +contain the user's user ID. The following example uses :ref:`MongoDB Data Access ` to insert a document containing the user ID of the currently logged in user and several custom properties into the custom user data collection: diff --git a/temp/flutter/sync/write-to-synced-realm.txt b/temp/flutter/sync/write-to-synced-realm.txt index e40ce55eb1..c198f915fc 100644 --- a/temp/flutter/sync/write-to-synced-realm.txt +++ b/temp/flutter/sync/write-to-synced-realm.txt @@ -4,6 +4,13 @@ Write Data to a Synced Realm - Flutter SDK ========================================== +.. meta:: + :description: Learn how to write data to a synced realm database using the Atlas Device SDK for Flutter. + +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -261,7 +268,7 @@ App Services Error The error message in the App Services logs provides some additional information to help you determine that it is a permissions issue, and not a query subscription issue. In this example, the error message shows -that the the object does not match the user's role: +that the object does not match the user's role: .. code-block:: console diff --git a/temp/flutter/users/custom-user-data.txt b/temp/flutter/users/custom-user-data.txt index d217854089..f14ebcbf4a 100644 --- a/temp/flutter/users/custom-user-data.txt +++ b/temp/flutter/users/custom-user-data.txt @@ -4,6 +4,13 @@ Custom User Data - Flutter SDK ============================== +.. meta:: + :description: Learn how to read custom user data using the Atlas Device SDK for Flutter. + +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -113,7 +120,7 @@ The Realm SDK code to call this Function: .. To create custom user data for a user, create a MongoDB document in the .. custom user data collection. The user ID field of the document must -.. contain the the user's user ID. The following example uses +.. contain the user's user ID. The following example uses .. TODO: update this ref`MongoDB Data Access <>` to insert a .. document containing the user ID of the currently logged in user and several .. custom properties into the custom user data collection: diff --git a/temp/java/quick-starts/livedata.txt b/temp/java/quick-starts/livedata.txt index 1647189ab8..577fd4a83f 100644 --- a/temp/java/quick-starts/livedata.txt +++ b/temp/java/quick-starts/livedata.txt @@ -4,6 +4,13 @@ Quick Start with LiveData - Java SDK ==================================== +.. meta:: + :description: Learn how to quickly integrate the Atlas Device SDK for Java into an Android application using LiveData. + +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -237,7 +244,7 @@ in the model singleton and the encapsulated LiveData instance. Summary ------- -- Use the the ``LiveRealmObject`` and ``LiveRealmResults`` classes as a template for encapsulating live Realm data in Android LiveData. +- Use the ``LiveRealmObject`` and ``LiveRealmResults`` classes as a template for encapsulating live Realm data in Android LiveData. - Use a ViewModel to separate underlying data from the UI elements that display that data. - DataBinding lets you declare relationships between model data and UI elements without explicitly setting values in an Activity or Fragment. diff --git a/temp/java/users/custom-user-data.txt b/temp/java/users/custom-user-data.txt index ba3a8c6906..3acaf6362e 100644 --- a/temp/java/users/custom-user-data.txt +++ b/temp/java/users/custom-user-data.txt @@ -92,7 +92,7 @@ Create a User's Custom Data Document To create custom user data for a user, create a MongoDB document in the custom user data collection. The user ID field of the document should -contain the the user's user ID. The following example uses +contain the user's user ID. The following example uses :ref:`MongoDB Data Access ` to insert a document containing the user ID of the currently logged in user and a ``favoriteColor`` value into the custom user data collection: @@ -143,7 +143,7 @@ MongoDB document whose user ID field contains the user ID of the user. The following example uses :ref:`MongoDB Data Access ` to update the ``favoriteColor`` field of -the the document containing the user ID of the currently logged in user +the document containing the user ID of the currently logged in user in the custom user data collection: .. tabs-realm-languages:: diff --git a/temp/kotlin/users/custom-user-data.txt b/temp/kotlin/users/custom-user-data.txt index c240caae1f..57b5680d0b 100644 --- a/temp/kotlin/users/custom-user-data.txt +++ b/temp/kotlin/users/custom-user-data.txt @@ -4,6 +4,13 @@ Manage Custom User Data - Kotlin SDK ==================================== +.. meta:: + :description: Learn how to read custom user data in an App Services App using the Atlas Device SDK for Kotlin. + +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -112,7 +119,7 @@ The Kotlin SDK code to call this Function: .. To create custom user data for a user, create a MongoDB document in the .. custom user data collection. The user ID field of the document must -.. contain the the user's user ID. The following example uses +.. contain the user's user ID. The following example uses .. MongoDB Data Access (INSERT LINK) to insert a .. document containing the user ID of the currently logged in user and several .. custom properties into the custom user data collection: diff --git a/temp/node/users/authenticate-users.txt b/temp/node/users/authenticate-users.txt index 28ecef3a23..f19948bd26 100644 --- a/temp/node/users/authenticate-users.txt +++ b/temp/node/users/authenticate-users.txt @@ -4,6 +4,13 @@ Authenticate Users - Node.js SDK ================================ +.. meta:: + :description: Authenticate users in an Atlas App Services App using the Atlas Device SDK for Node.js. + +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -234,7 +241,7 @@ to handle the user authentication and redirect flow from a Node.js client applic :language: javascript -#. Process the request from the the Google authentication server, which includes +#. Process the request from the Google authentication server, which includes an access code in the query string using the Google OAuth 2.0 client's ``getToken()`` method. In the callback function, sign in to your App using the ``id_token``. diff --git a/temp/swift/swiftui/swiftui-previews.txt b/temp/swift/swiftui/swiftui-previews.txt index 26ab6a08c4..035cc9028d 100644 --- a/temp/swift/swiftui/swiftui-previews.txt +++ b/temp/swift/swiftui/swiftui-previews.txt @@ -4,6 +4,13 @@ Use Realm with SwiftUI Previews =============================== +.. meta:: + :description: Use and debug SwiftUI Previews while developing with the Atlas Device SDK for Swift. + +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -231,7 +238,7 @@ configuration property when you initialize the realm. .. note:: - Do not use the the :swift-sdk:`deleteRealmIfMigrationNeeded + Do not use the :swift-sdk:`deleteRealmIfMigrationNeeded ` configuration property when you initialize a realm for SwiftUI Previews. Due to the way Apple has implemented SwiftUI Previews, using this property diff --git a/temp/swift/sync/write-to-synced-realm.txt b/temp/swift/sync/write-to-synced-realm.txt index 5adb045b44..554ad548e3 100644 --- a/temp/swift/sync/write-to-synced-realm.txt +++ b/temp/swift/sync/write-to-synced-realm.txt @@ -4,6 +4,13 @@ Write Data to a Synced Realm - Swift SDK ======================================== +.. meta:: + :description: Learn how to write to a synced database using the Atlas Device SDK for Swift. + +.. facet:: + :name: genre + :values: reference + .. contents:: On this page :local: :backlinks: none @@ -313,7 +320,7 @@ App Services Error The error message in the App Services logs provides some additional information to help you determine that it is a permissions issue, and not a query subscription issue. In this example, the error message shows -that the the object does not match the user's role: +that the object does not match the user's role: .. code-block:: console diff --git a/temp/swift/users/custom-user-data.txt b/temp/swift/users/custom-user-data.txt index 3808058b99..b314ef7bb8 100644 --- a/temp/swift/users/custom-user-data.txt +++ b/temp/swift/users/custom-user-data.txt @@ -4,6 +4,13 @@ Custom User Data - Swift SDK ============================ +.. meta:: + :description: Learn how to work with custom user data using the Atlas Device SDK for Swift. + +.. facet:: + :name: genre + :values: tutorial + .. contents:: On this page :local: :backlinks: none @@ -62,7 +69,7 @@ Create a User's Custom Data Document To create custom user data for a user, create a MongoDB document in the custom user data collection. The user ID field of the document should -contain the the user's user ID. +contain the user's user ID. .. tip:: From 569a50ddc067ea0c17b87d129562645bd95a28c1 Mon Sep 17 00:00:00 2001 From: Kyle Rollins <115574589+krollins-mdb@users.noreply.github.com> Date: Tue, 25 Jun 2024 14:02:14 -0500 Subject: [PATCH 39/63] (DOCSP-39541) Consolidate logging page (#3273) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39541 *Staged Page* - [Logging](https://preview-mongodbkrollinsmdb.gatsbyjs.io/realm/DOCSP-39541/sdk/test-and-debug/log/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [Logging - C++ SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/logging/) - [Logging - Flutter SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/logging/) - Added new Logger examples because the current examples no longer work - [Log Realm Events - Java SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/test-and-debug/log-realm-events/) - [Logging - Kotlin SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/logging/) - [Logging - .NET SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/logging/) - [Logging - Node.js SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/logging/) - [Logging - Swift SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/logging/) - [Log Realm Events - Java SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/test-and-debug/log-realm-events/) - [Set the Sync Client Log Level - C++ SDK](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/sync/log-level/) - All of the other SDKs' Sync Client Log Level page content will not be migrated. It's a deprecated feature that makes talking about logging awkward at best. ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: Dachary --- examples/dart/pubspec.lock | 139 +++++++----- examples/dart/test/logger.dart | 202 ++++++------------ examples/dart/test/utils.dart | 4 + .../logger.snippet.change-log-level.dart | 11 +- .../logger.snippet.set-custom-logger.dart | 5 +- .../logger.snippet.set-log-level-to-off.dart | 2 +- .../logger.snippet.set-the-log-level.dart | 3 +- .../logging-customize-logger-description.rst | 8 + .../logging-set-change-level-description.rst | 3 + .../logging-customize-logger-description.rst | 2 + .../logging-set-change-level-description.rst | 3 + .../logging-customize-logger-description.rst | 10 + .../logging-set-change-level-description.rst | 4 + .../logging-customize-logger-description.rst | 12 ++ .../logging-set-change-level-description.rst | 12 ++ .../logging-customize-logger-description.rst | 11 + .../logging-set-change-level-description.rst | 14 ++ .../logging-customize-logger-description.rst | 9 + .../logging-set-change-level-description.rst | 12 ++ .../logging-set-change-level-example-2.rst | 44 ++++ .../logging-set-change-level-example.rst | 44 ++++ .../logging-set-custom-logger-example.rst | 47 ++++ .../logger/logging-turn-off-example.rst | 47 ++++ source/sdk/test-and-debug/log.txt | 182 +++++++++++++++- 24 files changed, 619 insertions(+), 211 deletions(-) create mode 100644 source/includes/api-details/cpp/logger/logging-customize-logger-description.rst create mode 100644 source/includes/api-details/cpp/logger/logging-set-change-level-description.rst create mode 100644 source/includes/api-details/csharp/logger/logging-customize-logger-description.rst create mode 100644 source/includes/api-details/csharp/logger/logging-set-change-level-description.rst create mode 100644 source/includes/api-details/dart/logger/logging-customize-logger-description.rst create mode 100644 source/includes/api-details/dart/logger/logging-set-change-level-description.rst create mode 100644 source/includes/api-details/javascript/logger/logging-customize-logger-description.rst create mode 100644 source/includes/api-details/javascript/logger/logging-set-change-level-description.rst create mode 100644 source/includes/api-details/kotlin/logger/logging-customize-logger-description.rst create mode 100644 source/includes/api-details/kotlin/logger/logging-set-change-level-description.rst create mode 100644 source/includes/api-details/swift/logger/logging-customize-logger-description.rst create mode 100644 source/includes/api-details/swift/logger/logging-set-change-level-description.rst create mode 100644 source/includes/sdk-examples/logger/logging-set-change-level-example-2.rst create mode 100644 source/includes/sdk-examples/logger/logging-set-change-level-example.rst create mode 100644 source/includes/sdk-examples/logger/logging-set-custom-logger-example.rst create mode 100644 source/includes/sdk-examples/logger/logging-turn-off-example.rst diff --git a/examples/dart/pubspec.lock b/examples/dart/pubspec.lock index e142283420..b21f00065b 100644 --- a/examples/dart/pubspec.lock +++ b/examples/dart/pubspec.lock @@ -5,10 +5,15 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7" + sha256: "5aaf60d96c4cd00fe7f21594b5ad6a1b699c80a27420f8a837f4d68473ef09e3" url: "https://pub.dev" source: hosted - version: "67.0.0" + version: "68.0.0" + _macros: + dependency: transitive + description: dart + source: sdk + version: "0.1.0" adaptive_number: dependency: transitive description: @@ -21,18 +26,18 @@ packages: dependency: transitive description: name: analyzer - sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d" + sha256: "21f1d3720fd1c70316399d5e2bccaebb415c434592d778cce8acb967b8578808" url: "https://pub.dev" source: hosted - version: "6.4.1" + version: "6.5.0" args: dependency: transitive description: name: args - sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" url: "https://pub.dev" source: hosted - version: "2.4.2" + version: "2.5.0" async: dependency: transitive description: @@ -77,10 +82,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1" + sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9" url: "https://pub.dev" source: hosted - version: "4.0.1" + version: "4.0.2" build_resolvers: dependency: transitive description: @@ -93,10 +98,10 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: "581bacf68f89ec8792f5e5a0b2c4decd1c948e97ce659dc783688c8a88fbec21" + sha256: "1414d6d733a85d8ad2f1dfcb3ea7945759e35a123cb99ccfac75d0758f75edfa" url: "https://pub.dev" source: hosted - version: "2.4.8" + version: "2.4.10" build_runner_core: dependency: transitive description: @@ -117,10 +122,10 @@ packages: dependency: transitive description: name: built_value - sha256: a3ec2e0f967bc47f69f95009bb93db936288d61d5343b9436e378b28a2f830c6 + sha256: c7913a9737ee4007efedaffc968c049fd0f3d0e49109e778edc10de9426005cb url: "https://pub.dev" source: hosted - version: "8.9.0" + version: "8.9.2" cancellation_token: dependency: transitive description: @@ -173,10 +178,10 @@ packages: dependency: transitive description: name: coverage - sha256: "8acabb8306b57a409bf4c83522065672ee13179297a6bb0cb9ead73948df7c76" + sha256: "3945034e86ea203af7a056d98e98e42a5518fff200d6e8e6647e1886b07e936e" url: "https://pub.dev" source: hosted - version: "1.7.2" + version: "1.8.0" crypto: dependency: transitive description: @@ -189,18 +194,18 @@ packages: dependency: "direct main" description: name: dart_jsonwebtoken - sha256: "063c20d3cee2b626d8a789ba9df0ad21f35012c4e9bd846ce50e921d77123df7" + sha256: "346e9a21e4bf6e6a431e19ece00ebb2e3668e1e339cabdf6f46d18d88692a848" url: "https://pub.dev" source: hosted - version: "2.12.2" + version: "2.14.0" dart_style: dependency: transitive description: name: dart_style - sha256: "40ae61a5d43feea6d24bd22c0537a6629db858963b99b4bc1c3db80676f32368" + sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9" url: "https://pub.dev" source: hosted - version: "2.3.4" + version: "2.3.6" ed25519_edwards: dependency: transitive description: @@ -237,10 +242,10 @@ packages: dependency: transitive description: name: ffi - sha256: "7bf0adc28a23d395f19f3f1eb21dd7cfd1dd9f8e1c50051c069122e6853bc878" + sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" file: dependency: transitive description: @@ -261,10 +266,10 @@ packages: dependency: transitive description: name: frontend_server_client - sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612" + sha256: f64a0333a82f30b0cca061bc3d143813a486dc086b574bfb233b7c1372427694 url: "https://pub.dev" source: hosted - version: "3.2.0" + version: "4.0.0" glob: dependency: transitive description: @@ -285,10 +290,10 @@ packages: dependency: transitive description: name: http - sha256: a2bbf9d017fcced29139daa8ed2bba4ece450ab222871df93ca9eec6f80c34ba + sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938" url: "https://pub.dev" source: hosted - version: "1.2.0" + version: "1.2.1" http_multi_server: dependency: transitive description: @@ -317,18 +322,18 @@ packages: dependency: transitive description: name: js - sha256: "4186c61b32f99e60f011f7160e32c89a758ae9b1d0c6d28e2c02ef0382300e2b" + sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.1" json_annotation: dependency: transitive description: name: json_annotation - sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" url: "https://pub.dev" source: hosted - version: "4.8.1" + version: "4.9.0" lints: dependency: "direct dev" description: @@ -345,6 +350,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.2.0" + macros: + dependency: transitive + description: + name: macros + sha256: "12e8a9842b5a7390de7a781ec63d793527582398d16ea26c60fed58833c9ae79" + url: "https://pub.dev" + source: hosted + version: "0.1.0-main.0" matcher: dependency: transitive description: @@ -357,10 +370,10 @@ packages: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" mime: dependency: transitive description: @@ -405,10 +418,10 @@ packages: dependency: transitive description: name: pointycastle - sha256: "43ac87de6e10afabc85c445745a7b799e04de84cebaa4fd7bf55a5e1e9604d29" + sha256: "4be0097fcf3fd3e8449e53730c631200ebc7b88016acecab2b0da2f0149222fe" url: "https://pub.dev" source: hosted - version: "3.7.4" + version: "3.9.1" pool: dependency: transitive description: @@ -429,34 +442,34 @@ packages: dependency: transitive description: name: pubspec_parse - sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 + sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8 url: "https://pub.dev" source: hosted - version: "1.2.3" + version: "1.3.0" realm_common: dependency: transitive description: name: realm_common - sha256: c04b64fcbcd0afd78c06939efdedb484417697242039d5bb0b07fa150c9c021d + sha256: "1f36a224f35fd089691b631c0c9c92af274e00d524258203a937706d7d5e9d0c" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" realm_dart: dependency: "direct main" description: name: realm_dart - sha256: b523d392ec614ccb358e64451aca4772d56db23f93e8f58dd1d1780dadc92706 + sha256: ce2bd5dfb5eee142998fc7f395df34e349e1c179b78582d6d84bb4003c556c81 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" realm_generator: dependency: transitive description: name: realm_generator - sha256: a5c3c403add9d886c098509b49517f44f1d8b667ac0178f80f58fea5ce069fb8 + sha256: "183257f345ac5b01b424261dd6e3c400d414bec725d33d390b5b6942274f5a80" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" sane_uuid: dependency: transitive description: @@ -493,10 +506,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" + sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "2.0.0" source_gen: dependency: transitive description: @@ -565,10 +578,10 @@ packages: dependency: transitive description: name: tar - sha256: "1680219f82dfa81c8d0e76e849b7b34ea969c721f55a8ebd294a9a95e740dd42" + sha256: "22f67e2d77b51050436620b2a5de521c58ca6f0b75af1d9ab3c8cae2eae58fcd" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.5" term_glyph: dependency: transitive description: @@ -581,26 +594,26 @@ packages: dependency: "direct main" description: name: test - sha256: "7ee446762c2c50b3bd4ea96fe13ffac69919352bd3b4b17bac3f3465edc58073" + sha256: "47e9b601e20f24c27d08002eb635e92ddc2195010a8b3a621f4ed44ef70f6864" url: "https://pub.dev" source: hosted - version: "1.25.2" + version: "1.25.6" test_api: dependency: transitive description: name: test_api - sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.7.0" + version: "0.7.2" test_core: dependency: transitive description: name: test_core - sha256: "2bc4b4ecddd75309300d8096f781c0e3280ca1ef85beda558d33fcbedc2eead4" + sha256: "0c583123c86e58ab5036c92db5c7116ffddd655f1f5be762967d09f0fc66bf2d" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.3" timing: dependency: transitive description: @@ -613,10 +626,10 @@ packages: dependency: transitive description: name: type_plus - sha256: "2e33cfac2e129297d5874567bdf7587502ec359881e9318551e014d91b02f84a" + sha256: d5d1019471f0d38b91603adb9b5fd4ce7ab903c879d2fbf1a3f80a630a03fcc9 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" typed_data: dependency: transitive description: @@ -629,10 +642,10 @@ packages: dependency: transitive description: name: vm_service - sha256: a2662fb1f114f4296cf3f5a50786a2d888268d7776cf681aa17d660ffa23b246 + sha256: "360c4271613beb44db559547d02f8b0dc044741d0eeb9aa6ccdb47e8ec54c63a" url: "https://pub.dev" source: hosted - version: "14.0.0" + version: "14.2.3" watcher: dependency: transitive description: @@ -645,18 +658,26 @@ packages: dependency: transitive description: name: web - sha256: "4188706108906f002b3a293509234588823c8c979dc83304e229ff400c996b05" + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.4.2" + version: "0.5.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078" + url: "https://pub.dev" + source: hosted + version: "0.1.5" web_socket_channel: dependency: transitive description: name: web_socket_channel - sha256: "939ab60734a4f8fa95feacb55804fa278de28bdeef38e616dc08e44a84adea23" + sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276 url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "3.0.0" webkit_inspection_protocol: dependency: transitive description: @@ -674,4 +695,4 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=3.3.0 <4.0.0" + dart: ">=3.4.0 <4.0.0" diff --git a/examples/dart/test/logger.dart b/examples/dart/test/logger.dart index a743ff6fa8..bd7fd5ec2c 100644 --- a/examples/dart/test/logger.dart +++ b/examples/dart/test/logger.dart @@ -1,167 +1,85 @@ import 'package:test/test.dart'; -import '../bin/models/car.dart'; import 'dart:async'; -import 'dart:isolate'; -import 'package:realm_dart/src/realm_class.dart' show RealmInternal; -import 'package:logging/logging.dart'; import 'package:realm_dart/realm.dart'; import './utils.dart'; - -class LoggedMessage { - final Level level; - final String message; - - const LoggedMessage(this.level, this.message); - - factory LoggedMessage.empty() => LoggedMessage(RealmLogLevel.off, ""); - - @override - // ignore: hash_and_equals - bool operator ==(Object other) { - if (identical(this, other)) return true; - if (other is! LoggedMessage) return false; - return level == other.level && message == other.message; - } - - @override - String toString() => "level:$level message:$message"; -} +import 'schemas.dart'; void main() { - group('Set log level and customize logger', () { - test('Set the log level', () async { - LoggedMessage actual = await Isolate.run(() async { - final completer = Completer(); - - // :snippet-start: set-the-log-level - Realm.logger.level = RealmLogLevel.trace; - // :snippet-end: - // :snippet-start: attach-to-logger - Realm.logger.onRecord.listen((event) { - // Do something with the log event - for example, print to console - print("Realm log message: '$event'"); - // :remove-start: - completer.complete(LoggedMessage(event.level, event.message)); - // :remove-end: - }); - // :snippet-end: - - RealmInternal.logMessageForTesting( - RealmLogLevel.trace, "Realm log message for log level testing"); - - return await completer.future; - }); - - expect( - actual, - LoggedMessage( - RealmLogLevel.trace, "Realm log message for log level testing")); + test('Set log level and customize logger', () async { + final stringBuffer = StringBuffer(); + + // :snippet-start: set-the-log-level + // If no category is set, default is LogCategory.realm + Realm.logger.setLogLevel(LogLevel.all, category: LogCategory.realm); + // :snippet-end: + + // Customize logging behavior + // :snippet-start: set-custom-logger + Realm.logger.onRecord.listen((record) { + // Do something with the log record + // :uncomment-start: + // print(record.message); + // :uncomment-end: + // :remove-start: + // For testing + stringBuffer + .writeln('${record.category} ${record.level}: ${record.message}'); + // :remove-end: }); - test('Set a custom logger', () async { - LoggedMessage actual = await Isolate.run(() async { - final completer = Completer(); - - Realm.logger.onRecord.listen((event) { - throw RealmError( - "Default logger should not log messages if custom logger is set"); - }); - - // :snippet-start: set-custom-logger - Realm.logger = Logger.detached("custom logger"); - // :snippet-end: - Realm.logger.onRecord.listen((event) { - completer.complete(LoggedMessage(event.level, event.message)); - }); - - RealmInternal.logMessageForTesting( - RealmLogLevel.info, "Custom Realm log entry for testing"); - - return await completer.future; - }); - - expect( - actual, - LoggedMessage( - RealmLogLevel.info, "Custom Realm log entry for testing")); - }); - test('Change the log level as needed', () async { - bool logMessageReceived = false; - - Realm.logger.onRecord.listen((event) { - logMessageReceived = true; - }); - - void executeAppCode() { - // Placeholder - } + // :snippet-end: - void executeComplexCodeToDebug() { - // Placeholder - } + final config = Configuration.local([Person.schema]); + final realm = Realm(config); - // :snippet-start: change-log-level - // Set a default log level that's not too verbose - Realm.logger.level = RealmLogLevel.info; - executeAppCode(); - // Later, change the log level to debug an issue when running specific code - Realm.logger.level = RealmLogLevel.trace; - executeComplexCodeToDebug(); - // :snippet-end: + realm.write(() => realm.add(Person(ObjectId(), 'Anakin', 'Skywalker'))); - // Because we changed logging from .info to .trace, this should log a message. - RealmInternal.logMessageForTesting(RealmLogLevel.trace, - "This message should be logged because the log level was changed"); + // Hack to wait for stream to process + await delay(200); - await Future.delayed(Duration(seconds: 2)); + final logs = stringBuffer.toString(); - expect(logMessageReceived, isTrue); - }); - test('Set the log level to off', () async { - bool logMessageReceived = false; + // Expect logs to contain a substring that includes the field and value + // we set earlier + expect(logs.contains('Set \'firstName\' to "Anakin"'), isTrue); - Realm.logger.onRecord.listen((event) { - logMessageReceived = true; - }); + Future executeAppCode() async { + // Capture log length before new write transaction + final oldStringBufferLength = stringBuffer.length; - // Set the log level to the level in our test message to ensure - // the listener would log the event if logging did not turn off. - Realm.logger.level = RealmLogLevel.trace; - // :snippet-start: set-log-level-to-off - Realm.logger.level = RealmLogLevel.off; - // :snippet-end: + realm.write(() => realm.add(Person(ObjectId(), 'Leia', 'Organa'))); - // If logging was enabled at this log level, this should log a message. - // But because the log level is off, it should not log a message. - RealmInternal.logMessageForTesting(RealmLogLevel.trace, - "This message should not appear because the logger is off"); + // Hack to wait for stream to process + await delay(200); - await Future.delayed(Duration(seconds: 2)); + // Ensure that no new logs have been written after setting log level to off + // Length should not change. + expect(stringBuffer.length, oldStringBufferLength); + } - expect(logMessageReceived, isFalse); - }); + Future executeComplexCodeToDebug() async { + // Capture log length before new write transaction + final previousStringBufferLength = stringBuffer.length; - test('Disable logging by clearing listeners', () async { - bool logMessageReceived = false; + realm.write(() => realm.add(Person(ObjectId(), 'Mon', 'Mothma'))); - Realm.logger.onRecord.listen((event) { - logMessageReceived = true; - }); + // Hack to wait for stream to process + await delay(200); - // Set the log level to the level in our test message to ensure - // the listener would log the event if it was active. - Realm.logger.level = RealmLogLevel.trace; - // :snippet-start: clear-listeners - Realm.logger.clearListeners(); - // :snippet-end: + // There should be more log records than before the latest write + // transaction + expect(stringBuffer.length, greaterThan(previousStringBufferLength)); + } - // If logging was enabled at this log level, this should log a message. - // But because we have cleared log listeners, it should not log a message. - RealmInternal.logMessageForTesting(RealmLogLevel.trace, - "This message should not appear because listeners have been cleared"); + // :snippet-start: change-log-level + // :snippet-start: set-log-level-to-off + Realm.logger.setLogLevel(LogLevel.off); + // :snippet-end: + await executeAppCode(); - await Future.delayed(Duration(seconds: 2)); + Realm.logger.setLogLevel(LogLevel.debug, category: LogCategory.realm); + await executeComplexCodeToDebug(); + // :snippet-end: - expect(logMessageReceived, isFalse); - }); + cleanUpRealm(realm); }); } diff --git a/examples/dart/test/utils.dart b/examples/dart/test/utils.dart index ed245e61d0..d0917791f3 100644 --- a/examples/dart/test/utils.dart +++ b/examples/dart/test/utils.dart @@ -18,3 +18,7 @@ String generateRandomString(int len) { return List.generate(len, (index) => _chars[random.nextInt(_chars.length)]) .join(); } + +Future delay(duration) async { + await Future.delayed(Duration(milliseconds: duration)); +} diff --git a/source/examples/generated/flutter/logger.snippet.change-log-level.dart b/source/examples/generated/flutter/logger.snippet.change-log-level.dart index 71f26a4dfb..385771afe2 100644 --- a/source/examples/generated/flutter/logger.snippet.change-log-level.dart +++ b/source/examples/generated/flutter/logger.snippet.change-log-level.dart @@ -1,6 +1,5 @@ -// Set a default log level that's not too verbose -Realm.logger.level = RealmLogLevel.info; -executeAppCode(); -// Later, change the log level to debug an issue when running specific code -Realm.logger.level = RealmLogLevel.trace; -executeComplexCodeToDebug(); +Realm.logger.setLogLevel(LogLevel.off); +await executeAppCode(); + +Realm.logger.setLogLevel(LogLevel.debug, category: LogCategory.realm); +await executeComplexCodeToDebug(); diff --git a/source/examples/generated/flutter/logger.snippet.set-custom-logger.dart b/source/examples/generated/flutter/logger.snippet.set-custom-logger.dart index 41ee882000..b968e3aaf3 100644 --- a/source/examples/generated/flutter/logger.snippet.set-custom-logger.dart +++ b/source/examples/generated/flutter/logger.snippet.set-custom-logger.dart @@ -1 +1,4 @@ -Realm.logger = Logger.detached("custom logger"); +Realm.logger.onRecord.listen((record) { + // Do something with the log record + print(record.message); +}); diff --git a/source/examples/generated/flutter/logger.snippet.set-log-level-to-off.dart b/source/examples/generated/flutter/logger.snippet.set-log-level-to-off.dart index 51bce8ffa3..2932b2a7f9 100644 --- a/source/examples/generated/flutter/logger.snippet.set-log-level-to-off.dart +++ b/source/examples/generated/flutter/logger.snippet.set-log-level-to-off.dart @@ -1 +1 @@ -Realm.logger.level = RealmLogLevel.off; +Realm.logger.setLogLevel(LogLevel.off); diff --git a/source/examples/generated/flutter/logger.snippet.set-the-log-level.dart b/source/examples/generated/flutter/logger.snippet.set-the-log-level.dart index 4ad9503cf3..f2a51ddb52 100644 --- a/source/examples/generated/flutter/logger.snippet.set-the-log-level.dart +++ b/source/examples/generated/flutter/logger.snippet.set-the-log-level.dart @@ -1 +1,2 @@ -Realm.logger.level = RealmLogLevel.trace; +// If no category is set, default is LogCategory.realm +Realm.logger.setLogLevel(LogLevel.all, category: LogCategory.realm); diff --git a/source/includes/api-details/cpp/logger/logging-customize-logger-description.rst b/source/includes/api-details/cpp/logger/logging-customize-logger-description.rst new file mode 100644 index 0000000000..00c65d780a --- /dev/null +++ b/source/includes/api-details/cpp/logger/logging-customize-logger-description.rst @@ -0,0 +1,8 @@ +To set a custom logger function with the C++ SDK, create a +:cpp-sdk:`realm::logger ` +and override the virtual ``do_log()`` member function. + +.. literalinclude:: /examples/generated/cpp/logger.snippet.create-custom-logger.cpp + :language: cpp + +After setting a custom logger, you need to initialize it: diff --git a/source/includes/api-details/cpp/logger/logging-set-change-level-description.rst b/source/includes/api-details/cpp/logger/logging-set-change-level-description.rst new file mode 100644 index 0000000000..48b201654a --- /dev/null +++ b/source/includes/api-details/cpp/logger/logging-set-change-level-description.rst @@ -0,0 +1,3 @@ +For the C++ SDK, pass a +:cpp-sdk:`realm::logger::level ` +to the ``set_default_level_threshold()`` member function: diff --git a/source/includes/api-details/csharp/logger/logging-customize-logger-description.rst b/source/includes/api-details/csharp/logger/logging-customize-logger-description.rst new file mode 100644 index 0000000000..e8603e190a --- /dev/null +++ b/source/includes/api-details/csharp/logger/logging-customize-logger-description.rst @@ -0,0 +1,2 @@ +To set a custom logger with the .NET SDK, set :dotnet-sdk:`Logger.Default +` to a custom Logger function. diff --git a/source/includes/api-details/csharp/logger/logging-set-change-level-description.rst b/source/includes/api-details/csharp/logger/logging-set-change-level-description.rst new file mode 100644 index 0000000000..607283f4c3 --- /dev/null +++ b/source/includes/api-details/csharp/logger/logging-set-change-level-description.rst @@ -0,0 +1,3 @@ +For the .NET SDK, use +:dotnet-sdk:`LogLevel ` to control which +messages are logged by the client logger: \ No newline at end of file diff --git a/source/includes/api-details/dart/logger/logging-customize-logger-description.rst b/source/includes/api-details/dart/logger/logging-customize-logger-description.rst new file mode 100644 index 0000000000..0f9c1c8545 --- /dev/null +++ b/source/includes/api-details/dart/logger/logging-customize-logger-description.rst @@ -0,0 +1,10 @@ +The Flutter SDK logger conforms to the `Dart Logger class +`__. + +To get started, set a log level: + +.. literalinclude:: /examples/generated/flutter/logger.snippet.set-the-log-level.dart + :language: dart + +Define custom logging behavior by listening to :flutter-sdk:`Realm.logger.onRecord +`: diff --git a/source/includes/api-details/dart/logger/logging-set-change-level-description.rst b/source/includes/api-details/dart/logger/logging-set-change-level-description.rst new file mode 100644 index 0000000000..cfd56d52e5 --- /dev/null +++ b/source/includes/api-details/dart/logger/logging-set-change-level-description.rst @@ -0,0 +1,4 @@ +In the Flutter SDK, you can set the level of detail in different parts of +your app. To configure the log level, pass a valid +:flutter-sdk:`LogLevel ` value to +:flutter-sdk:`setLogLevel `. diff --git a/source/includes/api-details/javascript/logger/logging-customize-logger-description.rst b/source/includes/api-details/javascript/logger/logging-customize-logger-description.rst new file mode 100644 index 0000000000..b0445f306d --- /dev/null +++ b/source/includes/api-details/javascript/logger/logging-customize-logger-description.rst @@ -0,0 +1,12 @@ +To get started, set a log level: + +.. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-log-level.ts + :language: javascript + +To set a custom logger with the Node.js SDK, call :js-sdk:`setLogger() +`. This method recieves ``level`` and +``message`` arguments from the database logger. You can use these arguments to +define your own logging behavior. + +This sets the logging behavior for all database logging in your application. If +you do not provide a log level, the default value is "info". diff --git a/source/includes/api-details/javascript/logger/logging-set-change-level-description.rst b/source/includes/api-details/javascript/logger/logging-set-change-level-description.rst new file mode 100644 index 0000000000..2d97486cb5 --- /dev/null +++ b/source/includes/api-details/javascript/logger/logging-set-change-level-description.rst @@ -0,0 +1,12 @@ +To set the level of detail reported by the Node.js SDK pass a valid level to +:js-sdk:`Realm.setLogLevel() `. Refer to +:js-sdk:`LogLevel ` for all valid values. + +.. note:: Performance and console.log() + + You should avoid using ``console.log()`` in production because it will negatively + affect your app's performance. It can also be hard to account for all of the + method's quirks in Node.js. + + For details about ``console.log()`` behavior, check out the `Node.js docs + `__. diff --git a/source/includes/api-details/kotlin/logger/logging-customize-logger-description.rst b/source/includes/api-details/kotlin/logger/logging-customize-logger-description.rst new file mode 100644 index 0000000000..358d251923 --- /dev/null +++ b/source/includes/api-details/kotlin/logger/logging-customize-logger-description.rst @@ -0,0 +1,11 @@ +The Kotlin SDK implements the :kotlin-sdk:`RealmLogger +<-realm-logger/index.html>` interface for custom loggers. + +.. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.define-custom-logger.kt + :language: kotlin + +In the Kotlin SDK, use :kotlin-sdk:`RealmLog.add() <-realm-log/add.html>` +to set your custom logger as a logger for your app. + +You can also remove a specific logger or remove all loggers, including the +system logger. diff --git a/source/includes/api-details/kotlin/logger/logging-set-change-level-description.rst b/source/includes/api-details/kotlin/logger/logging-set-change-level-description.rst new file mode 100644 index 0000000000..87318cf022 --- /dev/null +++ b/source/includes/api-details/kotlin/logger/logging-set-change-level-description.rst @@ -0,0 +1,14 @@ +The Kotlin SDK uses the global :kotlin-sdk:`RealmLog <-realm-log/index.html>` +singleton. You can set the ``RealmLog.level`` property to an entry in the +:kotlin-sdk:`LogLevel <-log-level/index.html>` enum to specify the level of data +you want to receive. If the log level priority is equal to or higher than the +priority defined in ``RealmLog.level``, the database logs the event. You can +change the log level at any point during the app's lifecycle from this global +singleton. + +By default, all logs go to a default system logger that varies by system: + +- Android logs to Logcat. +- JVM logs to stdout. +- MacOS logs to NSLog. +- iOS logs to NSLog. diff --git a/source/includes/api-details/swift/logger/logging-customize-logger-description.rst b/source/includes/api-details/swift/logger/logging-customize-logger-description.rst new file mode 100644 index 0000000000..55d34edad2 --- /dev/null +++ b/source/includes/api-details/swift/logger/logging-customize-logger-description.rst @@ -0,0 +1,9 @@ +In the Swift SDK, initialize an instance of a :swift-sdk:`Logger +` and define the function to use +for logging. + +.. literalinclude:: /examples/generated/code/start/Logging.snippet.define-custom-logger.swift + :language: swift + +In the Swift SDK, use ``Logger.shared``. After you set the default logger, you +can change the log level during the app lifecycle as needed. diff --git a/source/includes/api-details/swift/logger/logging-set-change-level-description.rst b/source/includes/api-details/swift/logger/logging-set-change-level-description.rst new file mode 100644 index 0000000000..dfddf24d19 --- /dev/null +++ b/source/includes/api-details/swift/logger/logging-set-change-level-description.rst @@ -0,0 +1,12 @@ +For the Swift SDK, set the log level for the default logger with +``Logger.shared.level``. The :objc-sdk:`RLMLogLevel ` +enum represents the different levels of logging you can configure. + +.. tip:: Set the Logger Before Initializing an App Client + + When you initialize an :ref:`App client `, the Swift SDK + caches the configuration for the App. Changing to the App configuration + after initialization does not have any effect. This includes setting a + logger. Initializing an App reads the current shared logger and stores that. + + However, changing the log level for an existing logger does work at any time. diff --git a/source/includes/sdk-examples/logger/logging-set-change-level-example-2.rst b/source/includes/sdk-examples/logger/logging-set-change-level-example-2.rst new file mode 100644 index 0000000000..b18ef5c0c0 --- /dev/null +++ b/source/includes/sdk-examples/logger/logging-set-change-level-example-2.rst @@ -0,0 +1,44 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/logger.snippet.change-log-level.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.change-log-level.ts + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Logging.snippet.change-log-level.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.change-log-level.ts + :language: typescript diff --git a/source/includes/sdk-examples/logger/logging-set-change-level-example.rst b/source/includes/sdk-examples/logger/logging-set-change-level-example.rst new file mode 100644 index 0000000000..b1fa858264 --- /dev/null +++ b/source/includes/sdk-examples/logger/logging-set-change-level-example.rst @@ -0,0 +1,44 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/logger.snippet.set-default-log-level.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/ErrorHandler.snippet.set-log-level.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/logger.snippet.set-the-log-level.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-log-level.ts + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.set-log-level-realmlog.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Logging.snippet.set-log-level.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-log-level.ts + :language: typescript diff --git a/source/includes/sdk-examples/logger/logging-set-custom-logger-example.rst b/source/includes/sdk-examples/logger/logging-set-custom-logger-example.rst new file mode 100644 index 0000000000..144313deb9 --- /dev/null +++ b/source/includes/sdk-examples/logger/logging-set-custom-logger-example.rst @@ -0,0 +1,47 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/logger.snippet.initialize-logger.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/ErrorHandler.snippet.customize-logging-function.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/logger.snippet.set-custom-logger.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-custom-logger.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.set-custom-realmlog-logger.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Logging.snippet.set-default-logger.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.set-custom-logger.ts + :language: typescript + :copyable: false + diff --git a/source/includes/sdk-examples/logger/logging-turn-off-example.rst b/source/includes/sdk-examples/logger/logging-turn-off-example.rst new file mode 100644 index 0000000000..284c492469 --- /dev/null +++ b/source/includes/sdk-examples/logger/logging-turn-off-example.rst @@ -0,0 +1,47 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/logger.snippet.set-log-level-to-off.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.disable-logger.ts + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Logging.snippet.turn-logging-off.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/logger.test.snippet.disable-logger.ts + :language: typescript diff --git a/source/sdk/test-and-debug/log.txt b/source/sdk/test-and-debug/log.txt index 5f9fc0d083..b8d16be8ea 100644 --- a/source/sdk/test-and-debug/log.txt +++ b/source/sdk/test-and-debug/log.txt @@ -4,10 +4,190 @@ Logging ======= +.. meta:: + :description: Use logging to debug your Atlas Device SDK app. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for information about logging. +.. tabs-selector:: drivers + +You can set or change your app's log level when developing or debugging +your app. You might want to change the log level to log different +amounts of data depending on your development needs. You can specify +different log levels or custom loggers. + +.. _sdks-set-the-client-log-level: + +Set or Change the Log Level +--------------------------- + +You can set the level of detail reported by Atlas Device SDK. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/logger/logging-set-change-level-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/logger/logging-set-change-level-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/logger/logging-set-change-level-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/logger/logging-set-change-level-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/logger/logging-set-change-level-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/logger/logging-set-change-level-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/logger/logging-set-change-level-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/logger/logging-set-change-level-description.rst + +.. include:: /includes/sdk-examples/logger/logging-set-change-level-example.rst + +You can change the log level to increase or decrease verbosity at different +points in your code. + +.. include:: /includes/sdk-examples/logger/logging-set-change-level-example-2.rst + +.. _sdks-customize-logger: + +Customize the Logger +-------------------- + +You can create a custom logger. You might want to customize logging to add +specific tags or set specific log levels during development, testing, or +debugging. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/logger/logging-customize-logger-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/logger/logging-customize-logger-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/logger/logging-customize-logger-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/logger/logging-customize-logger-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/logger/logging-customize-logger-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/logger/logging-customize-logger-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/logger/logging-customize-logger-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/logger/logging-customize-logger-description.rst + +.. include:: /includes/sdk-examples/logger/logging-set-custom-logger-example.rst + +.. include:: /includes/tip-sync-log-levels.rst + +.. _sdks-turn-off-logging: + +Turn Off Logging +---------------- + +You can turn off logging by setting the log level: + +.. include:: /includes/sdk-examples/logger/logging-turn-off-example.rst + +Other Loggers +------------- + +The C++ and Java SDKs have additional loggers that behave differently than the +other examples on this page. + +C++ SDK +~~~~~~~ + +The C++ SDK uses a sync logger that behaves differently than the rest of +the examples on this page. You can set or change your sync client's log +level to develop or debug your application. You might want to change the +log level to log different amounts of data depending on the app's +environment. + +You can set the level of detail reported by the sync client logger to +specify the level of output you want from the sync client. Get +:cpp-sdk:`an instance of an App's sync manager +`, +and pass a :cpp-sdk:`realm::logger::level ` +to the ``set_log_level()`` member function: + +.. literalinclude:: /examples/generated/cpp/quick-start.snippet.set-sync-log-level.cpp + :language: cpp + +Java SDK +~~~~~~~~ + +The SDK logs events to the Android system log automatically. You can +view these events using :android:`Logcat `. + +We recommend using the Kotlin SDK to get the latest logging updates, like +changing the log level at different points in your code. + +The Java SDK uses the log levels defined by `Log4J +`_. +To configure the log level for database logs in your application, pass a +:java-sdk:`LogLevel ` to +:java-sdk:`RealmLog.setLevel() `: + +.. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.set-client-log-level.java + :language: java From ae0e146320dfba81a316ed542a0ad669e5a3a825 Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 25 Jun 2024 17:00:01 -0400 Subject: [PATCH 40/63] (DOCSP-39513): Consolidate Create page (#3270) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39513 *Staged Page* New consolidated pages: - [Create Object Methods](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39513/sdk/crud/create/create-methods/) - [Create Object Types](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39513/sdk/crud/create/create-object-types/) - [Create Property Types](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39513/sdk/crud/create/create-property-types/) Existing pages, ported over to the consolidated IA and updated for product naming/metadata: - [Swift Concurrency](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39513/platforms/apple/swift-concurrency/) - [Swift Actor Support](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39513/platforms/apple/use-sdk-with-actors/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Create](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/crud/create/) - [Flutter: Create](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/crud/create/) - [Flutter: Update](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/crud/update/#upsert-objects): Upsert - [Flutter: Data Types](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/data-types/) - [Flutter/Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/relationships/) - [Flutter: Geospatial](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/geospatial/) - [Java: Create](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/crud/create/) - [Java: Update](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/crud/update/#upsert-an-object): Upsert - [Java: Data Types/Mixed](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/data-types/realmany/) - [Java: Data Types/Counters](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/data-types/counters/) - [Java: Data Types/Dictionaries](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/data-types/realmdictionary/) - [Java: Data Types/Sets](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/data-types/realmset/) - [Java: Data Types/Enums](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/data-types/enums/) - [Java: Data Types/Embedded Objects](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/data-types/embedded-objects/) - [Java: Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/relationships/) - [Kotlin: Create](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/crud/create/) - [Kotlin: Update](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/crud/update/#upsert-a-realm-object): Upsert - [Kotlin: Model Data/Supported Types](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/schemas/supported-types/) - [Kotlin: Model Data/Geospatial](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/schemas/geospatials/) - [.NET: Create](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/crud/create/) - [.NET: Embedded Objects](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/embedded-objects/) - [.NET: Data Types/Field Types](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/field-types/) - [.NET: Data Types/Lists](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/lists/) - [.NET: Data Types/Realm Value](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/realm-value/) - [.NET: Data Types/Dictionaries](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/dictionaries/) - [.NET: Data Types/Sets](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/sets/) - [.NET: Data Types/RealmValue](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/realm-value/) - [.NET: Data Types/RealmInteger](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/realm-integer/) - [.NET: Data Types/Geospatial](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/geospatials/) - [.NET: Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/relationships/) - [Node.js: Create](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/crud/create/) - [Node.js: Update](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/crud/update/#upsert-an-object): Upsert - [Node.js: Data Types/Field Types](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/field-types/) - [Node.js: Data Types/Dictionaries](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/dictionaries/) - [Node.js: Data Types/Sets](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/sets/) - [Node.js: Data Types/Mixed](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/mixed/) - [Node.js: Data Types/UUID](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/uuid/) - [Node.js: Data Types/Embedded Objects](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/embedded-objects/) - [Node.js: Data Types/Geospatial Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/geospatial/) - [Node.js: Relationships & Embedded Objects](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/relationships-and-embedded-objects/) - [Swift: Create](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/crud/create/) - [Swift: Update](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/crud/update/#upsert-an-object): Upsert - [Swift: Supported Types](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/model-data/supported-types/) - [Swift: Threading](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/crud/threading/#perform-a-background-write): Perform a Background Write ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [ ] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) **Note for Reviewer**: The `.rst` files were named for a single create page. Having split the create page into 3, the names no longer comply with the guidelines. As this is around ~140 files, I didn't want to rename them all - but we may want to consider whether I should go through the effort, and/or what the naming guidelines look like as the IA evolves. #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --- snooty.toml | 3 + .../cpp/api-not-supported-description.rst | 1 + ...te-counter-property-type-not-supported.rst | 1 + ...create-dictionary-property-description.rst | 11 + .../create-embedded-object-description.rst | 6 +- ...create-geospatial-object-not-supported.rst | 1 + ...reate-inverse-relationship-description.rst | 11 + .../crud/create-list-property-description.rst | 28 + ...create-mixed-property-type-description.rst | 3 + ...te-object-id-property-type-description.rst | 1 + .../api-details/cpp/crud/create-procedure.rst | 2 +- .../crud/create-realm-object-description.rst | 6 +- .../crud/create-set-property-description.rst | 5 + ...te-timestamp-property-type-description.rst | 4 + ...reate-to-many-relationship-description.rst | 23 + ...create-to-one-relationship-description.rst | 14 + .../create-unmanaged-copy-description.rst | 4 + .../create-uuid-property-type-description.rst | 2 + ...eate-counter-property-type-description.rst | 23 + .../crud/create-list-property-description.rst | 3 + ...create-mixed-property-type-description.rst | 9 + .../create-multiple-objects-description.rst | 4 + ...te-object-id-property-type-description.rst | 1 + ...eate-objects-in-background-description.rst | 3 + .../create-or-update-object-description.rst | 5 + ...te-timestamp-property-type-description.rst | 6 + .../create-asymmetric-object-description.rst | 2 +- ...te-counter-property-type-not-supported.rst | 1 + .../crud/create-list-property-description.rst | 3 + ...create-mixed-property-type-description.rst | 2 + .../create-multiple-objects-description.rst | 3 + ...te-object-id-property-type-description.rst | 3 + ...eate-objects-in-background-description.rst | 6 + .../create-or-update-object-description.rst | 2 + .../crud/create-realm-object-description.rst | 6 - ...te-timestamp-property-type-description.rst | 7 + .../create-uuid-property-type-description.rst | 3 + ...-to-another-database-js-ts-description.rst | 6 + ...-object-to-another-database-no-example.rst | 2 + ...te-geospatial-object-js-ts-description.rst | 3 + ...ze-objects-with-value-no-dedicated-api.rst | 3 + ...eate-multiple-objects-no-dedicated-api.rst | 1 + ...eate-objects-from-json-missing-example.rst | 2 + ...estamp-property-type-js-ts-description.rst | 2 + .../create-unmanaged-copy-not-supported.rst | 2 + ...e-uuid-property-type-js-ts-description.rst | 3 + ...object-to-another-database-description.rst | 9 + ...counter-property-type-java-description.rst | 44 + ...unter-property-type-kotlin-description.rst | 45 ++ ...e-dictionary-property-java-description.rst | 5 + ...dictionary-property-kotlin-description.rst | 5 + ...create-geospatial-object-not-supported.rst | 2 + .../crud/create-list-property-description.rst | 3 + ...create-mixed-property-type-description.rst | 12 + ...ject-id-property-type-java-description.rst | 1 + ...ct-id-property-type-kotlin-description.rst | 1 + .../create-objects-from-json-description.rst | 11 + ...eate-or-update-object-java-description.rst | 19 + ...te-or-update-object-kotlin-description.rst | 19 + .../crud/create-realm-object-description.rst | 6 +- .../create-set-properties-description.rst | 5 + ...te-timestamp-property-type-description.rst | 1 + .../create-unmanaged-copy-description.rst | 2 + ...te-counter-property-type-not-supported.rst | 1 + ...create-dictionary-property-description.rst | 2 + .../crud/create-list-property-description.rst | 2 + ...create-mixed-property-type-description.rst | 2 + .../create-or-update-object-description.rst | 4 + .../crud/create-realm-object-description.rst | 10 +- .../create-set-properties-description.rst | 4 + .../create-asymmetric-object-description.rst | 2 +- ...object-to-another-database-description.rst | 6 + ...eate-counter-property-type-description.rst | 12 + ...create-dictionary-property-description.rst | 22 + ...reate-inverse-relationship-description.rst | 2 + .../crud/create-list-property-description.rst | 14 + ...create-mixed-property-type-description.rst | 12 + ...te-object-id-property-type-description.rst | 1 + .../create-or-update-object-description.rst | 27 + .../kotlin/crud/create-procedure.rst | 12 +- .../create-set-properties-description.rst | 16 + ...te-timestamp-property-type-description.rst | 16 + ...reate-to-many-relationship-description.rst | 4 + ...create-to-one-relationship-description.rst | 3 + .../create-unmanaged-copy-description.rst | 9 + .../create-uuid-property-type-description.rst | 4 + ...object-to-another-database-description.rst | 22 + ...te-counter-property-type-not-supported.rst | 1 + ...tialize-objects-with-value-description.rst | 12 + ...create-mixed-property-type-description.rst | 7 + .../create-multiple-objects-description.rst | 4 + .../create-objects-from-json-description.rst | 29 + .../create-or-update-object-description.rst | 9 + .../crud/create-realm-object-description.rst | 2 +- .../create-set-properties-description.rst | 4 + ...te-timestamp-property-type-description.rst | 1 + .../create-asymmetric-object-description.rst | 2 +- ...object-to-another-database-description.rst | 10 + ...te-counter-property-type-not-supported.rst | 1 + ...create-dictionary-property-description.rst | 10 + ...tialize-objects-with-value-description.rst | 12 + ...create-mixed-property-type-description.rst | 7 + .../create-multiple-objects-description.rst | 3 + ...te-object-id-property-type-description.rst | 3 + .../create-objects-from-json-description.rst | 28 + ...eate-objects-in-background-description.rst | 119 +++ .../create-or-update-object-description.rst | 9 + .../crud/create-realm-object-description.rst | 2 +- .../create-set-properties-description.rst | 4 + ...te-timestamp-property-type-description.rst | 1 + .../create-uuid-property-type-description.rst | 1 + ...te-counter-property-type-not-supported.rst | 1 + .../crud/create-list-property-description.rst | 2 + ...create-mixed-property-type-description.rst | 2 + .../create-or-update-object-description.rst | 4 + .../crud/create-realm-object-description.rst | 8 +- .../crud/create-asymmetric-object-model.rst | 11 +- .../crud/create-asymmetric-object.rst | 13 +- ...create-copy-object-to-another-database.rst | 72 ++ .../crud/create-counter-property-type.rst | 68 ++ .../crud/create-dictionary-property.rst | 68 ++ .../crud/create-embedded-object-model.rst | 14 +- .../crud/create-embedded-object.rst | 11 +- .../crud/create-geospatial-data-model.rst | 69 ++ .../crud/create-geospatial-data-object.rst | 67 ++ .../create-initialize-objects-with-value.rst | 82 ++ .../crud/create-inverse-relationship.rst | 70 ++ .../crud/create-list-property.rst | 69 ++ .../crud/create-mixed-property-type.rst | 67 ++ .../crud/create-multiple-objects.rst | 71 ++ .../crud/create-object-id-property-type.rst | 71 ++ .../crud/create-objects-from-json.rst | 68 ++ .../crud/create-objects-in-background.rst | 69 ++ .../crud/create-or-update-object.rst | 67 ++ .../crud/create-realm-object-model.rst | 14 +- .../sdk-examples/crud/create-realm-object.rst | 11 +- .../sdk-examples/crud/create-set-property.rst | 68 ++ .../crud/create-timestamp-property-type.rst | 70 ++ .../crud/create-to-many-relationship.rst | 70 ++ .../crud/create-to-one-relationship.rst | 70 ++ .../crud/create-unmanaged-object.rst | 78 ++ .../crud/create-uuid-property-type.rst | 69 ++ ...api-sendable-thread-confined-reference.rst | 2 +- source/platforms/apple.txt | 6 + source/platforms/apple/swift-concurrency.txt | 235 ++++++ .../platforms/apple/use-sdk-with-actors.txt | 358 ++++++++ source/sdk/crud/create.txt | 452 ++++++++--- .../sdk/crud/create/create-object-types.txt | 353 ++++++++ .../sdk/crud/create/create-property-types.txt | 764 ++++++++++++++++++ source/sdk/crud/read.txt | 5 + source/sdk/crud/threading.txt | 17 + source/sdk/crud/update.txt | 5 + source/sdk/files/configure-and-open.txt | 7 + source/sdk/model-data/object-models.txt | 16 + source/sdk/model-data/relationships.txt | 17 +- source/sdk/model-data/supported-types.txt | 49 ++ source/sdk/react-to-changes.txt | 10 + 157 files changed, 4562 insertions(+), 150 deletions(-) create mode 100644 source/includes/api-details/cpp/api-not-supported-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-counter-property-type-not-supported.rst create mode 100644 source/includes/api-details/cpp/crud/create-dictionary-property-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-geospatial-object-not-supported.rst create mode 100644 source/includes/api-details/cpp/crud/create-inverse-relationship-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-list-property-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-object-id-property-type-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-set-property-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-timestamp-property-type-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-to-many-relationship-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-to-one-relationship-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-unmanaged-copy-description.rst create mode 100644 source/includes/api-details/cpp/crud/create-uuid-property-type-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-counter-property-type-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-list-property-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-multiple-objects-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-object-id-property-type-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-objects-in-background-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-or-update-object-description.rst create mode 100644 source/includes/api-details/csharp/crud/create-timestamp-property-type-description.rst create mode 100644 source/includes/api-details/dart/crud/create-counter-property-type-not-supported.rst create mode 100644 source/includes/api-details/dart/crud/create-list-property-description.rst create mode 100644 source/includes/api-details/dart/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/dart/crud/create-multiple-objects-description.rst create mode 100644 source/includes/api-details/dart/crud/create-object-id-property-type-description.rst create mode 100644 source/includes/api-details/dart/crud/create-objects-in-background-description.rst create mode 100644 source/includes/api-details/dart/crud/create-or-update-object-description.rst create mode 100644 source/includes/api-details/dart/crud/create-timestamp-property-type-description.rst create mode 100644 source/includes/api-details/dart/crud/create-uuid-property-type-description.rst create mode 100644 source/includes/api-details/generic/crud/create-copy-object-to-another-database-js-ts-description.rst create mode 100644 source/includes/api-details/generic/crud/create-copy-object-to-another-database-no-example.rst create mode 100644 source/includes/api-details/generic/crud/create-geospatial-object-js-ts-description.rst create mode 100644 source/includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst create mode 100644 source/includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst create mode 100644 source/includes/api-details/generic/crud/create-objects-from-json-missing-example.rst create mode 100644 source/includes/api-details/generic/crud/create-timestamp-property-type-js-ts-description.rst create mode 100644 source/includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst create mode 100644 source/includes/api-details/generic/crud/create-uuid-property-type-js-ts-description.rst create mode 100644 source/includes/api-details/java/crud/create-copy-object-to-another-database-description.rst create mode 100644 source/includes/api-details/java/crud/create-counter-property-type-java-description.rst create mode 100644 source/includes/api-details/java/crud/create-counter-property-type-kotlin-description.rst create mode 100644 source/includes/api-details/java/crud/create-dictionary-property-java-description.rst create mode 100644 source/includes/api-details/java/crud/create-dictionary-property-kotlin-description.rst create mode 100644 source/includes/api-details/java/crud/create-geospatial-object-not-supported.rst create mode 100644 source/includes/api-details/java/crud/create-list-property-description.rst create mode 100644 source/includes/api-details/java/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/java/crud/create-object-id-property-type-java-description.rst create mode 100644 source/includes/api-details/java/crud/create-object-id-property-type-kotlin-description.rst create mode 100644 source/includes/api-details/java/crud/create-objects-from-json-description.rst create mode 100644 source/includes/api-details/java/crud/create-or-update-object-java-description.rst create mode 100644 source/includes/api-details/java/crud/create-or-update-object-kotlin-description.rst create mode 100644 source/includes/api-details/java/crud/create-set-properties-description.rst create mode 100644 source/includes/api-details/java/crud/create-timestamp-property-type-description.rst create mode 100644 source/includes/api-details/java/crud/create-unmanaged-copy-description.rst create mode 100644 source/includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst create mode 100644 source/includes/api-details/javascript/crud/create-dictionary-property-description.rst create mode 100644 source/includes/api-details/javascript/crud/create-list-property-description.rst create mode 100644 source/includes/api-details/javascript/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/javascript/crud/create-or-update-object-description.rst create mode 100644 source/includes/api-details/javascript/crud/create-set-properties-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-copy-object-to-another-database-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-counter-property-type-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-dictionary-property-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-inverse-relationship-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-list-property-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-object-id-property-type-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-or-update-object-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-set-properties-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-timestamp-property-type-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-to-many-relationship-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-to-one-relationship-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-unmanaged-copy-description.rst create mode 100644 source/includes/api-details/kotlin/crud/create-uuid-property-type-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-copy-object-to-another-database-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-counter-property-type-not-supported.rst create mode 100644 source/includes/api-details/objectivec/crud/create-initialize-objects-with-value-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-multiple-objects-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-objects-from-json-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-or-update-object-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-set-properties-description.rst create mode 100644 source/includes/api-details/objectivec/crud/create-timestamp-property-type-description.rst create mode 100644 source/includes/api-details/swift/crud/create-copy-object-to-another-database-description.rst create mode 100644 source/includes/api-details/swift/crud/create-counter-property-type-not-supported.rst create mode 100644 source/includes/api-details/swift/crud/create-dictionary-property-description.rst create mode 100644 source/includes/api-details/swift/crud/create-initialize-objects-with-value-description.rst create mode 100644 source/includes/api-details/swift/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/swift/crud/create-multiple-objects-description.rst create mode 100644 source/includes/api-details/swift/crud/create-object-id-property-type-description.rst create mode 100644 source/includes/api-details/swift/crud/create-objects-from-json-description.rst create mode 100644 source/includes/api-details/swift/crud/create-objects-in-background-description.rst create mode 100644 source/includes/api-details/swift/crud/create-or-update-object-description.rst create mode 100644 source/includes/api-details/swift/crud/create-set-properties-description.rst create mode 100644 source/includes/api-details/swift/crud/create-timestamp-property-type-description.rst create mode 100644 source/includes/api-details/swift/crud/create-uuid-property-type-description.rst create mode 100644 source/includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst create mode 100644 source/includes/api-details/typescript/crud/create-list-property-description.rst create mode 100644 source/includes/api-details/typescript/crud/create-mixed-property-type-description.rst create mode 100644 source/includes/api-details/typescript/crud/create-or-update-object-description.rst create mode 100644 source/includes/sdk-examples/crud/create-copy-object-to-another-database.rst create mode 100644 source/includes/sdk-examples/crud/create-counter-property-type.rst create mode 100644 source/includes/sdk-examples/crud/create-dictionary-property.rst create mode 100644 source/includes/sdk-examples/crud/create-geospatial-data-model.rst create mode 100644 source/includes/sdk-examples/crud/create-geospatial-data-object.rst create mode 100644 source/includes/sdk-examples/crud/create-initialize-objects-with-value.rst create mode 100644 source/includes/sdk-examples/crud/create-inverse-relationship.rst create mode 100644 source/includes/sdk-examples/crud/create-list-property.rst create mode 100644 source/includes/sdk-examples/crud/create-mixed-property-type.rst create mode 100644 source/includes/sdk-examples/crud/create-multiple-objects.rst create mode 100644 source/includes/sdk-examples/crud/create-object-id-property-type.rst create mode 100644 source/includes/sdk-examples/crud/create-objects-from-json.rst create mode 100644 source/includes/sdk-examples/crud/create-objects-in-background.rst create mode 100644 source/includes/sdk-examples/crud/create-or-update-object.rst create mode 100644 source/includes/sdk-examples/crud/create-set-property.rst create mode 100644 source/includes/sdk-examples/crud/create-timestamp-property-type.rst create mode 100644 source/includes/sdk-examples/crud/create-to-many-relationship.rst create mode 100644 source/includes/sdk-examples/crud/create-to-one-relationship.rst create mode 100644 source/includes/sdk-examples/crud/create-unmanaged-object.rst create mode 100644 source/includes/sdk-examples/crud/create-uuid-property-type.rst create mode 100644 source/platforms/apple/swift-concurrency.txt create mode 100644 source/platforms/apple/use-sdk-with-actors.txt create mode 100644 source/sdk/crud/create/create-object-types.txt create mode 100644 source/sdk/crud/create/create-property-types.txt diff --git a/snooty.toml b/snooty.toml index e6939c0f89..e44369c119 100644 --- a/snooty.toml +++ b/snooty.toml @@ -9,6 +9,9 @@ intersphinx = [ # These are the pages that open when you click on them (instead of just being containers) toc_landing_pages = [ + # New IA + "/sdk/crud/create", + # Tutorial "/tutorial", # SDKs diff --git a/source/includes/api-details/cpp/api-not-supported-description.rst b/source/includes/api-details/cpp/api-not-supported-description.rst new file mode 100644 index 0000000000..bfd43b8820 --- /dev/null +++ b/source/includes/api-details/cpp/api-not-supported-description.rst @@ -0,0 +1 @@ +This API is not currently supported in C++. diff --git a/source/includes/api-details/cpp/crud/create-counter-property-type-not-supported.rst b/source/includes/api-details/cpp/crud/create-counter-property-type-not-supported.rst new file mode 100644 index 0000000000..eb8e4befcc --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-counter-property-type-not-supported.rst @@ -0,0 +1 @@ +The C++ SDK does not currently provide a dedicated counter property type. diff --git a/source/includes/api-details/cpp/crud/create-dictionary-property-description.rst b/source/includes/api-details/cpp/crud/create-dictionary-property-description.rst new file mode 100644 index 0000000000..095176083d --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-dictionary-property-description.rst @@ -0,0 +1,11 @@ +When you create an object that has a +:cpp-sdk:`map property `, +you can set the values for keys in a few ways: + +- Set keys and values on the object and then add the object to the database +- Set the object's keys and values directly inside a write transaction + +.. include:: /includes/map-key-string-limitations.rst + +.. literalinclude:: /examples/generated/cpp/crud.snippet.percent-encode-disallowed-characters.cpp + :language: cpp diff --git a/source/includes/api-details/cpp/crud/create-embedded-object-description.rst b/source/includes/api-details/cpp/crud/create-embedded-object-description.rst index c2deb59ae6..51bdea508d 100644 --- a/source/includes/api-details/cpp/crud/create-embedded-object-description.rst +++ b/source/includes/api-details/cpp/crud/create-embedded-object-description.rst @@ -1,14 +1,14 @@ To create an embedded object, assign the raw pointer of the embedded object to a parent object's property. Move the parent object into -the realm using the :cpp-sdk:`Realm.add() function ` +the database using the :cpp-sdk:`Realm.add() function ` inside of a write transaction. In this example, we assign the raw pointer of the embedded object - ``ContactDetails *`` - to the embedded object property of the parent object - ``Business.contactDetails``. -Then, we add the ``business`` object to the realm. This copies the -``business`` and ``contactDetails`` objects to the realm. +Then, we add the ``business`` object to the database. This copies the +``business`` and ``contactDetails`` objects to the database. Because ``ContactDetails`` is an embedded object, it does not have its own lifecycle independent of the main ``Business`` object. diff --git a/source/includes/api-details/cpp/crud/create-geospatial-object-not-supported.rst b/source/includes/api-details/cpp/crud/create-geospatial-object-not-supported.rst new file mode 100644 index 0000000000..0fb2bb5e45 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-geospatial-object-not-supported.rst @@ -0,0 +1 @@ +The C++ SDK does not currently support geospatial data. diff --git a/source/includes/api-details/cpp/crud/create-inverse-relationship-description.rst b/source/includes/api-details/cpp/crud/create-inverse-relationship-description.rst new file mode 100644 index 0000000000..0bbfb9db40 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-inverse-relationship-description.rst @@ -0,0 +1,11 @@ +To create an object with a inverse relationship to another object, +assign the raw pointer of the related object to the relationship +property of the main object. Move the object into the realm using the +:cpp-sdk:`Realm.add() function ` +inside of a write transaction. + +In this example, we create two ``Person`` objects that each have a to-one +relationship to the same ``Dog`` object. The ``Dog`` has an inverse +relationship to each ``Person`` object. The inverse relationship backlink +is automatically updated when a linked ``Person`` object updates its +``Dog`` relationship. diff --git a/source/includes/api-details/cpp/crud/create-list-property-description.rst b/source/includes/api-details/cpp/crud/create-list-property-description.rst new file mode 100644 index 0000000000..a8251e9bfe --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-list-property-description.rst @@ -0,0 +1,28 @@ +To create an object with a list property (to-many relationship) to one or +more objects: + +- Initialize the main object and the related objects +- Use the :cpp-sdk:`push_back + ` + member function available to the SDK object lists + to append the raw pointers of the related objects to the main object's + list property +- Move the object into the realm using the + :cpp-sdk:`Realm.add() function ` + inside of a write transaction. + +In this example, we append the raw pointers of the related objects - +``Employee *`` - to the relationship property of the main object +- ``Company.employees``. This creates a one-way connection from the +``Company`` object to the ``Employee`` objects. + +Then, we add the ``Company`` to the database. This copies the +``Company`` and ``Employee`` objects to the database. + +The related ``Employee`` objects have their own lifecycle independent +of the main ``Company`` object. If you delete the main object, the +related objects remain. + +You can optionally create an inverse relationship to refer to the main object +from the related object. For more information, refer to: +:ref:`sdks-create-object-with-inverse-relationship`. diff --git a/source/includes/api-details/cpp/crud/create-mixed-property-type-description.rst b/source/includes/api-details/cpp/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..b9e2c69243 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-mixed-property-type-description.rst @@ -0,0 +1,3 @@ +When you create an object with a ``realm::mixed`` value, you must specify the +type of the value you store in the property. The SDK provides a ``type()`` +function you can call to determine what type of data the property has stored. diff --git a/source/includes/api-details/cpp/crud/create-object-id-property-type-description.rst b/source/includes/api-details/cpp/crud/create-object-id-property-type-description.rst new file mode 100644 index 0000000000..5fcb26ad20 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-object-id-property-type-description.rst @@ -0,0 +1 @@ +Create a unique Object ID with ``realm::object_id::generate()``. diff --git a/source/includes/api-details/cpp/crud/create-procedure.rst b/source/includes/api-details/cpp/crud/create-procedure.rst index 98e85ab096..fc6935ebeb 100644 --- a/source/includes/api-details/cpp/crud/create-procedure.rst +++ b/source/includes/api-details/cpp/crud/create-procedure.rst @@ -6,7 +6,7 @@ #. Move the unmanaged object instance into the database using the :cpp-sdk:`Realm.add() function `. - When you move an object into a realm, this consumes the object as an rvalue. + When you move an object into a database, this consumes the object as an rvalue. You must use the managed object for any data access or observation. If you would like to immediately work with the object, return a managed version of the object. diff --git a/source/includes/api-details/cpp/crud/create-realm-object-description.rst b/source/includes/api-details/cpp/crud/create-realm-object-description.rst index e9d7eff12a..5e9971ef9b 100644 --- a/source/includes/api-details/cpp/crud/create-realm-object-description.rst +++ b/source/includes/api-details/cpp/crud/create-realm-object-description.rst @@ -1,10 +1,10 @@ To create an object, you must instantiate it using the ``realm`` namespace. -Move the object into the realm using the +Move the object into the database using the :cpp-sdk:`Realm.add() function ` inside of a write transaction. -When you move an object into a realm, this consumes the object as an +When you move an object into a database, this consumes the object as an rvalue. You must use the managed object for any data access or observation. -In this example, copying the ``dog`` object into the realm consumes +In this example, copying the ``dog`` object into the database consumes it as an rvalue. You can return the managed object to continue to work with it. diff --git a/source/includes/api-details/cpp/crud/create-set-property-description.rst b/source/includes/api-details/cpp/crud/create-set-property-description.rst new file mode 100644 index 0000000000..f061b140ce --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-set-property-description.rst @@ -0,0 +1,5 @@ +You can create objects that contain +:cpp-sdk:`set ` +properties as you would any SDK object, but you can only mutate a set +property within a write transaction. This means you can only set the value(s) +of a set property within a write transaction. diff --git a/source/includes/api-details/cpp/crud/create-timestamp-property-type-description.rst b/source/includes/api-details/cpp/crud/create-timestamp-property-type-description.rst new file mode 100644 index 0000000000..fa2e238356 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-timestamp-property-type-description.rst @@ -0,0 +1,4 @@ +Use the `chrono library +`__ +to store a ``time_point`` relative to the ``system_clock``: +``>`` diff --git a/source/includes/api-details/cpp/crud/create-to-many-relationship-description.rst b/source/includes/api-details/cpp/crud/create-to-many-relationship-description.rst new file mode 100644 index 0000000000..10e8989f1f --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-to-many-relationship-description.rst @@ -0,0 +1,23 @@ +To create an object with a to-many relationship to one or more objects: + +- Initialize the main object and the related objects +- Use the :cpp-sdk:`push_back + ` + member function available to the Realm object lists + to append the raw pointers of the related objects to the main object's + list property +- Move the object into the realm using the + :cpp-sdk:`Realm.add() function ` + inside of a write transaction. + +In this example, we append the raw pointers of the related objects - +``Employee *`` - to the relationship property of the main object +- ``Company.employees``. This creates a one-way connection from the +``Company`` object to the ``Employee`` objects. + +Then, we add the ``Company`` to the realm. This copies the +``Company`` and ``Employee`` objects to the realm. + +The related ``Employee`` objects have their own lifecycle independent +of the main ``Company`` object. If you delete the main object, the +related objects remain. diff --git a/source/includes/api-details/cpp/crud/create-to-one-relationship-description.rst b/source/includes/api-details/cpp/crud/create-to-one-relationship-description.rst new file mode 100644 index 0000000000..eb228792f4 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-to-one-relationship-description.rst @@ -0,0 +1,14 @@ +To create an object with a to-one relationship to another object, +assign the raw pointer of the related object to the relationship +property of the main object. Move the object into the database using +the :cpp-sdk:`Realm.add() function ` +inside of a write transaction. + +In this example, we assign the raw pointer of the related object - +``FavoriteToy *`` - to the relationship property of the main object +- ``Dog.favoriteToy``. Then, when we add the ``dog`` object to the +database, this copies both the ``dog`` and ``favoriteToy`` to the database. + +The related ``favoriteToy`` object has its own lifecycle independent +of the main ``dog`` object. If you delete the main object, the related +object remains. diff --git a/source/includes/api-details/cpp/crud/create-unmanaged-copy-description.rst b/source/includes/api-details/cpp/crud/create-unmanaged-copy-description.rst new file mode 100644 index 0000000000..e8b7e0e8f5 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-unmanaged-copy-description.rst @@ -0,0 +1,4 @@ +Create an unmanaged version of a managed object by calling the ``detach()`` +function. This returns a value of the managed type. For example, calling +the ``detach()`` function on a managed string property of a managed object +returns a ``std::string`` copy of that property. diff --git a/source/includes/api-details/cpp/crud/create-uuid-property-type-description.rst b/source/includes/api-details/cpp/crud/create-uuid-property-type-description.rst new file mode 100644 index 0000000000..c2733a7bf6 --- /dev/null +++ b/source/includes/api-details/cpp/crud/create-uuid-property-type-description.rst @@ -0,0 +1,2 @@ +You can create a UUID with ``realm::uuid()``. Or you can initialize a UUID +with a specific value, similar to ``realm::uuid("18de7916-7f84-11ec-a8a3-0242ac120002")``. diff --git a/source/includes/api-details/csharp/crud/create-counter-property-type-description.rst b/source/includes/api-details/csharp/crud/create-counter-property-type-description.rst new file mode 100644 index 0000000000..a8548584c6 --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-counter-property-type-description.rst @@ -0,0 +1,23 @@ +Traditionally, you would implement a counter by reading a value, incrementing +it, and then setting it (``myObject.Counter += 1``). This does not work well in +an asynchronous situation like when two clients are offline. Consider +the following scenario: + +- The SDK object has a ``counter`` property of type ``int``. It is currently + set to a value of ``10``. + +- Clients 1 and 2 both read the ``counter`` property (``10``) and each increments + the value by ``1``. + +- When each client regains connectivity and merges their changes, they expect a + value of 11, and there is no conflict. However, the counter value should be + ``12``! + +When using a ``RealmInteger``, however, you can call the ``Increment()`` and +``Decrement()`` methods, and to reset the counter, you set it to ``0``, just as +you would an ``int``. + +.. important:: + + When you reset a ``RealmInteger``, you may run into the offline merge issue + described above. diff --git a/source/includes/api-details/csharp/crud/create-list-property-description.rst b/source/includes/api-details/csharp/crud/create-list-property-description.rst new file mode 100644 index 0000000000..97377df95d --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-list-property-description.rst @@ -0,0 +1,3 @@ +You create a list collection property by defining a getter-only property of type +`IList `_, +where ``T`` can be any data type (except other collections). diff --git a/source/includes/api-details/csharp/crud/create-mixed-property-type-description.rst b/source/includes/api-details/csharp/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..5fcff67c42 --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-mixed-property-type-description.rst @@ -0,0 +1,9 @@ +.. note:: + + You cannot create a nullable ``RealmValue``. However, if you want a + ``RealmValue`` property to contain a null value, you can + use the special ``RealmValue.Null`` property. + +The following code demonstrates creating a ``RealmValue`` property in a class +that inherits from ``IRealmObject`` and then setting and getting the value of +that property: diff --git a/source/includes/api-details/csharp/crud/create-multiple-objects-description.rst b/source/includes/api-details/csharp/crud/create-multiple-objects-description.rst new file mode 100644 index 0000000000..8778c1566f --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-multiple-objects-description.rst @@ -0,0 +1,4 @@ +You can create multiple items in the database using the +:dotnet-sdk:`Add(IEnumerable, bool) ` +method. It takes a collection of standalone ``IRealmObject`` instances to +add to the database. diff --git a/source/includes/api-details/csharp/crud/create-object-id-property-type-description.rst b/source/includes/api-details/csharp/crud/create-object-id-property-type-description.rst new file mode 100644 index 0000000000..49851f6544 --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-object-id-property-type-description.rst @@ -0,0 +1 @@ +Create a unique Object ID with ``ObjectId.GenerateNewId()``. \ No newline at end of file diff --git a/source/includes/api-details/csharp/crud/create-objects-in-background-description.rst b/source/includes/api-details/csharp/crud/create-objects-in-background-description.rst new file mode 100644 index 0000000000..af2c1f306f --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-objects-in-background-description.rst @@ -0,0 +1,3 @@ +Open a write transaction with the +or :dotnet-sdk:`Realm.WriteAsync() ` +method to avoid blocking the UI thread. diff --git a/source/includes/api-details/csharp/crud/create-or-update-object-description.rst b/source/includes/api-details/csharp/crud/create-or-update-object-description.rst new file mode 100644 index 0000000000..47dffba609 --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-or-update-object-description.rst @@ -0,0 +1,5 @@ +Upserting a document is the same as creating a new one, except you set the +optional ``update`` parameter to ``true``. In this example, we create a new +``Item`` object with a unique ``Id``. We then insert an item with the +same id but a different ``Name`` value. Because we have set the ``update`` +parameter to ``true``, the existing record is updated with the new name. diff --git a/source/includes/api-details/csharp/crud/create-timestamp-property-type-description.rst b/source/includes/api-details/csharp/crud/create-timestamp-property-type-description.rst new file mode 100644 index 0000000000..0fbac8b5c9 --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-timestamp-property-type-description.rst @@ -0,0 +1,6 @@ +Use ``DateTimeOffset`` to store timestamp data. The SDK converts +``DateTimeOffset`` values to UTC before storing in the database, and does not +store the timezone information. + +See :github:`Issue #1835 ` for more +information. diff --git a/source/includes/api-details/dart/crud/create-asymmetric-object-description.rst b/source/includes/api-details/dart/crud/create-asymmetric-object-description.rst index 1dbaf49905..9210ead407 100644 --- a/source/includes/api-details/dart/crud/create-asymmetric-object-description.rst +++ b/source/includes/api-details/dart/crud/create-asymmetric-object-description.rst @@ -1,2 +1,2 @@ -Once you have an open Realm, you can create an asymmetric object inside +Once you have an open database, you can create an asymmetric object inside a write transaction. Pass your object data to ``realm.ingest``. diff --git a/source/includes/api-details/dart/crud/create-counter-property-type-not-supported.rst b/source/includes/api-details/dart/crud/create-counter-property-type-not-supported.rst new file mode 100644 index 0000000000..7e0c63c17d --- /dev/null +++ b/source/includes/api-details/dart/crud/create-counter-property-type-not-supported.rst @@ -0,0 +1 @@ +The Flutter SDK does not currently provide a dedicated counter property type. diff --git a/source/includes/api-details/dart/crud/create-list-property-description.rst b/source/includes/api-details/dart/crud/create-list-property-description.rst new file mode 100644 index 0000000000..8510ff09c5 --- /dev/null +++ b/source/includes/api-details/dart/crud/create-list-property-description.rst @@ -0,0 +1,3 @@ +You can create a relationship between one object and any number of objects +using a property of type ``List`` in your application, where T is an SDK +model class. diff --git a/source/includes/api-details/dart/crud/create-mixed-property-type-description.rst b/source/includes/api-details/dart/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..e37f980e09 --- /dev/null +++ b/source/includes/api-details/dart/crud/create-mixed-property-type-description.rst @@ -0,0 +1,2 @@ +To add a ``RealmValue`` to an object, call ``RealmValue.from()`` on the data +or ``RealmValue.nullValue()`` to set a null value. diff --git a/source/includes/api-details/dart/crud/create-multiple-objects-description.rst b/source/includes/api-details/dart/crud/create-multiple-objects-description.rst new file mode 100644 index 0000000000..993d130edb --- /dev/null +++ b/source/includes/api-details/dart/crud/create-multiple-objects-description.rst @@ -0,0 +1,3 @@ +To add multiple objects to a database, pass a list of multiple objects +to :flutter-sdk:`Realm.addAll() ` inside a write +transaction block. diff --git a/source/includes/api-details/dart/crud/create-object-id-property-type-description.rst b/source/includes/api-details/dart/crud/create-object-id-property-type-description.rst new file mode 100644 index 0000000000..e3f1b19d70 --- /dev/null +++ b/source/includes/api-details/dart/crud/create-object-id-property-type-description.rst @@ -0,0 +1,3 @@ +Call ``ObjectId()`` to set any unique identifier properties of +your object. Alternatively, pass a string +to ``ObjectId()`` to set the unique identifier property to a specific value. diff --git a/source/includes/api-details/dart/crud/create-objects-in-background-description.rst b/source/includes/api-details/dart/crud/create-objects-in-background-description.rst new file mode 100644 index 0000000000..005bc54f1b --- /dev/null +++ b/source/includes/api-details/dart/crud/create-objects-in-background-description.rst @@ -0,0 +1,6 @@ +You can add, modify, or delete objects asynchronously using +:flutter-sdk:`Realm.writeAsync() `. + +When you use ``Realm.writeAsync()`` to perform write operations, waiting +to obtain the write lock and committing a transaction occur in the background. +Only the write itself occurs on the main process. diff --git a/source/includes/api-details/dart/crud/create-or-update-object-description.rst b/source/includes/api-details/dart/crud/create-or-update-object-description.rst new file mode 100644 index 0000000000..2a9cc1dc57 --- /dev/null +++ b/source/includes/api-details/dart/crud/create-or-update-object-description.rst @@ -0,0 +1,2 @@ +To upsert an object, call :flutter-sdk:`Realm.add() ` +with the optional ``update`` flag set to ``true`` inside a transaction block. diff --git a/source/includes/api-details/dart/crud/create-realm-object-description.rst b/source/includes/api-details/dart/crud/create-realm-object-description.rst index 37958863aa..b5aac7f6e7 100644 --- a/source/includes/api-details/dart/crud/create-realm-object-description.rst +++ b/source/includes/api-details/dart/crud/create-realm-object-description.rst @@ -8,9 +8,3 @@ Once you've opened a database, you can create objects within it using a }); You can also return values from the write transaction callback function. - -.. warning:: Write RealmObjects to One Realm File - - You can only write ``RealmObjects`` to a single realm file. - If you already wrote a ``RealmObject`` to one realm file, - the SDK throws a ``RealmException`` if you try to write it to another database. diff --git a/source/includes/api-details/dart/crud/create-timestamp-property-type-description.rst b/source/includes/api-details/dart/crud/create-timestamp-property-type-description.rst new file mode 100644 index 0000000000..cbe7854140 --- /dev/null +++ b/source/includes/api-details/dart/crud/create-timestamp-property-type-description.rst @@ -0,0 +1,7 @@ +Use ``DateTime`` to store timestamp data. + +However, it is important to note that the SDK stores ``DateTime`` in UTC. +When you use ``DateTime``, you must create it in UTC or convert it +with ``.toUtc()`` before you store it. If your application requires it, +you can convert it back to local or the desired time zone when reading +from the database. diff --git a/source/includes/api-details/dart/crud/create-uuid-property-type-description.rst b/source/includes/api-details/dart/crud/create-uuid-property-type-description.rst new file mode 100644 index 0000000000..84b3799cbd --- /dev/null +++ b/source/includes/api-details/dart/crud/create-uuid-property-type-description.rst @@ -0,0 +1,3 @@ +To set any unique identifier properties of +your object to a random value, call one of the ``Uuid`` methods to create a UUID, +such as ``Uuid.v4()``. diff --git a/source/includes/api-details/generic/crud/create-copy-object-to-another-database-js-ts-description.rst b/source/includes/api-details/generic/crud/create-copy-object-to-another-database-js-ts-description.rst new file mode 100644 index 0000000000..a2b0dbf4de --- /dev/null +++ b/source/includes/api-details/generic/crud/create-copy-object-to-another-database-js-ts-description.rst @@ -0,0 +1,6 @@ +To copy a managed object to another database instance, call the +:js-sdk:`Realm.create() ` method in a write +transaction with the object to copy. You can optionally specify the +:js-sdk:`UpdateMode ` to determine how to handle +copying objects where the target database instance already contains an object +with a matching primary key. diff --git a/source/includes/api-details/generic/crud/create-copy-object-to-another-database-no-example.rst b/source/includes/api-details/generic/crud/create-copy-object-to-another-database-no-example.rst new file mode 100644 index 0000000000..a151d89047 --- /dev/null +++ b/source/includes/api-details/generic/crud/create-copy-object-to-another-database-no-example.rst @@ -0,0 +1,2 @@ +The selected language does not currently have an example of how to copy an +object to another database instance. diff --git a/source/includes/api-details/generic/crud/create-geospatial-object-js-ts-description.rst b/source/includes/api-details/generic/crud/create-geospatial-object-js-ts-description.rst new file mode 100644 index 0000000000..aa08c242e1 --- /dev/null +++ b/source/includes/api-details/generic/crud/create-geospatial-object-js-ts-description.rst @@ -0,0 +1,3 @@ +However, in this example, because the ``MyGeoPoint`` class does not +extend ``Realm.Object``, we must specify ``MyGeoPoint.schema`` when opening +the database: diff --git a/source/includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst b/source/includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst new file mode 100644 index 0000000000..93993034c6 --- /dev/null +++ b/source/includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst @@ -0,0 +1,3 @@ +This SDK does not provide specialized methods to initialize objects with +a value. Instead, use standard language features to create objects with +initial values, or set the values after creating an object. diff --git a/source/includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst b/source/includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst new file mode 100644 index 0000000000..378167cf98 --- /dev/null +++ b/source/includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst @@ -0,0 +1 @@ +The SDK does not have a dedicated API to create multiple objects. diff --git a/source/includes/api-details/generic/crud/create-objects-from-json-missing-example.rst b/source/includes/api-details/generic/crud/create-objects-from-json-missing-example.rst new file mode 100644 index 0000000000..dc245dc40c --- /dev/null +++ b/source/includes/api-details/generic/crud/create-objects-from-json-missing-example.rst @@ -0,0 +1,2 @@ +This language is currently missing an example of how to create objects from +JSON. diff --git a/source/includes/api-details/generic/crud/create-timestamp-property-type-js-ts-description.rst b/source/includes/api-details/generic/crud/create-timestamp-property-type-js-ts-description.rst new file mode 100644 index 0000000000..9969f1b6ea --- /dev/null +++ b/source/includes/api-details/generic/crud/create-timestamp-property-type-js-ts-description.rst @@ -0,0 +1,2 @@ +Use the ``date`` property type to store timestamp data. This maps to the +JavaScript :mdn:`Date ` type. diff --git a/source/includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst b/source/includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst new file mode 100644 index 0000000000..4a1ce01df6 --- /dev/null +++ b/source/includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst @@ -0,0 +1,2 @@ +The API to create an unmanaged copy of an object is either not needed or +not currently supported in this SDK. diff --git a/source/includes/api-details/generic/crud/create-uuid-property-type-js-ts-description.rst b/source/includes/api-details/generic/crud/create-uuid-property-type-js-ts-description.rst new file mode 100644 index 0000000000..c2dc948a4d --- /dev/null +++ b/source/includes/api-details/generic/crud/create-uuid-property-type-js-ts-description.rst @@ -0,0 +1,3 @@ +To set any unique identifier properties of +your object to a random value, call ``new UUID()``. Alternatively, pass a string +to ``new UUID()`` to set the unique identifier property to a specific value. diff --git a/source/includes/api-details/java/crud/create-copy-object-to-another-database-description.rst b/source/includes/api-details/java/crud/create-copy-object-to-another-database-description.rst new file mode 100644 index 0000000000..cb0c5b3bcb --- /dev/null +++ b/source/includes/api-details/java/crud/create-copy-object-to-another-database-description.rst @@ -0,0 +1,9 @@ +Use :java-sdk:`realm.copyToRealm() ` +in a write transaction to copy a managed object to another database instance. + +Alternately, to copy an object that does not exist, or update an object that +does exist, use :java-sdk:`realm.copyToRealmOrUpdate() +`. This +copies an object where the target database instance does not contain an +object with the same primary key. If the target database instance already +contains an object with a matching primary key, it updates the object. diff --git a/source/includes/api-details/java/crud/create-counter-property-type-java-description.rst b/source/includes/api-details/java/crud/create-counter-property-type-java-description.rst new file mode 100644 index 0000000000..ce9cc49e4a --- /dev/null +++ b/source/includes/api-details/java/crud/create-counter-property-type-java-description.rst @@ -0,0 +1,44 @@ +Typically, incrementing or decrementing a +``byte``, ``short``, ``int``, or ``long`` field of a Realm +object looks something like this: + +1. Read the current value of the field. +#. Update that value in memory to a new value based on the increment or + decrement. +#. Write a new value back to the field. + +When multiple distributed clients attempt this at the same time, +updates reaching clients in different orders can +result in different values on different clients. ``MutableRealmInteger`` +improves on this by translating numeric updates into sync operations +that can be executed in any order to converge to the same value. + +The :java-sdk:`counter.increment() ` +and :java-sdk:`counter.decrement() ` +operators ensure that increments and decrements from multiple distributed +clients are aggregated correctly. + +To change a :java-sdk:`MutableRealmInteger +` value, call ``increment()`` or +``decrement()`` within a write transaction. + +You can assign a ``MutableRealmInteger`` a new value with a call to +:java-sdk:`counter.set() ` +within a write transaction. + +.. warning:: Counter Resets + + Use the ``set()`` operator with extreme care. ``set()`` ignores + the effects of any prior calls to ``increment()`` or ``decrement()``. + Although the value of a ``MutableRealmInteger`` always converges + across devices, the specific value on which it converges depends on + the actual order in which operations took place. + Mixing ``set()`` with ``increment()`` and ``decrement()`` is + not advised unless fuzzy counting is acceptable. + +.. literalinclude:: /examples/generated/java/local/WritesTest.snippet.counter-set.java + :language: java + +Since ``MutableRealmInteger`` instances retain a reference to their +parent object, neither object can be garbage collected while you still +retain a reference to the ``MutableRealmInteger``. diff --git a/source/includes/api-details/java/crud/create-counter-property-type-kotlin-description.rst b/source/includes/api-details/java/crud/create-counter-property-type-kotlin-description.rst new file mode 100644 index 0000000000..1b68339a80 --- /dev/null +++ b/source/includes/api-details/java/crud/create-counter-property-type-kotlin-description.rst @@ -0,0 +1,45 @@ +Typically, incrementing or decrementing a +``byte``, ``short``, ``int``, or ``long`` field of a Realm +object looks something like this: + +1. Read the current value of the field. +#. Update that value in memory to a new value based on the increment or + decrement. +#. Write a new value back to the field. + +When multiple distributed clients attempt this at the same time, +updates reaching clients in different orders can +result in different values on different clients. ``MutableRealmInteger`` +improves on this by translating numeric updates into sync operations +that can be executed in any order to converge to the same value. + +The :java-sdk:`counter.increment() ` +and :java-sdk:`counter.decrement() ` +operators ensure that increments and decrements from multiple distributed +clients are aggregated correctly. + +To change a :java-sdk:`MutableRealmInteger +` value, call ``increment()`` or +``decrement()`` within a write transaction. + +You can assign a ``MutableRealmInteger`` a new value with a call to +:java-sdk:`counter.set() ` +within a write transaction. + +.. warning:: Counter Resets + + Use the ``set()`` operator with extreme care. ``set()`` ignores + the effects of any prior calls to ``increment()`` or ``decrement()``. + Although the value of a ``MutableRealmInteger`` always converges + across devices, the specific value on which it converges depends on + the actual order in which operations took place. + Mixing ``set()`` with ``increment()`` and ``decrement()`` is + not advised unless fuzzy counting is acceptable. + +.. literalinclude:: /examples/generated/java/local/WritesTest.snippet.counter-set.kt + :language: kotlin + :copyable: false + +Since ``MutableRealmInteger`` instances retain a reference to their +parent object, neither object can be garbage collected while you still +retain a reference to the ``MutableRealmInteger``. diff --git a/source/includes/api-details/java/crud/create-dictionary-property-java-description.rst b/source/includes/api-details/java/crud/create-dictionary-property-java-description.rst new file mode 100644 index 0000000000..3140a8648c --- /dev/null +++ b/source/includes/api-details/java/crud/create-dictionary-property-java-description.rst @@ -0,0 +1,5 @@ +Add an object to a ``RealmDictionary`` with +:java-sdk:`put() `. + +Add multiple objects to a ``RealmDictionary`` with +:java-sdk:`putAll() `. diff --git a/source/includes/api-details/java/crud/create-dictionary-property-kotlin-description.rst b/source/includes/api-details/java/crud/create-dictionary-property-kotlin-description.rst new file mode 100644 index 0000000000..7cb2f5c9bb --- /dev/null +++ b/source/includes/api-details/java/crud/create-dictionary-property-kotlin-description.rst @@ -0,0 +1,5 @@ +Add an object to a ``RealmDictionary`` with +:java-sdk:`put() ` (or the ``[]`` operator). + +Add multiple objects to a ``RealmDictionary`` with +:java-sdk:`putAll() `. diff --git a/source/includes/api-details/java/crud/create-geospatial-object-not-supported.rst b/source/includes/api-details/java/crud/create-geospatial-object-not-supported.rst new file mode 100644 index 0000000000..5d99e9a83c --- /dev/null +++ b/source/includes/api-details/java/crud/create-geospatial-object-not-supported.rst @@ -0,0 +1,2 @@ +The Java SDK does not support geospatial data. To store and query geospatial +data, use the Kotlin SDK. diff --git a/source/includes/api-details/java/crud/create-list-property-description.rst b/source/includes/api-details/java/crud/create-list-property-description.rst new file mode 100644 index 0000000000..b2e9889d3f --- /dev/null +++ b/source/includes/api-details/java/crud/create-list-property-description.rst @@ -0,0 +1,3 @@ +You can create a relationship between one object +and any number of objects using a field of type ``RealmList`` +where ``T`` is an SDK object in your application. diff --git a/source/includes/api-details/java/crud/create-mixed-property-type-description.rst b/source/includes/api-details/java/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..1ab4164235 --- /dev/null +++ b/source/includes/api-details/java/crud/create-mixed-property-type-description.rst @@ -0,0 +1,12 @@ +To create a ``RealmAny`` instance, use the +:java-sdk:`RealmAny.valueOf() ` method +to assign an initial value or ``RealmAny.nullValue()`` to assign no +value. ``RealmAny`` instances are immutable just like ``String`` or +``Integer`` instances; if you want to assign a new value to a +``RealmAny`` field, you must create a new ``RealmAny`` instance. + +.. warning:: Two Possible Null ``RealmAny`` Values + + ``RealmAny`` instances are always :ref:`nullable + `. Additionally, instances can contain a + value of type ``RealmAny.Type.NULL``. diff --git a/source/includes/api-details/java/crud/create-object-id-property-type-java-description.rst b/source/includes/api-details/java/crud/create-object-id-property-type-java-description.rst new file mode 100644 index 0000000000..e9b2526808 --- /dev/null +++ b/source/includes/api-details/java/crud/create-object-id-property-type-java-description.rst @@ -0,0 +1 @@ +Create a unique Object ID with ``new ObjectId()``. diff --git a/source/includes/api-details/java/crud/create-object-id-property-type-kotlin-description.rst b/source/includes/api-details/java/crud/create-object-id-property-type-kotlin-description.rst new file mode 100644 index 0000000000..2b7541ff1a --- /dev/null +++ b/source/includes/api-details/java/crud/create-object-id-property-type-kotlin-description.rst @@ -0,0 +1 @@ +Create a unique Object ID with ``ObjectId()``. diff --git a/source/includes/api-details/java/crud/create-objects-from-json-description.rst b/source/includes/api-details/java/crud/create-objects-from-json-description.rst new file mode 100644 index 0000000000..f1a10612cb --- /dev/null +++ b/source/includes/api-details/java/crud/create-objects-from-json-description.rst @@ -0,0 +1,11 @@ +You can insert objects into the database from JSON. The SDK +supports creating objects from ``String``, +:android:`JSONObject `, and +:android:`InputStream ` types. +The SDK ignores any properties present in the JSON that are +not defined in the SDK object schema. + +The following example demonstrates how to create a single object from JSON with +:java-sdk:`createObjectFromJson() ` +or multiple objects from JSON with +:java-sdk:`createAllFromJson() `: diff --git a/source/includes/api-details/java/crud/create-or-update-object-java-description.rst b/source/includes/api-details/java/crud/create-or-update-object-java-description.rst new file mode 100644 index 0000000000..e3bf1f8de9 --- /dev/null +++ b/source/includes/api-details/java/crud/create-or-update-object-java-description.rst @@ -0,0 +1,19 @@ +The following example demonstrates how to upsert an object with the +SDK. We create a new turtle enthusiast named "Drew" and then +update their name to "Andy" using :java-sdk:`insertOrUpdate() +`: + +.. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.upsert-an-object.java + :language: java + :emphasize-lines: 16 + +You can also use :java-sdk:`copyToRealmOrUpdate() +` to +either create a new object based on a supplied object or update an +existing object with the same primary key value. Use the +``CHECK_SAME_VALUES_BEFORE_SET`` +:java-sdk:`ImportFlag ` to only update fields +that are different in the supplied object. + +The following example demonstrates how to insert an object or, if an object already +exists with the same primary key, update only those fields that differ: diff --git a/source/includes/api-details/java/crud/create-or-update-object-kotlin-description.rst b/source/includes/api-details/java/crud/create-or-update-object-kotlin-description.rst new file mode 100644 index 0000000000..5ed7628137 --- /dev/null +++ b/source/includes/api-details/java/crud/create-or-update-object-kotlin-description.rst @@ -0,0 +1,19 @@ +The following example demonstrates how to upsert an object with the SDK. We +create a new turtle enthusiast named "Drew" and then +update their name to "Andy" using :java-sdk:`insertOrUpdate() +`: + +.. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.upsert-an-object.kt + :language: kotlin + :emphasize-lines: 16 + +You can also use :java-sdk:`copyToRealmOrUpdate() +` to +either create a new object based on a supplied object or update an +existing object with the same primary key value. Use the +``CHECK_SAME_VALUES_BEFORE_SET`` +:java-sdk:`ImportFlag ` to only update fields +that are different in the supplied object. + +The following example demonstrates how to insert an object or, if an object already +exists with the same primary key, update only those fields that differ: diff --git a/source/includes/api-details/java/crud/create-realm-object-description.rst b/source/includes/api-details/java/crud/create-realm-object-description.rst index cb6fba2130..29160528a8 100644 --- a/source/includes/api-details/java/crud/create-realm-object-description.rst +++ b/source/includes/api-details/java/crud/create-realm-object-description.rst @@ -1,7 +1,7 @@ Use :java-sdk:`realm.createObject() ` -in a transaction to create a persistent instance of a Realm object in a -realm. You can then modify the returned object with other field values -using accessors and mutators. +in a transaction to create a persistent instance of a database object. You can +then modify the returned object with other field values using accessors and +mutators. The following example demonstrates how to create an object with :java-sdk:`createObject() `: diff --git a/source/includes/api-details/java/crud/create-set-properties-description.rst b/source/includes/api-details/java/crud/create-set-properties-description.rst new file mode 100644 index 0000000000..d76c203b82 --- /dev/null +++ b/source/includes/api-details/java/crud/create-set-properties-description.rst @@ -0,0 +1,5 @@ +Add an object to a ``RealmSet`` with +:java-sdk:`RealmSet.add() `. + +Add multiple objects with +:java-sdk:`RealmSet.addAll() `. diff --git a/source/includes/api-details/java/crud/create-timestamp-property-type-description.rst b/source/includes/api-details/java/crud/create-timestamp-property-type-description.rst new file mode 100644 index 0000000000..b12cc6d0e5 --- /dev/null +++ b/source/includes/api-details/java/crud/create-timestamp-property-type-description.rst @@ -0,0 +1 @@ +Use the ``Date`` type to store timestamp data. diff --git a/source/includes/api-details/java/crud/create-unmanaged-copy-description.rst b/source/includes/api-details/java/crud/create-unmanaged-copy-description.rst new file mode 100644 index 0000000000..23512b07b9 --- /dev/null +++ b/source/includes/api-details/java/crud/create-unmanaged-copy-description.rst @@ -0,0 +1,2 @@ +Use :java-sdk:`realm.copyFromRealm() ` +to create an in-memory instance of a database object. diff --git a/source/includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst b/source/includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst new file mode 100644 index 0000000000..08187be898 --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst @@ -0,0 +1 @@ +JavaScript does not currently have a dedicated counter property type. diff --git a/source/includes/api-details/javascript/crud/create-dictionary-property-description.rst b/source/includes/api-details/javascript/crud/create-dictionary-property-description.rst new file mode 100644 index 0000000000..290eb9079b --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-dictionary-property-description.rst @@ -0,0 +1,2 @@ +Create an object with a dictionary value by running the :js-sdk:`realm.create() +` method within a write transaction. diff --git a/source/includes/api-details/javascript/crud/create-list-property-description.rst b/source/includes/api-details/javascript/crud/create-list-property-description.rst new file mode 100644 index 0000000000..2d4a846db5 --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-list-property-description.rst @@ -0,0 +1,2 @@ +To define a to-many relationship, specify a property where the type is a list +or array of the related SDK object type in its object schema. diff --git a/source/includes/api-details/javascript/crud/create-mixed-property-type-description.rst b/source/includes/api-details/javascript/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..a939d3ffc1 --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-mixed-property-type-description.rst @@ -0,0 +1,2 @@ +Create an object with a mixed value by running the :js-sdk:`realm.create() +` method within a write transaction. diff --git a/source/includes/api-details/javascript/crud/create-or-update-object-description.rst b/source/includes/api-details/javascript/crud/create-or-update-object-description.rst new file mode 100644 index 0000000000..09e7f6f338 --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-or-update-object-description.rst @@ -0,0 +1,4 @@ +To upsert an object, call :js-sdk:`Realm.create() ` +with the update mode set to ``modified``. The operation either inserts a +new object with the given primary key or updates an existing object that +already has that primary key. diff --git a/source/includes/api-details/javascript/crud/create-realm-object-description.rst b/source/includes/api-details/javascript/crud/create-realm-object-description.rst index f18ba92475..474e64f9f3 100644 --- a/source/includes/api-details/javascript/crud/create-realm-object-description.rst +++ b/source/includes/api-details/javascript/crud/create-realm-object-description.rst @@ -1,5 +1,5 @@ -To add an object to a realm, instantiate it as you would any other object -and then pass it to :js-sdk:`Realm.create() ` inside of a -write transaction. If the realm's :ref:`schema ` includes -the object type and the object conforms to the schema, then Realm -stores the object, which is now *managed* by the realm. +To add an object to a database, instantiate it as you would any other object +and then pass it to :js-sdk:`Realm.create() ` +inside of a write transaction. If the database :ref:`schema ` +includes the object type and the object conforms to the schema, then the SDK +stores the object, which is now *managed* by the database instance. diff --git a/source/includes/api-details/javascript/crud/create-set-properties-description.rst b/source/includes/api-details/javascript/crud/create-set-properties-description.rst new file mode 100644 index 0000000000..c0ef2d772d --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-set-properties-description.rst @@ -0,0 +1,4 @@ +To create an object with a **Realm Set** property, you must create +the object within a write transaction. When defining your SDK +object, initialize the **Realm Set** by passing an empty array or an +array with your initial values. diff --git a/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst b/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst index 5f145cc22d..d26f06703e 100644 --- a/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst +++ b/source/includes/api-details/kotlin/crud/create-asymmetric-object-description.rst @@ -5,7 +5,7 @@ it into the database. To create a new ``AsymmetricRealmObject`` instance, instantiate a new object of an :ref:`asymmetric object type ` using -`insert() <{+kotlin-sync-prefix+}io.realm.kotlin.mongodb.ext/insert.html>`__. +:kotlin-sync-sdk:`insert() `. In the following example, we instantiate a new ``WeatherSensor`` object and pass it to ``insert()`` within a write transaction: diff --git a/source/includes/api-details/kotlin/crud/create-copy-object-to-another-database-description.rst b/source/includes/api-details/kotlin/crud/create-copy-object-to-another-database-description.rst new file mode 100644 index 0000000000..9188d4688d --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-copy-object-to-another-database-description.rst @@ -0,0 +1,6 @@ +You can copy an SDK object to a :kotlin-sdk:`MutableRealm +` instance with the +:kotlin-sdk:`copyToRealm() ` +method. The :kotlin-sdk:`UpdatePolicy ` +you specify determines how to handle copying objects where the target database +instance already contains an object with a matching primary key. diff --git a/source/includes/api-details/kotlin/crud/create-counter-property-type-description.rst b/source/includes/api-details/kotlin/crud/create-counter-property-type-description.rst new file mode 100644 index 0000000000..6ce690ea06 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-counter-property-type-description.rst @@ -0,0 +1,12 @@ +To create a new object instance with a +:kotlin-sdk:`MutableRealmInt +` +property, instantiate an object and pass an initial value to the +``MutableRealmInt`` property using +:kotlin-sdk:`MutableRealmInt.create() `. +For more information about the ``MutableRealmInt`` type, refer to +:ref:``. + +In the following example, we instantiate a new ``Frog`` object with a +``fliesEaten`` property and pass an initial value to +``MutableRealmInt.create()``: diff --git a/source/includes/api-details/kotlin/crud/create-dictionary-property-description.rst b/source/includes/api-details/kotlin/crud/create-dictionary-property-description.rst new file mode 100644 index 0000000000..918bb09cec --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-dictionary-property-description.rst @@ -0,0 +1,22 @@ +To create a new object instance with a +:kotlin-sdk:`RealmDictionary ` +property, instantiate an object and pass any key-value pairs of a +supported type to the ``RealmDictionary`` property. + +You can instantiate an unmanaged dictionary with +:kotlin-sdk:`realmDictionaryOf() ` +or +:kotlin-sdk:`realmDictionaryEntryOf() `. +Or you can pass key-values using +:kotlin-sdk:`put() ` +or +:kotlin-sdk:`putAll() `. +The dictionary is unmanaged until you copy it to the database. + +.. include:: /includes/map-key-string-limitations.rst + +.. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.percent-encode-disallowed-characters.kt + :language: kotlin + +In the following example, we instantiate a new ``Frog`` object with +initial key-values for several dictionary properties: diff --git a/source/includes/api-details/kotlin/crud/create-inverse-relationship-description.rst b/source/includes/api-details/kotlin/crud/create-inverse-relationship-description.rst new file mode 100644 index 0000000000..d8eb42c7df --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-inverse-relationship-description.rst @@ -0,0 +1,2 @@ +In the following example, we instantiate a new ``User`` object with a +backlinks ``posts`` property that references a list of ``Post`` objects: diff --git a/source/includes/api-details/kotlin/crud/create-list-property-description.rst b/source/includes/api-details/kotlin/crud/create-list-property-description.rst new file mode 100644 index 0000000000..2099b30d91 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-list-property-description.rst @@ -0,0 +1,14 @@ +To create a new object instance with a +:kotlin-sdk:`RealmList ` +property, instantiate an object and pass any values of a +supported type to the ``RealmList`` property. + +You can instantiate an unmanaged list with :kotlin-sdk:`realmListOf() ` +or pass elements to the list using +:kotlin-sdk:`list.add() `, +:kotlin-sdk:`list.addAll() `, +or :kotlin-sdk:`list.set() `. +The list is unmanaged until you copy it to the database. + +In the following example, we instantiate a new ``Frog`` object with +initial values for several ``RealmList`` properties: diff --git a/source/includes/api-details/kotlin/crud/create-mixed-property-type-description.rst b/source/includes/api-details/kotlin/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..44a98b5e50 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-mixed-property-type-description.rst @@ -0,0 +1,12 @@ +To create a new object instance with a polymorphic +:kotlin-sdk:`RealmAny ` +property, instantiate an object and pass an initial value of a +supported type to the ``RealmAny`` property using +:kotlin-sdk:`RealmAny.create() `. + +After you create the object, you *must* know the stored value type +to work with the ``RealmAny`` property. + +In the following example, we instantiate a new ``Frog`` object with a +``favoriteThings`` list of ``RealmAny`` type and pass the initial values to +``RealmAny.create()``: diff --git a/source/includes/api-details/kotlin/crud/create-object-id-property-type-description.rst b/source/includes/api-details/kotlin/crud/create-object-id-property-type-description.rst new file mode 100644 index 0000000000..0713a0ca45 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-object-id-property-type-description.rst @@ -0,0 +1 @@ +You can initialize an ``ObjectId`` using ``ObjectId()``. \ No newline at end of file diff --git a/source/includes/api-details/kotlin/crud/create-or-update-object-description.rst b/source/includes/api-details/kotlin/crud/create-or-update-object-description.rst new file mode 100644 index 0000000000..d7f0f9c4b5 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-or-update-object-description.rst @@ -0,0 +1,27 @@ +To upsert an object into a database, insert an object with a primary key +using +:kotlin-sdk:`copyToRealm() `, +as you would when creating a new object. Pass an +:kotlin-sdk:`UpdatePolicy ` +parameter to specify how the SDK should handle existing objects with the same +primary key: + +- ``UpdatePolicy.ALL``: Update all properties on any existing objects + identified with the same primary key. +- ``UpdatePolicy.ERROR`` (default): Disallow updating existing objects and instead + throw an exception if an object already exists with the same primary key. If + you do not specify an update policy, the SDK uses this policy by default. + +The following can occur depending on the update policy: + +- If no object exists that matches the primary key, the SDK creates the new object. +- If an object with the same primary key already exists, the SDK either: + + - Updates all properties on any existing objects identified with the + same primary key. Note that properties are marked as updated in change + listeners, even if the property was updated to the same value. + - Throws an exception indicating that an object already exists in the database. + +In the following example, we attempt to insert a ``Frog`` object with a +primary key that already exists in the database with ``UpdatePolicy.ALL``. +Then, we confirm the object is successfully upserted: diff --git a/source/includes/api-details/kotlin/crud/create-procedure.rst b/source/includes/api-details/kotlin/crud/create-procedure.rst index 4d81f4535e..ff9c1cf777 100644 --- a/source/includes/api-details/kotlin/crud/create-procedure.rst +++ b/source/includes/api-details/kotlin/crud/create-procedure.rst @@ -1,15 +1,15 @@ -#. Open a write transaction with `realm.write() - <{+kotlin-local-prefix+}io.realm.kotlin/-realm/write.html>`__ or - `realm.writeBlocking() - <{+kotlin-local-prefix+}io.realm.kotlin/-realm/write-blocking.html>`__. +#. Open a write transaction with :kotlin-sdk:`realm.write() + ` or + :kotlin-sdk:`realm.writeBlocking() + `. #. Instantiate an unmanaged object instance with the class constructor. You can use an `apply block `__ to configure multiple properties at once. -#. Pass the unmanaged object instance to `copyToRealm() - <{+kotlin-local-prefix+}io.realm.kotlin/-mutable-realm/copy-to-realm.html>`__ +#. Pass the unmanaged object instance to :kotlin-sdk:`copyToRealm() + ` to persist the object data to the database. This method returns a live managed instance of the object. diff --git a/source/includes/api-details/kotlin/crud/create-set-properties-description.rst b/source/includes/api-details/kotlin/crud/create-set-properties-description.rst new file mode 100644 index 0000000000..e7b7956327 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-set-properties-description.rst @@ -0,0 +1,16 @@ +To create a new object instance with a +:kotlin-sdk:`RealmSet ` +property, instantiate an object and pass any values of a +supported type to the ``RealmSet`` property. + +You can instantiate an unmanaged set with +:kotlin-sdk:`realmSetOf() ` +or pass elements to the set using +:kotlin-sdk:`set.add() ` +or +:kotlin-sdk:`set.addAll() `. +The set is unmanaged until you copy it to the database. + +In the following example, we instantiate a new ``Frog`` object with +initial values for ``favoriteSnacks`` and ``favoriteWeather`` set +properties: diff --git a/source/includes/api-details/kotlin/crud/create-timestamp-property-type-description.rst b/source/includes/api-details/kotlin/crud/create-timestamp-property-type-description.rst new file mode 100644 index 0000000000..3a4b0c5083 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-timestamp-property-type-description.rst @@ -0,0 +1,16 @@ +To create a new object instance with a +:kotlin-sdk:`RealmInstant +` +property, instantiate an object and pass an initial value to the +``RealmInstant`` property using either: + +- :kotlin-sdk:`RealmInstant.from() `: + the epochSeconds and nanoseconds since the Unix epoch +- :kotlin-sdk:`RealmInstant.now() `: + the epochSeconds and nanoseconds since the Unix epoch until now + +For more information about the ``RealmInstant`` type, refer to +:ref:``. + +In the following example, we instantiate a new ``Frog`` object with a +``birthdate`` property and pass an initial value to ``RealmInstant.from()``: diff --git a/source/includes/api-details/kotlin/crud/create-to-many-relationship-description.rst b/source/includes/api-details/kotlin/crud/create-to-many-relationship-description.rst new file mode 100644 index 0000000000..471013560f --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-to-many-relationship-description.rst @@ -0,0 +1,4 @@ +In the following example, we instantiate a new ``Forest`` object with a +``frogsThatLiveHere`` property that references a set of ``Frog`` +objects and a ``nearByPonds`` property that references a list of +``Pond`` objects: diff --git a/source/includes/api-details/kotlin/crud/create-to-one-relationship-description.rst b/source/includes/api-details/kotlin/crud/create-to-one-relationship-description.rst new file mode 100644 index 0000000000..ca46321695 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-to-one-relationship-description.rst @@ -0,0 +1,3 @@ +In the following example, we instantiate a new ``Frog`` object with a +``favoritePond`` property that references a ``Pond`` object and a +``bestFriend`` property that references another ``Frog`` object: diff --git a/source/includes/api-details/kotlin/crud/create-unmanaged-copy-description.rst b/source/includes/api-details/kotlin/crud/create-unmanaged-copy-description.rst new file mode 100644 index 0000000000..08099a1e27 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-unmanaged-copy-description.rst @@ -0,0 +1,9 @@ +Create an unmanaged copy of a managed object by passing it to +:kotlin-sdk:`copyFromRealm() `. +For collections, this is a deep copy that includes all referenced objects up +to the specified ``depth``. + +In the following example, we create an unmanaged copy of an existing +managed ``Pond`` object that contains a list of two ``Frog`` objects. +After copying the object from the database, we confirm that the copy is +unmanaged and contains both referenced ``Frog`` objects: diff --git a/source/includes/api-details/kotlin/crud/create-uuid-property-type-description.rst b/source/includes/api-details/kotlin/crud/create-uuid-property-type-description.rst new file mode 100644 index 0000000000..356d3b31e3 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/create-uuid-property-type-description.rst @@ -0,0 +1,4 @@ +You can generate a random ``RealmUUID`` using :kotlin-sdk:`RealmUUID.random() +` +or pass a UUID-formatted string to :kotlin-sdk:`RealmUUID.from() +`: diff --git a/source/includes/api-details/objectivec/crud/create-copy-object-to-another-database-description.rst b/source/includes/api-details/objectivec/crud/create-copy-object-to-another-database-description.rst new file mode 100644 index 0000000000..e68ca3ee6f --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-copy-object-to-another-database-description.rst @@ -0,0 +1,22 @@ +To copy a managed object to another database instance, call the +:objc-sdk:`RLMObject createOrUpdateInRealm:withValue +` +or :objc-sdk:`RLMObject createOrUpdateModifiedInRealm:withValue +` +method in a write transaction. + +If the object type does not have a primary key, or no object with a matching +primary key exists, this method creates a new object in the target database +instance. + +If an object with a matching primary key already exists in the target +database instance, ``createOrUpdateInRealm`` sets each property defined in its +schema by copying from value using key-value coding. + +Alternately, ``createOrUpdateModifiedInRealm`` only sets values which have +changed. Checking which properties have changed imposes a small amount of +overhead, and so this method may be slower when all or nearly all of the +properties being set have changed. If most or all of the properties being set +have *not* changed, this method is much faster than unconditionally setting +all of them. It also reduces how much data has to be written to the database, +saving both i/o time and disk space. diff --git a/source/includes/api-details/objectivec/crud/create-counter-property-type-not-supported.rst b/source/includes/api-details/objectivec/crud/create-counter-property-type-not-supported.rst new file mode 100644 index 0000000000..c6b0104478 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-counter-property-type-not-supported.rst @@ -0,0 +1 @@ +The Swift SDK does not currently provide a dedicated counter property type. diff --git a/source/includes/api-details/objectivec/crud/create-initialize-objects-with-value-description.rst b/source/includes/api-details/objectivec/crud/create-initialize-objects-with-value-description.rst new file mode 100644 index 0000000000..d780446174 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-initialize-objects-with-value-description.rst @@ -0,0 +1,12 @@ +You can initialize an object by passing an initializer value to +:objc-sdk:`RLMObject initWithValue +`. +The initializer value can be a :apple:`key-value coding +` +compliant object, a dictionary, or an array containing one element for +each managed property. + +.. note:: + + When using an array as an initializer value, you must include all + properties in the same order as they are defined in the model. diff --git a/source/includes/api-details/objectivec/crud/create-mixed-property-type-description.rst b/source/includes/api-details/objectivec/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..a3ee3c39b6 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-mixed-property-type-description.rst @@ -0,0 +1,7 @@ +When you create an object with an ``RLMValue``, you must specify the +type of the value you store in the property. The SDK provides an +:objc-sdk:`RLMValue type ` +that you can use to determine what type of value the property has stored. + +Later, when you read the mixed property type, you must check the type before +you do anything with the value. diff --git a/source/includes/api-details/objectivec/crud/create-multiple-objects-description.rst b/source/includes/api-details/objectivec/crud/create-multiple-objects-description.rst new file mode 100644 index 0000000000..b6985d86ff --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-multiple-objects-description.rst @@ -0,0 +1,4 @@ +You can create multiple items in the database using the +:objc-sdk:`-[RLMRealm +addObjects:] ` +method. It takes a collection of objects to add to the database. diff --git a/source/includes/api-details/objectivec/crud/create-objects-from-json-description.rst b/source/includes/api-details/objectivec/crud/create-objects-from-json-description.rst new file mode 100644 index 0000000000..e7aa85b1a5 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-objects-from-json-description.rst @@ -0,0 +1,29 @@ +The SDK does not directly support JSON, but you can use +:apple:`NSJSONSerialization +` to +convert JSON into a value that you can pass to +:objc-sdk:`RLMObject createInRealm(withValue:) +`. + +Nested objects or arrays in the JSON map to to-one or to-many relationships. + +The JSON property names and types must match the destination +:ref:`object model ` exactly. For example: + +- ``float`` properties must be initialized with float-backed ``NSNumbers``. +- ``Date`` and ``Data`` properties cannot be inferred from strings. Convert + them to the appropriate type before passing to + :objc-sdk:`RLMObject createInRealm(withValue:) + `. +- Required properties cannot be ``null`` or missing in the JSON. + +The SDK ignores any properties in the JSON not defined in the +object schema. + +.. tip:: + + If your JSON schema doesn't exactly align with your SDK objects, + consider using a third-party framework to transform your JSON. There + are many model mapping frameworks that work with the SDK. + See a :github:`partial list in the realm-swift repository + `. diff --git a/source/includes/api-details/objectivec/crud/create-or-update-object-description.rst b/source/includes/api-details/objectivec/crud/create-or-update-object-description.rst new file mode 100644 index 0000000000..a72ed64ef4 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-or-update-object-description.rst @@ -0,0 +1,9 @@ +To upsert an object, call :objc-sdk:`-[RLMRealm +addOrUpdateObject:] +`. + +.. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.upsert.m + :language: objectivec + +You can also partially update an object by passing the primary key and a +subset of the values to update: diff --git a/source/includes/api-details/objectivec/crud/create-realm-object-description.rst b/source/includes/api-details/objectivec/crud/create-realm-object-description.rst index be7d8b3c32..729a168dc0 100644 --- a/source/includes/api-details/objectivec/crud/create-realm-object-description.rst +++ b/source/includes/api-details/objectivec/crud/create-realm-object-description.rst @@ -1,4 +1,4 @@ -To add an object to a realm, instantiate it as you would any other +To add an object to a database, instantiate it as you would any other object and then pass it to :objc-sdk:`-[RLMRealm addObject:] ` inside of a write transaction. diff --git a/source/includes/api-details/objectivec/crud/create-set-properties-description.rst b/source/includes/api-details/objectivec/crud/create-set-properties-description.rst new file mode 100644 index 0000000000..44589bcf6b --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-set-properties-description.rst @@ -0,0 +1,4 @@ +You can create objects that contain :objc-sdk:`RLMSet +` properties as you would any SDK object, but you +can only mutate an ``RLMSet`` within a write transaction. This means you can +only set the value(s) of a set property within a write transaction. diff --git a/source/includes/api-details/objectivec/crud/create-timestamp-property-type-description.rst b/source/includes/api-details/objectivec/crud/create-timestamp-property-type-description.rst new file mode 100644 index 0000000000..12471da3b6 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/create-timestamp-property-type-description.rst @@ -0,0 +1 @@ +Use the Objective-C ``NSDate`` data type to store timestamp data. diff --git a/source/includes/api-details/swift/crud/create-asymmetric-object-description.rst b/source/includes/api-details/swift/crud/create-asymmetric-object-description.rst index cd9dc7b89a..20dafee43f 100644 --- a/source/includes/api-details/swift/crud/create-asymmetric-object-description.rst +++ b/source/includes/api-details/swift/crud/create-asymmetric-object-description.rst @@ -2,6 +2,6 @@ You can only create an ``AsymmetricObject`` using :swift-sdk:`create(_ type:, value:) `. You cannot use the ``.add()`` API to create asymmetric object types. -You can create AsymmetricObjects for a realm initialized with a +You can create AsymmetricObjects for a database initialized with a :swift-sdk:`Flexible Sync configuration `. diff --git a/source/includes/api-details/swift/crud/create-copy-object-to-another-database-description.rst b/source/includes/api-details/swift/crud/create-copy-object-to-another-database-description.rst new file mode 100644 index 0000000000..e138aa0352 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-copy-object-to-another-database-description.rst @@ -0,0 +1,10 @@ +To copy a managed object to another database instance, call the +:swift-sdk:`create(value: update:) ` +method in a write transaction. + +If the object type does not have a primary key, or no object with a matching +primary key exists, this method creates a new object in the target database +instance. If an object with a matching primary key already exists in the target +database instance, and you set the :swift-sdk:`update policy +` to ``.modified`` or ``.all``, this method +updates the existing object returns a reference to it. diff --git a/source/includes/api-details/swift/crud/create-counter-property-type-not-supported.rst b/source/includes/api-details/swift/crud/create-counter-property-type-not-supported.rst new file mode 100644 index 0000000000..c6b0104478 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-counter-property-type-not-supported.rst @@ -0,0 +1 @@ +The Swift SDK does not currently provide a dedicated counter property type. diff --git a/source/includes/api-details/swift/crud/create-dictionary-property-description.rst b/source/includes/api-details/swift/crud/create-dictionary-property-description.rst new file mode 100644 index 0000000000..ab30067903 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-dictionary-property-description.rst @@ -0,0 +1,10 @@ +When you create an object that has a :swift-sdk:`map property +`, you can set the values for keys in a few ways: + +- Set keys and values on the object and then add the object to the realm +- Set the object's keys and values directly inside a write transaction +- Use key-value coding to set or update keys and values inside a write transaction + +.. include:: /includes/map-key-string-limitations.rst + +.. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.percent-encode-disallowed-map-keys.swift diff --git a/source/includes/api-details/swift/crud/create-initialize-objects-with-value-description.rst b/source/includes/api-details/swift/crud/create-initialize-objects-with-value-description.rst new file mode 100644 index 0000000000..ae31fdce02 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-initialize-objects-with-value-description.rst @@ -0,0 +1,12 @@ +You can initialize an object by passing an initializer value to +:swift-sdk:`Object.init(value:) +`. +The initializer value can be a :apple:`key-value coding +` +compliant object, a dictionary, or an array containing one element for +each managed property. + +.. note:: + + When using an array as an initializer value, you must include all + properties in the same order as they are defined in the model. diff --git a/source/includes/api-details/swift/crud/create-mixed-property-type-description.rst b/source/includes/api-details/swift/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..26185a3074 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-mixed-property-type-description.rst @@ -0,0 +1,7 @@ +When you create an object with an ``AnyRealmValue``, you must specify the +type of the value you store in the property. The SDK provides an +:swift-sdk:`AnyRealmValue enum ` that iterates +through all of the types the ``AnyRealmValue`` can store. + +Later, when you read the mixed property type, you must check the type before +you do anything with the value. diff --git a/source/includes/api-details/swift/crud/create-multiple-objects-description.rst b/source/includes/api-details/swift/crud/create-multiple-objects-description.rst new file mode 100644 index 0000000000..e378a3e278 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-multiple-objects-description.rst @@ -0,0 +1,3 @@ +You can create multiple items in the database using the +:swift-sdk:`add() ` +method. It takes a sequence of objects to add to the database. diff --git a/source/includes/api-details/swift/crud/create-object-id-property-type-description.rst b/source/includes/api-details/swift/crud/create-object-id-property-type-description.rst new file mode 100644 index 0000000000..9e44589357 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-object-id-property-type-description.rst @@ -0,0 +1,3 @@ +To create a random Object ID, call ``ObjectId.generate()``. + +To create a zero-initialized Object ID, call ``ObjectId()``. \ No newline at end of file diff --git a/source/includes/api-details/swift/crud/create-objects-from-json-description.rst b/source/includes/api-details/swift/crud/create-objects-from-json-description.rst new file mode 100644 index 0000000000..8dd19cf33c --- /dev/null +++ b/source/includes/api-details/swift/crud/create-objects-from-json-description.rst @@ -0,0 +1,28 @@ +The SDK does not directly support JSON, but you can use +:apple:`JSONSerialization.jsonObject(with:options:) +` to +convert JSON into a value that you can pass to +:swift-sdk:`Realm.create(_:value:update:) +`. + +Nested objects or arrays in the JSON map to to-one or to-many relationships. + +The JSON property names and types must match the destination +:ref:`object model ` exactly. For example: + +- ``float`` properties must be initialized with float-backed ``NSNumbers``. +- ``Date`` and ``Data`` properties cannot be inferred from strings. Convert + them to the appropriate type before passing to + :swift-sdk:`Realm.create(_:value:update:) `. +- Required properties cannot be ``null`` or missing in the JSON. + +The SDK ignores any properties in the JSON not defined in the +object schema. + +.. tip:: + + If your JSON schema doesn't exactly align with your SDK objects, + consider using a third-party framework to transform your JSON. There + are many model mapping frameworks that work with the SDK. + See a :github:`partial list in the realm-swift repository + `. diff --git a/source/includes/api-details/swift/crud/create-objects-in-background-description.rst b/source/includes/api-details/swift/crud/create-objects-in-background-description.rst new file mode 100644 index 0000000000..5f4a485bef --- /dev/null +++ b/source/includes/api-details/swift/crud/create-objects-in-background-description.rst @@ -0,0 +1,119 @@ +Use the Background Write API +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can add, modify, or delete objects in the background using +:swift-sdk:`writeAsync `. + +With ``writeAsync``, you don't need to pass a :ref:`thread-safe reference +` or :ref:`frozen objects ` +across threads. Instead, call ``realm.writeAsync``. You can provide +a completion block for the method to execute on the source thread after +the write completes or fails. + +Things to consider when performing background writes: + +- Async writes block closing or invalidating the database +- You can explicitly commit or cancel transactions + +Wait for Async Writes to Complete +````````````````````````````````` + +The SDK provides a ``Bool`` to signal whether the database is currently +performing an async write. The +:swift-sdk:`isPerformingAsynchronousWriteOperations +` +variable becomes ``true`` after a call to one of: + +- ``writeAsync`` +- ``beginAsyncWrite`` +- ``commitAsyncWrite`` + +It remains true until all scheduled async write operations have completed. +While this is true, this blocks closing or :swift-sdk:`invalidating +` the database. + +Commit or Cancel an Async Write +``````````````````````````````` + +To complete an async write, you or the SDK must call either: + +- :swift-sdk:`commitAsyncWrite ` +- :swift-sdk:`cancelAsyncWrite ` + +When you use the ``writeAsync`` method, the SDK handles committing or +canceling the transaction. This provides the convenience of the async write +without the need to manually keep state tied to the scope of the object. +However, while in the ``writeAsync`` block, you *can* explicitly call +``commitAsyncWrite`` or ``cancelAsyncWrite``. If you return without +calling one of these methods, ``writeAsync`` either: + +- Commits the write after executing the instructions in the write block +- Returns an error + +In either case, this completes the ``writeAsync`` operation. + +For more control over when to commit or cancel the async write transaction, +use the ``beginAsyncWrite`` method. When you use this method, you must +explicitly commit the transactions. Returning without committing an async +write cancels the transaction. ``beginAsyncWrite`` returns an ID that you +can pass to ``cancelAsyncWrite``. + +``commitAsyncWrite`` asynchronously commits a write transaction. This is +the step that persists the data to the database. ``commitAsyncWrite`` can +take an ``onComplete`` block. This block executes on the source thread +once the commit completes or fails with an error. + +Calling ``commitAsyncWrite`` immediately returns. This allows the caller +to proceed while the SDK performs the I/O on a background thread. This method +returns an ID that you can pass to ``cancelAsyncWrite``. This cancels the +pending invocation of the completion block. It does not cancel the commit +itself. + +You can group sequential calls to ``commitAsyncWrite``. Batching these calls +improves write performance; particularly when the batched transactions are +small. To permit grouping transactions, set the ``isGroupingAllowed`` +parameter to ``true``. + +You can call ``cancelAsyncWrite`` on either ``beginAsyncWrite`` or +``commitAsyncWrite``. When you call it on ``beginAsyncWrite``, this cancels +the entire write transaction. When you call it on ``commitAsyncWrite``, this +cancels only an ``onComplete`` block you may have passed to +``commitAsyncWrite``. It does not cancel the commit itself. You need the ID +of the ``beginAsyncWrite`` or the ``commitAsyncWrite`` you want to cancel. + +Use Swift Concurrency Features +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Write to an Actor-Isolated Realm +```````````````````````````````` + +You can use Swift concurrency features to write asynchronously to an +actor-isolated database. + +The following function is taken from the example ``RealmActor`` defined on the +:ref:`swift-define-realm-actor` page. It shows how you might +write to an actor-isolated database: + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.write-async.swift + :language: swift + +And you might perform this write using Swift's async syntax: + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.actor-isolated-realm-async.swift + :language: swift + +This operation does not block or perform I/O on the calling thread. For +more information about writing to a database using Swift concurrency features, +refer to :ref:`swift-actor-isolated-realm`. + +Perform Writes using Async/Await Syntax +``````````````````````````````````````` + +The :swift-sdk:`asyncWrite() ` +API allows for performing async writes using Swift async/await syntax. + +The ``asyncWrite()`` API suspends the calling task while waiting for its +turn to write rather than blocking the thread. In addition, the actual +I/O to write data to disk is done by a background worker thread. For small +writes, using this function on the main thread may block the main thread +for less time than manually dispatching the write to a background thread. diff --git a/source/includes/api-details/swift/crud/create-or-update-object-description.rst b/source/includes/api-details/swift/crud/create-or-update-object-description.rst new file mode 100644 index 0000000000..284de14920 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-or-update-object-description.rst @@ -0,0 +1,9 @@ +To upsert an object, call :swift-sdk:`Realm.add(_:update:) +` +with the second parameter, update policy, set to ``.modified``. + +.. literalinclude:: /examples/generated/code/start/UpdateRealmObjects.snippet.upsert.swift + :language: swift + +You can also partially update an object by passing the primary key and a +subset of the values to update: diff --git a/source/includes/api-details/swift/crud/create-realm-object-description.rst b/source/includes/api-details/swift/crud/create-realm-object-description.rst index 25fe15a5ea..952b085b02 100644 --- a/source/includes/api-details/swift/crud/create-realm-object-description.rst +++ b/source/includes/api-details/swift/crud/create-realm-object-description.rst @@ -1,4 +1,4 @@ -To add an object to a realm, instantiate it as you would any other +To add an object to a database, instantiate it as you would any other object and then pass it to :swift-sdk:`Realm.add(_:update:) ` inside of a write transaction. diff --git a/source/includes/api-details/swift/crud/create-set-properties-description.rst b/source/includes/api-details/swift/crud/create-set-properties-description.rst new file mode 100644 index 0000000000..cde6c80533 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-set-properties-description.rst @@ -0,0 +1,4 @@ +You can create objects that contain :swift-sdk:`MutableSet +` properties as you would any SDK object, but you +can only mutate a ``MutableSet`` within a write transaction. This means you can +only set the value(s) of a set property within a write transaction. diff --git a/source/includes/api-details/swift/crud/create-timestamp-property-type-description.rst b/source/includes/api-details/swift/crud/create-timestamp-property-type-description.rst new file mode 100644 index 0000000000..605337cbc4 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-timestamp-property-type-description.rst @@ -0,0 +1 @@ +Use the Swift ``Date`` data type to store timestamp data. diff --git a/source/includes/api-details/swift/crud/create-uuid-property-type-description.rst b/source/includes/api-details/swift/crud/create-uuid-property-type-description.rst new file mode 100644 index 0000000000..3e1c75ebc5 --- /dev/null +++ b/source/includes/api-details/swift/crud/create-uuid-property-type-description.rst @@ -0,0 +1 @@ +You can create a UUID with ``UUID()``. diff --git a/source/includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst b/source/includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst new file mode 100644 index 0000000000..2fddba5e74 --- /dev/null +++ b/source/includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst @@ -0,0 +1 @@ +TypeScript does not currently have a dedicated counter property type. diff --git a/source/includes/api-details/typescript/crud/create-list-property-description.rst b/source/includes/api-details/typescript/crud/create-list-property-description.rst new file mode 100644 index 0000000000..2d4a846db5 --- /dev/null +++ b/source/includes/api-details/typescript/crud/create-list-property-description.rst @@ -0,0 +1,2 @@ +To define a to-many relationship, specify a property where the type is a list +or array of the related SDK object type in its object schema. diff --git a/source/includes/api-details/typescript/crud/create-mixed-property-type-description.rst b/source/includes/api-details/typescript/crud/create-mixed-property-type-description.rst new file mode 100644 index 0000000000..a939d3ffc1 --- /dev/null +++ b/source/includes/api-details/typescript/crud/create-mixed-property-type-description.rst @@ -0,0 +1,2 @@ +Create an object with a mixed value by running the :js-sdk:`realm.create() +` method within a write transaction. diff --git a/source/includes/api-details/typescript/crud/create-or-update-object-description.rst b/source/includes/api-details/typescript/crud/create-or-update-object-description.rst new file mode 100644 index 0000000000..09e7f6f338 --- /dev/null +++ b/source/includes/api-details/typescript/crud/create-or-update-object-description.rst @@ -0,0 +1,4 @@ +To upsert an object, call :js-sdk:`Realm.create() ` +with the update mode set to ``modified``. The operation either inserts a +new object with the given primary key or updates an existing object that +already has that primary key. diff --git a/source/includes/api-details/typescript/crud/create-realm-object-description.rst b/source/includes/api-details/typescript/crud/create-realm-object-description.rst index f18ba92475..cee4e584b7 100644 --- a/source/includes/api-details/typescript/crud/create-realm-object-description.rst +++ b/source/includes/api-details/typescript/crud/create-realm-object-description.rst @@ -1,5 +1,5 @@ -To add an object to a realm, instantiate it as you would any other object +To add an object to a database, instantiate it as you would any other object and then pass it to :js-sdk:`Realm.create() ` inside of a -write transaction. If the realm's :ref:`schema ` includes -the object type and the object conforms to the schema, then Realm -stores the object, which is now *managed* by the realm. +write transaction. If the database :ref:`schema ` includes +the object type and the object conforms to the schema, then the SDK +stores the object, which is now *managed* by the database instance. diff --git a/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst b/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst index f41d389e0e..b115ea6477 100644 --- a/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst +++ b/source/includes/sdk-examples/crud/create-asymmetric-object-model.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.asymmetric-object.cpp @@ -12,6 +12,7 @@ .. literalinclude:: /examples/MissingPlaceholders/example.cs :language: csharp + :copyable: false - id: dart content: | @@ -25,6 +26,14 @@ .. literalinclude:: /examples/MissingPlaceholders/api.java :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false - id: javascript content: | diff --git a/source/includes/sdk-examples/crud/create-asymmetric-object.rst b/source/includes/sdk-examples/crud/create-asymmetric-object.rst index 332e2e4ef3..c9d7c2dc1d 100644 --- a/source/includes/sdk-examples/crud/create-asymmetric-object.rst +++ b/source/includes/sdk-examples/crud/create-asymmetric-object.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.create-asymmetric-object.cpp @@ -12,6 +12,7 @@ .. literalinclude:: /examples/MissingPlaceholders/example.cs :language: csharp + :copyable: false - id: dart content: | @@ -24,12 +25,21 @@ .. literalinclude:: /examples/MissingPlaceholders/api.java :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false - id: javascript content: | .. literalinclude:: /examples/MissingPlaceholders/example.js :language: javascript + :copyable: false - id: kotlin content: | @@ -43,6 +53,7 @@ .. literalinclude:: /examples/MissingPlaceholders/example.m :language: objectivec + :copyable: false - id: swift content: | diff --git a/source/includes/sdk-examples/crud/create-copy-object-to-another-database.rst b/source/includes/sdk-examples/crud/create-copy-object-to-another-database.rst new file mode 100644 index 0000000000..dcc256a747 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-copy-object-to-another-database.rst @@ -0,0 +1,72 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-counter-property-type.rst b/source/includes/sdk-examples/crud/create-counter-property-type.rst new file mode 100644 index 0000000000..341c05b2fc --- /dev/null +++ b/source/includes/sdk-examples/crud/create-counter-property-type.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/DataTypesSectionExamples.snippet.realmint-use.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/local/WritesTest.snippet.counter-increment-decrement.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/local/WritesTest.snippet.counter-increment-decrement.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-mutablerealm-property.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-dictionary-property.rst b/source/includes/sdk-examples/crud/create-dictionary-property.rst new file mode 100644 index 0000000000..3d42c38a6b --- /dev/null +++ b/source/includes/sdk-examples/crud/create-dictionary-property.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.create-map-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.create-realm-obj-with-dictionary.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-dictionary.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.map.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-embedded-object-model.rst b/source/includes/sdk-examples/crud/create-embedded-object-model.rst index c008b52013..de1a91108d 100644 --- a/source/includes/sdk-examples/crud/create-embedded-object-model.rst +++ b/source/includes/sdk-examples/crud/create-embedded-object-model.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/crud.snippet.model-with-embedded-object.cpp @@ -18,13 +18,19 @@ .. literalinclude:: /examples/MissingPlaceholders/example.dart :language: dart + :copyable: false - id: java content: | .. literalinclude:: /examples/EmbeddedObjects/DefineEmbeddedObjects.java :language: java - :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/EmbeddedObjects/DefineEmbeddedObjects.kt + :language: kotlin - id: javascript content: | @@ -38,21 +44,25 @@ .. literalinclude:: /examples/MissingPlaceholders/example.kt :language: kotlin + :copyable: false - id: objectivec content: | .. literalinclude:: /examples/MissingPlaceholders/example.m :language: objectivec + :copyable: false - id: swift content: | .. literalinclude:: /examples/MissingPlaceholders/example.swift :language: swift + :copyable: false - id: typescript content: | .. literalinclude:: /examples/MissingPlaceholders/example.ts :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-embedded-object.rst b/source/includes/sdk-examples/crud/create-embedded-object.rst index 50a666809a..6626e84ab6 100644 --- a/source/includes/sdk-examples/crud/create-embedded-object.rst +++ b/source/includes/sdk-examples/crud/create-embedded-object.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/crud.snippet.create-embedded-object.cpp @@ -18,13 +18,19 @@ .. literalinclude:: /examples/MissingPlaceholders/example.dart :language: dart + :copyable: false - id: java content: | .. literalinclude:: /examples/EmbeddedObjects/CreateEmbeddedObject.java :language: java - :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/EmbeddedObjects/CreateEmbeddedObject.kt + :language: kotlin - id: javascript content: | @@ -56,3 +62,4 @@ .. literalinclude:: /examples/MissingPlaceholders/example.ts :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-geospatial-data-model.rst b/source/includes/sdk-examples/crud/create-geospatial-data-model.rst new file mode 100644 index 0000000000..4b9751ab71 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-geospatial-data-model.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.usingcustomgeopoint.cs + :language: csharp + :emphasize-lines: 7 + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.use-geopoint-class.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.use-geopoint-class.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Geospatial.snippet.geopoint-model.kt + :language: kotlin + :emphasize-lines: 4 + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.custom-geopoint.swift + :language: swift + :emphasize-lines: 2-3 + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.use-geopoint-class.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/create-geospatial-data-object.rst b/source/includes/sdk-examples/crud/create-geospatial-data-object.rst new file mode 100644 index 0000000000..6d848c390b --- /dev/null +++ b/source/includes/sdk-examples/crud/create-geospatial-data-object.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.geopoint.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.write-geospatial-object.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.write-geospatial-object.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Geospatial.snippet.create-geopoint.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.write-geospatial-object.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/create-initialize-objects-with-value.rst b/source/includes/sdk-examples/crud/create-initialize-objects-with-value.rst new file mode 100644 index 0000000000..2a224154bd --- /dev/null +++ b/source/includes/sdk-examples/crud/create-initialize-objects-with-value.rst @@ -0,0 +1,82 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.initialize-objects-with-values.m + :language: objectivec + + You can even initialize related or embedded objects by nesting + initializer values: + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.nested-objects.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.initialize-objects-with-values.swift + :language: swift + + You can even initialize related or embedded objects by nesting + initializer values: + + .. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.nested-objects.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-inverse-relationship.rst b/source/includes/sdk-examples/crud/create-inverse-relationship.rst new file mode 100644 index 0000000000..1e05ec7027 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-inverse-relationship.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/relationships.snippet.create-inverse-relationship.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-inverse-realm-relationship.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-list-property.rst b/source/includes/sdk-examples/crud/create-list-property.rst new file mode 100644 index 0000000000..807c2a1125 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-list-property.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/relationships.snippet.create-to-many-relationship.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.many-to-many-models.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-realm-list.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-mixed-property-type.rst b/source/includes/sdk-examples/crud/create-mixed-property-type.rst new file mode 100644 index 0000000000..1bbd9670e3 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-mixed-property-type.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/DataTypesSectionExamples.snippet.realmvalue.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.realm-value-from.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.create-objects-with-mixed-values.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-realmany-property.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.mixed-data-type.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-multiple-objects.rst b/source/includes/sdk-examples/crud/create-multiple-objects.rst new file mode 100644 index 0000000000..41ac6c9a07 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-multiple-objects.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.create-multiple-objects.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-object-id-property-type.rst b/source/includes/sdk-examples/crud/create-object-id-property-type.rst new file mode 100644 index 0000000000..c4d65efb2e --- /dev/null +++ b/source/includes/sdk-examples/crud/create-object-id-property-type.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.objectid-use.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-objects-from-json.rst b/source/includes/sdk-examples/crud/create-objects-from-json.rst new file mode 100644 index 0000000000..023e01669d --- /dev/null +++ b/source/includes/sdk-examples/crud/create-objects-from-json.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/local/WritesTest.snippet.create-an-object-json.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/local/WritesTest.snippet.create-an-object-json.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.json.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.json.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-objects-in-background.rst b/source/includes/sdk-examples/crud/create-objects-in-background.rst new file mode 100644 index 0000000000..c03f01469b --- /dev/null +++ b/source/includes/sdk-examples/crud/create-objects-in-background.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.create.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.write-async.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/UpdateRealmObjects.snippet.async-transaction.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-or-update-object.rst b/source/includes/sdk-examples/crud/create-or-update-object.rst new file mode 100644 index 0000000000..c7ba1347cc --- /dev/null +++ b/source/includes/sdk-examples/crud/create-or-update-object.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.upsert.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.upsert.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.copy-or-update-same-values-flag.java + :language: java + :emphasize-lines: 16 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.copy-or-update-same-values-flag.kt + :language: kotlin + :emphasize-lines: 15-16 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-upsert-an-object.js + :language: javascript + :emphasize-lines: 4, 7, 13, 16 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/UpdateTest.snippet.upsert-an-object.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.partial-update.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/UpdateRealmObjects.snippet.partial-update.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-realm-object-model.rst b/source/includes/sdk-examples/crud/create-realm-object-model.rst index 5723d8d99f..1cf3f1ae7c 100644 --- a/source/includes/sdk-examples/crud/create-realm-object-model.rst +++ b/source/includes/sdk-examples/crud/create-realm-object-model.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/crud.snippet.dog-model-shows-namespace.cpp @@ -24,12 +24,21 @@ .. literalinclude:: /examples/MissingPlaceholders/example.java :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false - id: javascript content: | .. literalinclude:: /examples/MissingPlaceholders/example.js :language: javascript + :copyable: false - id: kotlin content: | @@ -42,15 +51,18 @@ .. literalinclude:: /examples/MissingPlaceholders/example.m :language: objectivec + :copyable: false - id: swift content: | .. literalinclude:: /examples/MissingPlaceholders/example.swift :language: swift + :copyable: false - id: typescript content: | .. literalinclude:: /examples/MissingPlaceholders/example.ts :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-realm-object.rst b/source/includes/sdk-examples/crud/create-realm-object.rst index b179aad056..bbb27ba0a4 100644 --- a/source/includes/sdk-examples/crud/create-realm-object.rst +++ b/source/includes/sdk-examples/crud/create-realm-object.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/crud.snippet.create-an-object.cpp @@ -25,7 +25,13 @@ .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.create-an-object.java :language: java :emphasize-lines: 3 - :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.create-an-object.kt + :language: kotlin + :emphasize-lines: 3 - id: javascript content: | @@ -57,3 +63,4 @@ .. literalinclude:: /examples/MissingPlaceholders/example.ts :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-set-property.rst b/source/includes/sdk-examples/crud/create-set-property.rst new file mode 100644 index 0000000000..01f035f230 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-set-property.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.write-set-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.create-set-objects.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-realm-set.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CreateRealmObjects.snippet.set-collections.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-timestamp-property-type.rst b/source/includes/sdk-examples/crud/create-timestamp-property-type.rst new file mode 100644 index 0000000000..09737ce38d --- /dev/null +++ b/source/includes/sdk-examples/crud/create-timestamp-property-type.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.datetime-use.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-realminstant-property.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-to-many-relationship.rst b/source/includes/sdk-examples/crud/create-to-many-relationship.rst new file mode 100644 index 0000000000..c070f12221 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-to-many-relationship.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/relationships.snippet.create-to-many-relationship.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-to-many-realm-relationship.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-to-one-relationship.rst b/source/includes/sdk-examples/crud/create-to-one-relationship.rst new file mode 100644 index 0000000000..7bf9025f03 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-to-one-relationship.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/relationships.snippet.create-to-one-relationship.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/CreateTest.snippet.create-to-one-realm-relationship.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-unmanaged-object.rst b/source/includes/sdk-examples/crud/create-unmanaged-object.rst new file mode 100644 index 0000000000..c398f0a513 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-unmanaged-object.rst @@ -0,0 +1,78 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/CreateTest.snippet.create-unmanaged-copy.kt + :language: kotlin + + .. output:: + + Unmanaged pond name: Big Pond + Unmanaged frogs: Kermit, Froggy Jay + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/create-uuid-property-type.rst b/source/includes/sdk-examples/crud/create-uuid-property-type.rst new file mode 100644 index 0000000000..febb9e9b55 --- /dev/null +++ b/source/includes/sdk-examples/crud/create-uuid-property-type.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.uuid-use.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.work-with-uuid.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DataTypes.snippet.create-uuid.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/swift-api-sendable-thread-confined-reference.rst b/source/includes/swift-api-sendable-thread-confined-reference.rst index 1bff9e5e63..5aaffe805f 100644 --- a/source/includes/swift-api-sendable-thread-confined-reference.rst +++ b/source/includes/swift-api-sendable-thread-confined-reference.rst @@ -1,4 +1,4 @@ -The Realm Swift SDK public API contains types that fall into three broad +The Swift SDK public API contains types that fall into three broad categories: - Sendable diff --git a/source/platforms/apple.txt b/source/platforms/apple.txt index 67aae62a10..cb469465eb 100644 --- a/source/platforms/apple.txt +++ b/source/platforms/apple.txt @@ -10,6 +10,12 @@ Build for Apple :depth: 2 :class: singlecol +.. toctree:: + :titlesonly: + + Swift Concurrency + Swift Actor Support + Placeholder page for information about building for Apple. Include info about which frameworks we support building for Apple, plus diff --git a/source/platforms/apple/swift-concurrency.txt b/source/platforms/apple/swift-concurrency.txt new file mode 100644 index 0000000000..bb64760b16 --- /dev/null +++ b/source/platforms/apple/swift-concurrency.txt @@ -0,0 +1,235 @@ +.. _swift-concurrency: + +============================= +Swift Concurrency - Swift SDK +============================= + +.. meta:: + :description: Learn how to use Atlas Device SDK with Swift language concurrency features, including which APIs support async/await syntax. + :keywords: Realm, Swift SDK + +.. facet:: + :name: genre + :values: reference + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Swift's concurrency system provides built-in support for writing asynchronous +and parallel code in a structured way. For a detailed overview of the +Swift concurrency system, refer to the `Swift Programming Language Concurrency +topic `__. + +While the considerations on this page broadly apply to using the Swift SDK with +Swift concurrency features, Swift SDK version 10.39.0 adds support +for using the SDK with Swift Actors. You can use the SDK isolated to a single +actor or use the SDK across actors. + +The SDK's actor support simplifies using the SDK in a MainActor and background +actor context, and supersedes much of the advice on this page regarding +concurrency considerations. For more information, refer to +:ref:`swift-use-sdk-with-actors`. + +SDK Concurrency Caveats +----------------------- + +As you implement concurrency features in your app, consider this caveat +about the SDK's threading model and Swift concurrency threading behaviors. + +.. _swift-suspend-execution-with-await: + +Suspending Execution with Await +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Anywhere you use the Swift keyword ``await`` marks a possible suspension +point in the execution of your code. With Swift 5.7, once your code suspends, +subsequent code might not execute on the same thread. This means that +anywhere you use ``await`` in your code, the subsequent code could be +executed on a different thread than the code that precedes or follows it. + +This is inherently incompatible with the SDK's :ref:`live object paradigm +`. Live objects, collections, and database +instances are **thread-confined**: that is, they are only valid on the thread +on which they were created. Practically speaking, this means you cannot pass +live instances to other threads. However, the SDK offers several +mechanisms for :ref:`sharing objects across threads +`. These mechanisms typically require +your code to do some explicit handling to safely pass data across threads. + +You can use some of these mechanisms, such as :ref:`frozen objects +` or the :ref:`ThreadSafeReference +`, to safely use SDK objects and instances +across threads with the ``await`` keyword. You can also avoid +threading-related issues by marking any asynchronous SDK code with +``@MainActor`` to ensure your apps always execute this code on the main +thread. + +As a general rule, keep in mind that using the SDK in an ``await`` context +*without* incorporating threading protection may yield inconsistent behavior. +Sometimes, the code may succeed. In other cases, it may throw an error +related to writing on an incorrect thread. + +.. _swift-async-await-apis: + +Async/Await APIs +---------------- + +Many Swift SDK APIs that involve working with :ref:`an Atlas App +Services app ` or a :ref:`synchronized database +` are compatible with Swift's +async/await syntax. For examples, check out: + +- :ref:`Authenticate Users ` +- :ref:`Manage Email/Password Users ` +- :ref:`Link User Identities ` +- :ref:`Open a Synced Database ` or a + :ref:`non-synced database ` +- :ref:`Await notifications from another actor ` +- :ref:`Manage Sync Subscriptions ` +- :ref:`Async/Await Call a Serverless Function ` +- :ref:`Async/Await Query MongoDB ` +- :ref:`Async/Await CRUD operations ` + +If you have specific feature requests related to Swift async/await APIs, +check out the `MongoDB Feedback Engine for Realm +`_. The Swift SDK +team plans to continue to develop concurrency-related features based on +community feedback and Swift concurrency evolution. + +.. _swift-perform-background-writes: + +Perform Background Writes +~~~~~~~~~~~~~~~~~~~~~~~~~ + +A commonly-requested use case for asynchronous code is to perform write +operations in the background without blocking the main thread. + +The SDK has two APIs that allow for performing asynchronous writes: + +- The :swift-sdk:`writeAsync() ` + API allows for performing async writes using Swift completion handlers. +- The :swift-sdk:`asyncWrite() ` + API allows for performing async writes using Swift async/await syntax. + +Both of these APIs allow you to add, update, or delete objects in the +background without using frozen objects or passing a thread-safe reference. + +With the ``writeAsync()`` API, waiting to obtain the write lock and +committing a transaction occur in the background. The write block itself +runs on the calling thread. This provides thread-safety without requiring +you to manually handle frozen objects or passing references across threads. + +However, while the write block itself is executed, this does block new +transactions on the calling thread. This means that a large write using +the ``writeAsync()`` API could block small, quick writes while it executes. + +The ``asyncWrite()`` API suspends the calling task while waiting for its +turn to write rather than blocking the thread. In addition, the actual +I/O to write data to disk is done by a background worker thread. For small +writes, using this function on the main thread may block the main thread +for less time than manually dispatching the write to a background thread. + +For more information, including code examples, refer to :ref:`sdks-create-objects-in-background`. + +Tasks and TaskGroups +-------------------- + +Swift concurrency provides APIs to manage :apple:`Tasks ` +and :apple:`TaskGroups `. The `Swift concurrency +documentation `__ +defines a task as a unit of work that can be run asynchronously as part of +your program. Task allows you to specifically define a unit of asynchronous +work. TaskGroup lets you define a collection of Tasks to execute as a unit +under the parent TaskGroup. + +Tasks and TaskGroups provide the ability to yield the thread to other +important work or to cancel a long-running task that could be blocking +other operations. To get these benefits, you might be tempted to use Tasks +and TaskGroups to manage database writes in the background. + +However, the thread-confined constraints described in :ref:`Suspending +Execution with Await ` above apply in +the Task context. If your Task contains ``await`` points, subsequent code +might run or resume on a different thread and violate the SDK's thread +confinement. + +You must annotate functions that you run in a Task context with ``@MainActor`` +to ensure code that accesses the database only runs on the main thread. This +negates some of the benefits of using Tasks, and may mean this is not a good +design choice for apps that use the SDK unless you are using Tasks solely for +networking activities like managing users. + +Actor Isolation +--------------- + +.. seealso:: Use the Swift SDK with Swift Actors + + The information in this section is applicable to Swift SDK versions earlier + than 10.39.0. Starting in Swift SDK version 10.39.0 and newer, + the SDK supports using Swift Actors and related async functionality. + + For more information, refer to :ref:`swift-actor-isolated-realm`. + +Actor isolation provides the perception of confining database access to a +dedicated actor, and therefore seems like a safe way to manage database +access in an asynchronous context. + +However, using the database in a non-``@MainActor`` async function is currently +not supported. + +In Swift 5.6, this would often work by coincidence. Execution after an +``await`` would continue on whatever thread the awaited thing ran on. +Using ``await Realm()`` in an async function would result in the code +following that running on the main thread until your next call to an +actor-isolated function. + +Swift 5.7 instead hops threads whenever changing actor isolation contexts. +An unisolated async function always runs on a background thread instead. + +If you have code which uses ``await Realm()`` and works in 5.6, marking +the function as ``@MainActor`` will make it work with Swift 5.7. It will +function how it did - unintentionally - in 5.6. + +Errors Related to Concurrency Code +---------------------------------- + +Most often, the error you see related to accessing the database through +concurrency code is ``Realm accessed from incorrect thread.`` This is due to +the thread-isolation issues described on this page. + +To avoid threading-related issues in code that uses Swift concurrency features: + +- Upgrade to a version of the Swift SDK that supports actor-isolated databases, + and use this as an alternative to manually managing threading. For more + information, refer to :ref:`swift-actor-isolated-realm`. +- Do not change execution contexts when accessing a database. If you open a + database on the main thread to provide data for your UI, annotate subsequent + functions where you access the database asynchronously with ``@MainActor`` to + ensure it always runs on the main thread. Remember that ``await`` marks a + suspension point that could change to a different thread. +- Apps that do not use actor-isolated databases can use the ``writeAsync`` + API to :ref:`perform a background write `. + This manages database access in a thread-safe way without requiring you to + write specialized code to do it yourself. This is a special API that + outsources aspects of the write process - where it is safe to do so - to run + in an async context. Unless you are writing to an actor-isolated database, + you do not use this method with Swift's ``async/await`` syntax. Use this + method synchronously in your code. Alternately, you can use the + ``asyncWrite`` API with Swift's ``async/await`` syntax when awaiting writes + to asynchronous databases. +- If you want to explicitly write concurrency code that is not actor-isolated + where accessing a database is done in a thread-safe way, you can explicitly + :ref:`pass instances across threads ` where + applicable to avoid threading-related crashes. This does require a good + understanding of the SDK's threading model, as well as being mindful of + Swift concurrency threading behaviors. + +.. _concurrency-page-sendable-thread-confined-reference: + +Sendable, Non-Sendable, and Thread-Confined Types +------------------------------------------------ + +.. include:: /includes/swift-api-sendable-thread-confined-reference.rst diff --git a/source/platforms/apple/use-sdk-with-actors.txt b/source/platforms/apple/use-sdk-with-actors.txt new file mode 100644 index 0000000000..f5ebc3db98 --- /dev/null +++ b/source/platforms/apple/use-sdk-with-actors.txt @@ -0,0 +1,358 @@ +.. _swift-actor-isolated-realm: +.. _swift-use-sdk-with-actors: + +========================================== +Use Atlas Device SDK for Swift with Actors +========================================== + +.. meta:: + :description: Learn how to use Atlas Device SDK with Swift's Actor system to manage asynchronous database work. + :keywords: Realm, Swift SDK, code examples + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Starting with Swift SDK version 10.39.0, Atlas Device SDK supports built-in +functionality for Swift Actors. The SDK's actor support provides an alternative +to managing threads or dispatch queues to perform asynchronous work. You can +use the SDK with actors in a few different ways: + +- Work with the SDK *only* on a specific actor with an actor-isolated database +- Use the SDK across actors based on the needs of your application + +You might want to use an actor-isolated database if you want to restrict all +database access to a single actor. This negates the need to pass data across +the actor boundary, and can simplify data race debugging. + +You might want to use databases across actors in cases where you want to +perform different types of work on different actors. For example, you might +want to read objects on the MainActor but use a background actor for large +writes. + +For general information about Swift actors, refer to :apple:`Apple's Actor +documentation `. + +Prerequisites +------------- + +To use the Swift SDK with a Swift actor, your project must: + +- Use Swift SDK version 10.39.0 or later +- Use Swift 5.8/Xcode 14.3 or later + +In addition, we strongly recommend enabling these settings in your project: + +- ``SWIFT_STRICT_CONCURRENCY=complete``: enables strict concurrency checking +- ``OTHER_SWIFT_FLAGS=-Xfrontend-enable-actor-data-race-checks``: enables + runtime actor data-race detection + +About the Examples on This Page +------------------------------- + +The examples on this page use the following model: + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.model.swift + :language: swift + +.. _swift-open-actor-confined-realm: + +Open an Actor-Isolated Database +------------------------------- + +You can use the Swift async/await syntax to await opening a database. + +Initializing a database with ``try await Realm()`` opens a MainActor-isolated +database. Alternately, you can explicitly specify an actor when opening a +database with the ``await`` syntax. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.await-main-actor-realm.swift + :language: swift + +You can specify a default configuration or customize your configuration when +opening an actor-isolated database: + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.actor-confined-realm-with-config.swift + :language: swift + +For more general information about configuring a database, refer to +:ref:`sdks-configure-and-open-database`. + +You can open a synced database as an actor-isolated database: + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.actor-confined-synced-realm.swift + :language: swift + +For more general information about opening a synced database, refer to +:ref:`sdks-configure-and-open-synced-database`. + +.. _swift-define-realm-actor: + +Define a Custom Database Actor +------------------------------ + +You can define a specific actor to manage the database in asynchronous contexts. +You can use this actor to manage database access and perform write operations. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.define-realm-actor.swift + :language: swift + +An actor-isolated database may be used with either local or global actors. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.global-actor-example.swift + :language: swift + +.. _swift-actor-synchronous-isolated-function: + +Use a Database Actor Synchronously in an Isolated Function +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When a function is confined to a specific actor, you can use the actor-isolated +database synchronously. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.actor-isolated-realm-synchronous.swift + :language: swift + +.. _swift-actor-async-nonisolated-function: + +Use a Database Actor in Async Functions +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When a function isn't confined to a specific actor, you can use your database +actor with Swift's async/await syntax. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.actor-isolated-realm-async.swift + :language: swift + +.. _swift-write-to-actor-confined-realm: + +Write to an Actor-Isolated Database +----------------------------------- + +Actor-isolated databases can use Swift async/await syntax for asynchronous +writes. Using ``try await realm.asyncWrite { ... }`` suspends the current task, +acquires the write lock without blocking the current thread, and then invokes +the block. The SDK writes the data to disk on a background thread and resumes +the task when that completes. + +This function from the example ``RealmActor`` defined above shows how you might +write to an actor-isolated database: + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.write-async.swift + :language: swift + +And you might perform this write using Swift's async syntax: + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.actor-isolated-realm-async.swift + :language: swift + +This does not block the calling thread while waiting to write. It does +not perform I/O on the calling thread. For small writes, this is safe to +use from ``@MainActor`` functions without blocking the UI. Writes that +negatively impact your app's performance due to complexity and/or platform +resource constraints may still benefit from being done on a background thread. + +Asynchronous writes are only supported for actor-isolated databases or in +``@MainActor`` functions. + +.. _swift-realm-cannot-cross-actor-boundary: + +Pass SDK Data Across the Actor Boundary +--------------------------------------- + +SDK objects are not :apple:`Sendable `, +and cannot cross the actor boundary directly. To pass SDK data across +the actor boundary, you have two options: + +- Pass a ``ThreadSafeReference`` to or from the actor +- Pass other types that *are* Sendable, such as passing values directly + or by creating structs to pass across actor boundaries + +.. _swift-pass-thread-safe-reference-across-actors: + +Pass a ThreadSafeReference +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can create a +:swift-sdk:`ThreadSafeReference ` on an +actor where you have access to the object. In this case, we create a +``ThreadSafeReference`` on the ``MainActor``. Then, pass the +``ThreadSafeReference`` to the destination actor. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.pass-tsr-across-actor-boundaries.swift + :language: swift + +On the destination actor, you must ``resolve()`` the reference within a +write transaction before you can use it. This retrieves a version of the +object local to that actor. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.resolve-tsr-on-actor.swift + :language: swift + +.. important:: + + You must resolve a ``ThreadSafeReference`` exactly once. Otherwise, + the source database remains pinned until the reference gets + deallocated. For this reason, ``ThreadSafeReference`` should be + short-lived. + + If you may need to share the same database object across actors more than + once, you may prefer to share the :ref:`primary key ` + and :ref:`query for it ` on + the actor where you want to use it. Refer to the "Pass a Primary Key + and Query for the Object on Another Actor" section on this page for an + example. + +Pass a Sendable Type +~~~~~~~~~~~~~~~~~~~~ + +While SDK objects are not Sendable, you can work around this by passing +Sendable types across actor boundaries. You can use a few strategies to +pass Sendable types and work with data across actor boundaries: + +- Pass Sendable SDK types or primitive values instead of complete SDK objects +- Pass an object's primary key and query for the object on another actor +- Create a Sendable representation of your SDK object, such as a struct + +Pass Sendable SDK Types and Primitive Values +```````````````````````````````````````````` + +If you only need a piece of information from the SDK object, such as a +``String`` or ``Int``, you can pass the value directly across actors instead +of passing the SDK object. For a full list of which SDK types are Sendable, +refer to :ref:`concurrency-page-sendable-thread-confined-reference`. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.pass-primitive-data-across-actors.swift + :language: swift + +Pass a Primary Key and Query for the Object on Another Actor +```````````````````````````````````````````````````````````` + +If you want to use a database object on another actor, you can share the +:ref:`primary key ` and +:ref:`query for it ` on the actor +where you want to use it. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.query-for-data-on-another-actor.swift + :language: swift + +Create a Sendable Representation of Your Object +``````````````````````````````````````````````` + +If you need to work with more than a simple value, but don't want the +overhead of passing around ``ThreadSafeReferences`` or querying objects on +different actors, you can create a struct or other Sendable representation +of your data to pass across the actor boundary. + +For example, your actor might have a function that creates a struct +representation of the database object. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.pass-data-as-struct.swift + :language: swift + +Then, you can call a function to get the data as a struct on another actor. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.get-actor-confined-data-as-struct.swift + :language: swift + +.. _swift-observe-notifications-on-another-actor: + +Observe Notifications on a Different Actor +------------------------------------------ + +You can observe notifications on an actor-isolated realm using Swift's +async/await syntax. + +Calling ``await object.observe(on: Actor)`` or +``await collection.observe(on: Actor)`` registers a block to be called +each time the object or collection changes. + +The SDK asynchronously calls the block on the given actor's executor. + +For write transactions performed on different threads or in different +processes, the SDK calls the block when the database is (auto)refreshed +to a version including the changes. For local writes, the SDK calls the block +at some point in the future after the write transaction is committed. + +Like :ref:`other notifications `, you can +only observe objects or collections managed by a database. You must retain the +returned token for as long as you want to watch for updates. + +If you need to manually advance the state of an observed database on the main +thread or on another actor, call ``await realm.asyncRefresh()``. +This updates the database and outstanding objects managed by the database to +point to the most recent data and deliver any applicable notifications. + +Observation Limitations +~~~~~~~~~~~~~~~~~~~~~~~ + +You *cannot* call the ``.observe()`` method: + +- During a write transaction +- When the containing database is read-only +- On an actor-confined database from outside the actor + +.. _swift-actor-collection-change-listener: + +Register a Collection Change Listener +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The SDK calls a collection notification block after each write transaction which: + +- Deletes an object from the collection. +- Inserts an object into the collection. +- Modifies any of the managed properties of an object in the collection. This + includes self-assignments that set a property to its existing value. + +.. important:: Order Matters + + In collection notification handlers, always apply changes + in the following order: deletions, insertions, then + modifications. Handling insertions before deletions may + result in unexpected behavior. + +These notifications provide information about the actor on which the change +occurred. Like non-actor-isolated :ref:`collection notifications +`, they also provide a ``change`` parameter +that reports which objects are deleted, added, or modified during the write +transaction. This +:swift-sdk:`RealmCollectionChange ` +resolves to an array of index paths that you can pass to a ``UITableView``'s +batch update methods. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.observe-collection-on-actor.swift + :language: swift + +.. _swift-actor-object-change-listener: + +Register an Object Change Listener +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The SDK calls an object notification block after each write transaction which: + +- Deletes the object. +- Modifies any of the managed properties of the object. This includes + self-assignments that set a property to its existing value. + +The block is passed a copy of the object isolated to the requested actor, +along with information about what changed. This object can be safely used +on that actor. + +By default, only direct changes to the object's properties produce notifications. +Changes to linked objects do not produce notifications. If a non-nil, non-empty +keypath array is passed in, only changes to the properties identified by those +keypaths produce change notifications. The keypaths may traverse link +properties to receive information about changes to linked objects. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.observe-object-on-actor.swift + :language: swift diff --git a/source/sdk/crud/create.txt b/source/sdk/crud/create.txt index 05f1debc6f..444109eb7f 100644 --- a/source/sdk/crud/create.txt +++ b/source/sdk/crud/create.txt @@ -4,6 +4,24 @@ Create Objects ============== +.. toctree:: + :titlesonly: + + Create Objects + Create Properties + +.. meta:: + :description: Learn about performing write transactions and the different ways to create objects with Atlas Device SDK. + :keywords: Realm, C++ SDK, Flutter SDK, .NET SDK, Kotlin SDK, Java SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none @@ -18,9 +36,10 @@ synced database using Atlas Device SDK. To learn more about object models and how to define them, refer to :ref:`sdks-object-models`. You can create objects whose object type is managed by the database instance. -For more information, refer to -:ref:`sdks-configure-and-open-database` or -:ref:`sdks-configure-and-open-synced-database`. +For more information, refer to: + +- With Sync: :ref:`sdks-configure-and-open-synced-database` +- Without Sync: :ref:`sdks-configure-and-open-database` .. note:: Write to a Synced Database @@ -55,11 +74,11 @@ values from the database within a transaction. When you are done with your transaction, the SDK either commits it or cancels it: -- When the SDK commits a transaction, it writes all changes to disk. For +- When the SDK commits a write transaction, it writes all changes to disk. For synced databases, the SDK then queues the change for synchronization with the backend. - When the SDK cancels a write transaction or an operation in - the transaction causes an error, all changes are discarded. + the transaction causes an error, it discards all changes. .. _sdks-managed-vs-unmanaged-objects: @@ -75,8 +94,9 @@ which creates a managed instance. updated with changes within write transactions as long as that database remains open. Managed objects are tied to the database instance from which they originated and cannot be directly written to another database. However, - the SDK supplies a method to copy managed objects from one database file to - another. + some of the SDKs supply a method to copy managed objects from one database + file to another. Refer to the :ref:`sdks-create-copy-object-to-another-database` + section on this page. You can use the SDK's APIs with managed objects. For example, managed objects can have relationships with other objects and you can observe them @@ -84,36 +104,29 @@ which creates a managed instance. Refer to the :ref:`Create an Unmanaged Copy of an Object or Collection ` section on this page. -- **Unmanaged objects** are SDK objects that behave like normal Kotlin objects, +- **Unmanaged objects** are SDK objects that behave like normal objects, but they are not persisted in the database. All SDK objects are unmanaged until you add them to a database within a write transaction. You cannot use the SDK's APIs with unmanaged objects or observe them for changes. -.. tip:: - - You can check if an object is managed with the - ``isManaged`` API. - -Create a Realm Object +Create Object Methods --------------------- -Before you can create a new object and persist it to the realm, you must -:ref:`sdks-object-models`. Then, you include that object type in your database -schema when you open the database. +The SDK provides a variety of methods to create objects and perform write +operations. -.. important:: Object Types Must Be in Your Schema +.. _sdks-create-one-object: - You can only write objects whose object type is included in the database - schema. If you try to reference or write an object of an object type - that isn't in your schema, the SDK returns a schema validation error. +Create One Object +~~~~~~~~~~~~~~~~~ To create a new object and persist it to the database: .. tabs-drivers:: .. tab:: - :tabid: cpp + :tabid: cpp-sdk .. include:: /includes/api-details/cpp/crud/create-procedure.rst @@ -132,6 +145,11 @@ To create a new object and persist it to the database: .. include:: /includes/api-details/java/crud/create-procedure.rst + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-procedure.rst + .. tab:: :tabid: javascript @@ -157,222 +175,450 @@ To create a new object and persist it to the database: .. include:: /includes/api-details/typescript/crud/create-procedure.rst -You can also upsert into a database using specific criteria. For more -information, refer to :ref:`sdks-upsert-an-object`. +.. include:: /includes/sdk-examples/crud/create-realm-object.rst -Create a Realm Object -~~~~~~~~~~~~~~~~~~~~~ +You can also upsert into a database using specific criteria. Refer to the +:ref:`sdks-upsert-an-object` section on this page. + +.. _sdks-create-multiple-objects: + +Create Multiple Objects +~~~~~~~~~~~~~~~~~~~~~~~ + +Some of the SDKs provide a dedicated API to create multiple objects from +a sequence or collection. .. tabs-drivers:: .. tab:: - :tabid: cpp + :tabid: cpp-sdk - .. include:: /includes/api-details/cpp/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst .. tab:: :tabid: csharp - .. include:: /includes/api-details/csharp/crud/create-realm-object-description.rst + .. include:: /includes/api-details/csharp/crud/create-multiple-objects-description.rst .. tab:: :tabid: dart - .. include:: /includes/api-details/dart/crud/create-realm-object-description.rst + .. include:: /includes/api-details/dart/crud/create-multiple-objects-description.rst .. tab:: :tabid: java - .. include:: /includes/api-details/java/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst .. tab:: :tabid: javascript - .. include:: /includes/api-details/javascript/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst .. tab:: :tabid: kotlin - .. include:: /includes/api-details/kotlin/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst .. tab:: :tabid: objectivec - .. include:: /includes/api-details/objectivec/crud/create-realm-object-description.rst + .. include:: /includes/api-details/objectivec/crud/create-multiple-objects-description.rst .. tab:: :tabid: swift - .. include:: /includes/api-details/swift/crud/create-realm-object-description.rst + .. include:: /includes/api-details/swift/crud/create-multiple-objects-description.rst .. tab:: :tabid: typescript - .. include:: /includes/api-details/typescript/crud/create-realm-object-description.rst + .. include:: /includes/api-details/generic/crud/create-multiple-objects-no-dedicated-api.rst -.. include:: /includes/sdk-examples/crud/create-realm-object.rst +.. include:: /includes/sdk-examples/crud/create-multiple-objects.rst -Model -````` +.. _sdks-upsert-an-object: -For more information about modeling an object, refer to: -:ref:`sdks-object-models`. +Create or Update an Object (Upsert) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. include:: /includes/sdk-examples/crud/create-realm-object-model.rst +An **upsert** is a write operation that either inserts a new object +with a given primary key or updates an existing object that already has +that primary key. We call this an upsert because it is an "**update** or +**insert**" operation. This is useful when an object may or may not +already exist, such as when bulk importing a dataset into an existing +database. Upserting lets you update existing entries while adding any new entries. -.. _sdks-create-an-embedded-object: +.. tabs-drivers:: -Create an Embedded Object -~~~~~~~~~~~~~~~~~~~~~~~~~ + .. tab:: + :tabid: cpp-sdk -To create a new embedded object instance, assign an instance of an -:ref:`embedded object type ` to a -parent object's property. This can be in a one-to-one, one-to-many, or -inverse :ref:`relationship ` -depending on how you defined the embedded object within the parent -object type. + .. include:: /includes/api-details/cpp/api-not-supported-description.rst -.. note:: Embedded Objects Must Be Created Within a Parent Object + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-or-update-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-or-update-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-or-update-object-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-or-update-object-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-or-update-object-description.rst - An embedded object requires a parent object and *cannot* exist as an - independent SDK object. + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-or-update-object-description.rst + + .. tab:: + :tabid: objectivec -Embedded objects have strict ownership with their parent object. -After you create the embedded object, you *cannot* reassign it to a -different parent object or share it between multiple parent objects. + .. include:: /includes/api-details/objectivec/crud/create-or-update-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-or-update-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/create-or-update-object-description.rst + +.. include:: /includes/sdk-examples/crud/create-or-update-object.rst + +.. _sdks-create-objects-with-value: + +Initialize Objects with a Value +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some of the SDKs provide specific methods to initialize objects with a value. +Others use language-idiomatic methods to set the values of objects during +initialization. + +Some Property Types are Only Mutable in a Write Transaction +``````````````````````````````````````````````````````````` + +Some property types are only mutable in a write transaction. For example, +you can instantiate an object with a Set +property, but you can only set that property's value in a write transaction. +You cannot initialize the object with a value for that property unless +you do so inside a write transaction. .. tabs-drivers:: .. tab:: - :tabid: cpp + :tabid: cpp-sdk - .. include:: /includes/api-details/cpp/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst .. tab:: :tabid: csharp - .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst .. tab:: :tabid: dart - .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst .. tab:: :tabid: java - .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst .. tab:: :tabid: javascript - .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst .. tab:: :tabid: kotlin - .. include:: /includes/api-details/kotlin/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst .. tab:: :tabid: objectivec - .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/objectivec/crud/create-initialize-objects-with-value-description.rst .. tab:: :tabid: swift - .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/swift/crud/create-initialize-objects-with-value-description.rst .. tab:: :tabid: typescript - .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + .. include:: /includes/api-details/generic/crud/create-initialize-objects-with-value-no-dedicated-api.rst + +.. include:: /includes/sdk-examples/crud/create-initialize-objects-with-value.rst + +.. _sdks-create-objects-from-json: + +Create Objects from JSON +~~~~~~~~~~~~~~~~~~~~~~~~ + +Working with JSON returned from an API is a common development use case. Most +of the supported SDK languages do not directly support creating objects from +JSON. However, you may use language or platform-idiomatic APIs to transform +JSON to a structure that matches your object schema, and create a matching +object. Or you may :ref:`model unstructured data ` +to work with **unstructured data** that is highly variable or whose structure +is unknown at runtime. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/create-objects-from-json-missing-example.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/create-objects-from-json-missing-example.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/crud/create-objects-from-json-missing-example.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-objects-from-json-description.rst + + .. tab:: + :tabid: java-kotlin -.. include:: /includes/sdk-examples/crud/create-embedded-object.rst + .. include:: /includes/api-details/java/crud/create-objects-from-json-description.rst -Model -````` + .. tab:: + :tabid: javascript -For more information about modeling an embedded object, refer to: -:ref:`sdks-embedded-objects`. + .. include:: /includes/api-details/generic/crud/create-objects-from-json-missing-example.rst -.. include:: /includes/sdk-examples/crud/create-embedded-object-model.rst + .. tab:: + :tabid: kotlin -.. _sdks-create-asymmetric-object: + .. include:: /includes/api-details/generic/crud/create-objects-from-json-missing-example.rst -Create an Asymmetric Object -~~~~~~~~~~~~~~~~~~~~~~~~~~~ + .. tab:: + :tabid: objectivec -Asymmetric objects are write-only. Once inserted, the asymmetric object syncs -to Atlas. You *cannot* access the managed data locally, remove it from the -database, or query for it. + .. include:: /includes/api-details/objectivec/crud/create-objects-from-json-description.rst -For information on how to use asymmetric objects in your application, -refer to :ref:`sdks-stream-data-to-atlas`. + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-objects-from-json-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-objects-from-json-missing-example.rst + +.. include:: /includes/sdk-examples/crud/create-objects-from-json.rst + +.. _sdks-create-unmanaged-copy: + +Create an Unmanaged Copy of an Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some of the SDKs provide APIs to create an unmanaged, in-memory copy of a +managed object or collection. In other SDKs, this API is not needed or not +currently implemented. .. tabs-drivers:: .. tab:: - :tabid: cpp + :tabid: cpp-sdk - .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + .. include:: /includes/api-details/cpp/crud/create-unmanaged-copy-description.rst .. tab:: :tabid: csharp - .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + .. include:: /includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst .. tab:: :tabid: dart - .. include:: /includes/api-details/dart/crud/create-asymmetric-object-description.rst + .. include:: /includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst .. tab:: :tabid: java - .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + .. include:: /includes/api-details/java/crud/create-unmanaged-copy-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-unmanaged-copy-description.rst .. tab:: :tabid: javascript - .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + .. include:: /includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst .. tab:: :tabid: kotlin - .. include:: /includes/api-details/kotlin/crud/create-asymmetric-object-description.rst + .. include:: /includes/api-details/kotlin/crud/create-unmanaged-copy-description.rst .. tab:: :tabid: objectivec - .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + .. include:: /includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst .. tab:: :tabid: swift - .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + .. include:: /includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst .. tab:: :tabid: typescript - .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + .. include:: /includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst -.. include:: /includes/sdk-examples/crud/create-asymmetric-object.rst +.. include:: /includes/sdk-examples/crud/create-unmanaged-object.rst -Model -````` +.. _sdks-create-copy-object-to-another-database: -For more information about modeling an asymmetric object, refer to: -:ref:`sdks-asymmetric-objects`. +Copy an Object to Another Database +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. include:: /includes/sdk-examples/crud/create-asymmetric-object-model.rst +You can copy objects that are managed by one database instance to another +database instance. -.. _sdks-create-unmanaged-copy: +.. tabs-drivers:: -Create an Unmanaged Copy of an Object -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + .. tab:: + :tabid: cpp-sdk -.. _sdks-upsert-an-object: + .. include:: /includes/api-details/generic/crud/create-copy-object-to-another-database-no-example.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/create-copy-object-to-another-database-no-example.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/crud/create-copy-object-to-another-database-no-example.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-copy-object-to-another-database-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-copy-object-to-another-database-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-copy-object-to-another-database-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-copy-object-to-another-database-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/create-copy-object-to-another-database-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-copy-object-to-another-database-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-copy-object-to-another-database-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/create-copy-object-to-another-database.rst + +.. _sdks-create-objects-in-background: + +Create Objects in the Background +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When performing large write operations, you may want to create objects in the +background. This avoids blocking the UI thread while performing large write +operations. This is particularly useful when using Device Sync, where you don't +know when and for how long the Sync client will be writing. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-objects-in-background-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-objects-in-background-description.rst + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-objects-in-background-description.rst + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/crud/create-objects-in-background.rst -Create or Update an Object (Upsert) -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/crud/create/create-object-types.txt b/source/sdk/crud/create/create-object-types.txt new file mode 100644 index 0000000000..0751637fae --- /dev/null +++ b/source/sdk/crud/create/create-object-types.txt @@ -0,0 +1,353 @@ +.. _sdks-create-specific-object-types: + +============================ +Create Specific Object Types +============================ + +.. meta:: + :description: Learn how to create specific types of objects with Atlas Device SDK, including constraints for certain object types. + :keywords: Realm, C++ SDK, .NET SDK, Flutter SDK, Kotlin SDK, Java SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. tabs-selector:: drivers + +This page describes how to create specific types of objects using Atlas Device +SDK. To learn more about object models and how to define them, refer to +:ref:`sdks-object-models`. + +You can create objects whose object type is managed by the database instance. +For more information, refer to +:ref:`sdks-configure-and-open-database` or +:ref:`sdks-configure-and-open-synced-database`. + +For more information about write transactions and the methods you can use to +create an object, refer to :ref:`sdks-crud-create`. + +For information about creating specific property types, including special +types, collections, and relationship properties, refer to +:ref:`sdks-create-specific-property-types`. + +Create Specific SDK Object Types +-------------------------------- + +Before you can create a new object and persist it to the database, you must +:ref:`sdks-object-models`. Then, include that object type in your database +schema when you open the database. + +.. important:: Object Types Must Be in Your Schema + + You can only write objects whose object type is included in the database + schema. If you try to reference or write an object of an object type + that isn't in your schema, the SDK returns a schema validation error. + +.. _sdks-create-realm-object: + +Create a Realm Object +~~~~~~~~~~~~~~~~~~~~~ + +The SDK refers to the base object type as a Realm object. This identifies it +as an object type that can be managed by the device persistence layer, Realm +database. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-realm-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-realm-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-realm-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-realm-object-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-realm-object-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-realm-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-realm-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/create-realm-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-realm-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/create-realm-object-description.rst + +.. include:: /includes/sdk-examples/crud/create-realm-object.rst + +Model +````` + +For more information about modeling an object, refer to +:ref:`sdks-object-models`. + +.. include:: /includes/sdk-examples/crud/create-realm-object-model.rst + +.. _sdks-create-an-embedded-object: + +Create an Embedded Object +~~~~~~~~~~~~~~~~~~~~~~~~~ + +To create a new embedded object instance, assign an instance of an +:ref:`embedded object type ` to a +parent object's property. This can be in a one-to-one, one-to-many, or +inverse :ref:`relationship ` +depending on how you defined the embedded object within the parent +object type. + +.. note:: Embedded Objects Must Be Created Within a Parent Object + + An embedded object requires a parent object and *cannot* exist as an + independent SDK object. + +Embedded objects have strict ownership with their parent object. +After you create the embedded object, you *cannot* reassign it to a +different parent object or share it between multiple parent objects. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-embedded-object-description.rst + +.. include:: /includes/sdk-examples/crud/create-embedded-object.rst + +Model +````` + +For more information about modeling an embedded object, refer to +:ref:`sdks-embedded-objects`. + +.. include:: /includes/sdk-examples/crud/create-embedded-object-model.rst + +.. _sdks-create-asymmetric-object: + +Create an Asymmetric Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Asymmetric objects are write-only. Once inserted, the asymmetric object syncs +to Atlas. You *cannot* access the managed data locally, remove it from the +database, or query for it. + +For information on how to use asymmetric objects in your application, +refer to :ref:`sdks-stream-data-to-atlas`. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-asymmetric-object-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-asymmetric-object-description.rst + +.. include:: /includes/sdk-examples/crud/create-asymmetric-object.rst + +Model +````` + +For more information about modeling an asymmetric object, refer to +:ref:`sdks-asymmetric-objects`. + +.. include:: /includes/sdk-examples/crud/create-asymmetric-object-model.rst + +.. _sdks-create-geospatial-data: + +Create a Geospatial Data Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +After you :ref:`define a geospatial object type `, +you can use that type to create objects that persist geospatial data. + +Initialize objects that use the geospatial data class, and add them to the +database like you would any other object type. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-geospatial-object-not-supported.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-geospatial-object-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-geospatial-object-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-geospatial-object-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-geospatial-object-js-ts-description.rst + + +.. include:: /includes/sdk-examples/crud/create-geospatial-data-object.rst + +The following image shows the results of creating these two company objects: + +.. figure:: /images/geopoints.png + :alt: 2 GeoPoints + :width: 150 + :lightbox: + +Model +````` + +For more information about modeling a geospatial object, refer to +:ref:`sdks-define-geospatial-object`. + +.. include:: /includes/sdk-examples/crud/create-geospatial-data-model.rst diff --git a/source/sdk/crud/create/create-property-types.txt b/source/sdk/crud/create/create-property-types.txt new file mode 100644 index 0000000000..4229f7e3b4 --- /dev/null +++ b/source/sdk/crud/create/create-property-types.txt @@ -0,0 +1,764 @@ +.. _sdks-create-specific-property-types: + +============================== +Create Specific Property Types +============================== + +.. meta:: + :description: Learn how to create specific property types with Atlas Device SDK. + :keywords: Realm, C++ SDK, Flutter SDK, .NET SDK, Kotlin SDK, Java SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. tabs-selector:: drivers + +This page describes how to create specific property types, including: + +- Special SDK-specific types, such as counters or mixed data types +- Collection property types, such as lists, sets, and maps +- Relationship property types, including to-one, to-many, and inverse + relationships + +To learn more about how to define these property types in the object model, +refer to :ref:`sdks-object-models`. + +For information about how to create specific types of objects, refer to +:ref:`sdks-create-specific-object-types`. + +For information about write transactions and the methods you can use to create +objects, refer to :ref:`sdks-crud-create`. + +.. _sdks-create-special-property-types: + +Create Special Properties +------------------------- + +Depending on how you define your object type, you might have properties +that are special SDK-specific types. These may be custom data types, or +familiar language types that have specific requirements or limitations when +used with Atlas Device SDK. + +.. _sdks-create-mixed-property-type: + +Create a Generic (Mixed) Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The SDK provides a generic mixed property type that could contain a +number of property types. It's the closest analog to a polymorphic data type +that the SDK provides. + +For a list of the value types that a mixed property can hold, refer to +:ref:`sdks-mixed-data-type`. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/create-mixed-property-type-description.rst + +.. include:: /includes/sdk-examples/crud/create-mixed-property-type.rst + +.. _sdks-create-counter-property-type: + +Create a Counter Property +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some of the SDKs provide a special property type that you can use as a logical +counter. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-counter-property-type-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-counter-property-type-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-counter-property-type-not-supported.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-counter-property-type-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-counter-property-type-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-counter-property-type-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/create-counter-property-type-not-supported.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-counter-property-type-not-supported.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst + +.. include:: /includes/sdk-examples/crud/create-counter-property-type.rst + +.. _sdks-create-timestamp-property-type: + +Create a Timestamp Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-timestamp-property-type-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-timestamp-property-type-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-timestamp-property-type-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-timestamp-property-type-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-timestamp-property-type-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/create-timestamp-property-type-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-timestamp-property-type-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/create-timestamp-property-type-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-timestamp-property-type-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/create-timestamp-property-type-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/create-timestamp-property-type.rst + +.. _sdks-create-object-id-property-type: + +Create an Object ID Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-object-id-property-type-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-object-id-property-type-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-object-id-property-type-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-object-id-property-type-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-object-id-property-type-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-object-id-property-type-description.rst + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-object-id-property-type-description.rst + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/crud/create-object-id-property-type.rst + +.. _sdks-create-uuid-property-type: + +Create a UUID Property +~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-uuid-property-type-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-uuid-property-type-description.rst + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-uuid-property-type-description.rst + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-uuid-property-type-description.rst + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/crud/create-uuid-property-type.rst + +.. _sdks-create-collection-property-types: + +Create Collection Properties +---------------------------- + +The SDK provides the following collection type properties: + +- List +- Set +- Map + +Collections are mutable within a write transaction. + +.. tip:: Listen for Changes to a Created Collection + + After you create a collection, you can register a notification handler to + listen for changes. For more information, refer to + :ref:``. + +.. _sdks-create-list-properties: + +Create List Properties +~~~~~~~~~~~~~~~~~~~~~~ + +The SDK's list data type is a container that holds a collection of primitive +values or objects. These values may be of any supported type except another +collection. + +The SDK uses the List container type to define to-many relationships. A +**to-many** relationship means that an object is related in a specific +way to multiple objects. + +For a list of the value types that a list property can hold, refer to +:ref:``. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-list-property-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/create-list-property-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/create-list-property-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-list-property-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-list-property-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-list-property-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/create-mixed-property-type-description.rst + +.. include:: /includes/sdk-examples/crud/create-list-property.rst + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. _flutter-create-Uint8List-property-type: + + Create a Uint8List Property Type (Dart) + ``````````````````````````````````````` + + The Flutter SDK provides a ``Uint8List`` from Dart. For more details about + defining a ``Uint8List`` type, refer to + :ref:`dart-define-uint8list-property-type`. + + To add ``Uint8List`` to a Realm object, call ``Uint8List.fromList()`` on the data. + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.binary-from-list.dart + :language: dart + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + +.. _sdks-create-set-properties: + +Create Set Properties +~~~~~~~~~~~~~~~~~~~~~ + +Like their native counterparts, the SDK's set data type stores unique values. +These values may be a Realm object or one of the supported data types. +It cannot be another collection, an embedded object, or an asymmetric object. + +The SDK uses the Set container type to define to-many relationships. A +**to-many** relationship means that an object is related in a specific +way to multiple objects. + +For a list of the value types that a set property can hold, refer to +:ref:``. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-set-property-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-set-properties-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-set-properties-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-set-properties-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-mixed-property-type-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/create-set-properties-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-set-properties-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/create-set-properties-description.rst + +.. include:: /includes/sdk-examples/crud/create-set-property.rst + +.. _sdks-create-dictionary-properties: + +Create Dictionary Properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The SDK supports a dictionary (map) property type. Dictionary keys must be +strings, but values can be any of the supported value types. For a list of the +value types that a dictionary property can hold, refer to +:ref:``. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-dictionary-property-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/create-dictionary-property-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/create-dictionary-property-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/create-dictionary-property-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-dictionary-property-description.rst + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/create-dictionary-property-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/create-dictionary-property-description.rst + +.. include:: /includes/sdk-examples/crud/create-dictionary-property.rst + +.. _sdks-create-relationship-property-types: + +Create Relationship Properties +------------------------------ + +When you have a property whose type references another SDK object, this creates +a relationship between the objects. This can be a to-one, to-many, or +inverse relationship. For more information about relationships, refer to +:ref:`sdks-relationships`. + +.. _sdks-create-to-one-relationship: + +Create a To-One Relationship +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To create a new object instance with a +:ref:`to-one relationship ` +property, instantiate both objects and pass the referenced object to the +relationship property. + +You can optionally create an inverse relationship to refer to the main object +from the related object. For more information, refer to the +:ref:`sdks-create-object-with-inverse-relationship` section on this page. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-to-one-relationship-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-to-one-relationship-description.rst + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/crud/create-to-one-relationship.rst + +.. _sdks-create-to-many-relationship: + +Create a To-Many Relationship +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To create a new object instance with a +:ref:`to-many relationship ` +property, instantiate all objects and pass any referenced objects to the +relationship collection property. + +You may use a List or a Set to represent a to-many relationship, depending +on whether you require the values to be unique, or whether you want to use any +of the special collection type methods. + +You can optionally create an inverse relationship to refer to the main object +from the related object. For more information, refer to the +:ref:`sdks-create-object-with-inverse-relationship` section on this page. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-to-many-relationship-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-to-many-relationship-description.rst + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/crud/create-to-many-relationship.rst + +.. _sdks-create-object-with-inverse-relationship: + +Create an Inverse Relationship +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To create a new object instance with an +:ref:`inverse relationship ` +property, instantiate the parent object and pass any referenced child +objects to the inverse relationship property. + +After you create an object that has an inverse relationship, you can access +the inverse relationship property to get the child objects. However, you +*cannot* directly modify the backlink itself. For more information, refer to +:ref:``. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/create-to-many-relationship-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/create-to-many-relationship-description.rst + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/crud/create-inverse-relationship.rst diff --git a/source/sdk/crud/read.txt b/source/sdk/crud/read.txt index de16c41b6f..cdc99da7c4 100644 --- a/source/sdk/crud/read.txt +++ b/source/sdk/crud/read.txt @@ -20,6 +20,11 @@ Read Objects Placeholder page for content related to reading realm objects. +.. _sdks-find-object-by-primary-key: + +Find an Object by Primary Key +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + .. _sdks-read-results: SDK Results Collections diff --git a/source/sdk/crud/threading.txt b/source/sdk/crud/threading.txt index 2bf6b1d9e1..731886890d 100644 --- a/source/sdk/crud/threading.txt +++ b/source/sdk/crud/threading.txt @@ -17,7 +17,24 @@ Threading :depth: 2 :class: singlecol + +.. _sdks-communication-across-threads: + +Communication Across Threads +---------------------------- + +.. _sdks-thread-safe-reference: + +Thread-Safe Reference +~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-frozen-objects: + +Frozen Objects +~~~~~~~~~~~~~~ + .. _sdks-modify-frozen-object: Update a Frozen Object ~~~~~~~~~~~~~~~~~~~~~~ + diff --git a/source/sdk/crud/update.txt b/source/sdk/crud/update.txt index 992cc009e0..2f17611c34 100644 --- a/source/sdk/crud/update.txt +++ b/source/sdk/crud/update.txt @@ -11,3 +11,8 @@ Update Objects :class: singlecol Placeholder page for content related to updating realm objects. + +.. _sdks-update-inverse-relationships: + +Update Inverse Relationships +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/files/configure-and-open.txt b/source/sdk/files/configure-and-open.txt index 47eaa2771a..c4b912df59 100644 --- a/source/sdk/files/configure-and-open.txt +++ b/source/sdk/files/configure-and-open.txt @@ -31,7 +31,14 @@ file can manage. Some SDKs require explicit realm file schemas, while others automatically manage schemas for any object in your project, and you can specify a subset of schemas (objects) when opening a realm. + +.. _sdks-open-database-asynchronously: + +Open a Database Asynchronously +------------------------------ + .. _sdks-provide-a-subset-of-classes-to-a-database: Provide a Subset of Classes to a Database ----------------------------------------- + diff --git a/source/sdk/model-data/object-models.txt b/source/sdk/model-data/object-models.txt index 1de0ac8170..9cb67efbdc 100644 --- a/source/sdk/model-data/object-models.txt +++ b/source/sdk/model-data/object-models.txt @@ -51,7 +51,23 @@ Define Special Property Types Define a Full-Text Search Property ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-optional-property-types: + +Define Optional Property Types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-primary-key: + +Define a Primary Key +~~~~~~~~~~~~~~~~~~~~ + .. _sdks-required-optional-property: Placeholder for .NET nullability info, and any other SDKs with similar APIs/requirements + +.. _sdks-model-unstructured-data: + +Model Unstructured Data +~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/model-data/relationships.txt b/source/sdk/model-data/relationships.txt index 94ab2460f7..71153db99e 100644 --- a/source/sdk/model-data/relationships.txt +++ b/source/sdk/model-data/relationships.txt @@ -10,4 +10,19 @@ Model Relationships :depth: 3 :class: singlecol -Placeholder page for modeling relationships in the SDKs. \ No newline at end of file +Placeholder page for modeling relationships in the SDKs. + +.. _sdks-to-one-relationship: + +To-One Relationship +------------------- + +.. _sdks-to-many-relationship: + +To-Many Relationship +-------------------- + +.. _sdks-inverse-relationship: + +Inverse Relationship +-------------------- diff --git a/source/sdk/model-data/supported-types.txt b/source/sdk/model-data/supported-types.txt index 6a13f4c7e2..0d67e2f1ae 100644 --- a/source/sdk/model-data/supported-types.txt +++ b/source/sdk/model-data/supported-types.txt @@ -19,3 +19,52 @@ Supported Types :class: singlecol Placeholder page for supported data types. + + +.. _sdks-mixed-data-type: + +Generic (Mixed) Data Type +~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-counter-data-type: + +Counter Data Type +~~~~~~~~~~~~~~~~~ + +.. _sdks-timestamp-data-type: + +Timestamp Data Type +~~~~~~~~~~~~~~~~~~~ + +.. _sdks-list-property-types: + +Supported List Property Types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _dart-define-uint8list-property-type: + +Define a Uint8List Property Type (Dart) +``````````````````````````````````````` + +`Uint8List `__ +is a binary data type from `dart:typed_data +`__. +You can use this data type in object models and property values. + +To define a property as ``Uint8List``, you must first import ``dart:typed_data``. +Then, set the object's type as ``Uint8List`` in your object model. + +.. literalinclude:: /examples/generated/flutter/data_types_test.snippet.binary-model.dart + :language: dart + +.. _sdks-set-property-types: + +Supported Set Property Types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-dictionary-property-types: + +Supported Dictionary Property Types +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + diff --git a/source/sdk/react-to-changes.txt b/source/sdk/react-to-changes.txt index e3a25cbb04..f4aa4c2320 100644 --- a/source/sdk/react-to-changes.txt +++ b/source/sdk/react-to-changes.txt @@ -11,3 +11,13 @@ React to Changes :class: singlecol Placeholder page for information about realm notifications. + +.. _sdks-collection-change-listener: + +Register a Collection Change Listener +------------------------------------- + +.. _sdks-list-change-listener: + +React to List Changes +~~~~~~~~~~~~~~~~~~~~~ From b9d858c03e59df3fad47d51855af89a96975ca1b Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 25 Jun 2024 17:20:09 -0400 Subject: [PATCH 41/63] (DOCSP-39538): Consolidate Manage Sync Sessions page (#3285) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39538 *Staged Page* - [Manage Sync Sessions](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39538/sdk/sync/manage-sync-sessions/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Manage Sync Sessions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/sync/manage-sync-session/) - [Flutter: Manage Sync Sessions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/sync/manage-sync-session/) - [Java: Pause or Resume a Sync Session](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/sync/pause-resume-sync/) - [Java: Check the Network Connection](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/sync/network-connection/) - [Kotlin: Manage Sync Session](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/sync/manage-sync-session/) - [.NET: Suspend or Resume a Sync Session](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/sync/sync-session/) - [.NET: Check Upload and Download Progress](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/sync/sync-progress/) - [Node.js: Manage a Sync Session](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/sync/manage-sync-session/) - [Swift: Manage Sync Sessions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/sync/sync-session/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: Kyle Rollins <115574589+krollins-mdb@users.noreply.github.com> --- .../api-details/cpp/api-not-supported.rst | 1 + ...s-check-network-connection-description.rst | 28 + ...-sessions-check-sync-state-description.rst | 4 + ...-sessions-get-sync-session-description.rst | 6 + ...ly-reconnect-sync-sessions-description.rst | 3 + ...-pause-resume-sync-session-description.rst | 10 + ...nges-to-upload-or-download-description.rst | 17 + ...s-check-network-connection-description.rst | 6 + ...-sessions-check-sync-state-description.rst | 6 + ...load-and-download-progress-description.rst | 26 + ...-sessions-get-sync-session-description.rst | 3 + ...-pause-resume-sync-session-description.rst | 10 + ...nges-to-upload-or-download-description.rst | 11 + ...s-check-network-connection-description.rst | 17 + ...-sessions-check-sync-state-description.rst | 7 + ...k-upload-download-progress-description.rst | 24 + ...-sessions-get-sync-session-description.rst | 3 + ...ly-reconnect-sync-sessions-description.rst | 3 + ...-pause-resume-sync-session-description.rst | 4 + ...nges-to-upload-or-download-description.rst | 8 + ...s-check-network-connection-description.rst | 7 + ...-sessions-check-sync-state-description.rst | 3 + ...-sessions-get-sync-session-description.rst | 2 + ...e-resume-sync-session-java-description.rst | 11 + ...resume-sync-session-kotlin-description.rst | 11 + ...nges-to-upload-or-download-description.rst | 13 + ...k-network-connection-js-ts-description.rst | 3 + ...ons-check-sync-state-js-ts-description.rst | 2 + ...ad-download-progress-js-ts-description.rst | 16 + ...ons-get-sync-session-js-ts-description.rst | 2 + ...onnect-sync-sessions-js-ts-description.rst | 3 + ...-resume-sync-session-js-ts-description.rst | 3 + ...nges-to-upload-or-download-description.rst | 17 + ...s-check-network-connection-description.rst | 19 + ...-sessions-check-sync-state-description.rst | 10 + ...k-upload-download-progress-description.rst | 24 + ...-sessions-get-sync-session-description.rst | 4 + ...ly-reconnect-sync-sessions-description.rst | 9 + ...-pause-resume-sync-session-description.rst | 6 + ...nges-to-upload-or-download-description.rst | 13 + ...s-check-network-connection-description.rst | 22 + ...-sessions-check-sync-state-description.rst | 5 + ...k-upload-download-progress-description.rst | 12 + ...-sessions-get-sync-session-description.rst | 2 + ...ly-reconnect-sync-sessions-description.rst | 5 + ...-pause-resume-sync-session-description.rst | 7 + ...nges-to-upload-or-download-description.rst | 7 + ...s-check-network-connection-description.rst | 8 + ...-sessions-check-sync-state-description.rst | 6 + ...k-upload-download-progress-description.rst | 22 + ...-sessions-get-sync-session-description.rst | 2 + ...ly-reconnect-sync-sessions-description.rst | 4 + ...-pause-resume-sync-session-description.rst | 5 + ...nges-to-upload-or-download-description.rst | 11 + ...nges-to-upload-or-download-description.rst | 20 + ...sync-sessions-check-network-connection.rst | 68 +++ .../manage-sync-sessions-check-sync-state.rst | 62 +++ ...essions-check-upload-download-progress.rst | 62 +++ .../manage-sync-sessions-get-sync-session.rst | 64 +++ ...sions-manually-reconnect-sync-sessions.rst | 62 +++ .../manage-sync-sessions-pause-resume.rst | 64 +++ ...wait-for-changes-to-upload-or-download.rst | 69 +++ source/includes/when-to-pause-sync.rst | 36 -- source/sdk/sync/manage-sync-sessions.txt | 510 +++++++++++++++++- 64 files changed, 1472 insertions(+), 38 deletions(-) create mode 100644 source/includes/api-details/cpp/api-not-supported.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-sessions-check-network-connection-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-sessions-check-sync-state-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-sessions-get-sync-session-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-sessions-check-network-connection-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-sessions-check-sync-state-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-sessions-get-sync-session-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-sessions-check-network-connection-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-sessions-check-sync-state-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-sessions-check-upload-download-progress-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-sessions-get-sync-session-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-sessions-pause-resume-sync-session-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-sessions-check-network-connection-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-sessions-check-sync-state-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-sessions-get-sync-session-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-java-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-kotlin-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-sessions-check-network-connection-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-sessions-check-sync-state-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-sessions-check-upload-download-progress-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-sessions-get-sync-session-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-sessions-manually-reconnect-sync-sessions-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-sessions-pause-resume-sync-session-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-sessions-check-network-connection-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-sessions-check-sync-state-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-sessions-check-upload-download-progress-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-sessions-get-sync-session-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-sessions-pause-resume-sync-session-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/api-details/objectivec/sync/manage-sync-sessions-check-network-connection-description.rst create mode 100644 source/includes/api-details/objectivec/sync/manage-sync-sessions-check-sync-state-description.rst create mode 100644 source/includes/api-details/objectivec/sync/manage-sync-sessions-check-upload-download-progress-description.rst create mode 100644 source/includes/api-details/objectivec/sync/manage-sync-sessions-get-sync-session-description.rst create mode 100644 source/includes/api-details/objectivec/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst create mode 100644 source/includes/api-details/objectivec/sync/manage-sync-sessions-pause-resume-sync-session-description.rst create mode 100644 source/includes/api-details/objectivec/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-sessions-check-network-connection-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-sessions-check-sync-state-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-sessions-check-upload-download-progress-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-sessions-get-sync-session-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-sessions-pause-resume-sync-session-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/api-details/typescript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst delete mode 100644 source/includes/when-to-pause-sync.rst diff --git a/source/includes/api-details/cpp/api-not-supported.rst b/source/includes/api-details/cpp/api-not-supported.rst new file mode 100644 index 0000000000..15ed2dd493 --- /dev/null +++ b/source/includes/api-details/cpp/api-not-supported.rst @@ -0,0 +1 @@ +The C++ SDK does not currently support this API. diff --git a/source/includes/api-details/cpp/sync/manage-sync-sessions-check-network-connection-description.rst b/source/includes/api-details/cpp/sync/manage-sync-sessions-check-network-connection-description.rst new file mode 100644 index 0000000000..4f2f4f9a7a --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-sessions-check-network-connection-description.rst @@ -0,0 +1,28 @@ +**Check Connection State** + +To check the connection state, you can read the +:cpp-sdk:`sync session instance's ` +``connection_state()`` property directly. + +.. literalinclude:: /examples/generated/cpp/sync-session.snippet.connection-state.cpp + :language: cpp + +The network connection state is distinct from the Device Sync connection state +that you can check with the ``state()`` method. For more information about +sync connection state, refer to the Check the Sync State documentation on +this page. + +**Observe Connection State** + +You can also observe the connection state with the +:cpp-sdk:`observe_connection_change() ` +function. This function registers a callback that the SDK invokes when the +underlying sync session changes its connection state. + +.. literalinclude:: /examples/generated/cpp/sync-session.snippet.observe-connection-change.cpp + :language: cpp + +If you register a connection change listener, you can unregister it when +you're done listening for changes. Call the sync session instance's +:cpp-sdk:`unregister_connection_change_observer() ` +method to unregister an observation token. diff --git a/source/includes/api-details/cpp/sync/manage-sync-sessions-check-sync-state-description.rst b/source/includes/api-details/cpp/sync/manage-sync-sessions-check-sync-state-description.rst new file mode 100644 index 0000000000..3acaeeece8 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-sessions-check-sync-state-description.rst @@ -0,0 +1,4 @@ +You can use the :cpp-sdk:`sync_session +`'s public +member function ``state()`` to check whether the sync session is active. +This returns an enum whose value reflects possible Device Sync states. diff --git a/source/includes/api-details/cpp/sync/manage-sync-sessions-get-sync-session-description.rst b/source/includes/api-details/cpp/sync/manage-sync-sessions-get-sync-session-description.rst new file mode 100644 index 0000000000..336e047156 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-sessions-get-sync-session-description.rst @@ -0,0 +1,6 @@ +You can use the member function :cpp-sdk:`get_sync_session() +` to get a +:cpp-sdk:`sync_session +` +object for any synced database. The SDK returns this object as an optional. +It is a lightweight handle that you can pass around by value. diff --git a/source/includes/api-details/cpp/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst b/source/includes/api-details/cpp/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst new file mode 100644 index 0000000000..5582e05cbc --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst @@ -0,0 +1,3 @@ +You can choose to manually trigger a reconnect attempt with a sync session's +:cpp-sdk:`reconnect() ` +method. diff --git a/source/includes/api-details/cpp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst b/source/includes/api-details/cpp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst new file mode 100644 index 0000000000..46d325379c --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst @@ -0,0 +1,10 @@ +To pause a sync session, call the sync session's +:cpp-sdk:`pause() ` +method. + +.. literalinclude:: /examples/generated/cpp/sync-session.snippet.pause.cpp + :language: cpp + +To resume a sync session, call the sync session's +:cpp-sdk:`resume() ` +method. diff --git a/source/includes/api-details/cpp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/cpp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..060084f9ea --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,17 @@ +You can use the +:cpp-sdk:`sync_session `'s +``wait_for_upload_completion()`` and ``wait_for_download_completion()`` +methods to wait for changes to upload to or download from Atlas. Both of these +methods can optionally take a callback to execute when upload or download +is complete. + +To wait for all changes to upload to Atlas from your synced database, +use the member function ``wait_for_upload_completion()``. + +.. literalinclude:: /examples/generated/cpp/sync-session.snippet.wait-for-upload.cpp + :language: cpp + +To wait for all changes from Atlas +to download to your synced database, use the member function +``wait_for_download_completion()``. Refresh the database after downloading +any changes to be sure it reflects the most recent data. diff --git a/source/includes/api-details/csharp/sync/manage-sync-sessions-check-network-connection-description.rst b/source/includes/api-details/csharp/sync/manage-sync-sessions-check-network-connection-description.rst new file mode 100644 index 0000000000..af6e1fa2f4 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-sessions-check-network-connection-description.rst @@ -0,0 +1,6 @@ +To check the connection state, you can read the +:dotnet-sdk:`Session instance's ConnectionState +` +property. Its value is a :dotnet-sdk:`ConnectionState enum +` that reflects the current state +of the sync session's connection. diff --git a/source/includes/api-details/csharp/sync/manage-sync-sessions-check-sync-state-description.rst b/source/includes/api-details/csharp/sync/manage-sync-sessions-check-sync-state-description.rst new file mode 100644 index 0000000000..b2da639c2c --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-sessions-check-sync-state-description.rst @@ -0,0 +1,6 @@ +To check the Sync state, you can read the +:dotnet-sdk:`Session instance's State +` +property. Its value is a :dotnet-sdk:`ConnectionState enum +` that reflects the current state +of the Sync session's communication with the server. diff --git a/source/includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst b/source/includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst new file mode 100644 index 0000000000..7fac246cf2 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst @@ -0,0 +1,26 @@ +To monitor Sync progress, get the Sync session from the +:dotnet-sdk:`Realms.Sync.SyncSession +` property, then add a +progress notification by calling the +:dotnet-sdk:`session.GetProgressObservable() ` +method. + +The ``session.GetProgressObservable`` method takes in the following two parameters: + +- A :dotnet-sdk:`ProgressDirection ` + parameter that can be set to ``Upload`` or ``Download``. + +- A :dotnet-sdk:`ProgressMode ` parameter + that can be set to ``ReportIndefinitely`` + for the notifications to continue until the callback is unregistered, or + ``ForCurrentlyOutstandingWork`` for the notifications to continue until only + the currently transferable bytes are synced. + +When you `Subscribe `_ +to the notifications, you receive a +:dotnet-sdk:`SyncProgress ` +object that provides a percentage estimate of the current progress, expressed +as a double between 0.0 and 1.0. + +Once you no longer wish to receive notifications, unregister the token with +``token.Dispose()``. diff --git a/source/includes/api-details/csharp/sync/manage-sync-sessions-get-sync-session-description.rst b/source/includes/api-details/csharp/sync/manage-sync-sessions-get-sync-session-description.rst new file mode 100644 index 0000000000..e85b478d09 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-sessions-get-sync-session-description.rst @@ -0,0 +1,3 @@ +You can access the Sync +:dotnet-sdk:`Session ` through a synced +:dotnet-sdk:`Realm `. diff --git a/source/includes/api-details/csharp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst b/source/includes/api-details/csharp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst new file mode 100644 index 0000000000..a48f936cba --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst @@ -0,0 +1,10 @@ +To pause synchronization for a specific session, you can call the +:dotnet-sdk:`Stop() ` +method on the session. + +When you then call the +:dotnet-sdk:`Start() ` +method on the paused session, the Sync session resumes. + +The following code block demonstrates calling the ``Stop()`` and ``Start()`` +methods: diff --git a/source/includes/api-details/csharp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/csharp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..ce0dc54d51 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,11 @@ +To asynchronously wait for your changes to finish uploading, get the Sync +session from the :dotnet-sdk:`Realms.Sync.SyncSession +` +property, and then call the :dotnet-sdk:`session.WaitForUploadAsync() +` +method. + +To wait for changes to finish downloading, call the +:dotnet-sdk:`session.WaitForDownloadAsync() +` +method. diff --git a/source/includes/api-details/dart/sync/manage-sync-sessions-check-network-connection-description.rst b/source/includes/api-details/dart/sync/manage-sync-sessions-check-network-connection-description.rst new file mode 100644 index 0000000000..e91a317e2b --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-sessions-check-network-connection-description.rst @@ -0,0 +1,17 @@ +You can get the state of the current network connection with +:flutter-sdk:`Session.connectionState `. +This returns a :flutter-sdk:`ConnectionState ` enum +that contains the network connection's state, which is one of: + +- ``connected`` +- ``disconnected`` +- ``connecting`` + +.. literalinclude:: /examples/generated/flutter/manage_sync_session_test.snippet.get-network-connection.dart + :language: dart + +Monitor the state of the network connection with +:flutter-sdk:`Session.connectionStateChanges `. +This property returns a Stream of :flutter-sdk:`ConnectionStateChange ` +objects that updates when the network connection changes. +You can access the current and previous ``ConnectionState`` from ``ConnectionStateChange``. diff --git a/source/includes/api-details/dart/sync/manage-sync-sessions-check-sync-state-description.rst b/source/includes/api-details/dart/sync/manage-sync-sessions-check-sync-state-description.rst new file mode 100644 index 0000000000..38a07ae047 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-sessions-check-sync-state-description.rst @@ -0,0 +1,7 @@ +You can get the state of the current Sync session state with +:flutter-sdk:`Session.state `. +This returns a :flutter-sdk:`SessionState ` enum +that contains the Sync session state, which is one of: + +- ``active`` +- ``inactive`` diff --git a/source/includes/api-details/dart/sync/manage-sync-sessions-check-upload-download-progress-description.rst b/source/includes/api-details/dart/sync/manage-sync-sessions-check-upload-download-progress-description.rst new file mode 100644 index 0000000000..41fd0c0f00 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-sessions-check-upload-download-progress-description.rst @@ -0,0 +1,24 @@ +.. versionchanged:: 2.0.0 + ``transferredBytes`` and ``transferrableBytes`` deprecated in favor of ``progressEstimate`` + +To monitor Sync progress, call :flutter-sdk:`SyncSession.getProgressStream() +`. This method returns a Stream of +:flutter-sdk:`SyncProgress ` objects that provide +a ``progressEstimate`` for the current upload or download. + +The provided ``progressEstimate`` is a double whose value +ranges from ``0.0`` to ``1.0``. At ``1.0``, the progress stream is complete. + +``SyncSession.getProgressStream()`` takes two arguments: + +- A :flutter-sdk:`ProgressDirection ` + enum that can be set to ``upload`` or ``download``. Specifies whether the + progress stream monitors upload or download progress. + +- A :flutter-sdk:`ProgressMode ` enum + that can be set to one of the following: + + - ``reportIndefinitely``: Sets notifications to continue until the callback is + unregistered. + - ``forCurrentlyOutstandingWork``: Sets notifications to continue until the + ``progressEstimate`` reaches ``1.0``. diff --git a/source/includes/api-details/dart/sync/manage-sync-sessions-get-sync-session-description.rst b/source/includes/api-details/dart/sync/manage-sync-sessions-get-sync-session-description.rst new file mode 100644 index 0000000000..28c1a2700a --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-sessions-get-sync-session-description.rst @@ -0,0 +1,3 @@ +You can access the :flutter-sdk:`Session ` of any +synced database through the :flutter-sdk:`Realm.syncSession +` property. diff --git a/source/includes/api-details/dart/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst b/source/includes/api-details/dart/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst new file mode 100644 index 0000000000..6ac3b9af17 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst @@ -0,0 +1,3 @@ +You can choose to manually trigger a reconnect attempt with the +:flutter-sdk:`App.reconnect() ` instead of waiting for +the duration of the incremental backoff. diff --git a/source/includes/api-details/dart/sync/manage-sync-sessions-pause-resume-sync-session-description.rst b/source/includes/api-details/dart/sync/manage-sync-sessions-pause-resume-sync-session-description.rst new file mode 100644 index 0000000000..1a5fa67a2f --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-sessions-pause-resume-sync-session-description.rst @@ -0,0 +1,4 @@ +To pause syncing for a session, call :flutter-sdk:`Session.pause() `. +The database does not sync changes with Atlas while the session is paused. + +To resume syncing a changes, call :flutter-sdk:`Session.resume() `. diff --git a/source/includes/api-details/dart/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/dart/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..1b12edfb86 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,8 @@ +To wait for the session to finish uploading all pending changes, call +:flutter-sdk:`Session.waitForUpload() `. + +To wait for the session to finish downloading all pending changes, call +:flutter-sdk:`Session.waitForDownload() `. + +Both of these sessions can take an optional :flutter-sdk:`CancellationToken +` to cancel the wait operation. diff --git a/source/includes/api-details/java/sync/manage-sync-sessions-check-network-connection-description.rst b/source/includes/api-details/java/sync/manage-sync-sessions-check-network-connection-description.rst new file mode 100644 index 0000000000..6a3cfac398 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-sessions-check-network-connection-description.rst @@ -0,0 +1,7 @@ +To check the current network connection, call :java-sdk:`getConnectionState() +` on your +:java-sdk:`SyncSession `. + +You can also subscribe to connection changes on your ``SyncSession`` +with :java-sdk:`addConnectionChangeListener() +` diff --git a/source/includes/api-details/java/sync/manage-sync-sessions-check-sync-state-description.rst b/source/includes/api-details/java/sync/manage-sync-sessions-check-sync-state-description.rst new file mode 100644 index 0000000000..9b3c807e6a --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-sessions-check-sync-state-description.rst @@ -0,0 +1,3 @@ +To check the current Sync state, call :java-sdk:`getState() +` on your +:java-sdk:`SyncSession `. diff --git a/source/includes/api-details/java/sync/manage-sync-sessions-get-sync-session-description.rst b/source/includes/api-details/java/sync/manage-sync-sessions-get-sync-session-description.rst new file mode 100644 index 0000000000..b4fbbc8b3c --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-sessions-get-sync-session-description.rst @@ -0,0 +1,2 @@ +You can access the session of any synced database through the +:java-sdk:`SyncSession `. diff --git a/source/includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-java-description.rst b/source/includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-java-description.rst new file mode 100644 index 0000000000..de8efa52e2 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-java-description.rst @@ -0,0 +1,11 @@ +To pause a currently active sync session, call +:java-sdk:`stop() ` +on your :java-sdk:`SyncSession `: + +.. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.pause-sync-session.java + :language: java + :copyable: false + +To resume a currently paused sync session, call +:java-sdk:`start() ` +on your :java-sdk:`SyncSession `: diff --git a/source/includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-kotlin-description.rst b/source/includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-kotlin-description.rst new file mode 100644 index 0000000000..cfd5d1b42c --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-kotlin-description.rst @@ -0,0 +1,11 @@ +To pause a currently active sync session, call +:java-sdk:`stop() ` +on your :java-sdk:`SyncSession `: + +.. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.pause-sync-session.kt + :language: kotlin + :copyable: false + +To resume a currently paused sync session, call +:java-sdk:`start() ` +on your :java-sdk:`SyncSession `: diff --git a/source/includes/api-details/java/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/java/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..e0779dc6c4 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,13 @@ +You can wait for changes to upload with :java-sdk:`SyncSession.uploadAllLocalChanges() +` or +:java-sdk:`SyncSession.uploadAllLocalChanges(long timeout, TimeUnit unit) +`. +These methods block block execution until all known changes on the device have +been uploaded to the server (or the specified timeout is hit). + +You can wait for changes to download with :java-sdk:`SyncSession.downloadAllServerChanges() +` or +:java-sdk:`SyncSession.downloadAllServerChanges(long timeout, TimeUnit unit) +`. +These methods block block execution until all known changes on the server have +downloaded to the device (or the specified timeout is hit). diff --git a/source/includes/api-details/javascript/sync/manage-sync-sessions-check-network-connection-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-sessions-check-network-connection-js-ts-description.rst new file mode 100644 index 0000000000..ae7f851aa9 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-sessions-check-network-connection-js-ts-description.rst @@ -0,0 +1,3 @@ +To check the current state of the connection to the server, call the +:js-sdk:`syncSession.connectionState() +` method. diff --git a/source/includes/api-details/javascript/sync/manage-sync-sessions-check-sync-state-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-sessions-check-sync-state-js-ts-description.rst new file mode 100644 index 0000000000..6227def9e2 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-sessions-check-sync-state-js-ts-description.rst @@ -0,0 +1,2 @@ +To check the current state of the Sync session, call the +:js-sdk:`syncSession.state() ` method. diff --git a/source/includes/api-details/javascript/sync/manage-sync-sessions-check-upload-download-progress-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-sessions-check-upload-download-progress-js-ts-description.rst new file mode 100644 index 0000000000..357f3b8ebd --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-sessions-check-upload-download-progress-js-ts-description.rst @@ -0,0 +1,16 @@ +To check the upload and download progress for a sync session, add a progress +notification using the :js-sdk:`syncSession.addProgressNotification() +` method. + +The ``syncSession.addProgressNotification()`` method takes in the following +three parameters: + +- A ``direction`` parameter. + Set to ``"upload"`` to register notifications for uploading data. + Set to ``"download"`` to register notifications for downloading data. +- A ``mode`` parameter. Set to ``"reportIndefinitely"`` + for the notifications to continue until the callback is unregistered using + :js-sdk:`syncSession.removeProgressNotification() `. + Set to ``"forCurrentlyOutstandingWork"`` for the notifications to continue + until only the currently transferable bytes are synced. +- A callback function parameter. diff --git a/source/includes/api-details/javascript/sync/manage-sync-sessions-get-sync-session-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-sessions-get-sync-session-js-ts-description.rst new file mode 100644 index 0000000000..c896582625 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-sessions-get-sync-session-js-ts-description.rst @@ -0,0 +1,2 @@ +After opening a synced database, you can access its sync session with the +:js-sdk:`Realm.syncSession ` property. diff --git a/source/includes/api-details/javascript/sync/manage-sync-sessions-manually-reconnect-sync-sessions-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-sessions-manually-reconnect-sync-sessions-js-ts-description.rst new file mode 100644 index 0000000000..8b0ac6d0a5 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-sessions-manually-reconnect-sync-sessions-js-ts-description.rst @@ -0,0 +1,3 @@ +To attempt to manually reconnect all Sync sessions, call +:js-sdk:`Realm.App.Sync.Session.reconnect() +`. diff --git a/source/includes/api-details/javascript/sync/manage-sync-sessions-pause-resume-sync-session-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-sessions-pause-resume-sync-session-js-ts-description.rst new file mode 100644 index 0000000000..63bcb440c6 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-sessions-pause-resume-sync-session-js-ts-description.rst @@ -0,0 +1,3 @@ +To pause synchronization, use the :js-sdk:`syncSession.pause() +` method. To resume synchronization, use the +:js-sdk:`syncSession.resume() ` method. diff --git a/source/includes/api-details/javascript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/javascript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..e44d9ef28f --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,17 @@ +To asynchronously wait for all changes to upload to Atlas from your synced +database, call :js-sdk:`uploadAllLocalChanges() +`. This method returns +true when all changes have been uploaded. + +To asynchronously wait for all changes on Atlas to download from the +Device Sync server to your synced database, call +:js-sdk:`downloadAllServerChanges() `. +This method returns true when all changes have been downloaded. + +You can specify a request timeout on the :js-sdk:`App configuration +`. With a timeout specified, you can set +``cancelWaitsOnNonFatalErrors`` on your :js-sdk:`BaseSyncConfiguration +`. When ``true`` and the timeout interval +arrives, any any outstanding work that is awaiting uploads and downloads +cancels. When this setting is false, awaiting uploads and downloads does +not cancel because the SDK treats these timeouts as non-fatal errors. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-network-connection-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-network-connection-description.rst new file mode 100644 index 0000000000..ca08e230c8 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-network-connection-description.rst @@ -0,0 +1,19 @@ +You can check the network connection state through the +:kotlin-sync-sdk:`SyncSession.ConnectionState +`. This is a +property of type ConnectionState enum, whose possible values are: + +- DISCONNECTED +- CONNECTING +- CONNECTED + +.. literalinclude:: /examples/generated/kotlin/ManageSyncSession.snippet.get-network-connection.kt + :language: kotlin + +Monitor the state of the network connection with +:kotlin-sync-sdk:`connectionStateAsFlow +`. +This property returns a Flow of :kotlin-sync-sdk:`ConnectionStateChange +` +objects that updates when the network connection changes. You can access the +new and old ``ConnectionState`` from ``ConnectionStateChange``. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-sync-state-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-sync-state-description.rst new file mode 100644 index 0000000000..b5bc79aa2f --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-sync-state-description.rst @@ -0,0 +1,10 @@ +You can check the Sync session state through the +:kotlin-sync-sdk:`SyncSession.State +`. This is a +property of type State enum, whose possible values are: + +- INACTIVE +- ACTIVE +- PAUSED +- DYING +- WAITING_FOR_ACCESS_TOKEN diff --git a/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-upload-download-progress-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-upload-download-progress-description.rst new file mode 100644 index 0000000000..fa70a47154 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-sessions-check-upload-download-progress-description.rst @@ -0,0 +1,24 @@ +To monitor Sync upload and download progress, call +:kotlin-sync-sdk:`SyncSession.progressAsFlow() +`. + +This method returns a Flow of :kotlin-sync-sdk:`Progress +` events. ``Progress`` +provides an ``estimate``, a double, that represents a transfer progress +estimate that ranges from 0.0 to 1.0. It also provides an +``isTransferComplete`` bool. + +``syncSession.progressAsFlow()`` takes two arguments: + +- A :kotlin-sync-sdk:`Direction ` + enum that can be set to ``UPLOAD`` or ``DOWNLOAD``. + This specifies that the progress stream tracks uploads or downloads. + +- A :kotlin-sync-sdk:`ProgressMode + ` enum that can be + set to either: + + - ``INDEFINITELY``: Sets notifications to continue until the callback is + unregistered. + - ``CURRENT_CHANGES``: Sets notifications to continue until only the currently + transferable bytes are synced. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-sessions-get-sync-session-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-sessions-get-sync-session-description.rst new file mode 100644 index 0000000000..e4c4f295ae --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-sessions-get-sync-session-description.rst @@ -0,0 +1,4 @@ +You can access the :kotlin-sync-sdk:`SyncSession +` +of a single synced database through the :kotlin-sync-sdk:`realm.syncSession +` property. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst new file mode 100644 index 0000000000..8f28ffce8d --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst @@ -0,0 +1,9 @@ +In Kotlin SDK version 1.11.0 and later, you can choose to manually trigger a +reconnect attempt with the :kotlin-sync-sdk:`App.Sync.reconnect() +` +instead of waiting for the duration of the incremental backoff. This is +useful if you have a more accurate understanding of +the network conditions (for example, when monitoring network changes with the +``ConnectivityManager`` on Android) and don't want to rely on Realm's automatic +reconnect detection. The SDK also automatically calls this method when a device +toggles off airplane mode. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-sessions-pause-resume-sync-session-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-sessions-pause-resume-sync-session-description.rst new file mode 100644 index 0000000000..a2bd9cbeeb --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-sessions-pause-resume-sync-session-description.rst @@ -0,0 +1,6 @@ +To pause syncing for a session, call :kotlin-sync-sdk:`syncSession.pause() +`. +The database does not sync changes with Atlas while the session is paused. + +To resume syncing changes, call :kotlin-sync-sdk:`syncSession.resume() +`. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..a7978e205a --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,13 @@ +To asynchronously wait for all changes to upload to Atlas from your synced +database, call :kotlin-sync-sdk:`uploadAllLocalChanges +`. +This method returns ``true`` when all changes have been uploaded. + +To asynchronously wait for all changes on Atlas to download from the Device Sync +server to your synced database, call :kotlin-sync-sdk:`downloadAllServerChanges +`. +This method returns ``true`` when all changes have been downloaded. + +You can also include an optional ``timeout`` parameter to either method to +determine the maximum amount of time before returning ``false``. Note that +the upload or download continues in the background even after returning ``false``. diff --git a/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-network-connection-description.rst b/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-network-connection-description.rst new file mode 100644 index 0000000000..ce2a81ec15 --- /dev/null +++ b/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-network-connection-description.rst @@ -0,0 +1,22 @@ +To get the connection state of a :dotnet-sdk:`SyncSession +`, set an event handler +on the :dotnet-sdk:`PropertyChanged ` +event. The event handler is a standard +`.NET PropertyChangedEventHandler delegate +`_ +that takes in a ``sender`` object and +`PropertyChangedEventArgs `_ +object. + +In the event handler, cast the sender to a ``Session`` object and check if +the event argument's ``PropertyName`` property is ``Session.ConnectionState``. +You can then get the +:dotnet-sdk:`ConnectionState ` +value, which is one of the following: + +- Connecting +- Connected +- Disconnected + +The following code demonstrates setting the event handler, casting the session +object, and checking the Sync status: diff --git a/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-sync-state-description.rst b/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-sync-state-description.rst new file mode 100644 index 0000000000..80a23d5f54 --- /dev/null +++ b/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-sync-state-description.rst @@ -0,0 +1,5 @@ +You can use the :objc-sdk:`RLMSyncSession.state +`property to +check whether the Sync session is active. This property is an +:objc-sdk:`RLMSyncSessionState enum ` whose +value reflects possible Device Sync states. diff --git a/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-upload-download-progress-description.rst b/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-upload-download-progress-description.rst new file mode 100644 index 0000000000..bd72faa3fc --- /dev/null +++ b/source/includes/api-details/objectivec/sync/manage-sync-sessions-check-upload-download-progress-description.rst @@ -0,0 +1,12 @@ +.. versionchanged:: 10.50.0 + ``addProgressNotificationForDirection`` deprecated in favor of ``addSyncProgressNotificationForDirection`` + +You can add a progress notification using the RLMSyncSession instance's +:objc-sdk:`addSyncProgressNotificationForDirection:mode:block: +` +method. + +This method returns a token that you should retain until you wish +to stop observing upload or download progress. Note that if you +keep the token in a local variable, observation will stop when the +local variable goes out of scope. diff --git a/source/includes/api-details/objectivec/sync/manage-sync-sessions-get-sync-session-description.rst b/source/includes/api-details/objectivec/sync/manage-sync-sessions-get-sync-session-description.rst new file mode 100644 index 0000000000..48b6d43296 --- /dev/null +++ b/source/includes/api-details/objectivec/sync/manage-sync-sessions-get-sync-session-description.rst @@ -0,0 +1,2 @@ +You can access the :objc-sdk:`SyncSession ` +object on a synced :objc-sdk:`Realm `. diff --git a/source/includes/api-details/objectivec/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst b/source/includes/api-details/objectivec/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst new file mode 100644 index 0000000000..310d207e1a --- /dev/null +++ b/source/includes/api-details/objectivec/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst @@ -0,0 +1,5 @@ +.. versionadded:: 10.44.0 + +In Swift SDK version 10.44.0 and later, you can choose to manually trigger a +reconnect attempt with :objc-sdk:`RLMSyncSession.reconnect() +`. diff --git a/source/includes/api-details/objectivec/sync/manage-sync-sessions-pause-resume-sync-session-description.rst b/source/includes/api-details/objectivec/sync/manage-sync-sessions-pause-resume-sync-session-description.rst new file mode 100644 index 0000000000..3e9e3ee8a1 --- /dev/null +++ b/source/includes/api-details/objectivec/sync/manage-sync-sessions-pause-resume-sync-session-description.rst @@ -0,0 +1,7 @@ +You can pause a Sync session by calling :objc-sdk:`RLMSyncSession.suspend() +` on a +synced database instance. + +Call :objc-sdk:`RLMSyncSession.resume() +` to start +syncing again. diff --git a/source/includes/api-details/objectivec/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/objectivec/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..8b74e39c25 --- /dev/null +++ b/source/includes/api-details/objectivec/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,7 @@ +To wait for all changes to upload or download from your synced database, call: + +- Upload: :objc-sdk:`RLMRealm.waitForUploadCompletionOnQueue:callback: `. +- Download: :objc-sdk:`RLMRealm.waitForUploadCompletionOnQueue:callback: `. + +These methods take a callback, which they dispatch onto the specified queue +after the work item completes or the session expires. diff --git a/source/includes/api-details/swift/sync/manage-sync-sessions-check-network-connection-description.rst b/source/includes/api-details/swift/sync/manage-sync-sessions-check-network-connection-description.rst new file mode 100644 index 0000000000..c92942f313 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-sessions-check-network-connection-description.rst @@ -0,0 +1,8 @@ +To check the connection state, you can read the ``SyncSession`` instance's +:swift-sdk:`connectionState +` +property directly. + +This property is :apple:`KVO-compliant +`, +so you can observe changes using KVO or even Combine. diff --git a/source/includes/api-details/swift/sync/manage-sync-sessions-check-sync-state-description.rst b/source/includes/api-details/swift/sync/manage-sync-sessions-check-sync-state-description.rst new file mode 100644 index 0000000000..dd57eb09ad --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-sessions-check-sync-state-description.rst @@ -0,0 +1,6 @@ +You can use the :swift-sdk:`SyncSession.state +` +property to check whether the Sync session is active. This property is a +typealias for the :objc-sdk:`RLMSyncSessionState enum +` whose value reflects possible Device Sync +states. diff --git a/source/includes/api-details/swift/sync/manage-sync-sessions-check-upload-download-progress-description.rst b/source/includes/api-details/swift/sync/manage-sync-sessions-check-upload-download-progress-description.rst new file mode 100644 index 0000000000..b0a0886c51 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-sessions-check-upload-download-progress-description.rst @@ -0,0 +1,22 @@ +.. versionchanged:: 10.50.0 + ``transferredBytes`` and ``transferrableBytes`` deprecated in favor of ``progressEstimate`` + +You can check upload and download progress by registering a token that provides +a ``progressEstimate`` for a given upload or download direction and work scope. +You can set a ``ProgressMode`` to determine the work scope: either observe +indefinitely or unregister the block after the current work item has completed. + +The ``progressEstimate`` value provided by the token is a double whose value +ranges from ``0.0`` to ``1.0``. At ``1.0``, the upload or download is complete. +You can use this ``progressEstimate`` to display a progress indicator or +estimated data transfer percentage. + +You can add a progress notification using the SyncSession instance's +:swift-sdk:`addProgressNotification(for:mode:block:) +` +method. + +This method returns a token that you should retain until you wish +to stop observing upload or download progress. Note that if you +keep the token in a local variable, observation will stop when the +local variable goes out of scope. diff --git a/source/includes/api-details/swift/sync/manage-sync-sessions-get-sync-session-description.rst b/source/includes/api-details/swift/sync/manage-sync-sessions-get-sync-session-description.rst new file mode 100644 index 0000000000..339fdd378c --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-sessions-get-sync-session-description.rst @@ -0,0 +1,2 @@ +You can access the :swift-sdk:`SyncSession ` +on a synced :swift-sdk:`Realm `. diff --git a/source/includes/api-details/swift/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst b/source/includes/api-details/swift/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst new file mode 100644 index 0000000000..389c178484 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst @@ -0,0 +1,4 @@ +.. versionadded:: 10.44.0 + +In Swift SDK version 10.44.0 and later, you can choose to manually trigger a +reconnect attempt with ``SyncSession.reconnect()``. diff --git a/source/includes/api-details/swift/sync/manage-sync-sessions-pause-resume-sync-session-description.rst b/source/includes/api-details/swift/sync/manage-sync-sessions-pause-resume-sync-session-description.rst new file mode 100644 index 0000000000..c9ec0e8c5b --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-sessions-pause-resume-sync-session-description.rst @@ -0,0 +1,5 @@ +You can pause a Sync session by calling +``SyncSession.suspend()`` on the :swift-sdk:`SyncSession +` of a synced database instance. + +You can resume a Sync session with ``SyncSession.resume()``. diff --git a/source/includes/api-details/swift/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/swift/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..929c628023 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,11 @@ +To wait for all changes to upload or download from your synced database, +call :swift-sdk:`realm.syncSession?.wait(for: ) `. + +This method takes a :swift-sdk:`ProgressDirection ` +argument to specify whether to track upload or download progress. + +You can use these methods with Swift's async/await syntax, or with the +callback syntax. The callback version, +:swift-sdk:`realm.syncSession?.wait(for:queue:block:) `, +can take a queue to dispatch the callback onto, and a block to invoke when +waiting is complete. diff --git a/source/includes/api-details/typescript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst b/source/includes/api-details/typescript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst new file mode 100644 index 0000000000..aa5918a509 --- /dev/null +++ b/source/includes/api-details/typescript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst @@ -0,0 +1,20 @@ +To asynchronously wait for all changes to upload to Atlas from your synced +database, call :js-sdk:`uploadAllLocalChanges() +`. This method returns +true when all changes have been uploaded. + +.. literalinclude:: /examples/generated/node/v12/configure-and-open-synced-realm.test.snippet.wait-for-upload.ts + :language: typescript + +To asynchronously wait for all changes on Atlas to download from the +Device Sync server to your synced database, call +:js-sdk:`downloadAllServerChanges() `. +This method returns true when all changes have been downloaded. + +You can specify a request timeout on the :js-sdk:`App configuration +`. With a timeout specified, you can set +``cancelWaitsOnNonFatalErrors`` on your :js-sdk:`BaseSyncConfiguration +`. When ``true`` and the timeout interval +arrives, any any outstanding work that is awaiting uploads and downloads +cancels. When this setting is false, awaiting uploads and downloads does +not cancel because the SDK treats these timeouts as non-fatal errors. diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst new file mode 100644 index 0000000000..cfebc51b5b --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/sync-session.snippet.unregister-observation-token.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/ProgressNotifications.snippet.connection-state.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_session_test.snippet.monitor-network-connection.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.check-current-network-connection.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.check-current-network-connection.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/device-sync.snippet.check-network-connection.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ManageSyncSession.snippet.monitor-network-connection.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.check-network-connection-setup.m + :language: objectivec + + You can then attach an observer instance to the RLMSyncSession + object. Be sure to remove the observer when finished. + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.check-network-connection.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.check-network-connection.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/device-sync.snippet.check-network-connection.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst new file mode 100644 index 0000000000..d6eaa8f7f8 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/sync-session.snippet.sync-state.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst new file mode 100644 index 0000000000..f69cc86741 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_session_test.snippet.monitor-progress.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.check-progress.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.check-progress-estimate.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst new file mode 100644 index 0000000000..6e70e78649 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst @@ -0,0 +1,64 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/sync-session.snippet.sync-session.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. code-block:: javascript + + const realm = await Realm.open(config); + const syncSession = realm.syncSession; + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst new file mode 100644 index 0000000000..7c1f791acc --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/sync-session.snippet.reconnect.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_session_test.snippet.session-reconnect.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ManageSyncSession.snippet.app-sync-reconnect.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.sync-session-reconnect.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst new file mode 100644 index 0000000000..1f341e208a --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst @@ -0,0 +1,64 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/sync-session.snippet.resume.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/DataSyncExamples.snippet.pause-synced-realm.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_session_test.snippet.pause-resume-sync.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.resume-sync-session.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/SyncDataTest.snippet.resume-sync-session.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/device-sync.snippet.pause-sync-session.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ManageSyncSession.snippet.pause-resume-sync.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.pause-resume-sync-session.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.pause-resume-sync-session.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/device-sync.snippet.pause-sync-session.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst new file mode 100644 index 0000000000..cd146d9662 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/sync-session.snippet.wait-for-download.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/ProgressNotifications.snippet.wait-for-changes-to-download-async-progress-notification.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ManageSyncSession.snippet.wait-upload-download.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + + - id: swift + content: | + + **Async/Await** + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.awaitable-wait-for-upload-download.swift + :language: swift + + **Callback** + + .. literalinclude:: /examples/generated/code/start/Sync.snippet.callback-wait-for-upload-download.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/configure-and-open-synced-realm.test.snippet.wait-for-download.ts + :language: typescript diff --git a/source/includes/when-to-pause-sync.rst b/source/includes/when-to-pause-sync.rst deleted file mode 100644 index e89c39b836..0000000000 --- a/source/includes/when-to-pause-sync.rst +++ /dev/null @@ -1,36 +0,0 @@ -For most applications, there is no need to manually pause and resume a sync -session. However, there are a few circumstances under which you may want to -pause or suspend a sync session: - -- You only want to sync after the user takes a specific action -- You only want to sync during a certain time of the day -- You don't want to attempt to sync when there is poor network connectivity -- You want to explicitly force a sync session to connect - -In the case of poor network connectivity, continually trying to establish -a network connection can drain the user's device battery. - -The case of explicitly forcing a sync session to connect is most commonly -related to being offline for some time. The sync client attempts to -connect, and upon failure, goes into exponential backoff. After being offline -for a long time, the client may not immediately reconnect. Pausing and -resuming the sync session explicitly forces the connection. - -When you do pause a sync session, keep these things in mind: - -- If the client may be offline longer than the :ref:`client maximum offline - time `, the client will be unable to resume - syncing and must perform a :ref:`client reset `. -- Pausing a sync session pauses it in both directions. Changes that your app - makes on the device do not sync with the backend, *and* changes to the - data in the backend or on other devices do not sync to the device. There - is no way to pause only uploads or pause only downloads. -- Do not pause a sync session if you want a client to permanently stop - syncing with the backend. To permanently stop syncing, - copy the contents of the synced realm into a non-synced - realm, and use the non-synced realm in the client. - -*Do not* pause sync to stop syncing for indefinite time periods or time -ranges in months and years. The functionality is not designed or tested -for these use cases. You could encounter a range of issues when using it -this way. diff --git a/source/sdk/sync/manage-sync-sessions.txt b/source/sdk/sync/manage-sync-sessions.txt index 49254167b0..3168fee8c7 100644 --- a/source/sdk/sync/manage-sync-sessions.txt +++ b/source/sdk/sync/manage-sync-sessions.txt @@ -6,21 +6,527 @@ Manage Sync Sessions .. meta:: :description: Access the Sync session to check network connection, wait for uploads and downloads, and check Sync progress. - :keywords: code example + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example .. facet:: :name: genre :values: reference +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for information about managing sync sessions. +.. tabs-selector:: drivers + +Opening a synced database starts a Sync session for that database. +Atlas Device SDK provides methods to: + +- Check the network connection state. +- Manually pause and resume a Sync session. +- Wait for changes to upload or download. +- Check upload or download progress. +- Manually reconnect Sync sessions after a device has been offline. + +You can also define the Sync connection behavior. App Services defaults to +sharing a single connection to the server for all opened synced databases. +The connection to the server is independent of the Sync session, and is based +on the App Services user. + +You can change the Sync connection behavior from the :ref:`App client +configuration `. + +.. _sdks-access-sync-session: + +Get the Sync Session +-------------------- + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-sessions-get-sync-session-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-sessions-get-sync-session-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-sessions-get-sync-session-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-get-sync-session-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-get-sync-session-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-get-sync-session-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-sessions-get-sync-session-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/manage-sync-sessions-get-sync-session-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-sessions-get-sync-session-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-get-sync-session-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst + +.. _sdks-check-network-connection: + +Check the Network Connection +---------------------------- + +The SDK's *offline-first* design means that you generally don't need to check +the current network connection state. However, the SDK provides a connection +state property if your app calls for some indication of connection state. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-sessions-check-network-connection-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-sessions-check-network-connection-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-sessions-check-network-connection-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-check-network-connection-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-check-network-connection-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-check-network-connection-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-sessions-check-network-connection-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/manage-sync-sessions-check-network-connection-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-sessions-check-network-connection-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-check-network-connection-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst + +.. _sdks-check-sync-state: + +Check the Sync State +-------------------- + +You can check the state of the Sync session itself to determine whether the +sync session is active. The Sync connection state is distinct from the network +connection state. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-sessions-check-sync-state-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-sessions-check-sync-state-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-sessions-check-sync-state-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-check-sync-state-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-check-sync-state-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-check-sync-state-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-sessions-check-sync-state-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/manage-sync-sessions-check-sync-state-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-sessions-check-sync-state-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-check-sync-state-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst .. _sdks-pause-resume-sync: Pause or Resume a Sync Session ------------------------------ + +You can pause and resume the sync session on the database. Pausing a sync +session only suspends that database's sync session. If you have more than one +open database, and you have enabled multiple sync sessions, pausing one sync +session does not affect the sync sessions for other databases. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-sessions-pause-resume-sync-session-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-sessions-pause-resume-sync-session-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-pause-resume-sync-session-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-pause-resume-sync-session-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-sessions-pause-resume-sync-session-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/manage-sync-sessions-pause-resume-sync-session-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-sessions-pause-resume-sync-session-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-pause-resume-sync-session-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst + +When to Pause a Sync Session +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +For most applications, there is no need to manually pause and resume a sync +session. However, there are a few circumstances under which you may want to +pause or suspend a sync session: + +- You only want to sync after the user takes a specific action +- You only want to sync during a certain time of the day +- You don't want to attempt to sync when there is poor network connectivity +- You want to force the SDK to re-evaluate the user's permissions after making + a permissions-related change + +In the case of poor network connectivity, continually trying to establish +a network connection can drain the user's device battery. + +The case of explicitly forcing a sync session to connect is most commonly +related to being offline for some time. The sync client attempts to +connect, and upon failure, goes into exponential backoff. After being offline +for a long time, the client may not immediately reconnect. Pausing and +resuming the sync session explicitly forces the connection. + +When you do pause a sync session, keep these things in mind: + +- If the client may be offline longer than the :ref:`client maximum offline + time `, the client will be unable to resume + syncing and must perform a :ref:`client reset `. +- Pausing a sync session pauses it in both directions. Changes that your app + makes on the device do not sync with the backend, *and* changes to the + data in the backend or on other devices do not sync to the device. There + is no way to pause only uploads or pause only downloads. +- Do not pause a sync session if you want a client to permanently stop + syncing with the backend. To permanently stop syncing, + copy the contents of the synced database into a non-synced + database, and use the non-synced database in the client. + +*Do not* pause sync to stop syncing for indefinite time periods or time +ranges in months and years. The functionality is not designed or tested +for these use cases. You could encounter a range of issues when using it +this way. + +.. _sdks-sync-session-wait-for-changes: + +Wait for Changes to Upload or Download +-------------------------------------- + +You can wait for changes to upload or download. You might want to wait for +changes to upload or download before you close a synced database, pause a +Sync session, or change Sync subscriptions. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst + +.. _sdks-check-upload-and-download-progress: + +Check Upload and Download Progress +---------------------------------- + +You can check the upload and download progress for a Sync session. You might +want to check upload or download progress when you want to provide a progress +estimate indicator in your app's user interface. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-sessions-check-upload-download-progress-description.rst + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-check-upload-download-progress-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-sessions-check-upload-download-progress-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/manage-sync-sessions-check-upload-download-progress-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-sessions-check-upload-download-progress-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-check-upload-download-progress-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst + +.. _sdks-reconnect-sync-sessions: + +Manually Reconnect All Sync Sessions +------------------------------------ + +The SDK automatically detects when a device regains connectivity after being +offline and attempts to reconnect using an incremental backoff strategy. +For example, on Apple platforms, the SDK listens for network change +notifications and automatically triggers a reconnect immediately after +receiving one. + +You can choose to manually trigger a reconnect attempt with with the reconnect +method instead of waiting for the duration of the incremental backoff. This is +useful if you have a more accurate understanding of the network conditions +and don't want to rely on the SDK's automatic reconnect detection. + +When you call this method, the SDK forces all sync sessions to *attempt* to +reconnect immediately. This resets any timers used for incremental +backoff. + +Calling this method does not guarantee the device can reconnect. If the SDK +gets a fatal error, or if the device is already connected or is trying to +connect, calling this method has no effect. + +.. important:: Cannot Reconnect Within Socket Read Timeout Duration + + The SDK has an internal default socket read timeout of 2 minutes. The + SDK times out if a read operation does not receive any data within a + 2-minute window. If you call the reconnect method within that window, the + SDK does *not* attempt to reconnect. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-manually-reconnect-sync-sessions-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-sessions-manually-reconnect-sync-sessions-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-sessions-manually-reconnect-sync-sessions-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst + From 1021196a4388e4bd63ae1953698d4a0bc783daab Mon Sep 17 00:00:00 2001 From: Dachary Date: Thu, 11 Jul 2024 13:08:08 -0400 Subject: [PATCH 42/63] (DOCSP-39536): Consolidate Write Data to a Synced Database page (#3286) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39536 *Staged Page* - [Write to a Synced Database](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39536/sdk/sync/write-to-synced-database/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Write to a Synced Realm](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/sync/write-to-synced-realm/) - [Flutter: Write Data to a Synced Realm](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/sync/write-to-synced-realm/) - [Kotlin: Write to a Synced Realm](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/sync/write-to-synced-realm/) - [.NET: Write to a Synced Realm](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/sync/write-to-synced-realm/) - [Swift: Write Data to a Synced Realm](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/sync/write-to-synced-realm/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --- ...ng-write-error-information-description.rst | 38 ++ ...ng-write-error-information-description.rst | 13 + ...ng-write-error-information-description.rst | 14 + ...ng-write-error-information-description.rst | 14 + ...ng-write-error-information-description.rst | 38 ++ ...ng-write-error-information-description.rst | 44 +++ ...ng-write-error-information-description.rst | 14 + ...ent-data-model-and-configuration-model.rst | 44 +++ ...a-model-and-configuration-subscription.rst | 45 +++ ...e-to-synced-database-successful-writes.rst | 44 +++ ...es-dont-match-permissions-code-example.rst | 88 +++++ ...s-dont-match-subscription-code-example.rst | 87 +++++ source/sdk/sync.txt | 2 +- .../configure-and-open-synced-database.txt | 5 + source/sdk/sync/write-to-synced-database.txt | 364 +++++++++++++++++- 15 files changed, 852 insertions(+), 2 deletions(-) create mode 100644 source/includes/api-details/cpp/sync/write-to-synced-database-compensating-write-error-information-description.rst create mode 100644 source/includes/api-details/csharp/sync/write-to-synced-database-compensating-write-error-information-description.rst create mode 100644 source/includes/api-details/dart/sync/write-to-synced-database-compensating-write-error-information-description.rst create mode 100644 source/includes/api-details/javascript/sync/write-to-synced-database-compensating-write-error-information-description.rst create mode 100644 source/includes/api-details/kotlin/sync/write-to-synced-database-compensating-write-error-information-description.rst create mode 100644 source/includes/api-details/swift/sync/write-to-synced-database-compensating-write-error-information-description.rst create mode 100644 source/includes/api-details/typescript/sync/write-to-synced-database-compensating-write-error-information-description.rst create mode 100644 source/includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-model.rst create mode 100644 source/includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-subscription.rst create mode 100644 source/includes/sdk-examples/sync/write-to-synced-database-successful-writes.rst create mode 100644 source/includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-permissions-code-example.rst create mode 100644 source/includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-subscription-code-example.rst diff --git a/source/includes/api-details/cpp/sync/write-to-synced-database-compensating-write-error-information-description.rst b/source/includes/api-details/cpp/sync/write-to-synced-database-compensating-write-error-information-description.rst new file mode 100644 index 0000000000..13cba88e63 --- /dev/null +++ b/source/includes/api-details/cpp/sync/write-to-synced-database-compensating-write-error-information-description.rst @@ -0,0 +1,38 @@ +The :cpp-sdk:`compensating_writes_info() +` +function provides an array of ``compensating_write_error_info`` +structs that contain: + +- The ``object_name`` of the object the client attempted to write +- The ``primary_key`` of the specific object +- The ``reason`` for the compensating write error + +This information is the same information you can find in the +:ref:`App Services logs `. The C++ SDK exposes this object on the +client for convenience and debugging purposes. + +The following shows an example of how you might log information +about compensating write errors: + +.. io-code-block:: + + .. input:: /examples/generated/cpp/sync-errors.snippet.get-compensating-write-error-info.cpp + :language: cpp + + .. output:: + :language: console + + A write was rejected with a compensating write error. + An object of type Item + was rejected because write to ObjectID("6557ddb0bf050934870ca0f5") in + table "Item" not allowed; object is outside of the current query view. + +- The ``Item`` in this message is ``Item`` object used in the object model. +- The ``table "Item"`` refers to the Atlas collection where this object would + sync. +- The reason ``object is outside of the current query view`` in this message + is because the query subscription was set to require the object's ``complexity`` + property to be less than or equal to ``4``. The client attempted to write an + object outside of this boundary. +- The primary key is the ``objectId`` of the specific object the client + attempted to write. diff --git a/source/includes/api-details/csharp/sync/write-to-synced-database-compensating-write-error-information-description.rst b/source/includes/api-details/csharp/sync/write-to-synced-database-compensating-write-error-information-description.rst new file mode 100644 index 0000000000..1188cbfd8b --- /dev/null +++ b/source/includes/api-details/csharp/sync/write-to-synced-database-compensating-write-error-information-description.rst @@ -0,0 +1,13 @@ +The .NET SDK exposes a ``CompensatingWrites`` field on a +:dotnet-sdk:`CompensatingWriteException `. +You can access this information through the :ref:`Sync error handler +`. + +When a ``CompensatingWriteException`` is thrown, it includes an enumerable of +:dotnet-sdk:`CompensatingWriteInfo ` +objects. Each ``CompensatingWriteInfo`` object contains properties that describe +the object type, its primary key, and reason the server performed the compensating +write. + +This information is the same information you can find in the App Services logs. +It is exposed on the client for convenience and debugging purposes. diff --git a/source/includes/api-details/dart/sync/write-to-synced-database-compensating-write-error-information-description.rst b/source/includes/api-details/dart/sync/write-to-synced-database-compensating-write-error-information-description.rst new file mode 100644 index 0000000000..40be59629f --- /dev/null +++ b/source/includes/api-details/dart/sync/write-to-synced-database-compensating-write-error-information-description.rst @@ -0,0 +1,14 @@ +The Flutter SDK exposes a ``compensatingWrites`` field on a +:flutter-sdk:`CompensatingWriteError `. +You can access this information through the :ref:`Sync error handler +`. + +This field contains an array of :flutter-sdk:`CompensatingWriteInfo +` objects, which provide: + +- The ``objectType`` of the object the client attempted to write +- The ``primaryKey`` of the specific object +- The ``reason`` for the compensating write error + +This information is the same information you can find in the App Services logs. +It is exposed on the client for convenience and debugging purposes. diff --git a/source/includes/api-details/javascript/sync/write-to-synced-database-compensating-write-error-information-description.rst b/source/includes/api-details/javascript/sync/write-to-synced-database-compensating-write-error-information-description.rst new file mode 100644 index 0000000000..44ff4b105b --- /dev/null +++ b/source/includes/api-details/javascript/sync/write-to-synced-database-compensating-write-error-information-description.rst @@ -0,0 +1,14 @@ +The Node.js SDK exposes a ``writes`` field on a +:js-sdk:`CompensatingWriteError `. +You can access this information through the :ref:`Sync error handler +`. + +This field contains an array of :js-sdk:`CompensatingWriteInfo +` objects, which provide: + +- The ``objectName`` of the object the client attempted to write +- The ``primaryKey`` of the specific object +- The ``reason`` for the compensating write error + +This information is the same information you can find in the App Services logs. +It is exposed on the client for convenience and debugging purposes. diff --git a/source/includes/api-details/kotlin/sync/write-to-synced-database-compensating-write-error-information-description.rst b/source/includes/api-details/kotlin/sync/write-to-synced-database-compensating-write-error-information-description.rst new file mode 100644 index 0000000000..52fd806229 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/write-to-synced-database-compensating-write-error-information-description.rst @@ -0,0 +1,38 @@ +The :kotlin-sync-sdk:`CompensatingWriteInfo +` +object provides: + +- The ``objectType`` of the object the client attempted to write +- The ``primaryKey`` of the specific object +- The ``reason`` for the compensating write error + +This information is the same information you can find in the :ref:`App Services +logs `. The Kotlin SDK exposes this object on the client for +convenience and debugging purposes. + +The following shows an example of how you might log information +about compensating write errors: + +.. io-code-block:: + + .. input:: /examples/generated/kotlin/SyncedRealmCRUD.snippet.access-compensating-write.kt + :language: kotlin + + .. output:: + :language: console + + A write was rejected with a compensating write error + The write to object type: Item + With primary key of: RealmAny{type=OBJECT_ID, value=BsonObjectId(649f2c38835cc0346b861b74)} + Was rejected because: write to "649f2c38835cc0346b861b74" in table "Item" not allowed; object is outside of the current query view + +- The ``Item`` in this message is ``Item`` object used in the object model on + this page. +- The primary key is the ``objectId`` of the specific object the client + attempted to write. +- The ``table "Item"`` refers to the Atlas collection where this object would + sync. +- The reason ``object is outside of the current query view`` in this example is + because the query subscription was set to require the object's ``complexity`` + property to be less than or equal to ``4``, and the client attempted to + write an object outside of this boundary. diff --git a/source/includes/api-details/swift/sync/write-to-synced-database-compensating-write-error-information-description.rst b/source/includes/api-details/swift/sync/write-to-synced-database-compensating-write-error-information-description.rst new file mode 100644 index 0000000000..17f548bcf2 --- /dev/null +++ b/source/includes/api-details/swift/sync/write-to-synced-database-compensating-write-error-information-description.rst @@ -0,0 +1,44 @@ +The Swift SDK exposes a :swift-sdk:`compensatingWriteInfo +` field on a +SyncError whose code is ``.writeRejected``. You can access this information +through the :ref:`Sync error handler `. + +This field contains an array of :objc-sdk:`RLMCompensatingWriteInfo +` objects, which provide: + +- The ``objectType`` of the object the client attempted to write +- The ``primaryKey`` of the specific object +- The ``reason`` for the compensating write error + +This information is the same information you can find in the App Services logs. +It is exposed on the client for convenience and debugging purposes. + +.. example:: + + This error handler shows an example of how you might log information + about compensating write errors: + + .. literalinclude:: /examples/generated/code/start/Errors.snippet.access-compensating-write.swift + :language: swift + + The example error handler above produces this output when a compensating + write error occurs: + + .. code-block:: console + + A write was rejected with a compensating write error + The write to object type: Optional("Item") + With primary key of: objectId(641382026852d9220b2e2bbf) + Was rejected because: Optional("write to \"641382026852d9220b2e2bbf\" in table \"Item\" not + allowed; object is outside of the current query view") + + - The ``Optional("Item")`` in this message is an ``Item`` object used in the + :github:`Swift Template App `. + - The primary key is the ``objectId`` of the specific object the client + attempted to write. + - The ``table \"Item"\`` refers to the Atlas collection where this object + would sync. + - The reason ``object is outside of the current query view`` in this example + is because the query subscription was set to require the object's ``isComplete`` + property to be ``true``, and the client attempted to write an object where + this property was ``false``. diff --git a/source/includes/api-details/typescript/sync/write-to-synced-database-compensating-write-error-information-description.rst b/source/includes/api-details/typescript/sync/write-to-synced-database-compensating-write-error-information-description.rst new file mode 100644 index 0000000000..44ff4b105b --- /dev/null +++ b/source/includes/api-details/typescript/sync/write-to-synced-database-compensating-write-error-information-description.rst @@ -0,0 +1,14 @@ +The Node.js SDK exposes a ``writes`` field on a +:js-sdk:`CompensatingWriteError `. +You can access this information through the :ref:`Sync error handler +`. + +This field contains an array of :js-sdk:`CompensatingWriteInfo +` objects, which provide: + +- The ``objectName`` of the object the client attempted to write +- The ``primaryKey`` of the specific object +- The ``reason`` for the compensating write error + +This information is the same information you can find in the App Services logs. +It is exposed on the client for convenience and debugging purposes. diff --git a/source/includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-model.rst b/source/includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-model.rst new file mode 100644 index 0000000000..ae9c9600fc --- /dev/null +++ b/source/includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-model.rst @@ -0,0 +1,44 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/sync-errors.snippet.compensating-write-model.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/write_to_synced_realm_test.snippet.realm-model.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncedRealmCRUD.snippet.flexible-sync-crud-model.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/SyncedRealmCRUD.snippet.flexible-sync-crud-model.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-subscription.rst b/source/includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-subscription.rst new file mode 100644 index 0000000000..0670363c69 --- /dev/null +++ b/source/includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-subscription.rst @@ -0,0 +1,45 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/sync-errors.snippet.compensating-write-setup.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.example_sub.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/write_to_synced_realm_test.snippet.subscription-setup.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncedRealmCRUD.snippet.flexible-sync-subscription-setup.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/SyncedRealmCRUD.snippet.flexible-sync-subscription-setup.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/write-to-synced-database-successful-writes.rst b/source/includes/sdk-examples/sync/write-to-synced-database-successful-writes.rst new file mode 100644 index 0000000000..0b9be914ce --- /dev/null +++ b/source/includes/sdk-examples/sync/write-to-synced-database-successful-writes.rst @@ -0,0 +1,44 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/sync-errors.snippet.successful-write-example.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/write_to_synced_realm_test.snippet.write-synced-realm.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncedRealmCRUD.snippet.successful-write.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/SyncedRealmCRUD.snippet.successful-write.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-permissions-code-example.rst b/source/includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-permissions-code-example.rst new file mode 100644 index 0000000000..d063b5c80c --- /dev/null +++ b/source/includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-permissions-code-example.rst @@ -0,0 +1,88 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. io-code-block:: + + .. input:: /examples/generated/cpp/sync-errors.snippet.write-not-matching-permissions.cpp + :language: cpp + + .. output:: + :language: console + + Connection[2]: Session[11]: Received: ERROR "Client attempted a + write that is not allowed; it has been reverted" (error_code=231, + is_fatal=false, error_action=Warning) + + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. io-code-block:: + + .. input:: /examples/generated/flutter/write_to_synced_realm_test.snippet.not-match-permissions.dart + :language: dart + + .. output:: + :language: console + + [INFO] Realm: Connection[1]: Session[1]: Received: ERROR "Client attempted + a write that is outside of permissions or query filters; it has been reverted" + (error_code=231, try_again=true, error_action=Warning) + [INFO] Realm: Connection[1]: Session[1]: Reporting compensating write + for client version 25 in server version 2879: Client attempted a write that + is outside of permissions or query filters; it has been reverted + [ERROR] Realm: SyncSessionError message: Client attempted a write that + is outside of permissions or query filters; it has been reverted + Logs: https://services.cloud.mongodb.com/groups/5f60207f14dfb25d23101102/apps/639340a757271cb5e3a0f0cf/logs?co_id=6424433efb0c6bbcc330347c + category: SyncErrorCategory.session code: SyncSessionErrorCode.compensatingWrite isFatal: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/SyncedRealmCRUD.snippet.write-outside-permissions.kt + :language: kotlin + + .. output:: + :language: console + + [Session][CompensatingWrite(231)] Client attempted a write that + is disallowed by permissions, or modifies an object outside the + current query, and the server undid the change. + + - id: swift + content: | + + .. io-code-block:: + + .. input:: /examples/generated/code/start/SyncedRealmCRUD.snippet.write-outside-permissions.swift + :language: swift + + .. output:: + :language: console + + Sync: Connection[1]: Session[1]: Received: ERROR "Client attempted a + write that is outside of permissions or query filters; it has been + reverted" (error_code=231, try_again=true, error_action=Warning) + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-subscription-code-example.rst b/source/includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-subscription-code-example.rst new file mode 100644 index 0000000000..7f369795ba --- /dev/null +++ b/source/includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-subscription-code-example.rst @@ -0,0 +1,87 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. io-code-block:: + + .. input:: /examples/generated/cpp/sync-errors.snippet.compensating-write-example.cpp + :language: cpp + + .. output:: + :language: console + + Connection[2]: Session[10]: Received: ERROR "Client attempted a + write that is not allowed; it has been reverted" (error_code=231, + is_fatal=false, error_action=Warning) + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. io-code-block:: + + .. input:: /examples/generated/flutter/write_to_synced_realm_test.snippet.not-match-query-subscription.dart + :language: dart + + .. output:: + :language: console + + [INFO] Realm: Connection[1]: Session[1]: Received: ERROR "Client attempted + a write that is outside of permissions or query filters; it has been reverted" + (error_code=231, try_again=true, error_action=Warning) + [INFO] Realm: Connection[1]: Session[1]: Reporting compensating write + for client version 21 in server version 2877: Client attempted a write that + is outside of permissions or query filters; it has been reverted + [ERROR] Realm: SyncSessionError message: Client attempted a write that + is outside of permissions or query filters; it has been reverted + Logs: https://services.cloud.mongodb.com/groups/5f60207f14dfb25d23101102/apps/639340a757271cb5e3a0f0cf/logs?co_id=6424433efb0c6bbcc330347c + category: SyncErrorCategory.session code: SyncSessionErrorCode.compensatingWrite isFatal: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/SyncedRealmCRUD.snippet.write-outside-flexible-sync-query.kt + :language: kotlin + + .. output:: + :language: console + + [Session][CompensatingWrite(231)] Client attempted a write that + is disallowed by permissions, or modifies an object outside the + current query, and the server undid the change. + + - id: swift + content: | + + .. io-code-block:: + + .. input:: /examples/generated/code/start/SyncedRealmCRUD.snippet.write-outside-flexible-sync-query.swift + :language: swift + + .. output:: + :language: console + + Sync: Connection[1]: Session[1]: Received: ERROR "Client attempted a + write that is outside of permissions or query filters; it has been + reverted" (error_code=231, try_again=true, error_action=Warning) + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript diff --git a/source/sdk/sync.txt b/source/sdk/sync.txt index 997bbf8942..fd9777ff90 100644 --- a/source/sdk/sync.txt +++ b/source/sdk/sync.txt @@ -16,7 +16,7 @@ Sync Data Add Sync to an App Configure & Open a Synced Database Manage Sync Subscriptions - Write to a Synced Realm + Write to a Synced Database Handle Sync Errors Manage Sync Sessions Stream Data to Atlas diff --git a/source/sdk/sync/configure-and-open-synced-database.txt b/source/sdk/sync/configure-and-open-synced-database.txt index d073d7040d..e67848c7dc 100644 --- a/source/sdk/sync/configure-and-open-synced-database.txt +++ b/source/sdk/sync/configure-and-open-synced-database.txt @@ -24,3 +24,8 @@ Placeholder page for configuring and opening a synced database. Download Changes Before Open ---------------------------- + +.. _sdks-synced-dbs-vs-non-synced-dbs: + +Synced Databases vs. Non-Synced Databases +----------------------------------------- diff --git a/source/sdk/sync/write-to-synced-database.txt b/source/sdk/sync/write-to-synced-database.txt index e351da49c4..d9efc5bdca 100644 --- a/source/sdk/sync/write-to-synced-database.txt +++ b/source/sdk/sync/write-to-synced-database.txt @@ -4,10 +4,372 @@ Write Data to a Synced Database =============================== +.. meta:: + :description: Atlas Device SDK uses a combination of server-side permissions and Sync subscription to validate what data users can write to a synced database. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, javascript/typescript, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 3 :class: singlecol -Placeholder page for information about writing to a synced realm. +.. tabs-selector:: drivers + +When writing data to a synced database using Device Sync, you can use the +same APIs as writing to a non-synced database. However, there are some +differences in behavior to keep in mind as you develop your application. + +When you write to a synced database, your write operations must match *both* +of the following: + +- **The sync subscription query.** + - If your write operation doesn't match the query in the subscription, + the write reverts with a non-fatal compensating write error. +- **The permissions** in your App Services App. + - If your try to write data that doesn't match the permissions expression, + the write reverts with a non-fatal permission denied error. In the client, + this shows as a compensating write error. On the server, you can see more + details about how the write was denied was by a write filter in the role. + - To learn more about configuring permissions for your app, see + :ref:`sync-rules` and the :ref:`flexible-sync-permissions-guide` in the + App Services documentation. + +.. warning:: Multi-Process Sync is Not Supported + + Device Sync does not currently support opening or writing to a synced + database from more than one process. For more information, including + suggested alternatives, refer to: :ref:`multiprocess-sync-not-supported`. + +Determining What Data Syncs +--------------------------- + +The data that you can write to a synced database is the intersection of: + +- Your Device Sync configuration. +- Your Atlas server-side permissions. +- The Sync subscription query that you use when you open the database. + +The examples on this page use the following configurations and models: + +App Services Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Device Sync is configured with the following queryable fields: + +- ``_id`` (always included) +- ``complexity`` +- ``ownerId`` + +The App Services App has permissions configured to let users read and write +only their own data: + +.. code-block:: json + + { + "name": "owner-read-write", + "apply_when": {}, + "document_filters": { + "read": { "ownerId": "%%user.id" }, + "write": { "ownerId": "%%user.id" } + }, + "read": true, + "write": true + } + +Client Data Model and Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The examples on this page use the following object model: + +.. include:: /includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-model.rst + +Using that object model, the synced database configuration syncs objects that +match the subscription query where the ``complexity`` property's value +is less than or equal to ``4``: + +.. include:: /includes/sdk-examples/sync/write-to-synced-database-client-data-model-and-configuration-subscription.rst + +What Data Syncs? +~~~~~~~~~~~~~~~~ + +The subscription query combined with the permissions mean that the synced +database only syncs objects where: + +- The ``ownerId`` matches the user ID of the logged-in user (from the + permissions) +- The ``complexity`` property's value is less than or equal to ``4`` (from the + subscription query) + +Any object in the Atlas collection where the ``ownerId`` does not match +the user ID of the logged-in user, or the ``complexity`` property's +value is greater than ``4``, cannot sync to this database. + +Write to a Synced Database +-------------------------- + +Writes to synced databases may broadly fall into one of two categories: + +- **Successful writes**: The written object matches both the query subscription + and the user's permissions. The object writes successfully to the database, + and syncs successfully to the App Services backend and other devices. + +- **Compensating writes**: When the written object does not match + the subscription query, or where the user does not have sufficient + permissions to perform the write, the SDK reverts the illegal write. + +.. _sdks-successful-writes: + +Successful Writes +~~~~~~~~~~~~~~~~~ + +When the write matches both the :ref:`permissions ` and the +:ref:`Sync subscription query ` in the client, +the SDK can successfully write the object to the synced database. This object +syncs with the App Services backend when the device has a network connection. + +.. include:: /includes/sdk-examples/sync/write-to-synced-database-successful-writes.rst + +.. _sdks-compensating-writes: + +Compensating Writes +~~~~~~~~~~~~~~~~~~~ + +In some cases, a write that initially appears to succeed is actually an +illegal write. In these cases, the object writes to the database, but when +the database syncs to the backend, the SDK reverts the write in a non-fatal +error operation called a compensating write. Compensating writes can occur +when: + +- **Writes don't match the query subscription**: The written object matches + the user's permissions, but does not match the query subscription. +- **Writes don't match permissions**: The written object matches the query + subscription, but does not match the user's permissions. + +In more detail, when you write data that is outside the bounds of a query +subscription or does not match the user's permissions, the following occurs: + +#. Because the client database has no concept of "illegal" writes, + the write initially succeeds until the SDK resolves the changeset + with the App Services backend. +#. Upon sync, the server applies the rules and permissions. + The server determines that the user does not have authorization to perform + the write. +#. The server sends a revert operation, called a "compensating write", back to + the client. +#. The client's database reverts the illegal write operation. + +Any client-side writes to a given object between an illegal write to that object +and the corresponding compensating write will be lost. + +In practice, this may look like an object being written to the database, and +then disappearing after the server sends the compensating write back to +the client. + +To learn more about permission denied errors, compensating write errors +and other Device Sync error types, refer to :ref:`sync-errors` in the App +Services documentation. + +The :ref:`App Services logs ` contain more information about +why a compensating write error occurs. + +Compensating Write Error Information +```````````````````````````````````` + +You can get additional information in the client about why a compensating +write occurs. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/write-to-synced-database-compensating-write-error-information-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/write-to-synced-database-compensating-write-error-information-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/write-to-synced-database-compensating-write-error-information-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/write-to-synced-database-compensating-write-error-information-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/write-to-synced-database-compensating-write-error-information-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/write-to-synced-database-compensating-write-error-information-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/sync/write-to-synced-database-compensating-write-error-information-description.rst + +.. _sdks-writes-outside-subscription: + +Writes That Don't Match the Query Subscription +`````````````````````````````````````````````` + +You can only write objects to a synced database if they match the +subscription query. If you perform a write that does not match the +subscription query, the SDK initially writes the object, but then performs +a compensating write. This is a non-fatal operation that +reverts an illegal write that does not match the subscription query. + +In practice, this may look like the write succeeding, but then the +object "disappears" when the SDK syncs with the App Services backend and +performs the compensating write. + +If you want to write an object that does not match the query subscription, +you must open a different database where the object matches the query +subscription. Alternately, you could write the object to a :ref:`non-synced +database ` that does not enforce +permissions or subscription queries. + +Code Example +++++++++++++ + +Given the configuration for the synced database above, attempting to +write this object does not match the query subscription: + +.. include:: /includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-subscription-code-example.rst + +App Services Error +++++++++++++++++++ + +The error message in the App Services logs in this scenario is: + +.. code-block:: console + + "Item": { + "63bdfc40f16be7b1e8c7e4b7": "write to \"63bdfc40f16be7b1e8c7e4b7\" + in table \"Item\" not allowed; object is outside of + the current query view" + } + +.. _sdks-writes-outside-permissions: + +Writes That Don't Match Permissions +``````````````````````````````````` + +Attempting to write to the client can also trigger a compensating write +error when the object does not match the user's server-side write permissions. + +On the client, this type of write behaves the same as a write that doesn't +match the query subscription. In practice, this may look like the write +succeeding, but then the object "disappears" when the database syncs with the +App Services backend and performs the compensating write. + +Code Example +++++++++++++ + +Given the permissions in the Device Sync Configuration detailed above, +attempting to write an object where the ``ownerId`` property does not match +the ``user.id`` of the logged-in user is not a legal write: + +.. include:: /includes/sdk-examples/sync/write-to-synced-database-writes-dont-match-permissions-code-example.rst + +App Services Error +++++++++++++++++++ + +The error message in the App Services logs provides some additional +information to help you determine that it is a permissions issue, +and not a query subscription issue. In this example, the error message shows +that the the object does not match the user's role: + +.. code-block:: console + + "Item": { + "63bdfc40f16be7b1e8c7e4b8": "write to \"63bdfc40f16be7b1e8c7e4b8\" + in table \"Item\" was denied by write filter in role + \"owner-read-write\"" + } + +Group Writes for Improved Performance +------------------------------------- + +.. include:: /includes/sync-memory-performance.rst + +.. _multiprocess-sync-not-supported: + +Multi-Process Sync Not Supported +-------------------------------- + +If you are developing an app that may attempt to use a synced database in more +than one process, such as an Apple device application using a Share +Extension, avoid writing to a synced database in the additional process. +Device Sync supports opening a synced database in at most one process. In +practice, this means that if your app uses a synced database in an additional +process, it may crash intermittently. + +Crashes Related to Opening a Synced Database in Multiple Processes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you attempt to open a synced database in a Share Extension or other +multiple-process use case, and that database is not already open in the main +app, a write from a Share Extension may succeed. However, if the synced +database is already open in the main app, or is syncing data in the background, +you may see a crash related to ``Realm::MultiSyncAgents``. In this scenario, +you may need to restart the device. + +Alternatives to Writing to a Synced Database in Multiple Processes +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you need to read from or write to a synced database in more than one +process, there are a few recommended alternatives: + +- **Offline-first**: pass data on disk to or from the main process or main app +- **Always up-to-date**: communicate directly with the backing + Atlas collection across a network connection + +Pass Data On Disk +````````````````` + +If offline-first functionality is the most important consideration for your app, +you can pass data on disk to or from your main app. In an Apple ecosystem, for +example, you could copy objects to a non-synced database and read and share +it between apps in an App Group. Or you could use an on-disk queue to send the +data to or from the main app and only write to the synced database from there. +Then, regardless of the device's network connectivity, information can be +shared any time to or from the App Extension. + +Communicate Directly with the Backing Atlas Collection +`````````````````````````````````````````````````````` + +If having the information always up-to-date across all devices is the most +important consideration for your app, you can read or write data directly +to or from the backing Atlas collection across the network. Depending on your +needs, you may want to use one of these tools to communicate directly with +Atlas: + +- Query Atlas with the :ref:`the SDK MongoClient ` +- Pass data to an :ref:`App Services Function ` +- Make HTTPS calls with the :ref:`Data API ` + +Then, any device that has a network connection is always getting the most +up-to-date information, without waiting for the user to open your main app +as in the option above. + +This option does require your user's device to have a network connection +when using the secondary process. As a fallback, you could check for a network +connection. Then, use the on-disk option above in the event that the user's +device lacks network connectivity. From 81be17cca4da0f4670b4ccc17c3a0f9617a2c0e8 Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 12 Jul 2024 17:16:43 -0400 Subject: [PATCH 43/63] (DOCSP-39503): Consolidate Relationships page (#3287) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39503 *Staged Page* - [Relationships](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39503/sdk/model-data/relationships/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/model-data/relationships/) - [Flutter: Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/relationships/) - [Java: Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/relationships/) - [Kotlin: Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/schemas/relationships/) - [.NET: Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/relationships/) - [Node.js: Relationships and Embedded Objects](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/relationships-and-embedded-objects/) - [Swift: Relationships](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/model-data/relationships/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --- ...ships-inverse-relationship-description.rst | 7 + ...ships-inverse-relationship-description.rst | 18 ++ ...ships-inverse-relationship-description.rst | 6 + ...ships-inverse-relationship-description.rst | 9 + ...ships-inverse-relationship-description.rst | 28 ++++ ...ships-inverse-relationship-description.rst | 13 ++ ...ships-inverse-relationship-description.rst | 7 + ...ships-inverse-relationship-description.rst | 4 + ...ships-inverse-relationship-description.rst | 28 ++++ ...-to-one-relationships-must-be-optional.rst | 5 - .../relationships-inverse-relationship.rst | 61 +++++++ .../relationships-to-many-relationship.rst | 61 +++++++ .../relationships-to-one-relationship.rst | 61 +++++++ source/sdk/model-data/relationships.txt | 158 +++++++++++++++++- 14 files changed, 457 insertions(+), 9 deletions(-) create mode 100644 source/includes/api-details/cpp/model-data/relationships-inverse-relationship-description.rst create mode 100644 source/includes/api-details/csharp/model-data/relationships-inverse-relationship-description.rst create mode 100644 source/includes/api-details/dart/model-data/relationships-inverse-relationship-description.rst create mode 100644 source/includes/api-details/java/model-data/relationships-inverse-relationship-description.rst create mode 100644 source/includes/api-details/javascript/model-data/relationships-inverse-relationship-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/relationships-inverse-relationship-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/relationships-inverse-relationship-description.rst create mode 100644 source/includes/api-details/swift/model-data/relationships-inverse-relationship-description.rst create mode 100644 source/includes/api-details/typescript/model-data/relationships-inverse-relationship-description.rst delete mode 100644 source/includes/note-to-one-relationships-must-be-optional.rst create mode 100644 source/includes/sdk-examples/model-data/relationships-inverse-relationship.rst create mode 100644 source/includes/sdk-examples/model-data/relationships-to-many-relationship.rst create mode 100644 source/includes/sdk-examples/model-data/relationships-to-one-relationship.rst diff --git a/source/includes/api-details/cpp/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/cpp/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..d12183025f --- /dev/null +++ b/source/includes/api-details/cpp/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,7 @@ +To define an inverse relationship, use ``linking_objects`` in your object +model. The ``linking_objects`` definition specifies the object type and +property name of the relationship that it inverts. + +In this example, we define a ``Person`` having a to-one relationship with +a ``Dog``. The ``Dog`` has an inverse relationship to any ``Person`` +objects through its ``owners`` property. diff --git a/source/includes/api-details/csharp/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/csharp/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..f328da6544 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,18 @@ +To define the inverse relationship, define a getter-only ``IQueryable`` +property in your object model, where ``T`` is the source type of the +relationship. Then, annotate this property with a +:dotnet-sdk:`[Backlink(sourceProperty)] ` +attribute, where "sourceProperty" is the name of the property on the other +side of the relationship. The following example shows how to do this with the +"User has many Items" scenario. + +In this example, note that: + +- The Item object's ``Assignee`` property is a ``User`` object. + +- The ``User`` object's ``Items`` property inverts the relationship and + refers to all ``Item`` objects that contain this specific ``User`` in their + ``Assignee`` property. + +This, then, allows us to query the ``Item`` collection to get all ``Items`` +assigned to a specific ``User``. diff --git a/source/includes/api-details/dart/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/dart/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..a5ecc83f9b --- /dev/null +++ b/source/includes/api-details/dart/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,6 @@ +Use the `Backlink `__ +property annotation to define an inverse relationship. +Pass a `Symbol `__ +of the field name of the to-one or to-many field for which you are creating the +backlink as an argument to ``Backlink()``. Include an ``Iterable`` of the +object model you are backlinking to in the field below the annotation. diff --git a/source/includes/api-details/java/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/java/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..41b31e2dda --- /dev/null +++ b/source/includes/api-details/java/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,9 @@ +To define an inverse relationship, define a ``LinkingObjects`` property in your +object model. The ``LinkingObjects`` definition specifies the object type and +property name of the relationship that it inverts. + +Fields annotated with ``@LinkingObjects`` must be: + +- marked ``final`` +- of type ``RealmResults`` where ``T`` is the type at the opposite + end of the relationship diff --git a/source/includes/api-details/javascript/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/javascript/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..dde15adfd2 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,28 @@ +To define an inverse relationship, define a ``linkingObjects`` property in your +object model. ``linkingObjects`` specifies the object type and +property name of the relationship that it inverts. + +.. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.define-inverse.js + :language: javascript + +**Dynamically Obtain an Inversely Linked Object** + +You can dynamically retrieve an object with an inverse relationship without +defining a ``linkingObjects`` type in its schema. Remove the +``linkingObjects`` type from your schema, so your schemas look like a standard +**to-many** relationship. When you need to retrieve the linked object, call the +:js-sdk:`Realm.Object.linkingObjects() ` +query. + +In the following continuation from the inverse relationship example, we +have removed the ``manufacturer`` field with type 'linkingObjects' from +the ``Car`` schema. An application developer creates several manufacturers +and car objects, and the application pushes the newly-created cars into a +manufacturer's ``cars`` field. + +To find the manufacturer who makes a specific car object, call ``.linkingObjects()`` +and pass the "Manufacturer" class name and "cars" field as parameters. + +The ``.linkingObjects()`` method returns a Results collection of objects whose +property inverts the relationship. In this example, only one manufacturer makes +the Sentra car model, so we can expect that manufacturer to be named Nissan. diff --git a/source/includes/api-details/kotlin/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/kotlin/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..200cff2bf6 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,13 @@ +To define an inverse relationship between objects, first define a +collection property in the parent object whose type is a +``RealmList``, ``RealmSet``, or ``RealmDictionary``, where +```` is a ``RealmObject`` object type defined in your data model. +This can be a different Realm object type or the same Realm object +type: + +.. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-inverse-property-parent.kt + :language: kotlin + +Then, define an immutable :kotlin-sdk:`backlinks +` property in the child object of +``RealmResults``, where ```` is the parent object type: diff --git a/source/includes/api-details/objectivec/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/objectivec/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..9b7ecfcc47 --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,7 @@ +To define an inverse relationship, use +:objc-sdk:`RLMLinkingObjects +` in your object model. +Override :objc-sdk:`+[RLMObject linkingObjectProperties] +` +method in your class to specify the object type and property name +of the relationship that it inverts. diff --git a/source/includes/api-details/swift/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/swift/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..2fead0a5ae --- /dev/null +++ b/source/includes/api-details/swift/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,4 @@ +To define an inverse relationship, use :swift-sdk:`LinkingObjects +` in your object model. The +``LinkingObjects`` definition specifies the object type and +property name of the relationship that it inverts. diff --git a/source/includes/api-details/typescript/model-data/relationships-inverse-relationship-description.rst b/source/includes/api-details/typescript/model-data/relationships-inverse-relationship-description.rst new file mode 100644 index 0000000000..c7c6739a7e --- /dev/null +++ b/source/includes/api-details/typescript/model-data/relationships-inverse-relationship-description.rst @@ -0,0 +1,28 @@ +To define an inverse relationship, define a ``linkingObjects`` property in your +object model. ``linkingObjects`` specifies the object type and +property name of the relationship that it inverts. + +.. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.define-inverse.ts + :language: typescript + +**Dynamically Obtain an Inversely Linked Object** + +You can dynamically retrieve an object with an inverse relationship without +defining a ``linkingObjects`` type in its schema. Remove the +``linkingObjects`` type from your schema, so your schemas look like a standard +**to-many** relationship. When you need to retrieve the linked object, call the +:js-sdk:`Realm.Object.linkingObjects() ` +query. + +In the following continuation from the inverse relationship example, we +have removed the ``manufacturer`` field with type 'linkingObjects' from +the ``Car`` schema. An application developer creates several manufacturers +and car objects, and the application pushes the newly-created cars into a +manufacturer's ``cars`` field. + +To find the manufacturer who makes a specific car object, call ``.linkingObjects()`` +and pass the "Manufacturer" class name and "cars" field as parameters. + +The ``.linkingObjects()`` method returns a Results collection of objects whose +property inverts the relationship. In this example, only one manufacturer makes +the Sentra car model, so we can expect that manufacturer to be named Nissan. diff --git a/source/includes/note-to-one-relationships-must-be-optional.rst b/source/includes/note-to-one-relationships-must-be-optional.rst deleted file mode 100644 index c83b692a6b..0000000000 --- a/source/includes/note-to-one-relationships-must-be-optional.rst +++ /dev/null @@ -1,5 +0,0 @@ -.. important:: To-one relationships must be optional - - When you declare a to-one relationship in your object model, it must - be an optional property. If you try to make a to-one relationship - required, Realm throws an exception at runtime. \ No newline at end of file diff --git a/source/includes/sdk-examples/model-data/relationships-inverse-relationship.rst b/source/includes/sdk-examples/model-data/relationships-inverse-relationship.rst new file mode 100644 index 0000000000..d96f15593d --- /dev/null +++ b/source/includes/sdk-examples/model-data/relationships-inverse-relationship.rst @@ -0,0 +1,61 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/relationships.snippet.define-inverse-relationship.cpp + :language: cpp + :emphasize-lines: 13 + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Relationships.snippet.inverse.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/backlinks_test.snippet.backlink-models.dart + :language: dart + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogInverseRelationshipExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogInverseRelationshipExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.obtain-inverse-relationship-dynamically.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-inverse-property-child.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/Relationships.snippet.inverse-relationship.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Relationships.snippet.inverse-relationship.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.obtain-inverse-relationship-dynamically.ts + :language: typescript diff --git a/source/includes/sdk-examples/model-data/relationships-to-many-relationship.rst b/source/includes/sdk-examples/model-data/relationships-to-many-relationship.rst new file mode 100644 index 0000000000..161fbedc01 --- /dev/null +++ b/source/includes/sdk-examples/model-data/relationships-to-many-relationship.rst @@ -0,0 +1,61 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/relationships.snippet.to-many-relationship.cpp + :language: cpp + :emphasize-lines: 7 + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Relationships.snippet.one-to-many.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.many-to-many-models.dart + :language: dart + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogManyToManyExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogManyToManyExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.define-one-to-many.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-to-many-relationship.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/Relationships.snippet.to-many-relationship.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Relationships.snippet.to-many-relationship.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.define-one-to-many.ts + :language: typescript diff --git a/source/includes/sdk-examples/model-data/relationships-to-one-relationship.rst b/source/includes/sdk-examples/model-data/relationships-to-one-relationship.rst new file mode 100644 index 0000000000..0e4445e1f4 --- /dev/null +++ b/source/includes/sdk-examples/model-data/relationships-to-one-relationship.rst @@ -0,0 +1,61 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/relationships.snippet.to-one-relationship.cpp + :language: cpp + :emphasize-lines: 13 + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Relationships.snippet.one-to-one.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.many-to-one-models.dart + :language: dart + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogManyToOneExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogManyToOneExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.define-one-to-one.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-to-one-relationship.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/Relationships.snippet.to-one-relationship.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Relationships.snippet.to-one-relationship.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.define-one-to-one.ts + :language: typescript diff --git a/source/sdk/model-data/relationships.txt b/source/sdk/model-data/relationships.txt index 71153db99e..498ec9e7a3 100644 --- a/source/sdk/model-data/relationships.txt +++ b/source/sdk/model-data/relationships.txt @@ -4,25 +4,175 @@ Model Relationships =================== +.. meta:: + :description: Learn how Atlas Device SDK uses relationships to reference other database objects, and how to define relationships in your code. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none :depth: 3 :class: singlecol -Placeholder page for modeling relationships in the SDKs. +.. tabs-selector:: drivers + +This page describes how to define relationships between objects in your data +model. To learn about SDK objects and how to define them, refer to +:ref:`sdks-object-models`. + +Atlas Device SDK uses explicit relationships between the types of +objects in an App. A relationship is an object property that references +another SDK object rather than one of the primitive data types. You +define relationships by setting the type of an object property to +another object type in the object model or object schema. + +Relationships are direct references to other objects in a database, which +means that you don't need bridge tables or explicit joins to define a +relationship like you would in a relational database. Instead you can +access related objects by reading and writing to the property that +defines the relationship. The SDK executes read operations lazily as they +come in, so querying a relationship is just as performant as reading a regular +property. + +Relationship Types +------------------ + +The SDK supports **to-one**, **to-many**, and **inverse** +relationships. The SDK also provides a special type of object, called an +:ref:`embedded object `, that is conceptually +similar to a relationship but provides additional constraints. + +The SDK *does not* inherently limit object references from other +objects within the same database. This means that SDK relationships are +implicitly "many-to-one" or "many-to-many." The only way to restrict a +relationship to "one to one/one to many" instead of "many to one/many +to many" is to use an embedded object, which is a nested object with exactly +one parent. .. _sdks-to-one-relationship: To-One Relationship -------------------- +~~~~~~~~~~~~~~~~~~~ + +A **to-one** relationship maps one property in an object model to a single +instance of another object type. For example, a dog might have a to-one +relationship with a favorite toy. + +Setting a relationship field to null removes the connection between objects. +The SDK does not delete the referenced object, though, unless it is +:ref:`an embedded object `. + +.. important:: To-one relationships must be optional + + When you declare a to-one relationship in your object model, it must + be an optional property. If you try to make a to-one relationship + required, the SDK throws an exception at runtime. + +.. include:: /includes/sdk-examples/model-data/relationships-to-one-relationship.rst .. _sdks-to-many-relationship: To-Many Relationship --------------------- +~~~~~~~~~~~~~~~~~~~~ + +A **to-many** relationship means that an object relates to more than one +other object. In Atlas Device SDK, a to-many relationship is a list of +references to other objects. For example, a person might have many dogs. + +You can represent a to-many relationship between two SDK types as a list, map, +or a set. Lists, maps, and sets are mutable: within a write transaction, you +can add and remove elements to and from these collection types. Lists, maps, +and sets are not associated with a query and are declared as a property of the +object model. + +.. include:: /includes/sdk-examples/model-data/relationships-to-many-relationship.rst .. _sdks-inverse-relationship: Inverse Relationship --------------------- +~~~~~~~~~~~~~~~~~~~~ + +Relationship definitions in the SDK are unidirectional. An +**inverse relationship** links an object back to an object +that refers to it. + +An inverse relationship property is an automatic **backlink** relationship. +The SDK automatically updates implicit relationships whenever an object is +added or removed in the specified relationship. You cannot manually set the +value of an inverse relationship property. + +Since relationships are many-to-one or many-to-many, following inverse +relationships can result in zero, one, or many objects. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/relationships-inverse-relationship-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/relationships-inverse-relationship-description.rst + +.. include:: /includes/sdk-examples/model-data/relationships-inverse-relationship.rst + +.. note:: Inverse Relationships Not Present in Device Sync Schema + + If you are using Atlas Device Sync, inverse relationships are not present + in the server-side Device Sync schema in your App Services App. + Since you can't directly set the value of an inverse relationship, + the relationship does not exist in Device Sync schema. + + For more information on the server-side Device Sync schema, + refer to :ref:`Configure and Update Your Data Model ` + in the Atlas App Services documentation. From ebc8e9d4178e934d97bf93e0668173967acd761b Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 19 Jul 2024 11:57:25 -0400 Subject: [PATCH 44/63] (DOCSP-39502): Consolidate Define an Object Model page (#3314) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39502 *Staged Page* - [Define an SDK Object Model](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39502/sdk/model-data/object-models/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Object Types and Schemas](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/model-data/object-models/) - [C++: Supported Data Types](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/model-data/supported-types/) - [Flutter: Model Data landing page](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/) - [Flutter: Define a Realm Object Schema](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/define-realm-object-schema/) - [Flutter: Property Annotations](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/property-annotations/) - [Java: Model Data landing page](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/) - [Java: Define an Object Model](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/define-a-realm-object-model/) - [Java: Realm Files Landing page (Realm Schema)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/realm-files/#realm-schema) - [Kotlin: Model Data -> Define an Object Model](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/schemas/define-realm-object-model/) - [Kotlin: Open & Close a Realm (realm schema)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/open-and-close-a-realm/) - [Kotlin: Property Annotations](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/schemas/property-annotations/) - [.NET: Define an Object Model](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/define-object-model/) - [.NET: Object Types and Schemas](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/object-models-and-schemas/) - [.NET: Manually Define a Schema](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/manual-schema/) - [.NET: Configure & Open a Realm (Class Subsets)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/realm-files/realms/#class-subsets) - [Node.js SDK: Model Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/) - [Node.js SDK: Define an Object Model](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/define-a-realm-object-model/) - [Node.js SDK: Open & Close a Realm (schemas)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/realm-files/open-and-close-a-realm/) - [Swift SDK: Model Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/model-data/) - [Swift SDK: Define an Object Model](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/model-data/object-models/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --- .../schemas.snippet.part-directive.dart | 2 +- source/frameworks/flutter/quick-start.txt | 4 +- ...ect-models-database-schema-description.rst | 3 + ...s-define-asymmetric-object-description.rst | 12 + ...els-define-embedded-object-description.rst | 6 + ...define-geospatial-object-not-supported.rst | 1 + ...s-define-optional-property-description.rst | 2 + ...models-define-realm-object-description.rst | 12 + ...ls-define-sdk-object-model-description.rst | 9 + ...dels-designate-primary-key-description.rst | 11 + ...odels-fts-index-property-not-supported.rst | 1 + ...ect-models-ignore-property-description.rst | 1 + ...ct-models-index-property-not-supported.rst | 1 + ...operty-to-different-name-not-supported.rst | 2 + ...object-models-object-model-description.rst | 7 + ...bject-models-object-schema-description.rst | 13 + ...models-unstructured-data-not-supported.rst | 2 + ...ect-models-database-schema-description.rst | 16 + ...s-define-asymmetric-object-description.rst | 3 + ...dels-define-custom-setters-description.rst | 2 + ...els-define-embedded-object-description.rst | 8 + ...s-define-geospatial-object-description.rst | 24 + ...s-define-optional-property-description.rst | 31 + ...models-define-realm-object-description.rst | 8 + ...ls-define-sdk-object-model-description.rst | 32 + ...dels-designate-primary-key-description.rst | 13 + ...-models-fts-index-property-description.rst | 4 + ...ect-models-ignore-property-description.rst | 5 + ...ject-models-index-property-description.rst | 20 + ...property-to-different-name-description.rst | 2 + ...ls-model-unstructured-data-description.rst | 10 + ...object-models-object-model-description.rst | 1 + ...bject-models-object-schema-description.rst | 4 + ...default-value-for-property-description.rst | 9 + ...ect-models-database-schema-description.rst | 5 + ...s-define-asymmetric-object-description.rst | 10 + ...els-define-embedded-object-description.rst | 18 + ...s-define-geospatial-object-description.rst | 24 + ...s-define-optional-property-description.rst | 3 + ...models-define-realm-object-description.rst | 6 + ...ls-define-sdk-object-model-description.rst | 85 + ...dels-designate-primary-key-description.rst | 10 + ...-models-fts-index-property-description.rst | 5 + ...ect-models-ignore-property-description.rst | 5 + ...ject-models-index-property-description.rst | 13 + ...property-to-different-name-description.rst | 3 + ...ls-model-unstructured-data-description.rst | 15 + ...models-model-unstructured-data-example.rst | 23 + ...object-models-object-model-description.rst | 5 + ...bject-models-object-schema-description.rst | 3 + ...default-value-for-property-description.rst | 2 + ...art-define-your-object-model-procedure.rst | 4 +- ...models-define-projection-not-supported.rst | 3 + ...ect-models-database-schema-description.rst | 2 + ...define-asymmetric-object-not-supported.rst | 2 + ...efine-embedded-object-java-description.rst | 10 + ...ine-embedded-object-kotlin-description.rst | 10 + ...define-geospatial-object-not-supported.rst | 2 + ...ine-optional-property-java-description.rst | 22 + ...e-optional-property-kotlin-description.rst | 17 + ...models-define-realm-object-description.rst | 3 + ...fine-sdk-object-model-java-description.rst | 38 + ...ne-sdk-object-model-kotlin-description.rst | 39 + ...dels-designate-primary-key-description.rst | 13 + ...odels-fts-index-property-not-supported.rst | 2 + ...ect-models-ignore-property-description.rst | 7 + ...ject-models-index-property-description.rst | 15 + ...rty-to-different-name-java-description.rst | 23 + ...y-to-different-name-kotlin-description.rst | 23 + ...object-models-object-model-description.rst | 45 + ...bject-models-object-schema-description.rst | 2 + ...lt-value-for-property-java-description.rst | 9 + ...-value-for-property-kotlin-description.rst | 9 + ...models-unstructured-data-not-supported.rst | 3 + ...dels-database-schema-js-ts-description.rst | 3 + ...s-define-asymmetric-object-description.rst | 2 + ...fine-embedded-object-js-ts-description.rst | 3 + ...s-define-geospatial-object-description.rst | 34 + ...s-define-optional-property-description.rst | 3 + ...models-define-realm-object-description.rst | 12 + ...ls-define-sdk-object-model-description.rst | 12 + ...esignate-primary-key-js-ts-description.rst | 5 + ...s-fts-index-property-js-ts-description.rst | 3 + ...dels-ignore-property-js-ts-description.rst | 1 + ...odels-index-property-js-ts-description.rst | 13 + ...property-to-different-name-description.rst | 28 + ...el-unstructured-data-js-ts-description.rst | 11 + ...object-models-object-model-description.rst | 16 + ...models-object-schema-js-ts-description.rst | 12 + ...default-value-for-property-description.rst | 5 + ...ect-models-database-schema-description.rst | 3 + ...s-define-asymmetric-object-description.rst | 3 + ...els-define-embedded-object-description.rst | 4 + ...s-define-geospatial-object-description.rst | 26 + ...s-define-optional-property-description.rst | 5 + ...models-define-realm-object-description.rst | 3 + ...ls-define-sdk-object-model-description.rst | 25 + ...dels-designate-primary-key-description.rst | 14 + ...-models-fts-index-property-description.rst | 2 + ...ect-models-ignore-property-description.rst | 3 + ...ject-models-index-property-description.rst | 15 + ...property-to-different-name-description.rst | 37 + ...ls-model-unstructured-data-description.rst | 12 + ...object-models-object-model-description.rst | 2 + ...bject-models-object-schema-description.rst | 4 + ...ect-models-database-schema-description.rst | 7 + ...s-define-asymmetric-object-description.rst | 14 + ...els-define-embedded-object-description.rst | 3 + ...s-define-geospatial-object-description.rst | 3 + ...s-define-optional-property-description.rst | 9 + ...-define-projection-missing-description.rst | 2 + ...models-define-realm-object-description.rst | 2 + ...ls-define-sdk-object-model-description.rst | 10 + ...dels-designate-primary-key-description.rst | 8 + ...ect-models-ignore-property-description.rst | 3 + ...ject-models-index-property-description.rst | 11 + ...property-to-different-name-description.rst | 8 + ...ls-model-unstructured-data-description.rst | 13 + ...object-models-object-model-description.rst | 21 + ...ect-models-database-schema-description.rst | 7 + ...s-define-asymmetric-object-description.rst | 14 + ...els-define-embedded-object-description.rst | 3 + ...s-define-geospatial-object-description.rst | 12 + ...s-define-optional-property-description.rst | 2 + ...t-models-define-projection-description.rst | 23 + ...models-define-realm-object-description.rst | 2 + ...ls-define-sdk-object-model-description.rst | 10 + ...dels-designate-primary-key-description.rst | 11 + ...ndex-property-swift-objc-not-supported.rst | 1 + ...ect-models-ignore-property-description.rst | 2 + ...ject-models-index-property-description.rst | 14 + ...property-to-different-name-description.rst | 16 + ...ls-model-unstructured-data-description.rst | 13 + ...object-models-object-model-description.rst | 51 + ...bject-models-object-schema-description.rst | 7 + ...-data-open-synced-database-description.rst | 2 +- ...s-define-asymmetric-object-description.rst | 2 + ...s-define-geospatial-object-description.rst | 34 + ...s-define-optional-property-description.rst | 1 + ...models-define-realm-object-description.rst | 12 + ...ls-define-sdk-object-model-description.rst | 12 + ...property-to-different-name-description.rst | 24 + ...object-models-object-model-description.rst | 16 + ...default-value-for-property-description.rst | 2 + .../includes/dotnet-implement-interface.rst | 2 +- .../important-cant-persist-geospatial.rst | 6 - ...object-models-define-asymmetric-object.rst | 69 + .../object-models-define-custom-setters.rst | 71 + .../object-models-define-embedded-object.rst | 61 + ...object-models-define-geospatial-object.rst | 69 + ...object-models-define-optional-property.rst | 67 + .../object-models-define-projection.rst | 71 + .../object-models-define-realm-object.rst | 67 + .../object-models-define-sdk-object-model.rst | 63 + .../object-models-designate-primary-key.rst | 64 + ...ls-enable-full-text-search-on-property.rst | 71 + .../object-models-ignore-property.rst | 64 + .../object-models-index-property.rst | 65 + ...ap-model-or-property-to-different-name.rst | 76 + .../object-models-model-unstructured-data.rst | 70 + ...-models-set-default-value-for-property.rst | 67 + source/platforms/apple/swift-concurrency.txt | 2 +- source/platforms/unity.txt | 2 +- source/sdk/crud/read.txt | 8 + source/sdk/files/configure-and-open.txt | 6 +- source/sdk/model-data.txt | 4 +- source/sdk/model-data/object-models.txt | 1375 ++++++++++++++++- ...supported-types.txt => property-types.txt} | 47 +- source/sdk/sync/event-library.txt | 2 +- 169 files changed, 3964 insertions(+), 52 deletions(-) create mode 100644 source/includes/api-details/cpp/model-data/object-models-database-schema-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-define-embedded-object-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-define-geospatial-object-not-supported.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-define-optional-property-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-define-sdk-object-model-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-designate-primary-key-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-fts-index-property-not-supported.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-ignore-property-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-index-property-not-supported.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-map-model-or-property-to-different-name-not-supported.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-object-schema-description.rst create mode 100644 source/includes/api-details/cpp/model-data/object-models-unstructured-data-not-supported.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-database-schema-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-define-custom-setters-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-define-embedded-object-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-define-geospatial-object-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-define-optional-property-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-define-sdk-object-model-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-designate-primary-key-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-fts-index-property-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-ignore-property-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-index-property-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-map-model-or-property-to-different-name-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-model-unstructured-data-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-object-schema-description.rst create mode 100644 source/includes/api-details/csharp/model-data/object-models-set-default-value-for-property-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-database-schema-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-define-embedded-object-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-define-geospatial-object-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-define-optional-property-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-define-sdk-object-model-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-designate-primary-key-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-fts-index-property-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-ignore-property-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-index-property-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-map-model-or-property-to-different-name-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-model-unstructured-data-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-model-unstructured-data-example.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-object-schema-description.rst create mode 100644 source/includes/api-details/dart/model-data/object-models-set-default-value-for-property-description.rst create mode 100644 source/includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst create mode 100644 source/includes/api-details/java/model-data/object-models-database-schema-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-asymmetric-object-not-supported.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-embedded-object-java-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-embedded-object-kotlin-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-geospatial-object-not-supported.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-optional-property-java-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-optional-property-kotlin-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-sdk-object-model-java-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-define-sdk-object-model-kotlin-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-designate-primary-key-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-fts-index-property-not-supported.rst create mode 100644 source/includes/api-details/java/model-data/object-models-ignore-property-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-index-property-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-java-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-kotlin-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-object-schema-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-set-default-value-for-property-java-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-set-default-value-for-property-kotlin-description.rst create mode 100644 source/includes/api-details/java/model-data/object-models-unstructured-data-not-supported.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-database-schema-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-define-embedded-object-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-define-geospatial-object-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-define-optional-property-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-define-sdk-object-model-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-designate-primary-key-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-fts-index-property-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-ignore-property-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-index-property-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-map-model-or-property-to-different-name-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-model-unstructured-data-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-object-schema-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/model-data/object-models-set-default-value-for-property-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-database-schema-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-define-embedded-object-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-define-geospatial-object-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-define-optional-property-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-define-sdk-object-model-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-designate-primary-key-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-fts-index-property-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-ignore-property-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-index-property-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-model-unstructured-data-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/kotlin/model-data/object-models-object-schema-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-database-schema-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-define-embedded-object-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-define-geospatial-object-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-define-optional-property-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-define-projection-missing-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-define-sdk-object-model-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-designate-primary-key-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-ignore-property-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-index-property-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-map-model-or-property-to-different-name-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-model-unstructured-data-description.rst create mode 100644 source/includes/api-details/objectivec/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-database-schema-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-define-embedded-object-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-define-geospatial-object-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-define-optional-property-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-define-projection-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-define-sdk-object-model-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-designate-primary-key-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-fts-index-property-swift-objc-not-supported.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-ignore-property-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-index-property-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-map-model-or-property-to-different-name-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-model-unstructured-data-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/swift/model-data/object-models-object-schema-description.rst create mode 100644 source/includes/api-details/typescript/model-data/object-models-define-asymmetric-object-description.rst create mode 100644 source/includes/api-details/typescript/model-data/object-models-define-geospatial-object-description.rst create mode 100644 source/includes/api-details/typescript/model-data/object-models-define-optional-property-description.rst create mode 100644 source/includes/api-details/typescript/model-data/object-models-define-realm-object-description.rst create mode 100644 source/includes/api-details/typescript/model-data/object-models-define-sdk-object-model-description.rst create mode 100644 source/includes/api-details/typescript/model-data/object-models-map-model-or-property-to-different-name-description.rst create mode 100644 source/includes/api-details/typescript/model-data/object-models-object-model-description.rst create mode 100644 source/includes/api-details/typescript/model-data/object-models-set-default-value-for-property-description.rst delete mode 100644 source/includes/important-cant-persist-geospatial.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-define-asymmetric-object.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-define-custom-setters.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-define-embedded-object.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-define-geospatial-object.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-define-optional-property.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-define-projection.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-define-realm-object.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-define-sdk-object-model.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-designate-primary-key.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-enable-full-text-search-on-property.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-ignore-property.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-index-property.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-map-model-or-property-to-different-name.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-model-unstructured-data.rst create mode 100644 source/includes/sdk-examples/model-data/object-models-set-default-value-for-property.rst rename source/sdk/model-data/{supported-types.txt => property-types.txt} (65%) diff --git a/source/examples/generated/flutter/schemas.snippet.part-directive.dart b/source/examples/generated/flutter/schemas.snippet.part-directive.dart index 730fd18b33..caf6dc542c 100644 --- a/source/examples/generated/flutter/schemas.snippet.part-directive.dart +++ b/source/examples/generated/flutter/schemas.snippet.part-directive.dart @@ -1 +1 @@ -part 'schemas.realm.dart'; +part 'modelFile.realm.dart'; diff --git a/source/frameworks/flutter/quick-start.txt b/source/frameworks/flutter/quick-start.txt index 5a4d70244d..c28d39641e 100644 --- a/source/frameworks/flutter/quick-start.txt +++ b/source/frameworks/flutter/quick-start.txt @@ -59,8 +59,8 @@ classes in your application code with an SDK object schema. You then have to generate the :flutter-sdk:`RealmObjectBase ` class that's used within your application. -For more information, refer to :ref:`Define an Object Schema -`. +For more information, refer to :ref:`Define an Object Model +`. .. procedure:: diff --git a/source/includes/api-details/cpp/model-data/object-models-database-schema-description.rst b/source/includes/api-details/cpp/model-data/object-models-database-schema-description.rst new file mode 100644 index 0000000000..50baf93245 --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-database-schema-description.rst @@ -0,0 +1,3 @@ +In C++, when opening a database, you must specify which models are available by +passing the models to the template you use to open the database. Those +models must have schemas, and this list of schemas becomes the database schema. diff --git a/source/includes/api-details/cpp/model-data/object-models-define-asymmetric-object-description.rst b/source/includes/api-details/cpp/model-data/object-models-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..8bdb42a6da --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-define-asymmetric-object-description.rst @@ -0,0 +1,12 @@ +In C++, define an asymmetric object the same way you would +a regular C++ struct or class. Provide a ``REALM_ASYMMETRIC_SCHEMA`` with the +struct or class name as the first argument. Add the names of any properties +that you want the database to persist. + +An ``asymmetric_object`` broadly has the same :ref:`supported types +` as ``realm::object``, with a few exceptions: + +- Asymmetric objects can link to the following types: + - ``object`` + - ``embedded_object`` + - ``std::vector`` diff --git a/source/includes/api-details/cpp/model-data/object-models-define-embedded-object-description.rst b/source/includes/api-details/cpp/model-data/object-models-define-embedded-object-description.rst new file mode 100644 index 0000000000..18ff917b0b --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-define-embedded-object-description.rst @@ -0,0 +1,6 @@ +In C++, you define an embedded object by providing a ``REALM_EMBEDDED_SCHEMA`` +whose first argument is the struct or class name. Add the names of any +properties that you want the database to persist. + +Define a property as an embedded object on the parent object by setting +a pointer to the embedded object's type. diff --git a/source/includes/api-details/cpp/model-data/object-models-define-geospatial-object-not-supported.rst b/source/includes/api-details/cpp/model-data/object-models-define-geospatial-object-not-supported.rst new file mode 100644 index 0000000000..0fb2bb5e45 --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-define-geospatial-object-not-supported.rst @@ -0,0 +1 @@ +The C++ SDK does not currently support geospatial data. diff --git a/source/includes/api-details/cpp/model-data/object-models-define-optional-property-description.rst b/source/includes/api-details/cpp/model-data/object-models-define-optional-property-description.rst new file mode 100644 index 0000000000..01a68f1d88 --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-define-optional-property-description.rst @@ -0,0 +1,2 @@ +In C++, define an optional type using the class template +`std::optional `__. diff --git a/source/includes/api-details/cpp/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/cpp/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..ef4ddf57be --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,12 @@ +In C++, the base :cpp-sdk:`object ` +provides accessors and other methods to work with SDK objects, including +things like: + +- Checking whether an object is valid +- Getting its managing database instance +- Registering a notification token + +Define a C++ struct or class as you would normally. Add a ``REALM_SCHEMA`` +whose first value is the name of the struct or class. Add the names of the +properties that you want the database to manage. Omit any fields that you do +not want to persist. diff --git a/source/includes/api-details/cpp/model-data/object-models-define-sdk-object-model-description.rst b/source/includes/api-details/cpp/model-data/object-models-define-sdk-object-model-description.rst new file mode 100644 index 0000000000..53aed98776 --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-define-sdk-object-model-description.rst @@ -0,0 +1,9 @@ +In the C++ SDK, you can define your models as regular C++ structs or classes. +Provide an :ref:`sdks-object-schema` with the object type name and +the names of any properties that you want to persist to the database. When you +add the object to the database, the SDK ignores any properties that you omit +from the schema. + +You must declare your object and the schema within the ``realm`` namespace. +You must then use the ``realm`` namespace when you initialize and perform CRUD +operations with the object. diff --git a/source/includes/api-details/cpp/model-data/object-models-designate-primary-key-description.rst b/source/includes/api-details/cpp/model-data/object-models-designate-primary-key-description.rst new file mode 100644 index 0000000000..9cfbe7a1c4 --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-designate-primary-key-description.rst @@ -0,0 +1,11 @@ +C++ supports primary keys of the following types, and their optional variants: + +- ``int64_t`` +- ``realm::object_id`` +- ``realm::uuid`` +- ``std::string`` + +Additionally, a required ``realm::enum`` property can be a primary key, but +``realm::enum`` cannot be optional if it is used as a primary key. + +Set a property as a primary key with the ``primary_key`` template. diff --git a/source/includes/api-details/cpp/model-data/object-models-fts-index-property-not-supported.rst b/source/includes/api-details/cpp/model-data/object-models-fts-index-property-not-supported.rst new file mode 100644 index 0000000000..53a38fce2c --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-fts-index-property-not-supported.rst @@ -0,0 +1 @@ +The C++ SDK does not currently support Full-Text Search. diff --git a/source/includes/api-details/cpp/model-data/object-models-ignore-property-description.rst b/source/includes/api-details/cpp/model-data/object-models-ignore-property-description.rst new file mode 100644 index 0000000000..e05b7ce89f --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-ignore-property-description.rst @@ -0,0 +1 @@ +To ignore a property, omit it from the :ref:`object schema `. diff --git a/source/includes/api-details/cpp/model-data/object-models-index-property-not-supported.rst b/source/includes/api-details/cpp/model-data/object-models-index-property-not-supported.rst new file mode 100644 index 0000000000..519f3da06a --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-index-property-not-supported.rst @@ -0,0 +1 @@ +The C++ SDK does not currently support indexing a property. \ No newline at end of file diff --git a/source/includes/api-details/cpp/model-data/object-models-map-model-or-property-to-different-name-not-supported.rst b/source/includes/api-details/cpp/model-data/object-models-map-model-or-property-to-different-name-not-supported.rst new file mode 100644 index 0000000000..df47476348 --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-map-model-or-property-to-different-name-not-supported.rst @@ -0,0 +1,2 @@ +C++ does not currently provide an API to map a model or property name to a +different stored name. diff --git a/source/includes/api-details/cpp/model-data/object-models-object-model-description.rst b/source/includes/api-details/cpp/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..067fa55318 --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-object-model-description.rst @@ -0,0 +1,7 @@ +The C++ SDK object model is a regular C++ class or struct that contains +a collection of properties. When you define your C++ class or struct, you +must also provide an object schema. The schema is a C++ macro that gives the +SDK information about which properties to persist, and what type of database +object it is. + +You must define your SDK object model within the ``realm`` namespace. diff --git a/source/includes/api-details/cpp/model-data/object-models-object-schema-description.rst b/source/includes/api-details/cpp/model-data/object-models-object-schema-description.rst new file mode 100644 index 0000000000..7bde1a40cc --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-object-schema-description.rst @@ -0,0 +1,13 @@ +In C++, schemas are managed through macros. The schema must list every +property type that you want to persist. The SDK inspects the object model to +determine the property types and other special information, such as whether +a property is the object's primary key. + +A schema must accompany every object model you want to persist, and it may be +one of: + +- ``REALM_SCHEMA`` +- ``REALM_EMBEDDED_SCHEMA`` +- ``REALM_ASYMMETRIC_SCHEMA`` + +You must define the schema and your object model within the ``realm`` namespace. diff --git a/source/includes/api-details/cpp/model-data/object-models-unstructured-data-not-supported.rst b/source/includes/api-details/cpp/model-data/object-models-unstructured-data-not-supported.rst new file mode 100644 index 0000000000..ddd41f7f12 --- /dev/null +++ b/source/includes/api-details/cpp/model-data/object-models-unstructured-data-not-supported.rst @@ -0,0 +1,2 @@ +C++ does not currently support modeling unstructured data as a collection +of the mixed property type. diff --git a/source/includes/api-details/csharp/model-data/object-models-database-schema-description.rst b/source/includes/api-details/csharp/model-data/object-models-database-schema-description.rst new file mode 100644 index 0000000000..f0527803a8 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-database-schema-description.rst @@ -0,0 +1,16 @@ +In C#, you can define object schemas by using the C# class declarations. +When a database is initialized, it discovers the SDK objects defined in all +assemblies that have been loaded and generates schemas accordingly. If you +want to restrict a database to manage only a subset of the SDK models in the +loaded assemblies, you *can* explicitly pass the models when configuring a +database. + +For more information, refer to :ref:`sdks-provide-a-subset-of-models-to-a-database`. + +.. note:: + + .NET does not load an assembly until you reference a class in it. If you + define your object models in one assembly and instantiate a database + in another, be sure to call a method in the assembly that contains the object + models *before* initialization. Otherwise, the SDK does not discover + the objects when it first loads. diff --git a/source/includes/api-details/csharp/model-data/object-models-define-asymmetric-object-description.rst b/source/includes/api-details/csharp/model-data/object-models-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..0428e4a92d --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-define-asymmetric-object-description.rst @@ -0,0 +1,3 @@ +In C#, to define a asymmetric object, inherit from the the +:dotnet-sdk:`IAsymmetricObject ` +interface and declare the class a ``partial`` class. diff --git a/source/includes/api-details/csharp/model-data/object-models-define-custom-setters-description.rst b/source/includes/api-details/csharp/model-data/object-models-define-custom-setters-description.rst new file mode 100644 index 0000000000..8ab3229f5b --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-define-custom-setters-description.rst @@ -0,0 +1,2 @@ +In the following code, the private ``email`` property is stored in the database, +but the public ``Email`` property, which provides validation, is not persisted. diff --git a/source/includes/api-details/csharp/model-data/object-models-define-embedded-object-description.rst b/source/includes/api-details/csharp/model-data/object-models-define-embedded-object-description.rst new file mode 100644 index 0000000000..60973a7c7d --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-define-embedded-object-description.rst @@ -0,0 +1,8 @@ +In C#, to define an embedded object, inherit from the the +:dotnet-sdk:`IEmbeddedObject ` interface +and declare the class a ``partial`` class. You can reference an embedded object +type from parent object types in the same way as you would define a relationship. + +Consider the following example where the ``Address`` is an Embedded Object. Both +the ``Contact`` and the ``Business`` classes reference the ``Address`` as an +embedded object. diff --git a/source/includes/api-details/csharp/model-data/object-models-define-geospatial-object-description.rst b/source/includes/api-details/csharp/model-data/object-models-define-geospatial-object-description.rst new file mode 100644 index 0000000000..1c6ebe3235 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-define-geospatial-object-description.rst @@ -0,0 +1,24 @@ +In C#, to create a class that conforms to the GeoJSON spec: + +1. Create an embedded object (a class that inherits from + :dotnet-sdk:`IEmbeddedObject `). + +#. At a minimum, add the two fields required by the GeoJSON spec: + + - A field of type ``IList`` that maps to a "coordinates" (case sensitive) + property in the object schema. + + - A field of type ``string`` that maps to a "type" property. The value of this + field must be "Point". + +The following example shows an embedded class named "CustomGeoPoint" that is used +to persist GeoPoint data: + +.. literalinclude:: /examples/generated/dotnet/CustomGeoPoint.snippet.customgeopoint.cs + :language: csharp + +Use the Embedded Class +`````````````````````` + +You then use the custom GeoPoint class in your SDK object model, as shown in +the following example. diff --git a/source/includes/api-details/csharp/model-data/object-models-define-optional-property-description.rst b/source/includes/api-details/csharp/model-data/object-models-define-optional-property-description.rst new file mode 100644 index 0000000000..9934c386e7 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-define-optional-property-description.rst @@ -0,0 +1,31 @@ +In C#, value types, such as ``int`` and ``bool``, are implicitly non-nullable. +However, they can be made optional by using the question mark (``?``) `notation +`__. + +Beginning with C# 8.0, nullable reference types were introduced. If your project +is using C# 8.0 or later, you can also declare reference types, such as ``string`` +and ``byte[]``, as nullable with ``?``. + +.. note:: + + Beginning with .NET 6.0, the nullable context is enabled by default for new + projects. For older projects, you can manually enable it. For more information, + refer to ``__. + +The SDK fully supports the nullable-aware context and uses nullability +to determine whether a property is required or optional. + +Alternatives to the Nullable-Aware Context +`````````````````````````````````````````` + +If you are using the older schema type definition (your classes derive from +the ``RealmObject`` base class), or you do not have nullability enabled, you +must use the :dotnet-sdk:`[Required] ` +attribute for any required ``string`` and ``byte[]`` property. + +You may prefer to have more flexibility in defining the nullability of properties +in your SDK objects. You can do so by setting ``realm.ignore_objects_nullability = true`` +in a `global configuration file `__. + +If you enable ``realm.ignore_objects_nullability``, the SDK ignores nullability +annotations on object properties, including collections of SDK objects. diff --git a/source/includes/api-details/csharp/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/csharp/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..a4544c80ee --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,8 @@ +In C#, to define a Realm object, inherit from the the +:dotnet-sdk:`IRealmObject ` interface and +declare the class a ``partial`` class. + +The following code block shows an object schema that describes a Dog. +Every Dog object must include a ``Name`` and may +optionally include the dog's ``Age``, ``Breed`` and a list of people that +represents the dog's ``Owners``. diff --git a/source/includes/api-details/csharp/model-data/object-models-define-sdk-object-model-description.rst b/source/includes/api-details/csharp/model-data/object-models-define-sdk-object-model-description.rst new file mode 100644 index 0000000000..115ac6901a --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-define-sdk-object-model-description.rst @@ -0,0 +1,32 @@ +All SDK objects inherit from the +:dotnet-sdk:`IRealmObject `, +:dotnet-sdk:`IEmbeddedObject `, or +:dotnet-sdk:`IAsymmetricObject ` +interface and must be declared ``partial`` classes. + +In versions of the .NET SDK v10.18.0 and earlier, objects derive from +:dotnet-sdk:`RealmObject `, +:dotnet-sdk:`EmbeddedObject `, or +:dotnet-sdk:`AsymmetricObject ` +base classes. This approach to SDK model definition is still supported, but +does not include new features such as the :ref:`nullability annotations +`. These base classes will be +deprecated in a future SDK release. You should use the interfaces for any +new classes that you write and should consider migrating your existing +classes. + +.. literalinclude:: /examples/generated/dotnet/ObjectModelsAndSchemas.snippet.dog_class.cs + :language: csharp + +**Customize the Object Schema (Optional)** + +You can use the +:dotnet-sdk:`Schema ` +property of the +:dotnet-sdk:`RealmConfigurationBase ` +object to customize how schemas are defined. The following code example shows +three ways to do this, from easiest to most complex: + +- Automatic configuration +- Manual configuration +- A mix of both methods diff --git a/source/includes/api-details/csharp/model-data/object-models-designate-primary-key-description.rst b/source/includes/api-details/csharp/model-data/object-models-designate-primary-key-description.rst new file mode 100644 index 0000000000..6172aecf7e --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-designate-primary-key-description.rst @@ -0,0 +1,13 @@ +You can create a primary key with any of the following types (or their nullable counterparts): + +- ``ObjectId`` +- ``UUID`` +- ``string`` +- ``char`` +- ``byte`` +- ``short`` +- ``int`` +- ``long`` + +To designate a property as the object's primary key, use the +:dotnet-sdk:`Primary Key ` attribute. diff --git a/source/includes/api-details/csharp/model-data/object-models-fts-index-property-description.rst b/source/includes/api-details/csharp/model-data/object-models-fts-index-property-description.rst new file mode 100644 index 0000000000..5c93c23304 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-fts-index-property-description.rst @@ -0,0 +1,4 @@ +To index an FTS property, use the :dotnet-sdk:`Indexed ` +attribute with the :dotnet-sdk:`IndexType.FullText ` +enum. In the following example, we have a ``FullText`` index on the +``Biography`` property: diff --git a/source/includes/api-details/csharp/model-data/object-models-ignore-property-description.rst b/source/includes/api-details/csharp/model-data/object-models-ignore-property-description.rst new file mode 100644 index 0000000000..979b5577f7 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-ignore-property-description.rst @@ -0,0 +1,5 @@ +A property is ignored by default if it is not autoimplemented or +does not have a setter. + +Ignore an object property with the +:dotnet-sdk:`Ignored ` attribute. diff --git a/source/includes/api-details/csharp/model-data/object-models-index-property-description.rst b/source/includes/api-details/csharp/model-data/object-models-index-property-description.rst new file mode 100644 index 0000000000..35caf099e5 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-index-property-description.rst @@ -0,0 +1,20 @@ +You can index properties of these data types: + +- ``bool`` +- ``byte`` +- ``short`` +- ``int`` +- ``long`` +- ``DateTimeOffset`` +- ``char`` +- ``string`` +- ``ObjectId`` +- ``UUID`` + +To index a property, use the :dotnet-sdk:`Indexed ` +attribute. With the ``Indexed`` attribute, you can specify the type of index +on the property by using the :dotnet-sdk:`IndexType ` +enum. + +In the following example, we have a default ("General") index on the ``Name`` +property: diff --git a/source/includes/api-details/csharp/model-data/object-models-map-model-or-property-to-different-name-description.rst b/source/includes/api-details/csharp/model-data/object-models-map-model-or-property-to-different-name-description.rst new file mode 100644 index 0000000000..0d8f7cf7bc --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-map-model-or-property-to-different-name-description.rst @@ -0,0 +1,2 @@ +Use the :dotnet-sdk:`[MapTo] ` +attribute to rename a class or property. diff --git a/source/includes/api-details/csharp/model-data/object-models-model-unstructured-data-description.rst b/source/includes/api-details/csharp/model-data/object-models-model-unstructured-data-description.rst new file mode 100644 index 0000000000..67f244c2e2 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-model-unstructured-data-description.rst @@ -0,0 +1,10 @@ +Starting in SDK version 12.22.0, you can store collections of mixed data +within a ``RealmValue`` property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`RealmValue ` types. You can then +set these ``RealmValue`` properties as a :ref:`list ` +or a :ref:`dictionary ` of ``RealmValue`` +elements. + +Note that ``RealmValue`` *cannot* represent a set or an embedded object. diff --git a/source/includes/api-details/csharp/model-data/object-models-object-model-description.rst b/source/includes/api-details/csharp/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..5ddd400424 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-object-model-description.rst @@ -0,0 +1 @@ +In C#, SDK object models are regular C# classes that define the SDK data model. diff --git a/source/includes/api-details/csharp/model-data/object-models-object-schema-description.rst b/source/includes/api-details/csharp/model-data/object-models-object-schema-description.rst new file mode 100644 index 0000000000..a4d056e8c8 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-object-schema-description.rst @@ -0,0 +1,4 @@ +In C#, when the SDK processes SDK object types, it generates a schema for each +class based on the class properties. However, there may be times that you want +to manually define the schema, and the .NET SDK provides a mechanism for doing +so. diff --git a/source/includes/api-details/csharp/model-data/object-models-set-default-value-for-property-description.rst b/source/includes/api-details/csharp/model-data/object-models-set-default-value-for-property-description.rst new file mode 100644 index 0000000000..7a2a1e5a90 --- /dev/null +++ b/source/includes/api-details/csharp/model-data/object-models-set-default-value-for-property-description.rst @@ -0,0 +1,9 @@ +You can use the built-in language features to assign a default value to a property. +In C#, you can assign a default value on primitives in the property declaration. + +.. note:: Default Values and Nullability + + While default values ensure that a newly created object cannot contain + a value of ``null`` (unless you specify a default value of ``null``), + they do not impact the nullability of a property. For details about + nullability, refer to :ref:`sdks-optional-property-types`. diff --git a/source/includes/api-details/dart/model-data/object-models-database-schema-description.rst b/source/includes/api-details/dart/model-data/object-models-database-schema-description.rst new file mode 100644 index 0000000000..6c91eea29b --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-database-schema-description.rst @@ -0,0 +1,5 @@ +In Dart, the database configuration takes a :flutter-sdk:`RealmSchema +` that has an iterable collection of +:flutter-sdk:`SchemaObjects `. These +``SchemaObjects`` represent the SDK object types that the database file can +manage. diff --git a/source/includes/api-details/dart/model-data/object-models-define-asymmetric-object-description.rst b/source/includes/api-details/dart/model-data/object-models-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..808942a2c0 --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-define-asymmetric-object-description.rst @@ -0,0 +1,10 @@ +In Dart, to define an asymmetric object, create a class model and add the +`RealmModel `__ +annotation. Pass `ObjectType.asymmetricObject +`__ +to the ``@RealmModel()`` annotation. + +Follow the :ref:`sdks-define-objects` procedure detailed on this +page to generate the ``RealmObject`` model and schema definitions. + +Then, use the generated ``RealmObject`` model in your application code. diff --git a/source/includes/api-details/dart/model-data/object-models-define-embedded-object-description.rst b/source/includes/api-details/dart/model-data/object-models-define-embedded-object-description.rst new file mode 100644 index 0000000000..4264428a9d --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-define-embedded-object-description.rst @@ -0,0 +1,18 @@ +In Dart, to define an embedded object, create a class model and add the +`RealmModel `__ +annotation. Pass `ObjectType.embeddedObject +`__ +to the ``@RealmModel()`` annotation. + +Embedded objects must be nullable when defining them in the parent object's +``RealmModel``. You can use the :flutter-sdk:`parent +` property to access the parent of +the embedded object. + +Follow the :ref:`sdks-define-objects` procedure detailed on this +page to generate the ``RealmObject`` model and schema definitions. + +Then, use the generated ``RealmObject`` model in your application code. + +The following example shows how to model an embedded object in a Realm object +schema. The ``_Address`` model is embedded within the ``_Person`` model. diff --git a/source/includes/api-details/dart/model-data/object-models-define-geospatial-object-description.rst b/source/includes/api-details/dart/model-data/object-models-define-geospatial-object-description.rst new file mode 100644 index 0000000000..55f23480ea --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-define-geospatial-object-description.rst @@ -0,0 +1,24 @@ +In Dart, to create a class that conforms to the GeoJSON spec, you: + +1. Create an embedded object. For more information about embedded + objects, refer to :ref:`sdks-object-models`. + +#. At a minimum, add the two fields required by the GeoJSON spec: + + - A field of type ``double[]`` that maps to a "coordinates" (case sensitive) + property in the schema. + + - A field of type ``string`` that maps to a "type" property. The value of this + field must be "Point". + +The following example shows an embedded class named ``MyGeoPoint`` that is +used to persist geospatial data: + +.. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.define-geopoint-class.dart + :language: dart + +Use the Embedded Class +``````````````````````` + +You then use the custom ``MyGeoPoint`` class in your data model, as shown +in the following example: diff --git a/source/includes/api-details/dart/model-data/object-models-define-optional-property-description.rst b/source/includes/api-details/dart/model-data/object-models-define-optional-property-description.rst new file mode 100644 index 0000000000..b6238f6620 --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-define-optional-property-description.rst @@ -0,0 +1,3 @@ +In Dart, value types are implicitly non-nullable, but can be made optional +(nullable) by appending `? `__. Include ``?`` +to make properties optional. diff --git a/source/includes/api-details/dart/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/dart/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..f7732b0a22 --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,6 @@ +In Dart, to define a Realm object, create a class model and add the +`RealmModel `__ +annotation. Follow the :ref:`sdks-define-objects` procedure detailed on this +page to generate the ``RealmObject`` model and schema definitions. + +Then, use the generated ``RealmObject`` model in your application code. diff --git a/source/includes/api-details/dart/model-data/object-models-define-sdk-object-model-description.rst b/source/includes/api-details/dart/model-data/object-models-define-sdk-object-model-description.rst new file mode 100644 index 0000000000..bd379a827a --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-define-sdk-object-model-description.rst @@ -0,0 +1,85 @@ +1. Create Generated File Part Directive + + .. versionchanged:: v2.0.0 + Generated files are named ``.realm.dart`` instead of ``.g.dart`` + + Add a part directive to include the ``RealmObject`` file that you generate in step 4 + in the same package as the file you're currently working on. + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.part-directive.dart + :language: dart + :caption: modelFile.dart + +2. Create a ``RealmModel``. + + Create the model for your SDK object type. + You must include the annotation `RealmModel `__ + at the top of the class definition. + + You'll use the ``RealmModel`` to generate the public ``RealmObject`` + used throughout the application in step 4. + + You can make the model private or public. We recommend making + all models private and defining them in a single file. + Prepend the class name with an underscore (``_``) to make it private. + + If you need to define your schema across multiple files, + you can make the ``RealmModel`` public. Prepend the name with a dollar + sign (``$``) to make the model public. You must do this to generate the + ``RealmObject`` from the ``RealmModel``, as described in step 4. + + Add fields to the ``RealmModel``. + You can add fields of any :ref:`supported data types `. + Include additional behavior using :ref:`special object types + `. + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.create-realm-model.dart + :language: dart + :caption: modelFile.dart + +3. Generate a ``RealmObject``. + + .. versionchanged:: v2.0.0 + Generated files are named ``.realm.dart`` instead of ``.g.dart`` + + Generate the ``RealmObject``, which you'll use in your application: + + .. tabs:: + + .. tab:: Flutter + :tabid: flutter + + .. code-block:: + + dart run realm generate + + .. tab:: Dart + :tabid: dart + + .. code-block:: + + dart run realm_dart generate + + This command generates the file in the same directory as your model file. + It has the name you specified in the part directive of step 2. + + .. tip:: Track the generated file + + Track the generated file in your version control system, such as git. + + .. example:: File structure after generating model + + .. code-block:: + + . + ├── modelFile.dart + ├── modelFile.realm.dart // newly generated file + ├── myapp.dart + └── ...rest of application + +4. Use the ``RealmObject`` in your application code. + + Use the ``RealmObject`` that you generated in the previous step in your + application code. Since you included the generated file as part of the same + package where you defined the ``RealmModel`` in step 2, access the + ``RealmObject`` by importing the file with the ``RealmModel``. diff --git a/source/includes/api-details/dart/model-data/object-models-designate-primary-key-description.rst b/source/includes/api-details/dart/model-data/object-models-designate-primary-key-description.rst new file mode 100644 index 0000000000..2b3786d240 --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-designate-primary-key-description.rst @@ -0,0 +1,10 @@ +You can create a primary key with any of the following types (or their nullable counterparts): + +- ``String`` +- ``int`` +- ``ObjectId`` +- ``Uuid`` + +To designate a property as the object's primary key, use the `PrimaryKey +`__ +annotation. diff --git a/source/includes/api-details/dart/model-data/object-models-fts-index-property-description.rst b/source/includes/api-details/dart/model-data/object-models-fts-index-property-description.rst new file mode 100644 index 0000000000..874c3e88ea --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-fts-index-property-description.rst @@ -0,0 +1,5 @@ +To create an FTS index on a property, use the `@Indexed +`__ +annotation and specify the `RealmIndexType `__ +as ``fullText``. This enables full-text queries on the property. In the +following example, we mark the pattern and material properties with the FTS annotation: diff --git a/source/includes/api-details/dart/model-data/object-models-ignore-property-description.rst b/source/includes/api-details/dart/model-data/object-models-ignore-property-description.rst new file mode 100644 index 0000000000..8d7aa606d1 --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-ignore-property-description.rst @@ -0,0 +1,5 @@ +To ignore a property, add the `Ignored `__ +annotation to the property in your ``RealmModel``. When you +:ref:`generate the model `, the object generator doesn't +include the property in the ``RealmObject`` schema or persist it to the +database. diff --git a/source/includes/api-details/dart/model-data/object-models-index-property-description.rst b/source/includes/api-details/dart/model-data/object-models-index-property-description.rst new file mode 100644 index 0000000000..42eacaeeef --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-index-property-description.rst @@ -0,0 +1,13 @@ +You can index properties of these data types: + +- ``bool`` +- ``int`` +- ``String`` +- ``ObjectId`` +- ``Uuid`` +- ``DateTime`` +- ``RealmValue`` + +To create an index on the field, add the `Indexed +`__ +annotation to the property. diff --git a/source/includes/api-details/dart/model-data/object-models-map-model-or-property-to-different-name-description.rst b/source/includes/api-details/dart/model-data/object-models-map-model-or-property-to-different-name-description.rst new file mode 100644 index 0000000000..6d403827fa --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-map-model-or-property-to-different-name-description.rst @@ -0,0 +1,3 @@ +Use the `MapTo `__ +annotation to map an SDK object model or property to a different stored +name. diff --git a/source/includes/api-details/dart/model-data/object-models-model-unstructured-data-description.rst b/source/includes/api-details/dart/model-data/object-models-model-unstructured-data-description.rst new file mode 100644 index 0000000000..8d8b7b67ec --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-model-unstructured-data-description.rst @@ -0,0 +1,15 @@ +.. versionadded:: 2.0.0 + +Starting in Flutter SDK version 2.0.0, you can store +collections of mixed data within a ``RealmValue`` property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`RealmValue ` types. You can then set +these ``RealmValue`` properties as a :ref:`RealmList ` +or a :ref:`RealmMap ` collection of +``RealmValue`` elements. + +Note that ``RealmValue`` *cannot* represent a ``RealmSet`` or an embedded object. + +For example, you might use a ``RealmValue`` that contains a map of mixed +data when modeling a variable event log object. diff --git a/source/includes/api-details/dart/model-data/object-models-model-unstructured-data-example.rst b/source/includes/api-details/dart/model-data/object-models-model-unstructured-data-example.rst new file mode 100644 index 0000000000..d594d65cce --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-model-unstructured-data-example.rst @@ -0,0 +1,23 @@ +.. literalinclude:: /examples/generated/flutter/define_realm_model_test.snippet.unstructured-data-model.dart + :language: dart + :emphasize-lines: 10 + :caption: Data model + +.. io-code-block:: + :copyable: true + :caption: Create unstructured data + + .. input:: /examples/generated/flutter/define_realm_model_test.snippet.create-unstructured-data-example.dart + :language: dart + + .. output:: + :language: shell + + Event Type: purchase + Timestamp: 2024-03-18 13:50:58.402979Z + User ID: user123 + Details: + Item: + ipAddress: RealmValue(192.168.1.1) + items: RealmValue([RealmValue({id: RealmValue(1), name: RealmValue(Laptop), price: RealmValue(1200.0)}), RealmValue({id: RealmValue(2), name: RealmValue(Mouse), price: RealmValue(49.99)})]) + total: RealmValue(1249.99) diff --git a/source/includes/api-details/dart/model-data/object-models-object-model-description.rst b/source/includes/api-details/dart/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..810dcf3ecd --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-object-model-description.rst @@ -0,0 +1,5 @@ +In Dart, you can define the object model using the native class implementation. +You must annotate the class model with the SDK object type definition. As a +separate step, you must generate SDK object classes that contain additional +methods and meta-information that makes it possible to store, retrieve, and +work with the object. diff --git a/source/includes/api-details/dart/model-data/object-models-object-schema-description.rst b/source/includes/api-details/dart/model-data/object-models-object-schema-description.rst new file mode 100644 index 0000000000..66a7ca35e6 --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-object-schema-description.rst @@ -0,0 +1,3 @@ +In Dart, the object schema is automatically generated as part of the SDK object +model code generation step. You can view the schema as a ``static final schema`` +property in the generated ``.realm.dart`` file. diff --git a/source/includes/api-details/dart/model-data/object-models-set-default-value-for-property-description.rst b/source/includes/api-details/dart/model-data/object-models-set-default-value-for-property-description.rst new file mode 100644 index 0000000000..3063be0ae7 --- /dev/null +++ b/source/includes/api-details/dart/model-data/object-models-set-default-value-for-property-description.rst @@ -0,0 +1,2 @@ +You can use the built-in language features to assign a default value to a property. +Assign a default value in the property declaration. diff --git a/source/includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst b/source/includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst index 64812df3dc..58c2064164 100644 --- a/source/includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst +++ b/source/includes/api-details/dart/quick-start/quick-start-define-your-object-model-procedure.rst @@ -4,8 +4,8 @@ classes in your application code with an SDK object schema. You then have to generate the :flutter-sdk:`RealmObjectBase ` class that's used within your application. -For more information, refer to :ref:`Define an Object Schema -`. +For more information, refer to :ref:`Define an Object Model +`. **Create a Model Class** diff --git a/source/includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst b/source/includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst new file mode 100644 index 0000000000..a1db911e94 --- /dev/null +++ b/source/includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst @@ -0,0 +1,3 @@ +Projection is not currently supported for this programming language. If you'd +like to file a feature request for this functionality, refer to +:ref:`getting-help`. diff --git a/source/includes/api-details/java/model-data/object-models-database-schema-description.rst b/source/includes/api-details/java/model-data/object-models-database-schema-description.rst new file mode 100644 index 0000000000..2350949522 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-database-schema-description.rst @@ -0,0 +1,2 @@ +In Java, the SDK automatically adds all classes in your project +that derive from an SDK object type to the database schema. diff --git a/source/includes/api-details/java/model-data/object-models-define-asymmetric-object-not-supported.rst b/source/includes/api-details/java/model-data/object-models-define-asymmetric-object-not-supported.rst new file mode 100644 index 0000000000..8f5ad82b4e --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-asymmetric-object-not-supported.rst @@ -0,0 +1,2 @@ +The Java SDK does not support Data Ingest or asymmetric objects. Use the +Kotlin SDK for heavy insert-only workloads. diff --git a/source/includes/api-details/java/model-data/object-models-define-embedded-object-java-description.rst b/source/includes/api-details/java/model-data/object-models-define-embedded-object-java-description.rst new file mode 100644 index 0000000000..e661f06c87 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-embedded-object-java-description.rst @@ -0,0 +1,10 @@ +To embed an object, set the ``embedded`` property of the +:java-sdk:`@RealmClass ` +annotation to ``true`` on the class that you'd like to nest within +another class: + +.. include:: /examples/generated/java/local/FlyEmbeddedExample.snippet.complete.java.rst + +Then, any time you reference that class from another class, +the SDK embeds the referenced class within the enclosing +class, as in the following example: diff --git a/source/includes/api-details/java/model-data/object-models-define-embedded-object-kotlin-description.rst b/source/includes/api-details/java/model-data/object-models-define-embedded-object-kotlin-description.rst new file mode 100644 index 0000000000..8041391625 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-embedded-object-kotlin-description.rst @@ -0,0 +1,10 @@ +To embed an object, set the ``embedded`` property of the +:java-sdk:`@RealmClass ` +annotation to ``true`` on the class that you'd like to nest within +another class: + +.. include:: /examples/generated/java/local/FlyEmbeddedExampleKt.snippet.complete.kt.rst + +Then, any time you reference that class from another class, +the SDK embeds the referenced class within the enclosing +class, as in the following example: diff --git a/source/includes/api-details/java/model-data/object-models-define-geospatial-object-not-supported.rst b/source/includes/api-details/java/model-data/object-models-define-geospatial-object-not-supported.rst new file mode 100644 index 0000000000..6f7bc6f1c1 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-geospatial-object-not-supported.rst @@ -0,0 +1,2 @@ +The Java SDK does not support geospatial data. Use the Kotlin SDK to work with +GeoJSON and location data. diff --git a/source/includes/api-details/java/model-data/object-models-define-optional-property-java-description.rst b/source/includes/api-details/java/model-data/object-models-define-optional-property-java-description.rst new file mode 100644 index 0000000000..10afdabf48 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-optional-property-java-description.rst @@ -0,0 +1,22 @@ +Fields marked with Java object types are nullable by default. All other types +(primitives) are required by default. You can mark a nullable field with the +:java-sdk:`@Required ` +annotation to prevent that field from holding a null value. + +The following types are nullable: + +- ``String`` +- ``Date`` +- ``UUID`` +- ``ObjectId`` +- ``Integer`` +- ``Long`` +- ``Short`` +- ``Byte`` or ``byte[]`` +- ``Boolean`` +- ``Float`` +- ``Double`` + +Primitive types like ``int`` and ``long`` are non-nullable by +default and cannot be made nullable, as they cannot be set to a +null value. diff --git a/source/includes/api-details/java/model-data/object-models-define-optional-property-kotlin-description.rst b/source/includes/api-details/java/model-data/object-models-define-optional-property-kotlin-description.rst new file mode 100644 index 0000000000..c2331095d1 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-optional-property-kotlin-description.rst @@ -0,0 +1,17 @@ +In Kotlin, fields are considered nullable only if a field is +marked nullable with the Kotlin `? operator +`__ except +for the following types: + +- ``String`` +- ``Date`` +- ``UUID`` +- ``ObjectId`` +- ``Decimal128`` +- ``RealmAny`` + +You can require any type that ends with the Kotlin ``?`` +operator, such as ``Int?``. + +The ``RealmList`` type is non-nullable by default and cannot be +made nullable. diff --git a/source/includes/api-details/java/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/java/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..dc8ee7c10d --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,3 @@ +In the Java SDK, to define a Realm object in your application, +subclass :java-sdk:`RealmObject ` +or implement :java-sdk:`RealmModel `. diff --git a/source/includes/api-details/java/model-data/object-models-define-sdk-object-model-java-description.rst b/source/includes/api-details/java/model-data/object-models-define-sdk-object-model-java-description.rst new file mode 100644 index 0000000000..09a988c615 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-sdk-object-model-java-description.rst @@ -0,0 +1,38 @@ +In Java, to define an SDK object in your application, +create a subclass of :java-sdk:`RealmObject ` +or implement :java-sdk:`RealmModel `. + +.. important:: + + - All SDK objects must provide an empty constructor. + - All SDK objects must use the ``public`` visibility modifier + +**Extend RealmObject** + +The following code block shows a Realm object that +describes a Frog. This Frog class can be stored in the database because it +``extends`` the ``RealmObject`` class. + +.. include:: /examples/generated/java/local/FrogObjectExample.snippet.complete.java.rst + +**Implement RealmModel** + +The following code block shows a Realm object that +describes a Frog. This Frog class can +be stored in the database because it ``implements`` the +``RealmModel`` class and uses the ``@RealmClass`` annotation: + +.. include:: /examples/generated/java/local/FrogRealmModelExample.snippet.complete.java.rst + +.. important:: + + All Realm objects must use the ``public`` + visibility modifier. + +.. tip:: Using ``RealmObject`` Methods + + When you create a Realm object by extending the ``RealmObject`` + class, you can access ``RealmObject`` class methods dynamically on + instances of your Realm object. Realm objects + created by implementing ``RealmModel`` can access those same methods + statically through the ``RealmObject`` class. diff --git a/source/includes/api-details/java/model-data/object-models-define-sdk-object-model-kotlin-description.rst b/source/includes/api-details/java/model-data/object-models-define-sdk-object-model-kotlin-description.rst new file mode 100644 index 0000000000..45132774f8 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-define-sdk-object-model-kotlin-description.rst @@ -0,0 +1,39 @@ +Using Kotlin in the Java SDK, to define an SDK object in your application, +create a subclass of :java-sdk:`RealmObject ` +or implement :java-sdk:`RealmModel `. + +.. important:: + + - All SDK objects must provide an empty constructor. + - All SDK objects must use the ``open`` visibility modifier. + +**Extend RealmObject** + +The following code block shows an SDK object that +describes a Frog. This Frog class can be stored in +the database because it ``extends`` the ``RealmObject`` class. + +.. include:: /examples/generated/java/local/FrogObjectExampleKt.snippet.complete.kt.rst + +**Implement RealmModel** + +The following code block shows an SDK object that +describes a Frog. This Frog class can +be stored in the database because it ``implements`` the +``RealmModel`` class and uses the ``@RealmClass`` annotation: + +.. include:: /examples/generated/java/local/FrogRealmModelExampleKt.snippet.complete.kt.rst + + .. important:: + + All Realm objects must use the ``open`` + visibility modifier. + + +.. tip:: Using ``RealmObject`` Methods + + When you create a Realm object by extending the ``RealmObject`` + class, you can access ``RealmObject`` class methods dynamically on + instances of your Realm object. Realm objects + created by implementing ``RealmModel`` can access those same methods + statically through the ``RealmObject`` class. diff --git a/source/includes/api-details/java/model-data/object-models-designate-primary-key-description.rst b/source/includes/api-details/java/model-data/object-models-designate-primary-key-description.rst new file mode 100644 index 0000000000..42d7f507b0 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-designate-primary-key-description.rst @@ -0,0 +1,13 @@ +You can create a primary key with any of the following types: + +- ``String`` +- ``UUID`` +- ``ObjectId`` +- ``Integer`` or ``int`` +- ``Long`` or ``long`` +- ``Short`` or ``short`` +- ``Byte`` or ``byte[]`` + +To designate a property as the primary key for the object, annotate the +property with the :java-sdk:`@PrimaryKey ` +annotation. diff --git a/source/includes/api-details/java/model-data/object-models-fts-index-property-not-supported.rst b/source/includes/api-details/java/model-data/object-models-fts-index-property-not-supported.rst new file mode 100644 index 0000000000..92e786e8d8 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-fts-index-property-not-supported.rst @@ -0,0 +1,2 @@ +The Java SDK does not support Full-Text Search. If you would like to use FTS, +use the Kotlin SDK, instead. diff --git a/source/includes/api-details/java/model-data/object-models-ignore-property-description.rst b/source/includes/api-details/java/model-data/object-models-ignore-property-description.rst new file mode 100644 index 0000000000..ca852d50fd --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-ignore-property-description.rst @@ -0,0 +1,7 @@ +Ignore a field from an SDK object model with the +:java-sdk:`@Ignore ` annotation. + +.. note:: The SDK ignores ``static`` and ``transient`` Fields + + Fields marked ``static`` or ``transient`` are always ignored, and do + not need the ``@Ignore`` annotation. diff --git a/source/includes/api-details/java/model-data/object-models-index-property-description.rst b/source/includes/api-details/java/model-data/object-models-index-property-description.rst new file mode 100644 index 0000000000..362db4110e --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-index-property-description.rst @@ -0,0 +1,15 @@ +You can index properties of these data types: + +- ``String`` +- ``UUID`` +- ``ObjectId`` +- ``Integer`` or ``int`` +- ``Long`` or ``long`` +- ``Short`` or ``short`` +- ``Byte`` or ``byte[]`` +- ``Boolean`` or ``bool`` +- ``Date`` +- ``RealmAny`` + +To index a field, use the :java-sdk:`@Index ` +annotation. diff --git a/source/includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-java-description.rst b/source/includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-java-description.rst new file mode 100644 index 0000000000..88cdc82ca6 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-java-description.rst @@ -0,0 +1,23 @@ +**Map a Model Name** + +Use the :java-sdk:`@RealmClass ` +annotation to rename a class. + +.. include:: /examples/generated/java/local/FrogClassRenamePolicyExample.snippet.complete.java.rst + +**Map a Property Name** + +Use the :java-sdk:`@RealmField ` +annotation to rename a field: + +.. include:: /examples/generated/java/local/FrogRenameAFieldExample.snippet.complete.java.rst + +**Assign a Naming Policy at the Module or Class Level** + +Alternatively, you can also assign a naming policy at the module or +class levels to change the way that the SDK interprets field names. + +You can define a +:java-sdk:`naming policy ` +at the :ref:`module level `, +which affects all classes included in the module. diff --git a/source/includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-kotlin-description.rst b/source/includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-kotlin-description.rst new file mode 100644 index 0000000000..6821c78078 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-kotlin-description.rst @@ -0,0 +1,23 @@ +**Map a Model Name** + +Use the :java-sdk:`@RealmClass ` +annotation to rename a class. + +.. include:: /examples/generated/java/local/FrogClassRenamePolicyExampleKt.snippet.complete.kt.rst + +**Map a Property Name** + +Use the :java-sdk:`@RealmField ` +annotation to rename a field. + +.. include:: /examples/generated/java/local/FrogRenameAFieldExampleKt.snippet.complete.kt.rst + +**Assign a Naming Policy at the Module or Class Level** + +Alternatively, you can also assign a naming policy at the module or +class levels to change the way that the SDK interprets field names. + +You can define a +:java-sdk:`naming policy ` +at the :ref:`module level `, +which affects all classes included in the module. diff --git a/source/includes/api-details/java/model-data/object-models-object-model-description.rst b/source/includes/api-details/java/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..c15adb30c8 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-object-model-description.rst @@ -0,0 +1,45 @@ +In the Java SDK, unlike normal Java objects, which contain their own data, an +SDK object doesn't contain data. Instead, SDK objects read and write properties +directly to the database. + +The Java SDK uses ``RealmProxy`` classes to ensure that database objects +don't contain any data themselves. Instead, each class's ``RealmProxy`` +accesses data directly in the database. + +For every model class in your project, the SDK annotation processor generates +a corresponding ``RealmProxy`` class. This class extends your model class and +is returned when you call ``Realm.createObject()``. In your code, this object +works just like your model class. + +**Java SDK Object Limitations** + +SDK objects: + +- cannot contain fields that use the ``final`` or ``volatile`` modifiers + (except for :ref:`inverse relationship ` fields). + +- cannot extend any object other than ``RealmObject``. + +- must contain an empty constructor (if your class does not include any + constructor, the automatically generated empty constructor will suffice) + +Usage limitations: + +- Because SDK objects are live and can change at any time, + their ``hashCode()`` value can change over time. As a result, you + should not use ``RealmObject`` instances as a key in any map or set. + +**Java SDK Incremental Builds** + +The bytecode transformer used by the Java SDK supports incremental +builds, but your application requires a full rebuild when adding or +removing the following from an SDK object field: + +- an ``@Ignore`` annotation + +- the ``static`` keyword + +- the ``transient`` keyword + +You can perform a full rebuild with :guilabel:`Build > Clean Project` +and :guilabel:`Build > Rebuild Project` in these cases. diff --git a/source/includes/api-details/java/model-data/object-models-object-schema-description.rst b/source/includes/api-details/java/model-data/object-models-object-schema-description.rst new file mode 100644 index 0000000000..36e8ee661b --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-object-schema-description.rst @@ -0,0 +1,2 @@ +In the Java SDK, the SDK automatically creates object schemas based on your +SDK model classes. diff --git a/source/includes/api-details/java/model-data/object-models-set-default-value-for-property-java-description.rst b/source/includes/api-details/java/model-data/object-models-set-default-value-for-property-java-description.rst new file mode 100644 index 0000000000..e54ea6773e --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-set-default-value-for-property-java-description.rst @@ -0,0 +1,9 @@ +To assign a default value to a field, use the built-in language features. Use +the class constructor(s) to assign default values. + +.. note:: Default Values and Nullability + + While default values ensure that a newly created object cannot contain + a value of ``null`` (unless you specify a default value of ``null``), + they do not impact the nullability of a field. For details about + nullability, refer to :ref:`sdks-optional-property-types`. diff --git a/source/includes/api-details/java/model-data/object-models-set-default-value-for-property-kotlin-description.rst b/source/includes/api-details/java/model-data/object-models-set-default-value-for-property-kotlin-description.rst new file mode 100644 index 0000000000..fbd9c00942 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-set-default-value-for-property-kotlin-description.rst @@ -0,0 +1,9 @@ +To assign a default value to a field, use the built-in language features. +Assign default values in the field declaration. + +.. note:: Default Values and Nullability + + While default values ensure that a newly created object cannot contain + a value of ``null`` (unless you specify a default value of ``null``), + they do not impact the nullability of a field. For details about + nullability, refer to :ref:`sdks-optional-property-types`. diff --git a/source/includes/api-details/java/model-data/object-models-unstructured-data-not-supported.rst b/source/includes/api-details/java/model-data/object-models-unstructured-data-not-supported.rst new file mode 100644 index 0000000000..6081e8e1a8 --- /dev/null +++ b/source/includes/api-details/java/model-data/object-models-unstructured-data-not-supported.rst @@ -0,0 +1,3 @@ +The Java SDK does not support modeling unstructured data as a collection +of the mixed property type. If you would like to take advantage of more +flexible data models, use the Kotlin SDK. diff --git a/source/includes/api-details/javascript/model-data/object-models-database-schema-js-ts-description.rst b/source/includes/api-details/javascript/model-data/object-models-database-schema-js-ts-description.rst new file mode 100644 index 0000000000..ff353dd86e --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-database-schema-js-ts-description.rst @@ -0,0 +1,3 @@ +The JS SDK's :js-sdk:`database configuration ` +has a ``schema`` property that takes an array of object schemas that the +database instance can manage. diff --git a/source/includes/api-details/javascript/model-data/object-models-define-asymmetric-object-description.rst b/source/includes/api-details/javascript/model-data/object-models-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..ac6fb9e0bb --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-define-asymmetric-object-description.rst @@ -0,0 +1,2 @@ +In JavaScript, to define an asymmetric object, set the ``asymmetric`` property +on your object schema. diff --git a/source/includes/api-details/javascript/model-data/object-models-define-embedded-object-js-ts-description.rst b/source/includes/api-details/javascript/model-data/object-models-define-embedded-object-js-ts-description.rst new file mode 100644 index 0000000000..c3584f4b91 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-define-embedded-object-js-ts-description.rst @@ -0,0 +1,3 @@ +In the JavaScript SDK, to define an embedded object, set ``embedded`` +to ``true``. You can reference an embedded object type from parent object types +in the same way as you would define a relationship. diff --git a/source/includes/api-details/javascript/model-data/object-models-define-geospatial-object-description.rst b/source/includes/api-details/javascript/model-data/object-models-define-geospatial-object-description.rst new file mode 100644 index 0000000000..2749ea4e31 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-define-geospatial-object-description.rst @@ -0,0 +1,34 @@ +In JavaScript, to create a class that conforms to the GeoJSON spec, you: + +1. Create an embedded SDK object. For more information about embedded + objects, refer to :ref:`sdks-embedded-objects`. + +#. At a minimum, add the two fields required by the GeoJSON spec: + + - A field of type ``double[]`` that maps to a "coordinates" (case sensitive) + property in the object schema. + + - A field of type ``string`` that maps to a "type" property. The value of this + field must be "Point". + +To simplify geodata persistance, you can define a model that implements +``CanonicalGeoPoint``, which already has the correct shape. The following +example shows an embedded class named ``MyGeoPoint`` that is used +to persist geospatial data: + +.. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.define-geopoint-class.js + :language: javascript + +Use the Embedded Class +`````````````````````` + +You then use the custom ``MyGeoPoint`` class in your SDK model, as shown in the +following example: + +.. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.use-geopoint-class.js + :language: javascript + +You add instances of your class to the database just like any other SDK +model. However, in this example, because the ``MyGeoPoint`` class does not +extend ``Realm.Object``, we must specify ``MyGeoPoint.schema`` when opening +the database: diff --git a/source/includes/api-details/javascript/model-data/object-models-define-optional-property-description.rst b/source/includes/api-details/javascript/model-data/object-models-define-optional-property-description.rst new file mode 100644 index 0000000000..0ffb7b9735 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-define-optional-property-description.rst @@ -0,0 +1,3 @@ +To mark a property as optional, append a question mark ``?`` to its type. + +The following ``Car`` schema defines an optional ``miles`` property of type ``int``. diff --git a/source/includes/api-details/javascript/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/javascript/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..f604fb4dd4 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,12 @@ +Create a JavaScript class that extends :js-sdk:`Realm.Object +`. + +Define a static ``schema`` object of type :js-sdk:`ObjectSchema +`. This schema includes a ``name`` property, +which becomes the table name in the database. The schema should include a +``properties`` array, which is an array of objects of type +:js-sdk:`PropertiesTypes `. Each object in +this array contains a string key that becomes the name of the property, and +a :js-sdk:`PropertySchema ` that provides +additional details about the property, such as its type and any special +behaviors it should have. diff --git a/source/includes/api-details/javascript/model-data/object-models-define-sdk-object-model-description.rst b/source/includes/api-details/javascript/model-data/object-models-define-sdk-object-model-description.rst new file mode 100644 index 0000000000..458b26a6cc --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-define-sdk-object-model-description.rst @@ -0,0 +1,12 @@ +In JavaScript, to define an SDK object, create a JavaScript class that extends +:js-sdk:`Realm.Object `. + +Define a static ``schema`` object that includes a ``name`` property and +a ``properties`` array. The ``name`` becomes the table name in the database. +The ``properties`` array describes the property names, types, and any additional +details about special property behaviors, such as whether the property should +be indexed. + +For object types with special behaviors, such as embedded objects and +asymmetric objects, set the optional ``embedded`` or ``asymmetric`` property +to ``true``. diff --git a/source/includes/api-details/javascript/model-data/object-models-designate-primary-key-js-ts-description.rst b/source/includes/api-details/javascript/model-data/object-models-designate-primary-key-js-ts-description.rst new file mode 100644 index 0000000000..0129865c3d --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-designate-primary-key-js-ts-description.rst @@ -0,0 +1,5 @@ +To specify a property as an object type's primary key, set the schema's +``primaryKey`` field to the property name. + +The following ``Car`` object schema specifies the ``_id`` property as its +primary key. diff --git a/source/includes/api-details/javascript/model-data/object-models-fts-index-property-js-ts-description.rst b/source/includes/api-details/javascript/model-data/object-models-fts-index-property-js-ts-description.rst new file mode 100644 index 0000000000..22cfdae1cf --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-fts-index-property-js-ts-description.rst @@ -0,0 +1,3 @@ +To create an FTS index, set the `indexed `__ +type to ``'full-text'``. This enables full-text queries on the property. In the +following example, we set the indexed type for the ``name`` property to ``'full-text'``. diff --git a/source/includes/api-details/javascript/model-data/object-models-ignore-property-js-ts-description.rst b/source/includes/api-details/javascript/model-data/object-models-ignore-property-js-ts-description.rst new file mode 100644 index 0000000000..9a1c7596c0 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-ignore-property-js-ts-description.rst @@ -0,0 +1 @@ +To ignore a property, omit it from the object schema. diff --git a/source/includes/api-details/javascript/model-data/object-models-index-property-js-ts-description.rst b/source/includes/api-details/javascript/model-data/object-models-index-property-js-ts-description.rst new file mode 100644 index 0000000000..7bf911d797 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-index-property-js-ts-description.rst @@ -0,0 +1,13 @@ +You can index properties of these data types: + +- string +- integer +- boolean +- ``Date`` +- ``UUID`` +- ``ObjectId`` + +To define an index for a given property, set ``indexed`` to ``true``. + +The following ``Car`` object schema defines an index on the ``_id`` +property. diff --git a/source/includes/api-details/javascript/model-data/object-models-map-model-or-property-to-different-name-description.rst b/source/includes/api-details/javascript/model-data/object-models-map-model-or-property-to-different-name-description.rst new file mode 100644 index 0000000000..1cfb326f80 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-map-model-or-property-to-different-name-description.rst @@ -0,0 +1,28 @@ +**Map a Model Name** + +To use a different class name in your code than is stored in the database: + +1. Set the ``name`` property of your SDK object's **schema** to the name + that you want to use to store the object. + +#. Use the **class** name in the database configuration's ``schema`` property + when you :ref:`open the database `. + +#. Use the mapped name for performing CRUD operations or when defining + Sync Subscriptions. + +In the following example, the SDK stores objects created with the +``Task`` class as ``Todo_Item``. + +.. literalinclude:: /examples/generated/node/v12/define-a-realm-object-schema.test.snippet.remap-class-name.js + :language: javascript + :emphasize-lines: 5, 18, 27, 39, 47 + +**Map a Property Name** + +To use a different property name in your code than is stored in the database, +set ``mapTo`` to the name of the property as it appears in your code. + +In the following ``Car`` object schema, the database stores the car's +model name with the snake case ``model_name`` property. The schema maps the property +to ``modelName`` for objects used in client code. diff --git a/source/includes/api-details/javascript/model-data/object-models-model-unstructured-data-js-ts-description.rst b/source/includes/api-details/javascript/model-data/object-models-model-unstructured-data-js-ts-description.rst new file mode 100644 index 0000000000..6674d81e29 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-model-unstructured-data-js-ts-description.rst @@ -0,0 +1,11 @@ +.. versionadded:: 12.9.0 + +Starting in Node.js SDK version 12.9.0, you can store +collections of mixed data within a ``mixed`` property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`mixed ` types. You can then set these +``mixed`` properties as a :ref:`list ` or a +:ref:`dictionary ` collection of mixed elements. + +Note that ``mixed`` *cannot* represent a set or an embedded object. diff --git a/source/includes/api-details/javascript/model-data/object-models-object-model-description.rst b/source/includes/api-details/javascript/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..2f8edbdac5 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-object-model-description.rst @@ -0,0 +1,16 @@ +You can define SDK models as JavaScript classes that extend ``Realm.Object``. + +When you create objects, use an object literal. This lets you create an +**unmanaged** object, and pass it to the database when it makes sense to do so. + +Do not use ``new`` to construct a new object instance. If you use ``new`` with +class-based models, this creates a new **managed** object, which has the +following side effects: + +- Constructing a ``new`` object calls the ``realm.create()`` method, which can + only be used in a write transcation. +- Constructing a ``new`` object has complications when the object contains or + is itself an embedded object. + +For more information about object creation and managed objects, refer to +:ref:`sdks-crud-create` and :ref:`sdks-create-specific-object-types`. diff --git a/source/includes/api-details/javascript/model-data/object-models-object-schema-js-ts-description.rst b/source/includes/api-details/javascript/model-data/object-models-object-schema-js-ts-description.rst new file mode 100644 index 0000000000..f5ccf7caaa --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-object-schema-js-ts-description.rst @@ -0,0 +1,12 @@ +When you create an SDK object model class, you define the type's ``name`` and +``properties`` in a static property called ``schema``. + +When the SDK model extends ``Realm.Object``, you pass the model class directly +to the database ``schema`` list, and it uses the ``schema`` property in your +model class as a part of the database schema. + +When the SDK model does *not* extend ``Realm.Object``, as when it is an +embedded object, you pass only the object's schema to the database ``schema`` +list. You cannot pass the object itself directly to the database. + +.. TODO: Verify that this is accurate diff --git a/source/includes/api-details/javascript/model-data/object-models-set-default-value-for-property-description.rst b/source/includes/api-details/javascript/model-data/object-models-set-default-value-for-property-description.rst new file mode 100644 index 0000000000..06abe27ff0 --- /dev/null +++ b/source/includes/api-details/javascript/model-data/object-models-set-default-value-for-property-description.rst @@ -0,0 +1,5 @@ +To define a default value, set the value of the property to an object with a +``type`` field and a ``default`` field. + +The following ``Car`` object schema specifies a default value of ``0`` for +the ``miles`` property. diff --git a/source/includes/api-details/kotlin/model-data/object-models-database-schema-description.rst b/source/includes/api-details/kotlin/model-data/object-models-database-schema-description.rst new file mode 100644 index 0000000000..ea0ccb91c2 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-database-schema-description.rst @@ -0,0 +1,3 @@ +In Kotlin, the database :kotlin-sdk:`configuration ` +has a :kotlin-sdk:`schema ` +property that takes a set of classes that the database can manage. diff --git a/source/includes/api-details/kotlin/model-data/object-models-define-asymmetric-object-description.rst b/source/includes/api-details/kotlin/model-data/object-models-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..b6bf6079f8 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-define-asymmetric-object-description.rst @@ -0,0 +1,3 @@ +In the Kotlin SDK, to define an asymmetric object type, create a Kotlin class +that implements the :kotlin-sync-sdk:`AsymmetricRealmObject +` interface: diff --git a/source/includes/api-details/kotlin/model-data/object-models-define-embedded-object-description.rst b/source/includes/api-details/kotlin/model-data/object-models-define-embedded-object-description.rst new file mode 100644 index 0000000000..9e6b950825 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-define-embedded-object-description.rst @@ -0,0 +1,4 @@ +In the Kotlin SDK, to define an embedded object type, create a Kotlin class +that implements the :kotlin-sdk:`EmbeddedRealmObject +` +interface. diff --git a/source/includes/api-details/kotlin/model-data/object-models-define-geospatial-object-description.rst b/source/includes/api-details/kotlin/model-data/object-models-define-geospatial-object-description.rst new file mode 100644 index 0000000000..c48b1cd2b3 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-define-geospatial-object-description.rst @@ -0,0 +1,26 @@ +In the Kotlin SDK, to create a class that conforms to the GeoJSON spec, you: + +1. Create an :ref:`embedded object ` + (a class that inherits from :kotlin-sdk:`EmbeddedRealmObject + `). + +#. At a minimum, add the two fields required by the GeoJSON spec: + + - A field of type ``String`` property that maps to a ``type`` property + with the value of ``"Point"``: ``var type: String = "Point"`` + + - A field of type ``RealmList`` that maps to a ``coordinates`` + property in the object schema containing a latitude/longitude + pair: ``var coordinates: RealmList = realmListOf()`` + +The following example shows an embedded class named ``CustomGeoPoint`` that is used +to persist geospatial data: + +.. literalinclude:: /examples/generated/kotlin/Geospatial.snippet.custom-geopoint.kt + :language: kotlin + +Use the Embedded Class +`````````````````````` + +Use the ``customGeoPoint`` class in your SDK model, as shown in the +following example: diff --git a/source/includes/api-details/kotlin/model-data/object-models-define-optional-property-description.rst b/source/includes/api-details/kotlin/model-data/object-models-define-optional-property-description.rst new file mode 100644 index 0000000000..1687d2075f --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-define-optional-property-description.rst @@ -0,0 +1,5 @@ +SDK object properties *must* be mutable and initialized when declared. +The Kotlin SDK does not currently support abstract properties. You +can declare properties optional (nullable) using the built-in +``?`` Kotlin operator, or you can assign a default value to a property +when you declare it. diff --git a/source/includes/api-details/kotlin/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/kotlin/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..384a84f174 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,3 @@ +In the Kotlin SDK, to define a Realm object type, create a Kotlin class that +implements the :kotlin-sdk:`RealmObject +` interface. diff --git a/source/includes/api-details/kotlin/model-data/object-models-define-sdk-object-model-description.rst b/source/includes/api-details/kotlin/model-data/object-models-define-sdk-object-model-description.rst new file mode 100644 index 0000000000..67baca51f4 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-define-sdk-object-model-description.rst @@ -0,0 +1,25 @@ +In the Kotlin SDK, define an SDK object as a Kotlin class. Each object class +represents an **object type**. + +SDK objects *must* inherit from the ``RealmObject`` class or its +subclasses: ``EmbeddedRealmObject`` or ``AsymmetricRealmObject``. +The Kotlin SDK does *not* support inheritance from custom base classes. + +Additionally, the Kotlin SDK does *not* support using Kotlin +`data classes `__ to model +data. This is because data classes are typically used for immutable data, +which goes against how the Kotlin SDK models data. + +**Kotlin SDK Requires an Empty Constructor** + +The Kotlin SDK requires that SDK objects have an empty constructor. + +If you cannot provide an empty constructor, as a workaround, you can do +something similar to the following: + +.. code-block:: kotlin + :copyable: false + + class Person(var name: String, var age: Int): RealmObject { + constructor(): this("", 0) // Empty constructor required by the SDK + } diff --git a/source/includes/api-details/kotlin/model-data/object-models-designate-primary-key-description.rst b/source/includes/api-details/kotlin/model-data/object-models-designate-primary-key-description.rst new file mode 100644 index 0000000000..95199c8131 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-designate-primary-key-description.rst @@ -0,0 +1,14 @@ +You can create a primary key with any of the following types: + +- ``String`` +- ``Byte`` +- ``Char`` +- ``Short`` +- ``Int`` +- ``Long`` +- ``ObjectId`` +- ``RealmUUID`` + +To specify a property as the object type's primary key, use the +:kotlin-sdk:`@PrimaryKey ` +annotation. diff --git a/source/includes/api-details/kotlin/model-data/object-models-fts-index-property-description.rst b/source/includes/api-details/kotlin/model-data/object-models-fts-index-property-description.rst new file mode 100644 index 0000000000..c79ec4f106 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-fts-index-property-description.rst @@ -0,0 +1,2 @@ +To create an FTS index on a property, use the :kotlin-sdk:`@FullText +` annotation. diff --git a/source/includes/api-details/kotlin/model-data/object-models-ignore-property-description.rst b/source/includes/api-details/kotlin/model-data/object-models-ignore-property-description.rst new file mode 100644 index 0000000000..d2fae88811 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-ignore-property-description.rst @@ -0,0 +1,3 @@ +To ignore a property and prevent it from persisting to the database, use the +:kotlin-sdk:`@Ignore ` +annotation. diff --git a/source/includes/api-details/kotlin/model-data/object-models-index-property-description.rst b/source/includes/api-details/kotlin/model-data/object-models-index-property-description.rst new file mode 100644 index 0000000000..94b79b5153 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-index-property-description.rst @@ -0,0 +1,15 @@ +You can index properties of these data types: + +- ``String`` +- ``Byte`` +- ``Short`` +- ``Int`` +- ``Long`` +- ``Boolean`` +- ``RealmInstant`` +- ``ObjectId`` +- ``RealmUUID`` + +To create an index on a property, use the :kotlin-sdk:`@Index +` annotation on the +property. diff --git a/source/includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst b/source/includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst new file mode 100644 index 0000000000..f00104b3b8 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst @@ -0,0 +1,37 @@ +To map a Kotlin class or property name in your code to a different in the +database: + +#. Use the + :kotlin-sdk:`@PersistedName ` + annotation on the Kotlin class or property. +#. Specify a class or property ``name`` that you want persisted to + the database. + +**Map a Model Name** + +In this example, ``Frog`` is the Kotlin class name used in the code +throughout the project to perform CRUD operations, and ``Frog_Entity`` is the +persisted name to used to store objects in the database: + +.. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-persisted-class.kt + :language: kotlin + +.. important:: Querying by Remapped Class Names + + When querying an inverse relationship on an object with a + remapped class name, you must use the persisted class name. + In the example above, you must query ``Frog_Entity`` instead of + ``Frog``. + For more information, refer to :ref:`Query Inverse Relationships + `. + +**Map a Property Name** + +In this example, ``species`` is the Kotlin property name used in the code +throughout the project to perform CRUD operations and ``latin_name`` is the +persisted name used to store values in the database: + +.. tip:: Querying by Remapped Property Names + + You can query by either the Kotlin name used in the code *or* by the + persisted name stored in the database. diff --git a/source/includes/api-details/kotlin/model-data/object-models-model-unstructured-data-description.rst b/source/includes/api-details/kotlin/model-data/object-models-model-unstructured-data-description.rst new file mode 100644 index 0000000000..0dc6fe8c4c --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-model-unstructured-data-description.rst @@ -0,0 +1,12 @@ +.. versionadded:: 2.0.0 + +Starting in Kotlin SDK version 2.0.0, you can store +collections of mixed data within a ``RealmAny`` property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`RealmAny ` types. You can then set +these ``RealmAny`` properties as a :ref:`list ` or a +:ref:`dictionary ` collection of ``RealmAny`` +elements. + +Note that ``RealmAny`` *cannot* represent a ``RealmSet`` or an embedded object. diff --git a/source/includes/api-details/kotlin/model-data/object-models-object-model-description.rst b/source/includes/api-details/kotlin/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..095018a499 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-object-model-description.rst @@ -0,0 +1,2 @@ +In the Kotlin SDK, you define your application's data model with regular Kotlin +classes declared in your application code. diff --git a/source/includes/api-details/kotlin/model-data/object-models-object-schema-description.rst b/source/includes/api-details/kotlin/model-data/object-models-object-schema-description.rst new file mode 100644 index 0000000000..6a67547e46 --- /dev/null +++ b/source/includes/api-details/kotlin/model-data/object-models-object-schema-description.rst @@ -0,0 +1,4 @@ +In the Kotlin SDK, you do not need to manually specify an object schema. The +SDK automatically creates an object schema for every object type that inherits +from the ``RealmObject`` class or its subclasses: ``EmbeddedRealmObject`` or +``AsymmetricRealmObject``. diff --git a/source/includes/api-details/objectivec/model-data/object-models-database-schema-description.rst b/source/includes/api-details/objectivec/model-data/object-models-database-schema-description.rst new file mode 100644 index 0000000000..0a200a337e --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-database-schema-description.rst @@ -0,0 +1,7 @@ +In Objective-C, you don't have to explicitly specify the database schema when +you configure the database. Swift SDK executables can automatically read and +write any valid SDK object whose model is included in the executable. If you +want to restrict a database to manage only a subset of the SDK models in the +executable, you *can* explicitly pass the models when configuring a database. + +For more information, refer to :ref:`sdks-provide-a-subset-of-models-to-a-database`. diff --git a/source/includes/api-details/objectivec/model-data/object-models-define-asymmetric-object-description.rst b/source/includes/api-details/objectivec/model-data/object-models-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..f7e9104725 --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-define-asymmetric-object-description.rst @@ -0,0 +1,14 @@ +In Objective-C, to define an embedded object, create a class that inherits from +:objc-sdk:`RLMAsymmetricObject `. + +``RLMAsymmetricObject`` broadly supports the same property types as +``RLMObject``, with a few exceptions: + +- Asymmetric objects can only link to embedded objects + - ``RLMObject`` and ``RLMArray`` properties are not supported in Swift SDK + versions 10.42.3 and earlier. In Swift SDK versions 10.42.4 and later, + asymmetric objects can link to non-embedded objects. + - ``RLMEmbeddedObject`` and ``RLMArray`` are supported. + +You cannot link to an ``RLMAsymmetricObject`` from within an ``RLMObject``. +Doing so throws an error. diff --git a/source/includes/api-details/objectivec/model-data/object-models-define-embedded-object-description.rst b/source/includes/api-details/objectivec/model-data/object-models-define-embedded-object-description.rst new file mode 100644 index 0000000000..96bc070c6f --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-define-embedded-object-description.rst @@ -0,0 +1,3 @@ +In Objective-C, to define an embedded object, create a class that inherits from +:objc-sdk:`RLMEmbeddedObject `. You can use +your embedded object in another model as you would any other type. diff --git a/source/includes/api-details/objectivec/model-data/object-models-define-geospatial-object-description.rst b/source/includes/api-details/objectivec/model-data/object-models-define-geospatial-object-description.rst new file mode 100644 index 0000000000..2850761d80 --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-define-geospatial-object-description.rst @@ -0,0 +1,3 @@ +The SDK does not have an example of persisting GeoJSON data with Objective-C. +Refer to the Swift language for details about persisting geospatial data +with the Swift SDK. diff --git a/source/includes/api-details/objectivec/model-data/object-models-define-optional-property-description.rst b/source/includes/api-details/objectivec/model-data/object-models-define-optional-property-description.rst new file mode 100644 index 0000000000..36f727c5a1 --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-define-optional-property-description.rst @@ -0,0 +1,9 @@ +In Objective-C, pointer-type properties are considered optional in the +data model unless you specifically declare a property as required. +To declare a given property as required, implement the +:objc-sdk:`requiredProperties +` +method and return an array of required property names. + +Implicitly required properties, such as properties of primitive types, do +not need to be manually included in the ``requiredProperties`` array. diff --git a/source/includes/api-details/objectivec/model-data/object-models-define-projection-missing-description.rst b/source/includes/api-details/objectivec/model-data/object-models-define-projection-missing-description.rst new file mode 100644 index 0000000000..34eee13df2 --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-define-projection-missing-description.rst @@ -0,0 +1,2 @@ +The documentation is currently missing an example of how to define a projection +in Objective-C. diff --git a/source/includes/api-details/objectivec/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/objectivec/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..31fdb0d9fe --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,2 @@ +In Objective-C, to define a Realm object, create a class that inherits from +:objc-sdk:`RLMObject `. diff --git a/source/includes/api-details/objectivec/model-data/object-models-define-sdk-object-model-description.rst b/source/includes/api-details/objectivec/model-data/object-models-define-sdk-object-model-description.rst new file mode 100644 index 0000000000..e21148cfa1 --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-define-sdk-object-model-description.rst @@ -0,0 +1,10 @@ +In Objective-C, to define an SDK object, create a class that inherits from one +of the SDK object types: + +- :objc-sdk:`RLMObject ` +- :objc-sdk:`RLMEmbeddedObject ` +- :objc-sdk:`RLMAsymmetricObject ` + +The name of the class becomes the table name in the database. Properties of the +class persist in the database. This makes it as easy to work with persisted +objects as it is to work with regular Objective-C objects. diff --git a/source/includes/api-details/objectivec/model-data/object-models-designate-primary-key-description.rst b/source/includes/api-details/objectivec/model-data/object-models-designate-primary-key-description.rst new file mode 100644 index 0000000000..3066e50a3f --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-designate-primary-key-description.rst @@ -0,0 +1,8 @@ +You can create a primary key with any of the following types: + +- ``RLMPropertyTypeString`` +- ``RLMPropertyTypeInt`` + +To designate a property as an object's primary key, override +:objc-sdk:`+[RLMObject primaryKey] +`. diff --git a/source/includes/api-details/objectivec/model-data/object-models-ignore-property-description.rst b/source/includes/api-details/objectivec/model-data/object-models-ignore-property-description.rst new file mode 100644 index 0000000000..66740a0e6b --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-ignore-property-description.rst @@ -0,0 +1,3 @@ +To ignore a property, override :objc-sdk:`+[RLMObject ignoredProperties] +` +and return a list of ignored property names. diff --git a/source/includes/api-details/objectivec/model-data/object-models-index-property-description.rst b/source/includes/api-details/objectivec/model-data/object-models-index-property-description.rst new file mode 100644 index 0000000000..c3da06b10e --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-index-property-description.rst @@ -0,0 +1,11 @@ +You can index proeprties of these data types: + +- string +- integer +- boolean +- NSDate + +To index a property, override :objc-sdk:`+[RLMObject +indexedProperties] +` +and return a list of indexed property names. diff --git a/source/includes/api-details/objectivec/model-data/object-models-map-model-or-property-to-different-name-description.rst b/source/includes/api-details/objectivec/model-data/object-models-map-model-or-property-to-different-name-description.rst new file mode 100644 index 0000000000..75978c7a6c --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-map-model-or-property-to-different-name-description.rst @@ -0,0 +1,8 @@ +**Map a Model Name** + +The Swift SDK does not support mapping a model name to a different name. + +**Map a Property Name** + +The documentation does not currently have an example of how to map a property +name to a different persisted name with Objective-C. diff --git a/source/includes/api-details/objectivec/model-data/object-models-model-unstructured-data-description.rst b/source/includes/api-details/objectivec/model-data/object-models-model-unstructured-data-description.rst new file mode 100644 index 0000000000..6904b9f585 --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-model-unstructured-data-description.rst @@ -0,0 +1,13 @@ +.. versionadded:: 10.51.0 + +Starting in SDK version 10.51.0, you can store collections of mixed data +within an ``RLMValue`` property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`RLMValue ` types. You can then +set these ``RLMValue`` properties as a :ref:`list ` +or a :ref:`dictionary ` collection of +``RLMValue`` elements. + +Note that ``RLMValue`` *cannot* represent a ``RLMSet`` or an embedded +object. diff --git a/source/includes/api-details/objectivec/model-data/object-models-object-model-description.rst b/source/includes/api-details/objectivec/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..ff6858dff9 --- /dev/null +++ b/source/includes/api-details/objectivec/model-data/object-models-object-model-description.rst @@ -0,0 +1,21 @@ +In Objective-C, SDK object models are regular Objective-C classes that define +the SDK data model. + +Objective-C SDK objects must derive from one of the SDK object types. + +Model Inheritance +````````````````` + +You can subclass SDK models to share behavior between +classes, but there are limitations. In particular, the SDK +does not allow you to: + +- Cast between polymorphic classes: subclass to subclass, subclass to parent, parent to subclass +- Query on multiple classes simultaneously: for example, "get all instances of parent class and subclass" +- Multi-class containers: ``List`` and ``Results`` with a mixture of parent and subclass + +.. tip:: + + Check out the :github:`code samples + ` for working + around these limitations. diff --git a/source/includes/api-details/swift/model-data/object-models-database-schema-description.rst b/source/includes/api-details/swift/model-data/object-models-database-schema-description.rst new file mode 100644 index 0000000000..65e2d70146 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-database-schema-description.rst @@ -0,0 +1,7 @@ +In Swift, you don't have to explicitly specify the database schema when you +configure the database. Swift SDK executables can automatically read and write +any valid SDK object whose model is included in the executable. If you want to +restrict a database to manage only a subset of the SDK models in the executable, +you *can* explicitly pass the models when configuring a database. + +For more information, refer to :ref:`sdks-provide-a-subset-of-models-to-a-database`. diff --git a/source/includes/api-details/swift/model-data/object-models-define-asymmetric-object-description.rst b/source/includes/api-details/swift/model-data/object-models-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..6fe1eaec85 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-define-asymmetric-object-description.rst @@ -0,0 +1,14 @@ +In Swift, to define an asymmetric object, create a class that inherits from +:swift-sdk:`AsymmetricObject `. + +``AsymmetricObject`` broadly supports the same property types as ``Object``, +with a few exceptions: + +- Asymmetric objects can only link to embedded objects + - ``Object`` and ``List`` properties are not supported in Swift SDK + versions 10.42.3 and earlier. In Swift SDK versions 10.42.4 and later, + asymmetric objects can link to non-embedded objects. + - ``EmbeddedObject`` and ``List`` are supported. + +You cannot link to an ``AsymmetricObject`` from within an ``Object``. Doing so +throws an error. diff --git a/source/includes/api-details/swift/model-data/object-models-define-embedded-object-description.rst b/source/includes/api-details/swift/model-data/object-models-define-embedded-object-description.rst new file mode 100644 index 0000000000..614e77dd69 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-define-embedded-object-description.rst @@ -0,0 +1,3 @@ +In Swift, to define an embedded object, create a class that inherits from +:swift-sdk:`EmbeddedObject `. You can use your +embedded object in another model as you would any other type. diff --git a/source/includes/api-details/swift/model-data/object-models-define-geospatial-object-description.rst b/source/includes/api-details/swift/model-data/object-models-define-geospatial-object-description.rst new file mode 100644 index 0000000000..be2d651aed --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-define-geospatial-object-description.rst @@ -0,0 +1,12 @@ +To persist geospatial data with the Swift SDK, create a GeoJSON-compatible +embedded class that you can use in your data model. + +Your custom embedded object must contain the two fields required by the +GeoJSON spec: + +- A field of type ``String`` property that maps to a ``type`` property with + the value of ``"Point"``: ``@Persisted var type: String = "Point"`` + +- A field of type ``List`` that maps to a ``coordinates`` + property containing a latitude/longitude pair: + ``@Persisted private var coordinates: List`` diff --git a/source/includes/api-details/swift/model-data/object-models-define-optional-property-description.rst b/source/includes/api-details/swift/model-data/object-models-define-optional-property-description.rst new file mode 100644 index 0000000000..d739db3657 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-define-optional-property-description.rst @@ -0,0 +1,2 @@ +You can declare properties as optional or required (non-optional) using +standard Swift syntax. diff --git a/source/includes/api-details/swift/model-data/object-models-define-projection-description.rst b/source/includes/api-details/swift/model-data/object-models-define-projection-description.rst new file mode 100644 index 0000000000..863261f1de --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-define-projection-description.rst @@ -0,0 +1,23 @@ +Define a class projection by creating a class of type :swift-sdk:`Projection +`. Specify the :swift-sdk:`Object ` +or :swift-sdk:`EmbeddedObject ` base whose +properties you want to use in the class projection. Use the ``@Projected`` +property wrapper to declare a property that you want to project from a +``@Persisted`` property on the base object. + +.. note:: + + When you use a :ref:`List ` or a :ref:`Set + ` in a class projection, the type in the + projection should be :swift-sdk:`ProjectedCollection + `. + +The examples in this section use a simple data set. The two SDK object +types are ``Person`` and an embedded object ``Address``. A ``Person`` has +a first and last name, an optional ``Address``, and a list of friends +consisting of other ``Person`` objects. An ``Address`` has a city and country. + +See the model for these two classes, ``Person`` and ``Address``, below: + +.. literalinclude:: /examples/generated/code/start/ClassProjection.snippet.models.swift + :language: swift diff --git a/source/includes/api-details/swift/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/swift/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..e1b82a493e --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,2 @@ +In Swift, to define a Realm object, create a class that inherits from +:swift-sdk:`Object `. diff --git a/source/includes/api-details/swift/model-data/object-models-define-sdk-object-model-description.rst b/source/includes/api-details/swift/model-data/object-models-define-sdk-object-model-description.rst new file mode 100644 index 0000000000..b49975fa56 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-define-sdk-object-model-description.rst @@ -0,0 +1,10 @@ +In Swift, to define an SDK object, create a class that inherits from one +of the SDK object types: + +- :swift-sdk:`Object ` +- :swift-sdk:`EmbeddedObject ` +- :swift-sdk:`AsymmetricObject ` + +The name of the class becomes the table name in the database. Properties of the +class persist in the database. This makes it as easy to work with persisted +objects as it is to work with regular Swift objects. diff --git a/source/includes/api-details/swift/model-data/object-models-designate-primary-key-description.rst b/source/includes/api-details/swift/model-data/object-models-designate-primary-key-description.rst new file mode 100644 index 0000000000..1231c2d3c2 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-designate-primary-key-description.rst @@ -0,0 +1,11 @@ +You can create a primary key with any of the following types: + +- String +- Int +- ObjectId +- UUID + +To designate a property as an object's primary key, declare the property with +:swift-sdk:`primaryKey: true +` +on the ``@Persisted`` notation. diff --git a/source/includes/api-details/swift/model-data/object-models-fts-index-property-swift-objc-not-supported.rst b/source/includes/api-details/swift/model-data/object-models-fts-index-property-swift-objc-not-supported.rst new file mode 100644 index 0000000000..809aaa29d7 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-fts-index-property-swift-objc-not-supported.rst @@ -0,0 +1 @@ +The Swift SDK does not currently support Full-Text Search. diff --git a/source/includes/api-details/swift/model-data/object-models-ignore-property-description.rst b/source/includes/api-details/swift/model-data/object-models-ignore-property-description.rst new file mode 100644 index 0000000000..b66bf988bd --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-ignore-property-description.rst @@ -0,0 +1,2 @@ +To ignore a property, omit the ``@Persisted`` notation from the property +attribute. diff --git a/source/includes/api-details/swift/model-data/object-models-index-property-description.rst b/source/includes/api-details/swift/model-data/object-models-index-property-description.rst new file mode 100644 index 0000000000..32ccf8b8ed --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-index-property-description.rst @@ -0,0 +1,14 @@ +You can index properties of these data types: + +- string +- integer +- boolean +- ``Date`` +- ``UUID`` +- ``ObjectId`` +- ``AnyRealmValue`` + +To index a property, declare the property with +:swift-sdk:`indexed:true +` +on the ``@Persisted`` notation. diff --git a/source/includes/api-details/swift/model-data/object-models-map-model-or-property-to-different-name-description.rst b/source/includes/api-details/swift/model-data/object-models-map-model-or-property-to-different-name-description.rst new file mode 100644 index 0000000000..f16b8bb2c6 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-map-model-or-property-to-different-name-description.rst @@ -0,0 +1,16 @@ +**Map a Model Name** + +The Swift SDK does not support mapping a model name to a different name. + +**Map a Property Name** + +Declare the name you want to use in your project as the ``@Persisted`` +property on the object model. Then, pass a dictionary containing the +public and private values for the property names via the +``propertiesMapping()`` function. + +In this example, ``firstName`` is the public property name we use in the code +throughout the project to perform CRUD operations. Using the ``propertiesMapping()`` +function, we map that to store values using the private property name +``first_name`` in the database. If we write to a synced database, the Sync +schema sees the values stored using the private property name ``first_name``. diff --git a/source/includes/api-details/swift/model-data/object-models-model-unstructured-data-description.rst b/source/includes/api-details/swift/model-data/object-models-model-unstructured-data-description.rst new file mode 100644 index 0000000000..b4a9d422ce --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-model-unstructured-data-description.rst @@ -0,0 +1,13 @@ +.. versionadded:: 10.51.0 + +Starting in SDK version 10.51.0, you can store collections of mixed data +within a ``AnyRealmValue`` property. + +To model unstructured data in your app, define the appropriate properties in +your schema as :ref:`AnyRealmValue ` types. You can then +set these ``AnyRealmValue`` properties as a :ref:`list ` +or a :ref:`dictionary ` collection of +``AnyRealmValue`` elements. + +Note that ``AnyRealmValue`` *cannot* represent a ``MutableSet`` or an embedded +object. diff --git a/source/includes/api-details/swift/model-data/object-models-object-model-description.rst b/source/includes/api-details/swift/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..40da5ff400 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-object-model-description.rst @@ -0,0 +1,51 @@ +In Swift, SDK object models are regular Swift classes that define the SDK data +model. + +Swift SDK objects must derive from one of the SDK object types. + +Model Inheritance +````````````````` + +You can subclass SDK models to share behavior between +classes, but there are limitations. In particular, the SDK +does not allow you to: + +- Cast between polymorphic classes: subclass to subclass, subclass to parent, parent to subclass +- Query on multiple classes simultaneously: for example, "get all instances of parent class and subclass" +- Multi-class containers: ``List`` and ``Results`` with a mixture of parent and subclass + +.. tip:: + + Check out the :github:`code samples + ` for working + around these limitations. + +Swift Structs +````````````` + +The SDK does not support Swift structs as models for a variety of +reasons. The SDK's design focuses on "live" objects. +This concept is not compatible with value-type structs. By design, +the SDK provides features that are incompatible with these +semantics, such as: + +- :ref:`Live data ` +- :ref:`Reactive APIs ` +- Low memory footprint of data +- Good operation performance +- :ref:`Lazy and cheap access to partial data ` +- Lack of data serialization/deserialization +- :ref:`Keeping potentially complex object graphs synchronized ` + +That said, it is sometimes useful to detach objects from their backing +database. This typically isn't an ideal design decision. Instead, +developers use this as a workaround for temporary limitations in our +library. + +You can use key-value coding to initialize an unmanaged object as a copy of +a managed object. Then, you can work with that unmanaged object +like any other :apple:`NSObject `. + +.. code-block:: swift + + let standaloneModelObject = MyModel(value: persistedModelObject) diff --git a/source/includes/api-details/swift/model-data/object-models-object-schema-description.rst b/source/includes/api-details/swift/model-data/object-models-object-schema-description.rst new file mode 100644 index 0000000000..ef6988cba2 --- /dev/null +++ b/source/includes/api-details/swift/model-data/object-models-object-schema-description.rst @@ -0,0 +1,7 @@ +The Swift SDK does not require you to manually create object schemas. Instead, +it uses reflection to automatically create schemas for your SDK object types. + +Your project must not set +``SWIFT_REFLECTION_METADATA_LEVEL = none``, or the SDK cannot discover +properties in your models. Reflection is enabled by default if your project +does not specifically set a level for this setting. diff --git a/source/includes/api-details/swift/sync/stream-data-open-synced-database-description.rst b/source/includes/api-details/swift/sync/stream-data-open-synced-database-description.rst index 82a38be092..424d8c78fc 100644 --- a/source/includes/api-details/swift/sync/stream-data-open-synced-database-description.rst +++ b/source/includes/api-details/swift/sync/stream-data-open-synced-database-description.rst @@ -5,7 +5,7 @@ Specify the ``AsymmetricObject`` types you want to sync. The ``AsymmetricObject`` type is incompatible with non-synced databases. If your project uses both a synced and non-synced database, you must explicitly :ref:`pass a subset of classes in your database configuration - ` to exclude the + ` to exclude the ``AsymmetricObject`` from your non-synced database. Automatic schema discovery means that opening a non-synced database diff --git a/source/includes/api-details/typescript/model-data/object-models-define-asymmetric-object-description.rst b/source/includes/api-details/typescript/model-data/object-models-define-asymmetric-object-description.rst new file mode 100644 index 0000000000..242b984e2f --- /dev/null +++ b/source/includes/api-details/typescript/model-data/object-models-define-asymmetric-object-description.rst @@ -0,0 +1,2 @@ +In TypeScript, to define an asymmetric object, set the ``asymmetric`` property +on your object schema. diff --git a/source/includes/api-details/typescript/model-data/object-models-define-geospatial-object-description.rst b/source/includes/api-details/typescript/model-data/object-models-define-geospatial-object-description.rst new file mode 100644 index 0000000000..896d7d0db5 --- /dev/null +++ b/source/includes/api-details/typescript/model-data/object-models-define-geospatial-object-description.rst @@ -0,0 +1,34 @@ +In TypeScript, to create a class that conforms to the GeoJSON spec, you: + +1. Create an embedded SDK object. For more information about embedded + objects, refer to :ref:`sdks-embedded-objects`. + +#. At a minimum, add the two fields required by the GeoJSON spec: + + - A field of type ``double[]`` that maps to a "coordinates" (case sensitive) + property in the object schema. + + - A field of type ``string`` that maps to a "type" property. The value of this + field must be "Point". + +To simplify geodata persistance, you can define a model that implements +``CanonicalGeoPoint``, which already has the correct shape. The following +example shows an embedded class named ``MyGeoPoint`` that is used +to persist geospatial data: + +.. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.define-geopoint-class.ts + :language: typescript + +Use the Embedded Class +`````````````````````` + +You then use the custom ``MyGeoPoint`` class in your SDK model, as shown in the +following example: + +.. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.use-geopoint-class.ts + :language: typescript + +You add instances of your class to the database just like any other SDK +model. However, in this example, because the ``MyGeoPoint`` class does not +extend ``Realm.Object``, we must specify ``MyGeoPoint.schema`` when opening +the database: diff --git a/source/includes/api-details/typescript/model-data/object-models-define-optional-property-description.rst b/source/includes/api-details/typescript/model-data/object-models-define-optional-property-description.rst new file mode 100644 index 0000000000..2dbe939d1a --- /dev/null +++ b/source/includes/api-details/typescript/model-data/object-models-define-optional-property-description.rst @@ -0,0 +1 @@ +To mark a property as optional, append a question mark ``?`` to its type. diff --git a/source/includes/api-details/typescript/model-data/object-models-define-realm-object-description.rst b/source/includes/api-details/typescript/model-data/object-models-define-realm-object-description.rst new file mode 100644 index 0000000000..1544c31dc0 --- /dev/null +++ b/source/includes/api-details/typescript/model-data/object-models-define-realm-object-description.rst @@ -0,0 +1,12 @@ +Create a TypeScript class that extends :js-sdk:`Realm.Object +`. + +Define a static ``schema`` object of type :js-sdk:`ObjectSchema +`. This schema includes a ``name`` property, +which becomes the table name in the database. The schema should include a +``properties`` array, which is an array of objects of type +:js-sdk:`PropertiesTypes `. Each object in +this array contains a string key that becomes the name of the property, and +a :js-sdk:`PropertySchema ` that provides +additional details about the property, such as its type and any special +behaviors it should have. diff --git a/source/includes/api-details/typescript/model-data/object-models-define-sdk-object-model-description.rst b/source/includes/api-details/typescript/model-data/object-models-define-sdk-object-model-description.rst new file mode 100644 index 0000000000..f390a28203 --- /dev/null +++ b/source/includes/api-details/typescript/model-data/object-models-define-sdk-object-model-description.rst @@ -0,0 +1,12 @@ +In TypeScript, to define an SDK object, create a TypeScript class that extends +:js-sdk:`Realm.Object `. + +Define a static ``schema`` object that includes a ``name`` property and +a ``properties`` array. The ``name`` becomes the table name in the database. +The ``properties`` array describes the property names, types, and any additional +details about special property behaviors, such as whether the property should +be indexed. + +For object types with special behaviors, such as embedded objects and +asymmetric objects, set the optional ``embedded`` or ``asymmetric`` property +to ``true``. diff --git a/source/includes/api-details/typescript/model-data/object-models-map-model-or-property-to-different-name-description.rst b/source/includes/api-details/typescript/model-data/object-models-map-model-or-property-to-different-name-description.rst new file mode 100644 index 0000000000..5a471fc204 --- /dev/null +++ b/source/includes/api-details/typescript/model-data/object-models-map-model-or-property-to-different-name-description.rst @@ -0,0 +1,24 @@ +**Map a Model Name** + +To use a different class name in your code than is stored in the database: + +1. Set the ``name`` property of your SDK object's **schema** to the name + that you want to use to store the object. + +#. Use the **class** name in the database configuration's ``schema`` property + when you :ref:`open the database `. + +#. Use the mapped name for performing CRUD operations or when defining + Sync Subscriptions. + +In the following example, the SDK stores objects created with the +``Task`` class as ``Todo_Item``. + +.. literalinclude:: /examples/generated/node/v12/define-a-realm-object-schema.test.snippet.remap-class-name.ts + :language: typescript + :emphasize-lines: 9, 22, 31, 43, 51 + +**Map a Property Name** + +To use a different property name in your code than is stored in the database, +set ``mapTo`` to the name of the property as it appears in your code. diff --git a/source/includes/api-details/typescript/model-data/object-models-object-model-description.rst b/source/includes/api-details/typescript/model-data/object-models-object-model-description.rst new file mode 100644 index 0000000000..3bdea0b235 --- /dev/null +++ b/source/includes/api-details/typescript/model-data/object-models-object-model-description.rst @@ -0,0 +1,16 @@ +You can define SDK models as TypeScript classes that extend ``Realm.Object``. + +When you create objects, use an object literal. This lets you create an +**unmanaged** object, and pass it to the database when it makes sense to do so. + +Do not use ``new`` to construct a new object instance. If you use ``new`` with +class-based models, this creates a new **managed** object, which has the +following side effects: + +- Constructing a ``new`` object calls the ``realm.create()`` method, which can + only be used in a write transcation. +- Constructing a ``new`` object has complications when the object contains or + is itself an embedded object. + +For more information about object creation and managed objects, refer to +:ref:`sdks-crud-create` and :ref:`sdks-create-specific-object-types`. diff --git a/source/includes/api-details/typescript/model-data/object-models-set-default-value-for-property-description.rst b/source/includes/api-details/typescript/model-data/object-models-set-default-value-for-property-description.rst new file mode 100644 index 0000000000..b38e740e2e --- /dev/null +++ b/source/includes/api-details/typescript/model-data/object-models-set-default-value-for-property-description.rst @@ -0,0 +1,2 @@ +To define a default value, set the value of the property to an object with a +``type`` field and a ``default`` field. \ No newline at end of file diff --git a/source/includes/dotnet-implement-interface.rst b/source/includes/dotnet-implement-interface.rst index e036cdc995..f3326ccd26 100644 --- a/source/includes/dotnet-implement-interface.rst +++ b/source/includes/dotnet-implement-interface.rst @@ -12,7 +12,7 @@ :dotnet-sdk:`AsymmetricObject ` base classes. This approach to SDK model definition is still supported, but does not include new features such as the :ref:`nullability annotations - `. These base classes will be + `. These base classes will be deprecated in a future SDK release. You should use the interfaces for any new classes that you write and should consider migrating your existing classes. \ No newline at end of file diff --git a/source/includes/important-cant-persist-geospatial.rst b/source/includes/important-cant-persist-geospatial.rst deleted file mode 100644 index 077f8003b8..0000000000 --- a/source/includes/important-cant-persist-geospatial.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. important:: Cannot Persist Geospatial Data Types - - Currently, you can only persist geospatial data. Geospatial data types *cannot* be persisted directly. For example, you - can't declare a property that is of type ``GeoBox``. - - These types can only be used as arguments for geospatial queries. diff --git a/source/includes/sdk-examples/model-data/object-models-define-asymmetric-object.rst b/source/includes/sdk-examples/model-data/object-models-define-asymmetric-object.rst new file mode 100644 index 0000000000..e5f6a64530 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-define-asymmetric-object.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/asymmetric-sync.snippet.asymmetric-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_ingest.test.snippet.asymmetric-sync-object.dart + :language: dart + :emphasize-lines: 1 + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/react-native/js/data-ingest.test.snippet.data-ingest-object.jsx + :language: javascript + :emphasize-lines: 6 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-asymmetric-model.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AsymmetricSync.snippet.asymmetric-model.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/react-native/ts/data-ingest.test.snippet.data-ingest-object.tsx + :language: typescript + :emphasize-lines: 12 diff --git a/source/includes/sdk-examples/model-data/object-models-define-custom-setters.rst b/source/includes/sdk-examples/model-data/object-models-define-custom-setters.rst new file mode 100644 index 0000000000..7818169cc5 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-define-custom-setters.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Objects.snippet.custom-setter.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/model-data/object-models-define-embedded-object.rst b/source/includes/sdk-examples/model-data/object-models-define-embedded-object.rst new file mode 100644 index 0000000000..d75300b8d3 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-define-embedded-object.rst @@ -0,0 +1,61 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.model-with-embedded-object.cpp + :language: cpp + :emphasize-lines: 8, 13 + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/EmbeddedExamples.snippet.embedded-classes.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.embedded-object-model.dart + :language: dart + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogEmbeddedExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogEmbeddedExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.define-embedded-objects.js + :language: javascript + :emphasize-lines: 3, 18, 28 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-embedded-object.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/EmbeddedObjects.snippet.models.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.embedded-object-models.swift + :language: swift + + - id: typescript + content: | + + .. include:: /examples/generated/react-native/v12/models.snippet.define-embedded-property.ts.rst diff --git a/source/includes/sdk-examples/model-data/object-models-define-geospatial-object.rst b/source/includes/sdk-examples/model-data/object-models-define-geospatial-object.rst new file mode 100644 index 0000000000..7061972c58 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-define-geospatial-object.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.usingcustomgeopoint.cs + :language: csharp + :emphasize-lines: 7 + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.use-geopoint-class.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.write-geospatial-object.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Geospatial.snippet.geopoint-model.kt + :language: kotlin + :emphasize-lines: 4 + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.custom-geopoint.swift + :language: swift + :emphasize-lines: 2-3 + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.write-geospatial-object.ts + :language: typescript diff --git a/source/includes/sdk-examples/model-data/object-models-define-optional-property.rst b/source/includes/sdk-examples/model-data/object-models-define-optional-property.rst new file mode 100644 index 0000000000..b7998ce7e5 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-define-optional-property.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/supported-types.snippet.optional-string.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/NullabilityTest.snippet.nullability.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.property-annotations.dart + :language: dart + :emphasize-lines: 5 + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-object-properties.js + :language: javascript + :emphasize-lines: 8 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DataTypes.snippet.string-optional.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.optional-required-properties.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.optional-required-properties.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/model-data/object-models-define-projection.rst b/source/includes/sdk-examples/model-data/object-models-define-projection.rst new file mode 100644 index 0000000000..32ebf06e57 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-define-projection.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ClassProjection.snippet.declare-class-projection.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/model-data/object-models-define-realm-object.rst b/source/includes/sdk-examples/model-data/object-models-define-realm-object.rst new file mode 100644 index 0000000000..72618af10b --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-define-realm-object.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.define-model.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/ObjectModelsAndSchemas.snippet.dog_class.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.create-realm-model.dart + :language: dart + + .. literalinclude:: /examples/generated/flutter/define_realm_object_schema_usage_test.snippet.use-realm-object.dart + :language: dart + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogObjectExample.snippet.complete.java.rst + + .. include:: /examples/generated/java/local/FrogRealmModelExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogObjectExampleKt.snippet.complete.kt.rst + + .. include:: /examples/generated/java/local/FrogRealmModelExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/react-native/js/Book.snippet.js-book-schema.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-realm-object.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.define-a-model.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.define-a-model.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/react-native/ts/Book.snippet.ts-book-schema.ts + :language: typescript diff --git a/source/includes/sdk-examples/model-data/object-models-define-sdk-object-model.rst b/source/includes/sdk-examples/model-data/object-models-define-sdk-object-model.rst new file mode 100644 index 0000000000..103e122266 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-define-sdk-object-model.rst @@ -0,0 +1,63 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.define-model.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Schemas.snippet.schema_property.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/define_realm_object_schema_usage_test.snippet.use-realm-object.dart + :language: dart + :caption: myapp.dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/local/RealmObjectVsRealmModelTest.snippet.realm-object-vs-realm-model.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/local/RealmObjectVsRealmModelTest.snippet.realm-object-vs-realm-model.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/react-native/js/Book.snippet.js-book-schema.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-realm-object.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.define-a-model.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.define-a-model.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/react-native/ts/Book.snippet.ts-book-schema.ts + :language: typescript diff --git a/source/includes/sdk-examples/model-data/object-models-designate-primary-key.rst b/source/includes/sdk-examples/model-data/object-models-designate-primary-key.rst new file mode 100644 index 0000000000..4dbb93a139 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-designate-primary-key.rst @@ -0,0 +1,64 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.person-model.cpp + :language: cpp + :emphasize-lines: 2 + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Objects.snippet.primary-key.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.property-annotations.dart + :language: dart + :emphasize-lines: 2-3 + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogPrimaryKeyExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogPrimaryKeyExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-object-properties.js + :language: javascript + :emphasize-lines: 10 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-primary-key.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.specify-a-primary-key.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.specify-a-primary-key.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/model-data/object-models-enable-full-text-search-on-property.rst b/source/includes/sdk-examples/model-data/object-models-enable-full-text-search-on-property.rst new file mode 100644 index 0000000000..1a73d59e2e --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-enable-full-text-search-on-property.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Objects.snippet.index.cs + :language: csharp + :emphasize-lines: 6-7 + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/full_text_search_test.snippet.flutter-fts-annotation.dart + :language: dart + :emphasize-lines: 6-10 + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-fts.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/full-text-search.test.snippet.node-fts-annotation.ts + :language: typescript + :emphasize-lines: 8 diff --git a/source/includes/sdk-examples/model-data/object-models-ignore-property.rst b/source/includes/sdk-examples/model-data/object-models-ignore-property.rst new file mode 100644 index 0000000000..1c0ec0a5ad --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-ignore-property.rst @@ -0,0 +1,64 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.employee-model.cpp + :language: cpp + :emphasize-lines: 8 + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Objects.snippet.ignore.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.property-annotations.dart + :language: dart + :emphasize-lines: 9-10 + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogIgnoreExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogIgnoreExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-ignored.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.ignore-a-property.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.ignore-a-property.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/model-data/object-models-index-property.rst b/source/includes/sdk-examples/model-data/object-models-index-property.rst new file mode 100644 index 0000000000..60f9943b76 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-index-property.rst @@ -0,0 +1,65 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Objects.snippet.index.cs + :language: csharp + :emphasize-lines: 3-4 + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.property-annotations.dart + :language: dart + :emphasize-lines: 12-13 + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogIndexExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogIndexExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-advanced-properties.js + :language: javascript + :emphasize-lines: 5 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-index.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.index-a-property.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.index-a-property.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/model-data/object-models-map-model-or-property-to-different-name.rst b/source/includes/sdk-examples/model-data/object-models-map-model-or-property-to-different-name.rst new file mode 100644 index 0000000000..6fdbf57e59 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-map-model-or-property-to-different-name.rst @@ -0,0 +1,76 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Objects.snippet.rename-class.cs + :language: csharp + :caption: Map a model name + + .. literalinclude:: /examples/generated/dotnet/Objects.snippet.rename.cs + :language: csharp + :caption: Map a property name + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/define_realm_model_test.snippet.map-to.dart + :language: dart + :emphasize-lines: 2 + :caption: Map a model name + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.property-annotations.dart + :language: dart + :emphasize-lines: 15-16 + :caption: Map a property name + + - id: java + content: | + + .. include:: /examples/generated/java/local/RenameModuleExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/RenameModuleExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-advanced-properties.js + :language: javascript + :emphasize-lines: 7 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-persisted-name.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ObjectModels.snippet.rename-a-property.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/model-data/object-models-model-unstructured-data.rst b/source/includes/sdk-examples/model-data/object-models-model-unstructured-data.rst new file mode 100644 index 0000000000..2676768ad6 --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-model-unstructured-data.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. include:: /includes/api-details/dart/model-data/object-models-model-unstructured-data-example.rst + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/model-data/object-models-set-default-value-for-property.rst b/source/includes/sdk-examples/model-data/object-models-set-default-value-for-property.rst new file mode 100644 index 0000000000..37c978bb8d --- /dev/null +++ b/source/includes/sdk-examples/model-data/object-models-set-default-value-for-property.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Objects.snippet.default.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/schemas.snippet.property-annotations.dart + :language: dart + :emphasize-lines: 7 + + - id: java + content: | + + .. include:: /examples/generated/java/local/FrogDefaultValueExample.snippet.complete.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/local/FrogDefaultValueExampleKt.snippet.complete.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/define-a-realm-object-schema.snippet.define-advanced-properties.js + :language: javascript + :emphasize-lines: 8 + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/platforms/apple/swift-concurrency.txt b/source/platforms/apple/swift-concurrency.txt index bb64760b16..ba2cc0f255 100644 --- a/source/platforms/apple/swift-concurrency.txt +++ b/source/platforms/apple/swift-concurrency.txt @@ -230,6 +230,6 @@ To avoid threading-related issues in code that uses Swift concurrency features: .. _concurrency-page-sendable-thread-confined-reference: Sendable, Non-Sendable, and Thread-Confined Types ------------------------------------------------- +------------------------------------------------- .. include:: /includes/swift-api-sendable-thread-confined-reference.rst diff --git a/source/platforms/unity.txt b/source/platforms/unity.txt index 8caa8f1e94..bdc51d845f 100644 --- a/source/platforms/unity.txt +++ b/source/platforms/unity.txt @@ -243,7 +243,7 @@ away. For examples of when you may perform BSON deserialization, check out the ` documentation. Using the SDK While the Application is Quitting -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The .NET SDK cannot be accessed within the `AppDomain.DomainUnload Event `_ or diff --git a/source/sdk/crud/read.txt b/source/sdk/crud/read.txt index cdc99da7c4..fbc5798a14 100644 --- a/source/sdk/crud/read.txt +++ b/source/sdk/crud/read.txt @@ -46,3 +46,11 @@ and the one you use varying depending on the SDK you're using. i.e.: - LINQ (C#) - Swift SDK (Swift & Objective-C Type-Safe queries and NS Predicate queries) - Java (Java & Kotlin, Fluent Interface) + +Read Relationship Properties +---------------------------- + +.. _sdks-query-inverse-relationships: + +Query Inverse Relationships +~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/files/configure-and-open.txt b/source/sdk/files/configure-and-open.txt index c4b912df59..3d5c090a30 100644 --- a/source/sdk/files/configure-and-open.txt +++ b/source/sdk/files/configure-and-open.txt @@ -37,8 +37,8 @@ specify a subset of schemas (objects) when opening a realm. Open a Database Asynchronously ------------------------------ -.. _sdks-provide-a-subset-of-classes-to-a-database: +.. _sdks-provide-a-subset-of-models-to-a-database: -Provide a Subset of Classes to a Database ------------------------------------------ +Provide a Subset of Models to a Database +---------------------------------------- diff --git a/source/sdk/model-data.txt b/source/sdk/model-data.txt index 11296dd223..66fdddd50c 100644 --- a/source/sdk/model-data.txt +++ b/source/sdk/model-data.txt @@ -6,8 +6,8 @@ Model Data :titlesonly: Define an Object Model + Define Property Types Relationships - Supported Types Change an Object Model Model Data with Device Sync @@ -15,7 +15,7 @@ The following pages contain information about how to model data in Atlas Device SDK code: - :ref:`sdks-object-models` +- :ref:`sdks-define-property-types` - :ref:`sdks-relationships` -- :ref:`sdks-supported-data-types` - :ref:`sdks-change-object-model` - :ref:`sdks-model-data-device-sync` diff --git a/source/sdk/model-data/object-models.txt b/source/sdk/model-data/object-models.txt index 9cb67efbdc..ac8057081b 100644 --- a/source/sdk/model-data/object-models.txt +++ b/source/sdk/model-data/object-models.txt @@ -4,70 +4,1403 @@ Define an SDK Object Model ========================== +.. meta:: + :description: Define an object and schema to persist data with Atlas Device SDK. Data models may include properties with special behaviors, such as indexes or default values. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none - :depth: 3 + :depth: 2 :class: singlecol -.. _sdks-define-object-schema: +.. tabs-selector:: drivers + +Atlas Device SDK applications model data as objects composed of +field-value pairs that each contain one or more :ref:`supported +` data types. You can annotate a property to +provide additional meta-information that gives the property special behaviors, +such as: + +- Designate a property as the object's primary key +- Ignore a property when reading and writing data +- Index a property to improve performance for queries on that property +- Index a property for use with Full-Text Search +- Map a property or class to a different stored name + +.. _sdks-object-types-schemas: + +Object Types and Schemas +------------------------ + +Every database object has an *object type* that refers to the object's +class or struct. Objects of the same type share an :ref:`object schema +` that defines the properties and relationships of those +objects. + +.. _sdks-database-schema: + +Database Schema +~~~~~~~~~~~~~~~ + +A **database schema** is a list of valid object schemas that the database may +contain. Every database object must conform to an object type that's included +in its database's schema. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-database-schema-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-database-schema-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-database-schema-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-database-schema-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-database-schema-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-database-schema-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-database-schema-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-database-schema-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-database-schema-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/model-data/object-models-database-schema-js-ts-description.rst + +If the database already contains data when you open it, the SDK +validates each object to ensure that an object schema was provided for +its type and that it meets all of the constraints specified in the schema. + +For more information about how to open the database, refer to +:ref:`sdks-configure-and-open-database`. + +.. _sdks-object-model: + +Object Model +~~~~~~~~~~~~ + +Your **object model** is the core structure that gives the database +information about how to interpret and store the objects in your app. +The properties that you want to persist must use the :ref:`supported data types +`. Properties are also the mechanism for +establishing :ref:`relationships ` between object types, +or establishing other special behaviors for specific fields in your object. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-object-model-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/object-models-object-model-description.rst + +.. _sdks-object-schema: + +Object Schema +~~~~~~~~~~~~~ + +An **object schema** maps properties for a specific object type. The SDK +schemas give the SDK the information it needs to validate, store, and retrieve +the objects. A schema must accompany every object model you want to persist. +When possible, Device SDK uses language-specific features to simplify or +abstract away the process of creating a schema. + +.. tabs-drivers:: -Define an SDK Object Schema ---------------------------- + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-object-schema-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-object-schema-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-object-schema-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-object-schema-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-object-schema-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-object-schema-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-object-schema-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/swift/model-data/object-models-object-schema-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-object-schema-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/model-data/object-models-object-schema-js-ts-description.rst .. _sdks-define-objects: Define an SDK Object Model -------------------------- -Placeholder page for defining an object model. +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-define-sdk-object-model-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-define-sdk-object-model-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-define-sdk-object-model-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-define-sdk-object-model-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-define-sdk-object-model-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-define-sdk-object-model-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-define-sdk-object-model-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-define-sdk-object-model-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-define-sdk-object-model-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/object-models-define-sdk-object-model-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-define-sdk-object-model.rst + +.. include:: /includes/note-class-char-limit.rst + +.. _sdks-define-models-object-types: + +Define Models for Specific Object Types +--------------------------------------- + +The SDK provides three specific object types, plus support for using an object +with geospatial data: + +- **Realm object**: the base object type used by the SDK. +- **Embedded object**: a special object type that cannot exist outside the + lifecycle of its parent Realm object. +- **Asymmetric object**: a special object type used in heavy insert-only + workloads using the Data Ingest feature. +- **Geospatial object**: an object that uses duck-typing to provide a + consistent interface and special methods for working with geospatial data. + +Throughout the documentation, when we refer to "SDK objects" or "SDK object +types," we refer to one of these object types. + +.. _sdks-realm-objects: + +Define a Realm Object +~~~~~~~~~~~~~~~~~~~~~ + +A Realm object is the base object type stored by the SDK's device persistence +layer, Realm. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-define-realm-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/object-models-define-realm-object-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-define-realm-object.rst .. _sdks-embedded-objects: Define an Embedded Object ~~~~~~~~~~~~~~~~~~~~~~~~~ -Placeholder for defining an embedded object, so we have a ref target to link to. +An **embedded object** is a special type of object that models complex +data about a specific object. Embedded objects are similar to +relationships, but they provide additional constraints and +map more naturally to the denormalized :manual:`MongoDB document model +`. + +The SDK enforces unique ownership constraints that treat each embedded +object as nested data inside of a single, specific parent object. An +embedded object inherits the lifecycle of its parent object and cannot +exist as an independent database object. The SDK automatically deletes +embedded objects if their parent object is deleted or when overwritten +by a new embedded object instance. This differs from a :ref:`to-one +` or :ref:`to-many ` +relationship, in which the related objects have independent lifecycles. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-define-embedded-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-define-embedded-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-define-embedded-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-define-embedded-object-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-define-embedded-object-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-define-embedded-object-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-define-embedded-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-define-embedded-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-define-embedded-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/model-data/object-models-define-embedded-object-js-ts-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-define-embedded-object.rst + +.. important:: Lifecycle considerations + + Because embedded objects cannot exist as objects independent of their parent + object, when you delete a Realm object, the SDK automatically deletes any + embedded objects referenced by that object. Any objects that your + application must persist after the deletion of their parent object + should use :ref:`relationships ` instead. + + Additionally, embedded objects cannot have a primary key. .. _sdks-asymmetric-objects: Define an Asymmetric Object ~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Placeholder for defining an asymmetric object, so we have a ref target to link to. +You can use :ref:`Data Ingest ` to sync an +object unidirectionally from your device to the database linked to your +Atlas App Services App. + +Asymmetric objects do not function in the same way as other database objects. +You cannot: + +- Remove an asymmetric object from the device database +- Query an asymmetric object from the device database + +You can only create an asymmetric object, which then syncs unidirectionally +to the Atlas database linked to your App with Device Sync. + +For more information, see: :ref:`Create an Asymmetric Object +`. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-define-asymmetric-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-define-asymmetric-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-define-asymmetric-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-define-asymmetric-object-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-define-asymmetric-object-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-define-asymmetric-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-define-asymmetric-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-define-asymmetric-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-define-asymmetric-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/object-models-define-asymmetric-object-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-define-asymmetric-object.rst .. _sdks-define-geospatial-object: Define a Geospatial Object ~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. _sdks-define-special-property-types: +To persist ``GeoPoint`` data, it must conform to the +`GeoJSON spec `_. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk -Define Special Property Types ------------------------------ + .. include:: /includes/api-details/cpp/model-data/object-models-define-geospatial-object-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-define-geospatial-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-define-geospatial-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-define-geospatial-object-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-define-geospatial-object-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-define-geospatial-object-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-define-geospatial-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-define-geospatial-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-define-geospatial-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/object-models-define-geospatial-object-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-define-geospatial-object.rst + +.. important:: Cannot Persist Geospatial Data Types + + Currently, you can only persist geospatial data. Geospatial data types + *cannot* be persisted directly. For example, you can't declare a property + that is of type ``GeoBox``. + + These types can only be used as arguments for geospatial queries. + +.. _sdks-define-property-behaviors: + +Define Property Behaviors +------------------------- + +You can define property types that have special behavior. These property types +provide additional functionality or constraints to these fields in your data +model. + +.. _sdks-index-property: + +Index a Property +~~~~~~~~~~~~~~~~ + +When you add an index to a property, the SDK can perform equality matches and +range-based query operations on the property much more efficiently. Without +indexes, the SDK scans every object of its type to select the objects that +match the given query. However, if an applicable index exists for a query, the +SDK uses the index to limit the number of objects it must inspect. + +Indexes are special data structures that store a small portion of a +database's data in an easy-to-traverse form. The index stores the value +of a specific field ordered by the value of the field. + +When indexing a property, keep in mind: + +- Indexes can be nullable. +- :ref:`Primary keys ` are indexed by default. +- You *cannot* combine standard indexes with full-text search (FTS) + indexes on the same property. To create an FTS index on a property, refer to + the :ref:`sdks-fts-property` section on this page. + +Indexing a property makes some types of queries more efficient, but can slow +down writes and increase the size of the database file: + +- Indexes support more efficient match and range-based query operations. +- Indexes make insert and update operation speed slightly slower. +- Adding an index to a property increases disk space consumed by your database + file. Each index entry is a minimum of 12 bytes. +- Indexes on the client and on the server are entirely separate. The only + effect that adding indexes has on initial Sync performance is to make it + slightly slower as the index has to be populated. + +Generally, you should only add an index when you need to improve the performance +of a specific equality-based query, and the minor slowdown in writes is +acceptable with your app's write patterns. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-index-property-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-index-property-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-index-property-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-index-property-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-index-property-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-index-property-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-index-property-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-index-property-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-index-property-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/model-data/object-models-index-property-js-ts-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-index-property.rst + +.. note:: + + When you create an index with the SDK, you are creating it in the device + persistence layer and not on an Atlas collection. If you need to query an + Atlas collection directly and want to improve performance, refer to + `Create, View, Drop, and Hide Indexes `__. .. _sdks-fts-property: -Define a Full-Text Search Property -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Enable Full-Text Search on a Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The SDK supports Full-Text Search (FTS) on string properties. You do this by +adding a FTS index on the property. When you query a FTS property, the FTS +index enables searching for multiple words and phrases and excluding others. -.. _sdks-optional-property-types: +Similar to a regular index, FTS indexes have performance benefits and +implications. Adding a FTS index to a property makes some types of queries more +efficient, but can slow down writes and increase the size of the database file: -Define Optional Property Types -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +- FTS indexes support more efficient match and range-based query operations + when seraching for multiple words or phrases and excluding others. +- FTS indexes make insert and update operation speed slightly slower. +- Adding a FTS index to a property increases disk space consumed by your + database file. Each index entry is a minimum of 12 bytes. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-fts-index-property-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-fts-index-property-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-fts-index-property-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-fts-index-property-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-fts-index-property-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-fts-index-property-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-fts-index-property-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/swift/model-data/object-models-fts-index-property-swift-objc-not-supported.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-fts-index-property-swift-objc-not-supported.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/model-data/object-models-fts-index-property-js-ts-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-enable-full-text-search-on-property.rst + +You *cannot* combine standard indexes with full-text search (FTS) +indexes on the same property. To create a standard index on a property, refer +to the :ref:`sdks-index-property` section on this page. + +.. note:: Character Limitations for Full-Text Search Indexes + + For Full-Text Search (FTS) indexes, only ASCII and Latin-1 alphanumerical + chars (most western languages) are included in the index. + + Indexes are diacritics- and case-insensitive. .. _sdks-primary-key: -Define a Primary Key -~~~~~~~~~~~~~~~~~~~~ +Designate a Primary Key +~~~~~~~~~~~~~~~~~~~~~~~ + +A **primary key** is a property that uniquely identifies an object. + +Primary keys allow you to efficiently find, update, and upsert objects. + +Primary keys are subject to the following limitations: + +- You can define only one primary key per object model. +- Primary key values must be unique across all instances of an object + in the database. The SDK throws an error if you try to + insert a duplicate primary key value. +- Primary key values are immutable. To change the primary key value of + an object, you must delete the original object and insert a new object + with a different primary key value. +- Embedded objects cannot define a primary key. + +If you are using :ref:`Device Sync `, your models must +have a primary key named ``_id``. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-designate-primary-key-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-designate-primary-key-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-designate-primary-key-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-designate-primary-key-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-designate-primary-key-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-designate-primary-key-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-designate-primary-key-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-designate-primary-key-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-designate-primary-key-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/model-data/object-models-designate-primary-key-js-ts-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-designate-primary-key.rst + +.. _sdks-optional-property-types: + +Define an Optional Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The SDK supports defining optional properties. The SDK uses language-specific +idioms for handling optional model properties. The SDK considers all model +properties required unless you designate them as optional, or ignore them. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-define-optional-property-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-define-optional-property-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-define-optional-property-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-define-optional-property-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-define-optional-property-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-define-optional-property-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-define-optional-property-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-define-optional-property-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-define-optional-property-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/object-models-define-optional-property-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-define-optional-property.rst + +Special Rules +````````````` + +The SDK has some special rules about when things *must* be nullable, and when +they *cannot* be nullable: + +- You must declare properties that are SDK object types as nullable. + +- You cannot declare collections (list, sets, backlinks, and dictionaries) as + nullable, but their parameters may be nullable according to the following rules: + + - For all types of collections, if the parameters are primitives + (value- or reference-types), they can be required or nullable. + + - For lists, sets, and backlinks, if the parameters are SDK objects, they + **cannot** be nullable. + + - For dictionaries with a value type of an SDK object, you **must** declare + the value type parameter as nullable. + +.. _sdks-ignore-property: + +Ignore a Property +~~~~~~~~~~~~~~~~~ + +You can ignore a property to avoid persisting that property's value. + +An ignored property behaves exactly like a managed property, except: + +- They aren't stored to the database +- They can't be used in queries +- They don't trigger notifications + +You can mix managed and ignored properties within a model. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-ignore-property-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-ignore-property-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-ignore-property-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-ignore-property-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-ignore-property-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-ignore-property-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-ignore-property-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-ignore-property-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-ignore-property-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/model-data/object-models-ignore-property-js-ts-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-ignore-property.rst + +.. _sdks-set-default-property-value: + +Set a Default Value for a Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can specify a default value for a property in your data model. + +You cannot set a default value on a collection, except to set it to null or nil. +Even if you set a collection to nil, collections are always initialized on +first access, so will never be nil. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp -.. _sdks-required-optional-property: + .. include:: /includes/api-details/csharp/model-data/object-models-set-default-value-for-property-description.rst + + .. tab:: + :tabid: dart -Placeholder for .NET nullability info, and any other SDKs with similar -APIs/requirements + .. include:: /includes/api-details/dart/model-data/object-models-set-default-value-for-property-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-set-default-value-for-property-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-set-default-value-for-property-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-set-default-value-for-property-description.rst + + .. tab:: + :tabid: kotlin + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/object-models-set-default-value-for-property-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-set-default-value-for-property.rst + +.. _sdks-custom-setters: + +Define Custom Setters +~~~~~~~~~~~~~~~~~~~~~ + +For some platforms and languages, the idiomatic developer experience involves +defining custom setters. The SDK does not directly persist properties using +custom setters. Instead, you can store the property value in a private property, +and then map that value to a public property that uses the custom setter. + +The SDK stores the private property, while you modify its value through the +public property. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-define-custom-setters-description.rst + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: java + + .. tab:: + :tabid: java-kotlin + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. tab:: + :tabid: objectivec + + .. tab:: + :tabid: swift + + .. tab:: + :tabid: typescript + +.. include:: /includes/sdk-examples/model-data/object-models-define-custom-setters.rst .. _sdks-model-unstructured-data: Model Unstructured Data -~~~~~~~~~~~~~~~~~~~~~~~ +----------------------- + +**Unstructured data** is data that doesn't easily conform to an expected +schema, making it difficult or impractical to model to individual +data classes. For example, your app might have highly variable data or dynamic +data whose structure is unknown at runtime. + +The SDK provides the ability to store :ref:`collections of mixed data +` within a mixed property. You can use this +feature to model complex data structures, such as JSON or MongoDB documents, +without having to define a strict data model. + +You can work with these collections the same way you would a non-mixed +collection: + +- You can nest mixed collections up to 100 levels. +- You can query on and :ref:`react to changes + ` on mixed collections. +- You can find and update individual mixed collection elements. + +However, storing data in mixed collections is less performant than using a +structured schema or serializing JSON blobs into a single string property. + +.. tip:: + + - Use a map of mixed data types when the type is unknown but each value will have a unique identifier. + - Use a list of mixed data types when the type is unknown but the order of objects is meaningful. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-unstructured-data-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-model-unstructured-data-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-model-unstructured-data-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-unstructured-data-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-unstructured-data-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-model-unstructured-data-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-model-unstructured-data-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-model-unstructured-data-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-model-unstructured-data-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/model-data/object-models-model-unstructured-data-js-ts-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-model-unstructured-data.rst + +.. _sdks-map-db-name: + +Map a Model or Property to a Different Name +------------------------------------------- + +Some of the SDK implementations provide the ability to map an SDK object model +or property to a different stored name in the database. This can be useful when: + +- You work across platforms where naming conventions differ. For example, if + your Device Sync schema property names use snake case, while your project + uses camel case. +- You want to change a class or field name without forcing a migration. +- You need to support multiple model classes with the same name in different + packages. +- You want to use a class name that is longer than the 57-character limit + enforced by the SDK. + +If you're using Atlas Device Sync, the name that you specify when you map the +model or property to a new name is the name used in the persisted +:ref:`App Services Schema `. + +.. note:: + + Migrations must use the persisted class or property name. Any schema errors + reported also use the persisted name. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/model-data/object-models-map-model-or-property-to-different-name-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/model-data/object-models-map-model-or-property-to-different-name-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/model-data/object-models-map-model-or-property-to-different-name-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/model-data/object-models-map-model-or-property-to-different-name-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/model-data/object-models-map-model-or-property-to-different-name-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-map-model-or-property-to-different-name-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-map-model-or-property-to-different-name-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/model-data/object-models-map-model-or-property-to-different-name-description.rst + +.. include:: /includes/sdk-examples/model-data/object-models-map-model-or-property-to-different-name.rst + +.. _sdks-define-model-projection: + +Transform Model Data for View Models +------------------------------------ + +You can define a **projection** of your model objects and properties to +transform the data into different shapes and structures. You might want to use +a projection to make data available in a specific form, but persist it in a +different form. + +For example, you might want to work with persisted data in a different way in +a view model or based on certain business logic. This simplifies using and +testing SDK objects in your application. + +With projection, you can use a subset of your object's properties directly in +the UI, or transform them. When you use a projection for this, you get all the +benefits of the SDK's live objects: + +- The class-projected object live updates +- You can observe it for changes +- You can apply changes directly to the properties in write transactions + +Projection is currently only available in the Swift SDK. + +Transform Persisted Properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you define a projection, you can transform the original persisted +property in several ways: + +- Passthrough: the property is the same name and type as the original object +- Rename: the property has the same type as the original object, but a + different name +- Keypath resolution: use keypath resolution to access properties of the + original object, including embedded object properties +- Collection mapping: Project :ref:`lists ` or + :ref:`sets ` of ``Object`` s or + ``EmbeddedObject`` s as a collection of primitive values +- Exclusion: when you use a model projection, the underlying object's + properties that are not projected through the model projection are + excluded. This enables you to watch for changes to a model projection + and not see changes for properties that are not part of the model + projection. + +Define a Projection +~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/model-data/object-models-define-projection-missing-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/model-data/object-models-define-projection-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/model-data/object-models-define-projection-not-supported.rst + +.. include:: /includes/sdk-examples/model-data/object-models-define-projection.rst diff --git a/source/sdk/model-data/supported-types.txt b/source/sdk/model-data/property-types.txt similarity index 65% rename from source/sdk/model-data/supported-types.txt rename to source/sdk/model-data/property-types.txt index 0d67e2f1ae..50b82a1107 100644 --- a/source/sdk/model-data/supported-types.txt +++ b/source/sdk/model-data/property-types.txt @@ -1,8 +1,8 @@ -.. _sdks-supported-data-types: +.. _sdks-define-property-types: -=============== -Supported Types -=============== +===================== +Define Property Types +===================== .. meta:: :description: Atlas Device SDK supports a range of primitive data types, as well as collections and geospatial data. @@ -20,12 +20,21 @@ Supported Types Placeholder page for supported data types. +.. _sdks-data-property-types: + +Data Property Types +------------------- .. _sdks-mixed-data-type: Generic (Mixed) Data Type ~~~~~~~~~~~~~~~~~~~~~~~~~ +.. _sdks-nested-collections-in-mixed: + +Nested Collections in Mixed +``````````````````````````` + .. _sdks-counter-data-type: Counter Data Type @@ -36,10 +45,15 @@ Counter Data Type Timestamp Data Type ~~~~~~~~~~~~~~~~~~~ +.. _sdks-collection-property-types: + +Collection Property Types +------------------------- + .. _sdks-list-property-types: -Supported List Property Types -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define a List Property +~~~~~~~~~~~~~~~~~~~~~~ .. _dart-define-uint8list-property-type: @@ -59,12 +73,25 @@ Then, set the object's type as ``Uint8List`` in your object model. .. _sdks-set-property-types: -Supported Set Property Types -~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define a Set Property +~~~~~~~~~~~~~~~~~~~~~ .. _sdks-dictionary-property-types: -Supported Dictionary Property Types -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Define a Dictionary Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-relationship-property-types: + +Relationship Property Types +--------------------------- + +.. _sdks-other-property-types: + +Other Property Types +-------------------- +.. _sdks-enum-property: +Define an Enum Property +~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/source/sdk/sync/event-library.txt b/source/sdk/sync/event-library.txt index d6658e1bb0..35c4489b8d 100644 --- a/source/sdk/sync/event-library.txt +++ b/source/sdk/sync/event-library.txt @@ -213,7 +213,7 @@ JSON Object Serialization ~~~~~~~~~~~~~~~~~~~~~~~~~ The Event Library converts each event object to a JSON object. Most -:ref:`Realm types ` have an +:ref:`SDK types ` have an analogous JSON representation. For example, a Realm String property becomes a JSON String. From 9cd2167c388245e3d92817e1779102e2cd13b228 Mon Sep 17 00:00:00 2001 From: cbullinger <115956901+cbullinger@users.noreply.github.com> Date: Fri, 19 Jul 2024 13:24:17 -0400 Subject: [PATCH 45/63] DOCSP-36298 : Refactor RQL for JSv12 (#3266) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-3629 - Ports legacy RQL models and tests to v12 test suite - Generates updated snippets from v12 `.ts` test file Jira ticket: https://jira.mongodb.org/browse/DOCSP-36618 - Updates Realm Query Language page: - Add language selector - Reference new v12 snippets - Reorganize sections Jira ticket: https://jira.mongodb.org/browse/DOCSP-36265 - Update to indicate support for comparison operators on strings (expanded lexicographical querying) - Add example *Staged Page* - [Realm Query Language](https://preview-mongodbcbullinger.gatsbyjs.io/realm/docsp-36298-rql/sdk/crud/query-engines/realm-query-language/) *Page Source* - [Realm Query Language](https://www.mongodb.com/docs/atlas/device-sdks/realm-query-language) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - N/A ~[ ] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles~ #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages > NOTE: Omitted Swift and Objective-C from page - N/A ~[ ] API description sections have API details or a generic placeholder for all 9 languages~ - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --- .../legacy/Examples/realm-query-language.js | 13 +- .../node/legacy/Examples/rql-data-models.js | 7 + .../Examples/schemas/rql-data-models.js | 6 + .../v12/__tests__/models/rql-data-models.js | 54 + .../v12/__tests__/models/rql-data-models.ts | 59 +- .../__tests__/realm-query-language.test.js | 956 +++++++++++- .../__tests__/realm-query-language.test.ts | 988 +++++++++++++ .../v12/__tests__/rql-data-models.test.js | 71 + .../v12/__tests__/rql-data-models.test.ts | 81 ++ examples/node/v12/package-lock.json | 14 +- examples/node/v12/package.json | 4 +- examples/package-lock.json | 6 + ...spatial.test.snippet.rql-geospatial.js.rst | 3 + ...ge.test.snippet.aggregate-operators.ts.rst | 20 + ...uage.test.snippet.backlinks-atCount.ts.rst | 4 + ...uage.test.snippet.backlinks-atLinks.ts.rst | 5 + ...ppet.backlinks-collection-operators.ts.rst | 23 + ...st.snippet.backlinks-linkingObjects.ts.rst | 6 + ...guage.test.snippet.basic-arithmetic.ts.rst | 9 + ...e.test.snippet.comparison-operators.ts.rst | 13 + ...est.snippet.date-alt-representation.ts.rst | 5 + ...st.snippet.date-parameterized-query.ts.rst | 7 + ...uage.test.snippet.deep-dot-notation.ts.rst | 5 + ...e.test.snippet.dictionary-operators.ts.rst | 21 + ...-language.test.snippet.dot-notation.ts.rst | 5 + ...ippet.equivalent-lists-any-operator.ts.rst | 5 + ...snippet.list-comparisons-collection.ts.rst | 5 + ...ppet.list-comparisons-parameterized.ts.rst | 10 + ...est.snippet.list-comparisons-static.ts.rst | 5 + ...uage.test.snippet.logical-operators.ts.rst | 7 + ...uery-language.test.snippet.nil-type.ts.rst | 4 + ...alm-query-language.test.snippet.oid.ts.rst | 17 + ...ge.test.snippet.parameterized-query.ts.rst | 8 + ...ery-language.test.snippet.predicate.ts.rst | 6 + ...query-language.test.snippet.rql-fts.ts.rst | 12 + ...guage.test.snippet.serialized-query.ts.rst | 3 + ...language.test.snippet.set-operators.ts.rst | 17 + ...-language.test.snippet.simple-query.ts.rst | 5 + ...t.sort-distinct-limit-order-matters.ts.rst | 11 + ...ge.test.snippet.sort-distinct-limit.ts.rst | 13 + ...guage.test.snippet.string-operators.ts.rst | 17 + ...uery-language.test.snippet.subquery.ts.rst | 8 + ...language.test.snippet.type-operator.ts.rst | 12 + ...data-models.snippet.rql-data-models.js.rst | 33 + ...data-models.snippet.rql-data-models.ts.rst | 51 + .../query/rql-example-data-model.rst | 80 + .../query-engines/realm-query-language.txt | 1285 ++++++++--------- 47 files changed, 3242 insertions(+), 757 deletions(-) create mode 100644 examples/node/v12/__tests__/models/rql-data-models.js create mode 100644 examples/node/v12/__tests__/realm-query-language.test.ts create mode 100644 examples/node/v12/__tests__/rql-data-models.test.js create mode 100644 examples/node/v12/__tests__/rql-data-models.test.ts create mode 100644 examples/package-lock.json create mode 100644 source/examples/generated/node/v12/formatted/geospatial.test.snippet.rql-geospatial.js.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.aggregate-operators.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atCount.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atLinks.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-collection-operators.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-linkingObjects.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.basic-arithmetic.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.comparison-operators.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-alt-representation.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-parameterized-query.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.deep-dot-notation.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.dictionary-operators.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.dot-notation.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.equivalent-lists-any-operator.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-collection.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-parameterized.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-static.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.logical-operators.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.nil-type.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.oid.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.parameterized-query.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.predicate.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.rql-fts.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.serialized-query.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.set-operators.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.simple-query.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit-order-matters.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.string-operators.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.subquery.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.type-operator.ts.rst create mode 100644 source/examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.js.rst create mode 100644 source/examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.ts.rst create mode 100644 source/includes/sdk-examples/query/rql-example-data-model.rst diff --git a/examples/node/legacy/Examples/realm-query-language.js b/examples/node/legacy/Examples/realm-query-language.js index 305e8ccab2..e7a1e8eb41 100644 --- a/examples/node/legacy/Examples/realm-query-language.js +++ b/examples/node/legacy/Examples/realm-query-language.js @@ -1,9 +1,12 @@ import Realm, { BSON } from "realm"; import { ItemModel, ProjectModel } from "./schemas/rql-data-models"; -// Tests for new RQL operators or updates should be placed in the new -// file compatible with JSv12 and later, located at -// examples/node/v12/__tests__/realm-query-language.test.js +/* + DON'T UPDATE THIS FILE. DEPRECATED IN FAVOR OF V12 TESTS. + Tests for new RQL operators or updates should be placed in the new + files compatible with JSv12 and later, located at: + examples/node/v12/__tests__/realm-query-language.test.js/ts +*/ describe("Realm Query Language Reference", () => { let realm; @@ -148,7 +151,7 @@ describe("Realm Query Language Reference", () => { const progressMinutesRange = items.filtered( // :remove-end: - // Find to-do items within a certain time range by finding items + // Find to-do items within a certain time range by finding items // where the progressMinutes property is between two numbers. "progressMinutes BETWEEN { $0 , $1 }", 30, 60 // :remove-start: @@ -406,7 +409,7 @@ describe("Realm Query Language Reference", () => { ); expect(shallowResultLinkingObjects.length).toBe(1); expect(shallowResultLinkingObjects[0].name).toBe("Get coffee"); - + const shallowResultAtLinks = realm.objects("Item").filtered( // :remove-end: // Find items that are not referenced by any project diff --git a/examples/node/legacy/Examples/rql-data-models.js b/examples/node/legacy/Examples/rql-data-models.js index 8277722b6e..4cc90a4b90 100644 --- a/examples/node/legacy/Examples/rql-data-models.js +++ b/examples/node/legacy/Examples/rql-data-models.js @@ -1,6 +1,13 @@ import Realm from "realm"; import { ItemModel, ProjectModel } from "./schemas/rql-data-models"; +/* + DON'T UPDATE THIS FILE. DEPRECATED IN FAVOR OF V12 TESTS. + Updates should be placed in the new files compatible with + JSv12 and later, located at: + examples/node/v12/__tests__/rql-data-models.test.js/ts +*/ + describe("test models", () => { let realm; const config = { diff --git a/examples/node/legacy/Examples/schemas/rql-data-models.js b/examples/node/legacy/Examples/schemas/rql-data-models.js index 0e2cd9a02f..9c136650e5 100644 --- a/examples/node/legacy/Examples/schemas/rql-data-models.js +++ b/examples/node/legacy/Examples/schemas/rql-data-models.js @@ -1,3 +1,9 @@ +/* + DON'T UPDATE THIS FILE. DEPRECATED IN FAVOR OF V12 MODELS. + Updates should be placed in the new file compatible with + JSv12 and later, located at: + examples/node/v12/__tests__/models/rql-data-models.ts +*/ // :snippet-start: rql-data-models const ItemModel = { name: "Item", diff --git a/examples/node/v12/__tests__/models/rql-data-models.js b/examples/node/v12/__tests__/models/rql-data-models.js new file mode 100644 index 0000000000..01f5d485f8 --- /dev/null +++ b/examples/node/v12/__tests__/models/rql-data-models.js @@ -0,0 +1,54 @@ +// Models for embedded objects & dot notation queries +const Address = { + name: "Address", + embedded: true, + properties: { + name: "string", + street: "string", + zipcode: "int", + }, +}; + +const Office = { + name: "Office", + properties: { + name: "string", + address: "Address", + }, +}; + +// :snippet-start: rql-data-models +const Item = { + name: "Item", + properties: { + _id: "objectId", + name: { type: "string", indexed: "full-text" }, + isComplete: { type: "bool", default: false }, + assignee: "string?", + priority: { type: "int", default: 0 }, + progressMinutes: { type: "int", default: 0 }, + projects: { + type: "linkingObjects", + objectType: "Project", + property: "items", + }, + }, + primaryKey: "_id", +}; + +const Project = { + name: "Project", + properties: { + _id: "objectId", + name: "string", + items: "Item[]", + quota: "int?", + comments: "string?{}", + projectLocation: "Office?", + additionalInfo: "mixed", + }, + primaryKey: "_id", +}; +// :snippet-end: + +export { Address, Item, Office, Project }; diff --git a/examples/node/v12/__tests__/models/rql-data-models.ts b/examples/node/v12/__tests__/models/rql-data-models.ts index 210aaddcdc..776e1d1b94 100644 --- a/examples/node/v12/__tests__/models/rql-data-models.ts +++ b/examples/node/v12/__tests__/models/rql-data-models.ts @@ -1,5 +1,36 @@ import Realm, { BSON, ObjectSchema } from "realm"; +// Models for embedded objects & dot notation queries +export class Address extends Realm.Object
{ + name!: string; + street!: string; + zipcode!: number; + + static schema: ObjectSchema = { + name: "Address", + embedded: true, + properties: { + name: "string", + street: "string", + zipcode: "int", + }, + }; +} + +export class Office extends Realm.Object { + name!: string; + address!: Address; + + static schema: ObjectSchema = { + name: "Office", + properties: { + name: "string", + address: "Address", + }, + }; +} + +// :snippet-start: rql-data-models export class Item extends Realm.Object { _id!: BSON.ObjectId; name!: string; @@ -12,17 +43,11 @@ export class Item extends Realm.Object { name: "Item", properties: { _id: "objectId", - name: { type:"string", indexed: "full-text" }, + name: { type: "string", indexed: "full-text" }, isComplete: { type: "bool", default: false }, assignee: "string?", - priority: { - type: "int", - default: 0, - }, - progressMinutes: { - type: "int", - default: 0, - }, + priority: { type: "int", default: 0 }, + progressMinutes: { type: "int", default: 0 }, projects: { type: "linkingObjects", objectType: "Project", @@ -32,12 +57,14 @@ export class Item extends Realm.Object { primaryKey: "_id", }; } - export class Project extends Realm.Object { _id!: BSON.ObjectId; name!: string; - items!: Realm.List - quota?: number + items!: Realm.List; + quota?: number; + comments?: Realm.Dictionary; + projectLocation?: Office; + additionalInfo!: Realm.Mixed; static schema: ObjectSchema = { name: "Project", @@ -46,7 +73,11 @@ export class Project extends Realm.Object { name: "string", items: "Item[]", quota: "int?", + comments: "string?{}", + projectLocation: "Office?", + additionalInfo: "mixed", }, primaryKey: "_id", - } -}; + }; +} +// :snippet-end: diff --git a/examples/node/v12/__tests__/realm-query-language.test.js b/examples/node/v12/__tests__/realm-query-language.test.js index 81a11913c9..a265de2685 100644 --- a/examples/node/v12/__tests__/realm-query-language.test.js +++ b/examples/node/v12/__tests__/realm-query-language.test.js @@ -1,22 +1,51 @@ import Realm, { BSON } from "realm"; -import { Item, Project } from "./models/rql-data-models.ts"; +import { Address, Item, Office, Project } from "./models/rql-data-models.ts"; +import { describe, expect } from "@jest/globals"; describe("Realm Query Language Reference", () => { let realm; + const config = { schema: [Project, Item, Address, Office] }; + beforeEach(async () => { - realm = await Realm.open({ - schema: [Project, Item], - deleteRealmIfMigrationNeeded: true, - }); + // Before each test, open the realm and create project & item objects: + // 2 branches w/ 2 addresses; 3 projects; and + // 6 items (one used in 2 projects, another in 0 projects) + realm = await Realm.open(config); - // populate test objects + const mainBranch = { + name: "Main Branch", + address: { + name: "Main Branch", + street: "999 Big Boulevard", + zipcode: 10019, + }, + }; + const austinBranch = { + name: "Austin Branch", + address: { + name: "Austin Branch", + street: "123 Main Ave", + zipcode: 10019, + }, + }; realm.write(() => { - realm.create("Project", { - _id: new Realm.BSON.ObjectId(), - name: "New Project", + realm.create(Item, { + // Unassigned incomplete item not in any project + _id: new BSON.ObjectId("631a073c833a34ade21db2b2"), + name: "Write tests", + isComplete: false, + assignee: null, + priority: 10, + progressMinutes: 0, + }); + + realm.create(Project, { + _id: new BSON.ObjectId(), + name: "Example Project with Items", items: [ { - _id: new Realm.BSON.ObjectId(), + // Alex incomplete item + _id: new BSON.ObjectId("631a072f75120729dc9223d9"), name: "Write tests", isComplete: false, assignee: "Alex", @@ -24,73 +53,96 @@ describe("Realm Query Language Reference", () => { progressMinutes: 125, }, { - _id: new Realm.BSON.ObjectId(), + // Ali incomplete item + _id: new BSON.ObjectId("631a0737c98f89f5b81cd24d"), name: "Run tests", isComplete: false, assignee: "Ali", priority: 9, progressMinutes: 10, }, - { - _id: new Realm.BSON.ObjectId(), - name: "Bluehawk Tests", - isComplete: false, - assignee: null, - priority: 10, - progressMinutes: 55, - }, ], + quota: 1, // doesn't meet quota + comments: { status: "Behind schedule", projectNumber: "70150" }, + projectLocation: mainBranch, + // Mixed property is of type dictionary of mixed values + // (date, list of strings, bool, and int) + additionalInfo: { + startDate: new Date("2021-01-01"), + customerContacts: ["Alice", "Bob"], + recurringCustomer: true, + budget: 10000, + }, }); - const proj1 = realm.create("Project", { - _id: new Realm.BSON.ObjectId(), - name: "Project with High Quota", - quota: 12, + const project = realm.create(Project, { + _id: new BSON.ObjectId(), + name: "Project that Meets Quota", items: [ { - _id: new Realm.BSON.ObjectId(), - name: "Create a ticket", + // Complete item used in 2 projects + _id: new BSON.ObjectId(), + name: "Approve project plan", isComplete: true, - assignee: "Nick", - priority: 2, - progressMinutes: 8, + assignee: "Dachary", + priority: 1, + progressMinutes: 0, }, { - _id: new Realm.BSON.ObjectId(), - name: "Schedule a meeting", + // Complete high-priority item + _id: new BSON.ObjectId(), + name: "Create a ticket", isComplete: true, assignee: "Chris", priority: 9, progressMinutes: 10, }, { - _id: new Realm.BSON.ObjectId(), - name: "Get coffee", + // Incomplete high-priority item + _id: new BSON.ObjectId(), + name: "Demo template app", isComplete: false, assignee: "Dachary", priority: 11, progressMinutes: 3, }, ], + quota: 1, // meets quota + comments: { status: "Ahead of schedule", projectNumber: "70187" }, + projectLocation: mainBranch, + // Mixed property is of type string + additionalInfo: "Customer is a VIP.", }); - const proj2 = realm.create("Project", { - _id: new Realm.BSON.ObjectId(), - name: "Another project", - items: [proj1.items[2]], - }); - - realm.create("Item", { - _id: new Realm.BSON.ObjectId(), - name: "Assign me to a project", - isComplete: false, - assignee: "Nick", - priority: 2, - progressMinutes: 0, + realm.create(Project, { + _id: new BSON.ObjectId(), + name: "Project in Austin", + items: [ + project.items[0], + { + // Incomplete high-priority item assigned to `nil` type + _id: new BSON.ObjectId(), + name: "Lead offsite workshop", + isComplete: false, + assignee: "nil", + priority: 10, + progressMinutes: 0, + }, + ], + quota: 11, // doesn't meet quota + comments: { status: "On track", projectNumber: "N/A" }, + projectLocation: austinBranch, + // Mixed property is of type list, containing string and nested + // dictionary of mixed values (date, boolean, and int) + additionalInfo: [ + "Customer is difficult to work with.", + { + startDate: new Date("2021-03-01"), + recurringCustomer: false, + budget: 10000, + }, + ], }); }); - - expect(realm.objects("Project")[0].name).toBe("New Project"); - expect(realm.objects("Item")[0].name).toBe("Write tests"); }); afterEach(() => { @@ -100,37 +152,807 @@ describe("Realm Query Language Reference", () => { realm.deleteAll(); }); realm.close(); + expect(realm.isClosed).toBe(true); } }); - test("full-text search", () => { + afterAll(() => { + Realm.deleteFile(config); + }); + + test("Can open realm and create objects", async () => { + expect(realm.isClosed).toBe(false); + expect(realm.objects(Project)[0].name).toBe("Example Project with Items"); + expect(realm.objects(Item)[0].name).toBe("Write tests"); + }); + + test("Simple query", () => { + // NOTE: snippet used on Node.js Query Data page, not RQL page + // [snippet-start] simple-query const items = realm.objects(Item); + // Get all items where 'priority' property is 7 or more. + const importantItems = items.filtered("priority >= $0", 7); + // [snippet-end] + expect(importantItems.length).toEqual(5); + }); - const itemsWithWrite = items.filtered( - // :snippet-start: rql-fts - // Filter for items with 'write' in the name - "name TEXT $0", "write" + describe("Basic syntax", () => { + test("Expression query", () => { + const items = realm.objects(Item); + // [snippet-start] predicate + const expression = "priority == 1"; + // Property Name: priority + // Operator: == + // Value: 1 + // [snippet-end] + expect(items.filtered(expression).length).toBe(1); + }); + test("Serialized query", () => { + const items = realm.objects(Item); + const query = items.filtered( + // [snippet-start] serialized-query + "progressMinutes > 1 AND assignee == 'Ali'" + // [snippet-end] + ); + expect(query.length).toBe(1); + }); + test("Parameterized query", () => { + const items = realm.objects(Item); + // prettier-ignore + const substitution = items.filtered( + // [snippet-start] parameterized-query + // Include one parameter with `$0`. + "progressMinutes > 1 AND assignee == $0", "Ali" - // :remove-start: + // [remove-start] ); + expect(substitution.length).toBe(1); + }); - const itemsWithWriteNotTest = items.filtered( - // :remove-end: - // Find items with 'write' but not 'tests' using '-' - "name TEXT $0", "write -tests" + test("Multiple parameterized query", () => { + const items = realm.objects(Item); + // prettier-ignore + const substitution = items.filtered( + // [remove-end] + // Include multiple parameters using ascending integers, starting at`$0`. + "progressMinutes > $0 AND assignee == $1", 1, "Alex" + // [snippet-end] + ); + expect(substitution.length).toBe(1); + }); - // :remove-start: + test("Dot notation", () => { + const address = realm.objects(Project); + const nestedItem = address.filtered( + // [snippet-start] dot-notation + // Find projects whose `items` list property contains an item with a specific name. + "items[0].name == 'Approve project plan'" + // [snippet-end] ); + const nestedZipcode = address.filtered( + // [snippet-start] deep-dot-notation + // Find projects whose `projectLocation` property contains an embedded Address object with a specific zip code. + "projectLocation.address.zipcode == 10019" + // [snippet-end] + ); + expect(nestedItem.length).toBe(2); + expect(nestedZipcode.length).toBe(3); + }); + }); - const itemsStartingWithWri = items.filtered( - // :remove-end: - // Find items starting with 'wri-' using '*' - "name TEXT $0", "wri*" - // :snippet-end: + // prettier-ignore + test("Comparison operators", () => { + const items = realm.objects(Item); + + const highPriorityItems = items.filtered( + // [snippet-start] comparison-operators + // Compare `priority` values against a threshold value. + "priority > $0", 5 + + // [remove-start] + ); + expect(highPriorityItems.length).toBe(5); + + const unassignedItems = items.filtered( + // [remove-end] + // Compare `assignee` values to `null` value. + "assignee == $0", null + + // [remove-start] + ); + expect(unassignedItems.length).toBe(1); + + const progressMinutesRange = items.filtered( + // [remove-end] + // Compare `priority` values against an inclusive range of values. + "priority BETWEEN { $0 , $1 }", 1, 5 + + // [remove-start] + ); + expect(progressMinutesRange.length).toBe(2); + + const progressMinutesIn = items.filtered( + // [remove-end] + // Compare `progressMinutes` values against any of the listed values. + "progressMinutes IN { $0, $1, $2 }", 10, 30, 60 + // [snippet-end] + ); + }); + + // prettier-ignore + test("Logical operators", () => { + const items = realm.objects(Item); + const aliComplete = items.filtered( + // [snippet-start] logical-operators + // Find all items assigned to Ali AND marked completed. + "assignee == $0 AND isComplete == $1", "Ali", true + + // [remove-start] + ); + const alexOrAli = items.filtered( + // [remove-end] + // Find all items assigned to Alex OR to Ali. + "assignee == $0 OR assignee == $1", "Alex", "Ali" + // [snippet-end] + ); + expect(aliComplete.length).toBe(0); + expect(alexOrAli.length).toBe(2); + }); + + describe("Arithmetic operators", () => { + test("Basic arithmetic", () => { + const items = realm.objects(Item); + const basicMath = items.filtered( + // [snippet-start] basic-arithmetic + // Evaluate against an item's `priority` property value: + "2 * priority > 6" // resolves to `priority > 3` + + // [remove-start] ); + const lessBasicMath = items.filtered( + // [remove-end] + "priority >= 2 * (2 - 1) + 2" // resolves to `priority >= 4` - expect(itemsWithWrite.length).toBe(1) + // [remove-start] + ); + expect(basicMath.length).toBe(6); + expect(lessBasicMath.length).toBe(6); + }); + + test("Arithmetic with object properties", () => { + const items = realm.objects(Item); + const mathWithObjProps = items.filtered( + // [remove-end] + // Evaluate against multiple object property values: + "progressMinutes * priority == 90" + // [snippet-end] + ); + expect(mathWithObjProps.length).toBe(2); + }); + }); + + // prettier-ignore + describe("Type-specific operators", () => { + test("String operators", () => { + const projects = realm.objects(Project); + const startWithE = projects.filtered( + // [snippet-start] string-operators + // Find projects whose name starts with 'E' or 'e' (case-insensitive). + "name BEGINSWITH[c] $0", "E" + + // [remove-start] + ); + expect(startWithE.length).toBe(1); + + const containIe = projects.filtered( + // [remove-end] + // Find projects whose name contains 'ie' (case-sensitive). + "name CONTAINS $0", "ie" + + // [remove-start] + ); + expect(containIe.length).toBe(0); + }); + + test("String comparisons", () => { + const projects = realm.objects(Project); + const items = realm.objects(Item); + // prettier-ignore + const assigneeBetween = items.filtered( + // [remove-end] + // Find items where the assignee name is lexicographically between 'Ali' and 'Chris' (case-sensitive). + "assignee BETWEEN { $0 , $1 }", "Ali", "Chris" + + // [remove-start] + ); + // prettier-ignore + const compareStreet = projects.filtered( + // [remove-end] + // Find projects where the street address is lexicographically greater than '123 Main St' (case-sensitive). + "projectLocation.address.street > $0", "123 Main St" + // [snippet-end] + ); + expect(compareStreet.length).toBe(2); + expect(assigneeBetween.length).toBe(2); + }); + }); + + // prettier-ignore + test("Aggregate queries", () => { + const projects = realm.objects(Project); + // [snippet-start] aggregate-operators + var priorityNum = 5; + + // [remove-start] + const averageItemPriorityAbove5 = projects.filtered( + // [remove-end] + // Find projects with average item `priority` above 5. + "items.@avg.priority > $0", priorityNum + + // [remove-start] + ); + expect(averageItemPriorityAbove5.length).toBe(3); + + const allItemsLowerPriority = projects.filtered( + // [remove-end] + // Find projects where maximum `priority` of all items is 5. + "items.@max.priority < $0", priorityNum + + // [remove-start] + ); + expect(allItemsLowerPriority.length).toBe(0); + + const allItemsHighPriority = projects.filtered( + // [remove-end] + // Find projects where minimum `priority` of all items is 5. + "items.@min.priority > $0", priorityNum + + // [remove-start] + ); + expect(allItemsHighPriority.length).toBe(0); + + const moreThan5Items = projects.filtered( + // [remove-end] + + // Find projects with more than 5 items. + "items.@count > $0", 5 + + // [remove-start] + ); + expect(moreThan5Items.length).toBe(0); + + const longRunningProjects = projects.filtered( + // [remove-end] + // Find projects where the sum total value of `progressMinutes` + // across all items is greater than 100. + "items.@sum.progressMinutes > $0", 100 + // [snippet-end] + ); + expect(longRunningProjects.length).toBe(1); + }); + + describe("Collection operators", () => { + test("Collection queries", () => { + const projects = realm.objects(Project); + // prettier-ignore + const noCompleteItems = projects.filtered( + // [snippet-start] set-operators + // Find projects with no complete items. + "NONE items.isComplete == $0", true + + // [remove-start] + ); + // prettier-ignore + const anyTopPriorityItems = projects.filtered( + // [remove-end] + // Find projects that contain any item with priority 10. + "items.priority == $0", 10 // (ANY operator is implied.) + + // [remove-start] + ); + // prettier-ignore + const allItemsCompleted = projects.filtered( + // [remove-end] + // Find projects that only contain completed items. + "ALL items.isComplete == $0", true + + // [remove-start] + ); + // prettier-ignore + const assignedToAlexOrAli = projects.filtered( + // [remove-end] + // Find projects with at least one item assigned to either Alex or Ali. + "ANY items.assignee IN { $0 , $1 }", "Alex", "Ali" + + // [remove-start] + ); + // prettier-ignore + const notAssignedToAlexOrAli = projects.filtered( + // [remove-end] + // Find projects with no items assigned to either Alex or Ali. + "NONE items.assignee IN { $0 , $1 }", "Alex", "Ali" + // [snippet-end] + ); + expect(noCompleteItems.length).toBe(1); + expect(anyTopPriorityItems.length).toBe(1); + expect(allItemsCompleted.length).toBe(0); + expect(assignedToAlexOrAli.length).toBe(1); + expect(notAssignedToAlexOrAli.length).toBe(2); + }); + + test("List comparisons", () => { + realm.write(() => {}); + const projects = realm.objects(Project); + const items = realm.objects(Item); + + const collectionQuery = projects.filtered( + // [snippet-start] list-comparisons-collection + // Find an item with the specified ObjectId value in the `items` collection. + "oid(631a072f75120729dc9223d9) IN items._id" + // [snippet-end] + ); + const staticQuery = items.filtered( + // [snippet-start] list-comparisons-static + // Find items with a priority value matching any value in the static list. + "priority IN {0, 1, 2}" + // [snippet-end] + ); + // [snippet-start] list-comparisons-parameterized + const ids = [ + new BSON.ObjectId("631a072f75120729dc9223d9"), + new BSON.ObjectId("631a0737c98f89f5b81cd24d"), + new BSON.ObjectId("631a073c833a34ade21db2b2"), + ]; + // Find items with an ObjectId value matching any value in the parameterized list. + const parameterizedQuery = realm.objects(Item).filtered("_id IN $0", ids); + // [snippet-end] + + // prettier-ignore + const anyOperator = items.filtered( + // [snippet-start] equivalent-lists-any-operator + "assignee == ANY { $0, $1 }", "Alex", "Ali" + + // [remove-start] + ); + // prettier-ignore + const equivalentAnyOperator = items.filtered( + // [remove-end] + "assignee == { $0, $1 }", "Alex", "Ali" // Equivalent (ANY is implied.) + // [snippet-end] + ); + + expect(anyOperator.length).toBe(2); + expect(equivalentAnyOperator.length).toBe(2); + expect(collectionQuery.length).toBe(1); + expect(staticQuery.length).toBe(1); + expect(parameterizedQuery.length).toBe(3); + }); + + test("Sort, distinct, and limit results", () => { + const items = realm.objects(Item); + + const sortedItems = items.filtered( + // [snippet-start] sort-distinct-limit + // Find incomplete items, sort by `priority` in descending order, then + // sort equal `priority` values by `progressMinutes` in ascending order. + "isComplete == false SORT(priority DESC, progressMinutes ASC)" + + // [remove-start] + ); + expect(sortedItems[0].name).toBe("Demo template app"); + const distinctItems = items.filtered( + // [remove-end] + // Find high priority items, then remove from the results any items + // with duplicate values for both `name` AND `assignee` properties. + "priority >= 5 DISTINCT(name, assignee)" + + // [remove-start] + ); + expect(distinctItems.length).toBe(6); + const limitItems = items.filtered( + // [remove-end] + // Find in-progress items, then return the first 10 results. + "progressMinutes > 0 && isComplete != true LIMIT(10)" + // [snippet-end] + ); + expect(limitItems[0].name).toBe("Write tests"); + + const sortFirst = items.filtered( + // [snippet-start] sort-distinct-limit-order-matters + // 1. Sorts by highest priority. + // 2. Returns the first item. + // 3. Remove duplicate names (N/A because a single item is always considered distinct). + "assignee == null SORT(priority ASC) LIMIT(1) DISTINCT(name)" + + // [remove-start] + ); + const limitLast = items.filtered( + // [remove-end] + // 1. Removes any duplicates by name. + // 2. Sorts by highest priority. + // 3. Returns the first item. + "assignee == null DISTINCT(name) SORT(priority ASC) LIMIT(1)" + // [snippet-end] + ); + }); + + test("Subquery query", () => { + const projects = realm.objects(Project); + const subquery = projects.filtered( + // [snippet-start] subquery + // Find projects with incomplete items with 'Demo' in the name. + "SUBQUERY(items, $item, $item.isComplete == false AND $item.name CONTAINS[c] 'Demo').@count > 0" + + // [remove-start] + ); + expect(subquery.length).toBe(1); + expect(subquery[0].name).toBe("Project that Meets Quota"); + + const subquery2 = projects.filtered( + // [remove-end] + // Find projects where the number of completed items is greater than or equal to the project's `quota` property. + "SUBQUERY(items, $item, $item.isComplete == true).@count >= quota" + // [snippet-end] + ); + + expect(subquery2.length).toBe(1); + expect(subquery2[0].name).toBe("Project that Meets Quota"); + }); + + // prettier-ignore + test("Dictionary operators", () => { + const dictionaries = realm.objects(Project); + const statusKey = dictionaries.filtered( + // [snippet-start] dictionary-operators + // Find projects whose `comments` dictionary property have a key of 'status'. + "comments.@keys == $0", "status" + + // [remove-start] + ); + const statusOnTrack = dictionaries.filtered( + // [remove-end] + // Find projects whose `comments` dictionary property have a 'status' key with a value that ends in 'track'. + "comments['status'] LIKE $0", "*track" + + // [remove-start] + ); + const numItemsInDict = dictionaries.filtered( + // [remove-end] + // Find projects whose `comments` dictionary property have more than one key-value pair. + "comments.@count > $0", 1 + + // [remove-start] + ); + + const allString = dictionaries.filtered( + // [remove-end] + // Find projects whose `comments` dictionary property contains only values of type 'string'. + "ALL comments.@type == 'string'" + + // [remove-start] + ); + + const noInts = dictionaries.filtered( + // [remove-end] + // Find projects whose `comments` dictionary property contains no values of type 'int'. + "NONE comments.@type == 'int'" + // [snippet-end] + ); + expect(statusKey.length).toBe(3); + expect(statusOnTrack.length).toBe(1); + expect(numItemsInDict.length).toBe(3); + expect(allString.length).toBe(3); + expect(noInts.length).toBe(3); + }); + }); + + describe("Backlinks queries", () => { + test("Backlinks query @links", () => { + const atLinksResult = realm.objects(Item).filtered( + // [snippet-start] backlinks-atLinks + // Find items that belong to a project with a quota less than 10 + // (using '@links..'). + "@links.Project.items.quota < 10" + // [snippet-end] + ); + expect(atLinksResult.length).toBe(5); + + const linkingObjectsResult = realm.objects(Item).filtered( + // [snippet-start] backlinks-linkingObjects + // Find items that belong to a project with a quota greater than 10 through the Item object's `projects` property + // (using 'LinkingObjects'). + "projects.quota > 10" + // [snippet-end] + ); + expect(linkingObjectsResult.length).toBe(2); + }); + + test("Backlinks collection operators", () => { + const anyResult = realm.objects(Item).filtered( + // [snippet-start] backlinks-collection-operators + // Find items where no project that references the item has a quota greater than 10. + "NONE @links.Project.items.quota > 10" + + // [remove-start] + ); + expect(anyResult.length).toBe(5); + + const allResult = realm.objects(Item).filtered( + // [remove-end] + // Find items where all projects that reference the item have a quota less than 5. + "ALL @links.Project.items.quota < 5" + + // [remove-start] + ); + expect(allResult.length).toBe(5); + }); + + test("Backlinks aggregate operators", () => { + const shallowResultLinkingObjects = realm.objects(Item).filtered( + // [remove-end] + // Find items that are referenced by multiple projects. + "projects.@count > 1" + + // [remove-start] + ); + expect(shallowResultLinkingObjects.length).toBe(1); + expect(shallowResultLinkingObjects[0].name).toBe("Approve project plan"); + + const shallowResultAtLinks = realm.objects(Item).filtered( + // [remove-end] + // Find items that are not referenced by any project. + "@links.Project.items.@count == 0" + + // [remove-start] + ); + expect(shallowResultAtLinks.length).toBe(1); + expect(shallowResultAtLinks[0].name).toBe("Write tests"); + + const deepResultAtLinks = realm.objects(Item).filtered( + // [remove-end] + // Find items that belong to a project where the average item has been worked on for at least 10 minutes + "@links.Project.items.items.@avg.progressMinutes > 10" + + // [remove-start] + ); + expect(deepResultAtLinks.length).toBe(2); + expect(deepResultAtLinks[0].name).toBe("Write tests"); + }); + + test("Count all backlinks (@links.@count)", () => { + const result = realm.objects(Item).filtered( + // [remove-end] + // Find items that are not referenced by another object of any type (backlink count is 0). + "@links.@count == 0" + // [snippet-end] + ); + expect(result.length).toBe(1); + expect(result[0].name).toBe("Write tests"); + }); + }); + + describe("Type operators", () => { + test("Type operator", () => { + const projects = realm.objects(Project); + const mixedString = projects.filtered( + // [snippet-start] type-operator + // Find projects with an `additionalInfo` property of string type. + "additionalInfo.@type == 'string'" + + // [remove-start] + ); + const mixedCollection = projects.filtered( + // [remove-end] + // Find projects with an `additionalInfo` property of + // `collection` type, which matches list or dictionary types. + "additionalInfo.@type == 'collection'" + + // [remove-start] + ); + const mixedBool = projects.filtered( + // [remove-end] + // Find projects with an `additionalInfo` property of list type, where any list element is of type 'bool'. + "additionalInfo[*].@type == 'bool'" + // [snippet-end] + ); + expect(mixedString.length).toBe(1); + expect(mixedBool.length).toBe(1); + }); + }); + + test("Nil type", () => { + const items = realm.objects(Item); + const res = items.filtered( + // [snippet-start] nil-type + "assignee == nil" + // [remove-start] + ); + // prettier-ignore + const res2 = realm.objects(Item).filtered( + // [remove-end] + "assignee == $0", null // 'null' maps to the SDK language's null pointer + // [snippet-end] + ); + expect(res.length).toBe(1); + expect(res2.length).toBe(1); + }); + + describe("ObjectId and UUID queries", () => { + // Uses a test-specific schema with id types + const OidUuid = { + name: "OidUuid", + properties: { id: "uuid", _id: "objectId" }, + }; + + let realm; + const path = "oidUuid.realm"; + + const oidValueString = "6001c033600510df3bbfd864"; + const uuid1String = "d1b186e1-e9e0-4768-a1a7-c492519d47ee"; + const oidValue = new BSON.ObjectId(oidValueString); + const uuidValue = new BSON.UUID(uuid1String); + + // Add, then delete objects for this test + beforeEach(async () => { + realm = await Realm.open({ schema: [OidUuid], path }); + const obj1 = { + _id: oidValue, + id: uuidValue, + }; + const obj2 = { + _id: new BSON.ObjectId(), + id: new BSON.UUID(), + }; + realm.write(() => { + realm.create("OidUuid", obj1); + realm.create("OidUuid", obj2); + }); + }); + + afterEach(() => { + realm.close(); + Realm.deleteFile({ path }); + }); + + test("ObjectId query", () => { + const oidUuids = realm.objects("OidUuid"); + // prettier-ignore + const oidStringLiteral = oidUuids.filtered( + // [snippet-start] oid + // Find an item whose `_id` matches the ObjectID value passed to 'oid()'. + "_id == oid(6001c033600510df3bbfd864)" + + // [remove-start] + ); + + const oidInterpolation = oidUuids.filtered( + // [remove-end] + // Find an item whose `_id` matches the ObjectID passed as a parameterized query argument. + "_id == $0", + oidValue + + // [remove-start] + ); + + expect(oidStringLiteral.length).toBe(1); + expect(oidInterpolation.length).toBe(1); + }); + test("UUID query", () => { + const oidUuids = realm.objects("OidUuid"); + const uuid = oidUuids.filtered( + // [remove-end] + // Find an item whose `id` matches the UUID value passed to 'uuid()'. + "id == uuid(d1b186e1-e9e0-4768-a1a7-c492519d47ee)" + + // [remove-start] + ); + // prettier-ignore + const test = oidUuids.filtered( + // [remove-end] + // Find an item whose `_id` matches the UUID passed as a parameterized query argument. + "id == $0", uuidValue + // [snippet-end] + ); + expect(uuid.length).toBe(1); + }); + }); + + describe("Date queries", () => { + // Uses a test-specific schema with Date type + const DateTime = { + name: "Date", + properties: { name: "string", dateCompleted: "date" }, + }; + + let realm; + const path = "date.realm"; + + // Add, then delete Date objects for this test + beforeEach(async () => { + realm = await Realm.open({ + schema: [DateTime], + path, + }); + + realm.write(() => { + realm.create("Date", { + name: "now", + dateCompleted: new Date(), + }); + realm.create("Date", { + name: "past", + dateCompleted: new Date("December 17, 1985 03:24:00"), + }); + realm.create("Date", { + name: "withinYear", + dateCompleted: new Date("February 17, 2021 03:24:00"), + }); + }); + }); + + afterEach(() => { + realm.close(); + Realm.deleteFile({ path }); + }); + + // prettier-ignore + test("Date queries", () => { + const dates = realm.objects("Date"); + // [snippet-start] date-alt-representation + var lastYear = new Date(1577883184000); // Unix timestamp in ms + var thisYear = new Date("2021-01-01@17:30:15:0"); // DateTime in UTC + var today = new Date("April 01, 2021 03:24:00"); // Alternate DateTime format + // [snippet-end] + const dateParameterizedQuery = dates.filtered( + // [snippet-start] date-parameterized-query + // Find to-do items completed before today's date. + "dateCompleted < $0", today + + // [remove-start] + ); + + const dateAlt1 = dates.filtered( + // [remove-end] + // Find to-do items completed between the start of the year until today. + "dateCompleted > $0 AND dateCompleted < $1", thisYear, today + // [snippet-end] + ); + + expect(dateParameterizedQuery.length).toBe(2); + expect(dateAlt1.length).toBe(1); + }); + }); + + // prettier-ignore + test("Full-text search (FTS) query", () => { + const items = realm.objects(Item); + + const itemsWithWrite = items.filtered( + // [snippet-start] rql-fts + // Find items with 'write' in the name. + "name TEXT $0", "write" + + // [remove-start] + ); + + const itemsWithWriteNotTest = items.filtered( + // [remove-end] + // Use '-' to exclude: + // Find items with 'write' but not 'tests' in the name. + "name TEXT $0", "write -tests" + + // [remove-start] + ); + + const itemsStartingWithWri = items.filtered( + // [remove-end] + // Use '*' to match any characters after a prefix: + // Find items with a name that starts with 'wri'. + "name TEXT $0", "wri*" + // [snippet-end] + ); + expect(itemsWithWrite.length).toBe(2); expect(itemsWithWriteNotTest.length).toBe(0); - expect(itemsStartingWithWri.length).toBe(1); + expect(itemsStartingWithWri.length).toBe(2); }); -}); \ No newline at end of file +}); diff --git a/examples/node/v12/__tests__/realm-query-language.test.ts b/examples/node/v12/__tests__/realm-query-language.test.ts new file mode 100644 index 0000000000..fb16a7e8cc --- /dev/null +++ b/examples/node/v12/__tests__/realm-query-language.test.ts @@ -0,0 +1,988 @@ +import Realm, { BSON } from "realm"; +import { Address, Item, Office, Project } from "./models/rql-data-models.ts"; +import { describe, expect } from "@jest/globals"; + +describe("Realm Query Language Reference", () => { + let realm: Realm; + const config = { schema: [Project, Item, Address, Office] }; + + beforeEach(async () => { + // Before each test, open the realm and create project & item objects: + // 2 branches w/ 2 addresses; 3 projects; and + // 6 items (one used in 2 projects, another in 0 projects) + realm = await Realm.open(config); + + const mainBranch = { + name: "Main Branch", + address: { + name: "Main Branch", + street: "999 Big Boulevard", + zipcode: 10019, + }, + }; + const austinBranch = { + name: "Austin Branch", + address: { + name: "Austin Branch", + street: "123 Main Ave", + zipcode: 10019, + }, + }; + realm.write(() => { + realm.create("Item", { + // Unassigned incomplete item not in any project + _id: new BSON.ObjectId("631a073c833a34ade21db2b2"), + name: "Write tests", + isComplete: false, + assignee: null, + priority: 10, + progressMinutes: 0, + }); + + realm.create("Project", { + _id: new BSON.ObjectId(), + name: "Example Project with Items", + items: [ + { + // Alex incomplete item + _id: new BSON.ObjectId("631a072f75120729dc9223d9"), + name: "Write tests", + isComplete: false, + assignee: "Alex", + priority: 5, + progressMinutes: 125, + }, + { + // Ali incomplete item + _id: new BSON.ObjectId("631a0737c98f89f5b81cd24d"), + name: "Run tests", + isComplete: false, + assignee: "Ali", + priority: 9, + progressMinutes: 10, + }, + ], + quota: 1, // doesn't meet quota + comments: { status: "Behind schedule", projectNumber: "70150" }, + projectLocation: mainBranch, + // Mixed property is of type dictionary of mixed values + // (date, list of strings, bool, and int) + additionalInfo: { + startDate: new Date("2021-01-01"), + customerContacts: ["Alice", "Bob"], + recurringCustomer: true, + budget: 10000, + }, + }); + const project = realm.create("Project", { + _id: new BSON.ObjectId(), + name: "Project that Meets Quota", + items: [ + { + // Complete item used in 2 projects + _id: new BSON.ObjectId(), + name: "Approve project plan", + isComplete: true, + assignee: "Dachary", + priority: 1, + progressMinutes: 0, + }, + { + // Complete high-priority item + _id: new BSON.ObjectId(), + name: "Create a ticket", + isComplete: true, + assignee: "Chris", + priority: 9, + progressMinutes: 10, + }, + { + // Incomplete high-priority item + _id: new BSON.ObjectId(), + name: "Demo template app", + isComplete: false, + assignee: "Dachary", + priority: 11, + progressMinutes: 3, + }, + ], + quota: 1, // meets quota + comments: { status: "Ahead of schedule", projectNumber: "70187" }, + projectLocation: mainBranch, + // Mixed property is of type string + additionalInfo: "Customer is a VIP.", + }); + + realm.create("Project", { + _id: new BSON.ObjectId(), + name: "Project in Austin", + items: [ + project.items[0], + { + // Incomplete high-priority item assigned to `nil` type + _id: new BSON.ObjectId(), + name: "Lead offsite workshop", + isComplete: false, + assignee: "nil", + priority: 10, + progressMinutes: 0, + }, + ], + quota: 11, // doesn't meet quota + comments: { status: "On track", projectNumber: "N/A" }, + projectLocation: austinBranch, + // Mixed property is of type list, containing string and nested + // dictionary of mixed values (date, boolean, and int) + additionalInfo: [ + "Customer is difficult to work with.", + { + startDate: new Date("2021-03-01"), + recurringCustomer: false, + budget: 10000, + }, + ], + }); + }); + }); + + afterEach(() => { + // After the test, delete the objects and close the realm + if (realm && !realm.isClosed) { + realm.write(() => { + realm.deleteAll(); + }); + realm.close(); + expect(realm.isClosed).toBe(true); + } + }); + + afterAll(() => { + Realm.deleteFile(config); + }); + + test("Can open realm and create objects", async () => { + expect(realm.isClosed).toBe(false); + expect(realm.objects(Project)[0].name).toBe("Example Project with Items"); + expect(realm.objects(Item)[0].name).toBe("Write tests"); + }); + + test("Simple query", () => { + // NOTE: snippet used on Node.js Query Data page, not RQL page + // :snippet-start: simple-query + const items = realm.objects(Item); + // Get all items where 'priority' property is 7 or more + const importantItems = items.filtered("priority >= $0", 7); + // :snippet-end: + expect(importantItems.length).toEqual(5); + }); + + describe("Basic syntax", () => { + test("Expression query", () => { + const items = realm.objects(Item); + // prettier-ignore + const expression = + // :snippet-start: predicate + "priority == 1" + ; // :remove: + // Property Name: priority + // Operator: == + // Value: 1 + // :snippet-end: + expect(items.filtered(expression).length).toBe(1); + }); + test("Serialized query", () => { + const items = realm.objects(Item); + const query = items.filtered( + // :snippet-start: serialized-query + "progressMinutes > 1 AND assignee == 'Ali'" + // :snippet-end: + ); + expect(query.length).toBe(1); + }); + test("Parameterized query", () => { + const items = realm.objects(Item); + // prettier-ignore + const substitution = items.filtered( + // :snippet-start: parameterized-query + // Include one parameter with `$0` + "progressMinutes > 1 AND assignee == $0", "Ali" + + // :remove-start: + ); + expect(substitution.length).toBe(1); + }); + + test("Multiple parameterized query", () => { + const items = realm.objects(Item); + // prettier-ignore + const substitution = items.filtered( + // :remove-end: + // Include multiple parameters using ascending integers, + // starting at`$0` + "progressMinutes > $0 AND assignee == $1", 1, "Alex" + // :snippet-end: + ); + expect(substitution.length).toBe(1); + }); + + test("Dot notation", () => { + const address = realm.objects(Project); + const nestedItem = address.filtered( + // :snippet-start: dot-notation + // Find projects whose `items` list property contains an item + // with a specific name + "items[0].name == 'Approve project plan'" + // :snippet-end: + ); + const nestedZipcode = address.filtered( + // :snippet-start: deep-dot-notation + // Find projects whose `projectLocation` property contains an + // embedded Address object with a specific zip code + "projectLocation.address.zipcode == 10019" + // :snippet-end: + ); + expect(nestedItem.length).toBe(2); + expect(nestedZipcode.length).toBe(3); + }); + }); + + // prettier-ignore + test("Comparison operators", () => { + const items = realm.objects(Item); + + const highPriorityItems = items.filtered( + // :snippet-start: comparison-operators + // Compare `priority` values against a threshold value + "priority > $0", 5 + + // :remove-start: + ); + expect(highPriorityItems.length).toBe(5); + + const unassignedItems = items.filtered( + // :remove-end: + // Compare `assignee` values to `null` value. + "assignee == $0", null + + // :remove-start: + ); + expect(unassignedItems.length).toBe(1); + + const progressMinutesRange = items.filtered( + // :remove-end: + // Compare `priority` values against an inclusive range of values + "priority BETWEEN { $0 , $1 }", 1, 5 + + // :remove-start: + ); + expect(progressMinutesRange.length).toBe(2); + + const progressMinutesIn = items.filtered( + // :remove-end: + // Compare `progressMinutes` values against any of the listed values + "progressMinutes IN { $0, $1, $2 }", 10, 30, 60 + // :snippet-end: + ); + }); + + // prettier-ignore + test("Logical operators", () => { + const items = realm.objects(Item); + const aliComplete = items.filtered( + // :snippet-start: logical-operators + // Find all items assigned to Ali AND marked completed + "assignee == $0 AND isComplete == $1", "Ali", true + + // :remove-start: + ); + const alexOrAli = items.filtered( + // :remove-end: + // Find all items assigned to Alex OR to Ali + "assignee == $0 OR assignee == $1", "Alex", "Ali" + // :snippet-end: + ); + expect(aliComplete.length).toBe(0); + expect(alexOrAli.length).toBe(2); + }); + + describe("Arithmetic operators", () => { + test("Basic arithmetic", () => { + const items = realm.objects(Item); + const basicMath = items.filtered( + // :snippet-start: basic-arithmetic + // Evaluate against an item's `priority` property value: + "2 * priority > 6" // (resolves to `priority > 3`) + + // :remove-start: + ); + const lessBasicMath = items.filtered( + // :remove-end: + "priority >= 2 * (2 - 1) + 2" // (resolves to `priority >= 4`) + + // :remove-start: + ); + expect(basicMath.length).toBe(6); + expect(lessBasicMath.length).toBe(6); + }); + + test("Arithmetic with object properties", () => { + const items = realm.objects(Item); + const mathWithObjProps = items.filtered( + // :remove-end: + // Evaluate against multiple object property values: + "progressMinutes * priority == 90" + // :snippet-end: + ); + expect(mathWithObjProps.length).toBe(2); + }); + }); + + // prettier-ignore + describe("Type-specific operators", () => { + test("String operators", () => { + const projects = realm.objects(Project); + const startWithE = projects.filtered( + // :snippet-start: string-operators + // Find projects whose name starts with 'E' or 'e' + // (case-insensitive query) + "name BEGINSWITH[c] $0", "E" + + // :remove-start: + ); + expect(startWithE.length).toBe(1); + + const containIe = projects.filtered( + // :remove-end: + // Find projects whose name contains 'ie' + // (case-sensitive query) + "name CONTAINS $0", "ie" + + // :remove-start: + ); + expect(containIe.length).toBe(0); + }); + + test("String comparisons", () => { + const projects = realm.objects(Project); + const items = realm.objects(Item); + // prettier-ignore + const assigneeBetween = items.filtered( + // :remove-end: + // Find items where the assignee name is lexicographically between + // 'Ali' and 'Chris'(case-sensitive) + "assignee BETWEEN { $0 , $1 }", "Ali", "Chris" + + // :remove-start: + ); + // prettier-ignore + const compareStreet = projects.filtered( + // :remove-end: + // Find projects where the street address is lexicographically + // greater than '123 Main St'(case-sensitive) + "projectLocation.address.street > $0", "123 Main St" + // :snippet-end: + ); + expect(compareStreet.length).toBe(2); + expect(assigneeBetween.length).toBe(2); + }); + }); + + // prettier-ignore + test("Aggregate queries", () => { + const projects = realm.objects(Project); + // :snippet-start: aggregate-operators + var priorityNum = 5; + + // :remove-start: + const averageItemPriorityAbove5 = projects.filtered( + // :remove-end: + // Find projects with average item `priority` above 5 + "items.@avg.priority > $0", priorityNum + + // :remove-start: + ); + expect(averageItemPriorityAbove5.length).toBe(3); + + const allItemsLowerPriority = projects.filtered( + // :remove-end: + // Find projects where every item has a `priority` less than 5 + "items.@max.priority < $0", priorityNum + + // :remove-start: + ); + expect(allItemsLowerPriority.length).toBe(0); + + const allItemsHighPriority = projects.filtered( + // :remove-end: + // Find projects where every item has `priority` greater than 5 + "items.@min.priority > $0", priorityNum + + // :remove-start: + ); + expect(allItemsHighPriority.length).toBe(0); + + const moreThan5Items = projects.filtered( + // :remove-end: + // Find projects with more than 5 items + "items.@count > $0", 5 + + // :remove-start: + ); + expect(moreThan5Items.length).toBe(0); + + const longRunningProjects = projects.filtered( + // :remove-end: + // Find projects where the sum total value of `progressMinutes` + // across all items is greater than 100 + "items.@sum.progressMinutes > $0", + 100 + // :snippet-end: + ); + expect(longRunningProjects.length).toBe(1); + }); + + describe("Collection operators", () => { + test("Collection queries", () => { + const projects = realm.objects(Project); + // prettier-ignore + const noCompleteItems = projects.filtered( + // :snippet-start: set-operators + // Find projects with no complete items + "NONE items.isComplete == $0", true + + // :remove-start: + ); + // prettier-ignore + const anyTopPriorityItems = projects.filtered( + // :remove-end: + // Find projects that contain any item with priority 10 + "items.priority == $0", 10 // (ANY operator is implied) + + // :remove-start: + ); + // prettier-ignore + const allItemsCompleted = projects.filtered( + // :remove-end: + // Find projects that only contain completed items + "ALL items.isComplete == $0", true + + // :remove-start: + ); + // prettier-ignore + const assignedToAlexOrAli = projects.filtered( + // :remove-end: + // Find projects with at least one item assigned to + // either Alex or Ali + "ANY items.assignee IN { $0 , $1 }", "Alex", "Ali" + + // :remove-start: + ); + // prettier-ignore + const notAssignedToAlexOrAli = projects.filtered( + // :remove-end: + // Find projects with no items assigned to either Alex or Ali + "NONE items.assignee IN { $0 , $1 }", "Alex", "Ali" + // :snippet-end: + ); + expect(noCompleteItems.length).toBe(1); + expect(anyTopPriorityItems.length).toBe(1); + expect(allItemsCompleted.length).toBe(0); + expect(assignedToAlexOrAli.length).toBe(1); + expect(notAssignedToAlexOrAli.length).toBe(2); + }); + + test("List comparisons", () => { + realm.write(() => {}); + const projects = realm.objects(Project); + const items = realm.objects(Item); + + const collectionQuery = projects.filtered( + // :snippet-start: list-comparisons-collection + // Find an item with the specified ObjectId value + // in the`items` collection + "oid(631a072f75120729dc9223d9) IN items._id" + // :snippet-end: + ); + const staticQuery = items.filtered( + // :snippet-start: list-comparisons-static + // Find items with a priority value matching any value + // in the static list + "priority IN {0, 1, 2}" + // :snippet-end: + ); + // :snippet-start: list-comparisons-parameterized + const ids = [ + new BSON.ObjectId("631a072f75120729dc9223d9"), + new BSON.ObjectId("631a0737c98f89f5b81cd24d"), + new BSON.ObjectId("631a073c833a34ade21db2b2"), + ]; + // Find items with an ObjectId value matching any value + // in the parameterized list + const parameterizedQuery = realm.objects(Item).filtered("_id IN $0", ids); + // :snippet-end: + + // prettier-ignore + const anyOperator = items.filtered( + // :snippet-start: equivalent-lists-any-operator + "assignee == ANY { $0, $1 }", "Alex", "Ali" + + // :remove-start: + ); + // prettier-ignore + const equivalentAnyOperator = items.filtered( + // :remove-end: + "assignee == { $0, $1 }", "Alex", "Ali" // Equivalent (ANY is implied) + // :snippet-end: + ); + + expect(anyOperator.length).toBe(2); + expect(equivalentAnyOperator.length).toBe(2); + expect(collectionQuery.length).toBe(1); + expect(staticQuery.length).toBe(1); + expect(parameterizedQuery.length).toBe(3); + }); + + test("Sort, distinct, and limit results", () => { + const items = realm.objects(Item); + + const sortedItems = items.filtered( + // :snippet-start: sort-distinct-limit + // Find incomplete items, sort by `priority` in descending order, + // then sort equal `priority` values by `progressMinutes` + // in ascending order + "isComplete == false SORT(priority DESC, progressMinutes ASC)" + + // :remove-start: + ); + expect(sortedItems[0].name).toBe("Demo template app"); + const distinctItems = items.filtered( + // :remove-end: + // Find high priority items, then remove from the results any items + // with duplicate values for both `name` AND `assignee` properties + "priority >= 5 DISTINCT(name, assignee)" + + // :remove-start: + ); + expect(distinctItems.length).toBe(6); + const limitItems = items.filtered( + // :remove-end: + // Find in-progress items, then return the first 10 results + "progressMinutes > 0 && isComplete != true LIMIT(10)" + // :snippet-end: + ); + expect(limitItems[0].name).toBe("Write tests"); + + const sortFirst = items.filtered( + // :snippet-start: sort-distinct-limit-order-matters + // 1. Sorts by highest priority + // 2. Returns the first item + // 3. Remove duplicate names (N/A - a single item is always distinct) + "assignee == null SORT(priority ASC) LIMIT(1) DISTINCT(name)" + + // :remove-start: + ); + const limitLast = items.filtered( + // :remove-end: + // 1. Removes any duplicates by name + // 2. Sorts by highest priority + // 3. Returns the first item + "assignee == null DISTINCT(name) SORT(priority ASC) LIMIT(1)" + // :snippet-end: + ); + }); + + test("Subquery query", () => { + const projects = realm.objects("Project"); + const subquery = projects.filtered( + // :snippet-start: subquery + // Find projects with incomplete items with 'Demo' in the name + "SUBQUERY(items, $item, $item.isComplete == false AND $item.name CONTAINS[c] 'Demo').@count > 0" + + // :remove-start: + ); + expect(subquery.length).toBe(1); + expect(subquery[0].name).toBe("Project that Meets Quota"); + + const subquery2 = projects.filtered( + // :remove-end: + // Find projects where the number of completed items is + // greater than or equal to the project's `quota` property + "SUBQUERY(items, $item, $item.isComplete == true).@count >= quota" + // :snippet-end: + ); + + expect(subquery2.length).toBe(1); + expect(subquery2[0].name).toBe("Project that Meets Quota"); + }); + + // prettier-ignore + test("Dictionary operators", () => { + const dictionaries = realm.objects(Project); + const statusKey = dictionaries.filtered( + // :snippet-start: dictionary-operators + // Find projects whose `comments` dictionary property + // have a key of 'status' + "comments.@keys == $0", "status" + + // :remove-start: + ); + const statusOnTrack = dictionaries.filtered( + // :remove-end: + // Find projects whose `comments` dictionary property + // have a 'status' key with a value that ends in 'track' + "comments['status'] LIKE $0", "*track" + + // :remove-start: + ); + const numItemsInDict = dictionaries.filtered( + // :remove-end: + // Find projects whose `comments` dictionary property + // have more than one key-value pair + "comments.@count > $0", 1 + + // :remove-start: + ); + + const allString = dictionaries.filtered( + // :remove-end: + // Find projects whose `comments` dictionary property contains + // only values of type 'string' + "ALL comments.@type == 'string'" + + // :remove-start: + ); + + const noInts = dictionaries.filtered( + // :remove-end: + // Find projects whose `comments` dictionary property contains + // no values of type 'int' + "NONE comments.@type == 'int'" + // :snippet-end: + ); + expect(statusKey.length).toBe(3); + expect(statusOnTrack.length).toBe(1); + expect(numItemsInDict.length).toBe(3); + expect(allString.length).toBe(3); + expect(noInts.length).toBe(3); + }); + }); + + describe("Backlinks queries", () => { + test("Backlinks query @links", () => { + const atLinksResult = realm.objects(Item).filtered( + // :snippet-start: backlinks-atLinks + // Find items that belong to a project with a quota less than 10 + // (using '@links..') + "@links.Project.items.quota < 10" + // :snippet-end: + ); + expect(atLinksResult.length).toBe(5); + + const linkingObjectsResult = realm.objects(Item).filtered( + // :snippet-start: backlinks-linkingObjects + // Find items that belong to a project with a quota greater than 10 + // through the Item object's `projects` property + // (using 'LinkingObjects') + "projects.quota > 10" + // :snippet-end: + ); + expect(linkingObjectsResult.length).toBe(2); + }); + + test("Backlinks collection operators", () => { + const anyResult = realm.objects(Item).filtered( + // :snippet-start: backlinks-collection-operators + // Find items where no project that references the item has a + // quota greater than 10 + "NONE @links.Project.items.quota > 10" + + // :remove-start: + ); + expect(anyResult.length).toBe(5); + + const allResult = realm.objects(Item).filtered( + // :remove-end: + // Find items where all projects that reference the item have a + // quota less than 5 + "ALL @links.Project.items.quota < 5" + + // :remove-start: + ); + expect(allResult.length).toBe(5); + }); + + test("Backlinks aggregate operators", () => { + const shallowResultLinkingObjects = realm.objects(Item).filtered( + // :remove-end: + // Find items that are referenced by multiple projects + "projects.@count > 1" + + // :remove-start: + ); + expect(shallowResultLinkingObjects.length).toBe(1); + expect(shallowResultLinkingObjects[0].name).toBe("Approve project plan"); + + const shallowResultAtLinks = realm.objects(Item).filtered( + // :remove-end: + // Find items that are not referenced by any project + "@links.Project.items.@count == 0" + + // :remove-start: + ); + expect(shallowResultAtLinks.length).toBe(1); + expect(shallowResultAtLinks[0].name).toBe("Write tests"); + + const deepResultAtLinks = realm.objects(Item).filtered( + // :remove-end: + // Find items that belong to a project where the average item + // has been worked on for at least 10 minutes + "@links.Project.items.items.@avg.progressMinutes > 10" + + // :remove-start: + ); + expect(deepResultAtLinks.length).toBe(2); + expect(deepResultAtLinks[0].name).toBe("Write tests"); + }); + + test("Count all backlinks (@links.@count)", () => { + const result = realm.objects(Item).filtered( + // :remove-end: + // Find items that are not referenced by another object + // of any type (backlink count is 0) + "@links.@count == 0" + // :snippet-end: + ); + expect(result.length).toBe(1); + expect(result[0].name).toBe("Write tests"); + }); + }); + + describe("Type operators", () => { + test("Type operator", () => { + const projects = realm.objects(Project); + const mixedString = projects.filtered( + // :snippet-start: type-operator + // Find projects with an `additionalInfo` property of string type + "additionalInfo.@type == 'string'" + + // :remove-start: + ); + const mixedCollection = projects.filtered( + // :remove-end: + // Find projects with an `additionalInfo` property of + // `collection` type, which matches list or dictionary types + "additionalInfo.@type == 'collection'" + + // :remove-start: + ); + const mixedBool = projects.filtered( + // :remove-end: + // Find projects with an `additionalInfo` property of list type, + // where any list element is of type 'bool' + "additionalInfo[*].@type == 'bool'" + // :snippet-end: + ); + expect(mixedString.length).toBe(1); + expect(mixedBool.length).toBe(1); + }); + }); + + test("Nil type", () => { + const items = realm.objects(Item); + const res = items.filtered( + // :snippet-start: nil-type + "assignee == nil" + // :remove-start: + ); + // prettier-ignore + const res2 = realm.objects(Item).filtered( + // :remove-end: + "assignee == $0", null // 'null' maps to SDK language's null pointer + // :snippet-end: + ); + expect(res.length).toBe(1); + expect(res2.length).toBe(1); + }); + + describe("ObjectId and UUID queries", () => { + // Uses a test-specific schema with id types + const OidUuid = { + name: "OidUuid", + properties: { id: "uuid", _id: "objectId" }, + }; + + let realm: Realm; + const path = "oidUuid.realm"; + + const oidValueString = "6001c033600510df3bbfd864"; + const uuid1String = "d1b186e1-e9e0-4768-a1a7-c492519d47ee"; + const oidValue = new BSON.ObjectId(oidValueString); + const uuidValue = new BSON.UUID(uuid1String); + + // Add, then delete objects for this test + beforeEach(async () => { + realm = await Realm.open({ schema: [OidUuid], path }); + const obj1 = { + _id: oidValue, + id: uuidValue, + }; + const obj2 = { + _id: new BSON.ObjectId(), + id: new BSON.UUID(), + }; + realm.write(() => { + realm.create("OidUuid", obj1); + realm.create("OidUuid", obj2); + }); + }); + + afterEach(() => { + realm.close(); + Realm.deleteFile({ path }); + }); + + test("ObjectId query", () => { + const oidUuids = realm.objects("OidUuid"); + // prettier-ignore + const oidStringLiteral = oidUuids.filtered( + // :snippet-start: oid + // Find an item whose `_id` matches the ObjectID value + // passed to 'oid()' + "_id == oid(6001c033600510df3bbfd864)" + + // :remove-start: + ); + + const oidInterpolation = oidUuids.filtered( + // :remove-end: + // Find an item whose `_id` matches the ObjectID passed as + // a parameterized query argument + "_id == $0", oidValue + + // :remove-start: + ); + + expect(oidStringLiteral.length).toBe(1); + expect(oidInterpolation.length).toBe(1); + }); + test("UUID query", () => { + const oidUuids = realm.objects("OidUuid"); + const uuid = oidUuids.filtered( + // :remove-end: + // Find an item whose `id` matches the UUID value + // passed to 'uuid()' + "id == uuid(d1b186e1-e9e0-4768-a1a7-c492519d47ee)" + + // :remove-start: + ); + // prettier-ignore + const test = oidUuids.filtered( + // :remove-end: + // Find an item whose `_id` matches the UUID passed as + // a parameterized query argument + "id == $0", uuidValue + // :snippet-end: + ); + expect(uuid.length).toBe(1); + }); + }); + + describe("Date queries", () => { + // Uses a test-specific schema with Date type + const DateTime = { + name: "Date", + properties: { name: "string", dateCompleted: "date" }, + }; + + let realm: Realm; + const path = "date.realm"; + + // Add, then delete Date objects for this test + beforeEach(async () => { + realm = await Realm.open({ + schema: [DateTime], + path, + }); + + realm.write(() => { + realm.create("Date", { + name: "now", + dateCompleted: new Date(), + }); + realm.create("Date", { + name: "past", + dateCompleted: new Date("December 17, 1985 03:24:00"), + }); + realm.create("Date", { + name: "withinYear", + dateCompleted: new Date("February 17, 2021 03:24:00"), + }); + }); + }); + + afterEach(() => { + realm.close(); + Realm.deleteFile({ path }); + }); + + // prettier-ignore + test("Date queries", () => { + const dates = realm.objects("Date"); + // :snippet-start: date-alt-representation + var lastYear = new Date(1577883184000); // Unix timestamp in ms + var thisYear = new Date("2021-01-01@17:30:15:0"); // DateTime in UTC + var today = new Date("April 01, 2021 03:24:00"); // Alternate DateTime format + // :snippet-end: + const dateParameterizedQuery = dates.filtered( + // :snippet-start: date-parameterized-query + // Find to-do items completed before today's date + "dateCompleted < $0", today + + // :remove-start: + ); + + const dateAlt1 = dates.filtered( + // :remove-end: + // Find to-do items completed between start of the year to today + "dateCompleted > $0 AND dateCompleted < $1", thisYear, today + // :snippet-end: + ); + + expect(dateParameterizedQuery.length).toBe(2); + expect(dateAlt1.length).toBe(1); + }); + }); + + // prettier-ignore + test("Full-text search (FTS) query", () => { + const items = realm.objects(Item); + + const itemsWithWrite = items.filtered( + // :snippet-start: rql-fts + // Find items with 'write' in the name. + "name TEXT $0", "write" + + // :remove-start: + ); + + const itemsWithWriteNotTest = items.filtered( + // :remove-end: + // Use '-' to exclude: + // Find items with 'write' but not 'tests' in the name + "name TEXT $0", "write -tests" + + // :remove-start: + ); + + const itemsStartingWithWri = items.filtered( + // :remove-end: + // Use '*' to match any characters after a prefix: + // Find items with a name that starts with 'wri' + "name TEXT $0", "wri*" + // :snippet-end: + ); + expect(itemsWithWrite.length).toBe(2); + expect(itemsWithWriteNotTest.length).toBe(0); + expect(itemsStartingWithWri.length).toBe(2); + }); +}); diff --git a/examples/node/v12/__tests__/rql-data-models.test.js b/examples/node/v12/__tests__/rql-data-models.test.js new file mode 100644 index 0000000000..2a6500fb53 --- /dev/null +++ b/examples/node/v12/__tests__/rql-data-models.test.js @@ -0,0 +1,71 @@ +import Realm, { BSON } from "realm"; +import { Item, Project, Office, Address } from "./models/rql-data-models.ts"; + +describe("Test RQL Models", () => { + let realm; + const config = { schema: [Project, Item, Office, Address] }; + + beforeEach(async () => { + realm = await Realm.open(config); + }); + + afterEach(() => { + // After each test, delete the objects and close the realm + if (realm && !realm.isClosed) { + realm.write(() => { + realm.deleteAll(); + }); + realm.close(); + expect(realm.isClosed).toBe(true); + } + }); + + afterAll(() => { + Realm.deleteFile(config); + }); + + test("Can open realm with config", async () => { + expect(realm.isClosed).toBe(false); + }); + + test("Can create object of Item type", () => { + realm.write(() => { + realm.create(Item, { + _id: new BSON.ObjectId(), + name: "get coffee", + }); + }); + const coffeeItem = realm.objects(Item)[0]; + expect(coffeeItem._id instanceof BSON.ObjectId).toBe(true); + expect(coffeeItem.name).toBe("get coffee"); + expect(coffeeItem.isComplete).toBe(false); + }); + + test("Can create object of Project type", () => { + realm.write(() => { + const teaItem = realm.create(Item, { + _id: new BSON.ObjectId(), + name: "get tea", + }); + const officeAddress = realm.create(Office, { + name: "Austin", + address: { + name: "Main Branch", + street: "123 Main St", + zipcode: 10019, + }, + }); + realm.create(Project, { + _id: new BSON.ObjectId(), + name: "beverages", + items: [teaItem], + projectLocation: officeAddress, + }); + }); + const bevProject = realm.objects(Project)[0]; + expect(bevProject._id instanceof BSON.ObjectId).toBe(true); + expect(bevProject.name).toBe("beverages"); + expect(bevProject.items[0].name).toBe("get tea"); + expect(bevProject.projectLocation.name).toBe("Austin"); + }); +}); diff --git a/examples/node/v12/__tests__/rql-data-models.test.ts b/examples/node/v12/__tests__/rql-data-models.test.ts new file mode 100644 index 0000000000..046b94436b --- /dev/null +++ b/examples/node/v12/__tests__/rql-data-models.test.ts @@ -0,0 +1,81 @@ +import Realm, { BSON } from "realm"; +import { Item, Project, Office, Address } from "./models/rql-data-models.ts"; + +describe("Test RQL Models", () => { + let realm: Realm; + const config = { schema: [Project, Item, Office, Address] }; + + beforeEach(async () => { + realm = await Realm.open(config); + }); + + afterEach(() => { + if (realm && !realm.isClosed) { + realm.write(() => { + realm.deleteAll(); + }); + realm.close(); + expect(realm.isClosed).toBe(true); + } + }); + + afterAll(() => { + Realm.deleteFile(config); + }); + + test("Can open realm with config", async () => { + expect(realm.isClosed).toBe(false); + }); + + test("Can create object of Item type", () => { + const itemId = new BSON.ObjectId(); + realm.write(() => { + realm.create(Item, { + _id: itemId, + name: "get coffee", + }); + }); + const coffeeItem = realm.objects(Item)[0]; + expect(coffeeItem._id).toEqual(itemId); + expect(coffeeItem.name).toBe("get coffee"); + expect(coffeeItem.isComplete).toBe(false); + }); + + test("Can create object of Project type", () => { + const projectId = new BSON.ObjectId(); + realm.write(() => { + // Create the tea item + const teaItem = realm.create("Item", { + _id: new BSON.ObjectId(), + name: "get tea", + }); + + // Create the address object + const address = { + name: "Main Branch", + street: "123 Main St", + zipcode: 10019, + }; + + // Create the office object + const office = realm.create("Office", { + name: "Main Office", + address: address, + }); + // Create the project object + realm.create("Project", { + _id: projectId, + name: "beverages", + items: [teaItem], + projectLocation: office, + }); + }); + + const bevProject = realm.objects(Project)[0]; + expect(bevProject._id).toEqual(projectId); + expect(bevProject.name).toBe("beverages"); + expect(bevProject.items[0].name).toBe("get tea"); + expect(bevProject.projectLocation?.name).toBe("Main Office"); + expect(bevProject.projectLocation?.address.name).toBe("Main Branch"); + }); +}); diff --git a/examples/node/v12/package-lock.json b/examples/node/v12/package-lock.json index d51e9b2280..a2cd94e3d4 100644 --- a/examples/node/v12/package-lock.json +++ b/examples/node/v12/package-lock.json @@ -10,7 +10,7 @@ "license": "ISC", "dependencies": { "fs-extra": "^11.1.1", - "realm": "^12.8.0" + "realm": "^12.9.0" }, "devDependencies": { "@babel/core": "^7.21.8", @@ -7462,9 +7462,9 @@ } }, "node_modules/realm": { - "version": "12.8.0", - "resolved": "https://registry.npmjs.org/realm/-/realm-12.8.0.tgz", - "integrity": "sha512-U1w5+ncyURQFQTrshoGn3KV+pzR1rQlPT7s3Sw6HPIPVBH80EWU3mirwvqp6RQ+Qi32ctRrBMTNeGd5mzAyiSw==", + "version": "12.9.0", + "resolved": "https://registry.npmjs.org/realm/-/realm-12.9.0.tgz", + "integrity": "sha512-K7JblaSaqqFEu8kObgTCo1ITTYnR8rXYBdb5/5VXxD4VNKQVlrnO6Z4GhxDlohubmF8eNvRdC2wlHAsv2aUsOg==", "hasInstallScript": true, "dependencies": { "@realm/fetch": "^0.1.1", @@ -13846,9 +13846,9 @@ } }, "realm": { - "version": "12.8.0", - "resolved": "https://registry.npmjs.org/realm/-/realm-12.8.0.tgz", - "integrity": "sha512-U1w5+ncyURQFQTrshoGn3KV+pzR1rQlPT7s3Sw6HPIPVBH80EWU3mirwvqp6RQ+Qi32ctRrBMTNeGd5mzAyiSw==", + "version": "12.9.0", + "resolved": "https://registry.npmjs.org/realm/-/realm-12.9.0.tgz", + "integrity": "sha512-K7JblaSaqqFEu8kObgTCo1ITTYnR8rXYBdb5/5VXxD4VNKQVlrnO6Z4GhxDlohubmF8eNvRdC2wlHAsv2aUsOg==", "requires": { "@realm/fetch": "^0.1.1", "bson": "^4.7.2", diff --git a/examples/node/v12/package.json b/examples/node/v12/package.json index 70ba51024f..2aa2508fb3 100644 --- a/examples/node/v12/package.json +++ b/examples/node/v12/package.json @@ -5,7 +5,7 @@ "main": "index.js", "type": "module", "scripts": { - "test": "jest --runInBand --detectOpenHandles --forceExit", + "test": "jest --runInBand --detectOpenHandles --silent=false --forceExit", "posttest": "npm run delete-realm-files", "test:js": "jest --selectProjects JavaScript --runInBand --detectOpenHandles --forceExit; npm run delete-realm-files", "test:ts": "NODE_OPTIONS=--experimental-vm-modules jest --selectProjects TypeScript --runInBand --detectOpenHandles --forceExit; npm run delete-realm-files", @@ -15,7 +15,7 @@ "license": "ISC", "dependencies": { "fs-extra": "^11.1.1", - "realm": "^12.8.0" + "realm": "^12.9.0" }, "devDependencies": { "@babel/core": "^7.21.8", diff --git a/examples/package-lock.json b/examples/package-lock.json new file mode 100644 index 0000000000..94f1164790 --- /dev/null +++ b/examples/package-lock.json @@ -0,0 +1,6 @@ +{ + "name": "examples", + "lockfileVersion": 3, + "requires": true, + "packages": {} +} diff --git a/source/examples/generated/node/v12/formatted/geospatial.test.snippet.rql-geospatial.js.rst b/source/examples/generated/node/v12/formatted/geospatial.test.snippet.rql-geospatial.js.rst new file mode 100644 index 0000000000..ac21e33fe0 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/geospatial.test.snippet.rql-geospatial.js.rst @@ -0,0 +1,3 @@ +.. code-block:: javascript + + "location geoWithin $0", smallCircle diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.aggregate-operators.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.aggregate-operators.ts.rst new file mode 100644 index 0000000000..9aff639ec7 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.aggregate-operators.ts.rst @@ -0,0 +1,20 @@ +.. code-block:: typescript + + var priorityNum = 5; + + // Find projects with average item `priority` above 5 + "items.@avg.priority > $0", priorityNum + + // Find projects where every item has a `priority` less than 5 + "items.@max.priority < $0", priorityNum + + // Find projects where every item has `priority` greater than 5 + "items.@min.priority > $0", priorityNum + + // Find projects with more than 5 items + "items.@count > $0", 5 + + // Find projects where the sum total value of `progressMinutes` + // across all items is greater than 100 + "items.@sum.progressMinutes > $0", + 100 diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atCount.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atCount.ts.rst new file mode 100644 index 0000000000..74bd83b430 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atCount.ts.rst @@ -0,0 +1,4 @@ +.. code-block:: typescript + + // Find items that are not referenced by another object of any type + "@links.@count == 0" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atLinks.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atLinks.ts.rst new file mode 100644 index 0000000000..7d2c811f88 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atLinks.ts.rst @@ -0,0 +1,5 @@ +.. code-block:: typescript + + // Find items that belong to a project with a quota less than 10 + // (using '@links..') + "@links.Project.items.quota < 10" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-collection-operators.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-collection-operators.ts.rst new file mode 100644 index 0000000000..8743becabc --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-collection-operators.ts.rst @@ -0,0 +1,23 @@ +.. code-block:: typescript + + // Find items where no project that references the item has a + // quota greater than 10 + "NONE @links.Project.items.quota > 10" + + // Find items where all projects that reference the item have a + // quota less than 5 + "ALL @links.Project.items.quota < 5" + + // Find items that are referenced by multiple projects + "projects.@count > 1" + + // Find items that are not referenced by any project + "@links.Project.items.@count == 0" + + // Find items that belong to a project where the average item + // has been worked on for at least 10 minutes + "@links.Project.items.items.@avg.progressMinutes > 10" + + // Find items that are not referenced by another object + // of any type (backlink count is 0) + "@links.@count == 0" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-linkingObjects.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-linkingObjects.ts.rst new file mode 100644 index 0000000000..8e0bf24549 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-linkingObjects.ts.rst @@ -0,0 +1,6 @@ +.. code-block:: typescript + + // Find items that belong to a project with a quota greater than 10 + // through the Item object's `projects` property + // (using 'LinkingObjects') + "projects.quota > 10" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.basic-arithmetic.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.basic-arithmetic.ts.rst new file mode 100644 index 0000000000..982f8c6f36 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.basic-arithmetic.ts.rst @@ -0,0 +1,9 @@ +.. code-block:: typescript + + // Evaluate against an item's `priority` property value: + "2 * priority > 6" // (resolves to `priority > 3`) + + "priority >= 2 * (2 - 1) + 2" // (resolves to `priority >= 4`) + + // Evaluate against multiple object property values: + "progressMinutes * priority == 90" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.comparison-operators.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.comparison-operators.ts.rst new file mode 100644 index 0000000000..51e1eb6ada --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.comparison-operators.ts.rst @@ -0,0 +1,13 @@ +.. code-block:: typescript + + // Compare `priority` values against a threshold value + "priority > $0", 5 + + // Compare `assignee` values to `null` value. + "assignee == $0", null + + // Compare `priority` values against an inclusive range of values + "priority BETWEEN { $0 , $1 }", 1, 5 + + // Compare `progressMinutes` values against any of the listed values + "progressMinutes IN { $0, $1, $2 }", 10, 30, 60 diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-alt-representation.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-alt-representation.ts.rst new file mode 100644 index 0000000000..9cfacf588a --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-alt-representation.ts.rst @@ -0,0 +1,5 @@ +.. code-block:: typescript + + var lastYear = new Date(1577883184000); // Unix timestamp in ms + var thisYear = new Date("2021-01-01@17:30:15:0"); // DateTime in UTC + var today = new Date("April 01, 2021 03:24:00"); // Alternate DateTime format diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-parameterized-query.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-parameterized-query.ts.rst new file mode 100644 index 0000000000..539fa221c0 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-parameterized-query.ts.rst @@ -0,0 +1,7 @@ +.. code-block:: typescript + + // Find to-do items completed before today's date + "dateCompleted < $0", today + + // Find to-do items completed between start of the year to today + "dateCompleted > $0 AND dateCompleted < $1", thisYear, today diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.deep-dot-notation.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.deep-dot-notation.ts.rst new file mode 100644 index 0000000000..dcb91dfabc --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.deep-dot-notation.ts.rst @@ -0,0 +1,5 @@ +.. code-block:: typescript + + // Find projects whose `projectLocation` property contains an + // embedded Address object with a specific zip code + "projectLocation.address.zipcode == 10019" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.dictionary-operators.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.dictionary-operators.ts.rst new file mode 100644 index 0000000000..186e16929b --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.dictionary-operators.ts.rst @@ -0,0 +1,21 @@ +.. code-block:: typescript + + // Find projects whose `comments` dictionary property + // have a key of 'status' + "comments.@keys == $0", "status" + + // Find projects whose `comments` dictionary property + // have a 'status' key with a value that ends in 'track' + "comments['status'] LIKE $0", "*track" + + // Find projects whose `comments` dictionary property + // have more than one key-value pair + "comments.@count > $0", 1 + + // Find projects whose `comments` dictionary property contains + // only values of type 'string' + "ALL comments.@type == 'string'" + + // Find projects whose `comments` dictionary property contains + // no values of type 'int' + "NONE comments.@type == 'int'" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.dot-notation.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.dot-notation.ts.rst new file mode 100644 index 0000000000..ecc72d500c --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.dot-notation.ts.rst @@ -0,0 +1,5 @@ +.. code-block:: typescript + + // Find projects whose `items` list property contains an item + // with a specific name + "items[0].name == 'Approve project plan'" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.equivalent-lists-any-operator.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.equivalent-lists-any-operator.ts.rst new file mode 100644 index 0000000000..f38eb068a9 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.equivalent-lists-any-operator.ts.rst @@ -0,0 +1,5 @@ +.. code-block:: typescript + + "assignee == ANY { $0, $1 }", "Alex", "Ali" + + "assignee == { $0, $1 }", "Alex", "Ali" // Equivalent (ANY is implied) diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-collection.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-collection.ts.rst new file mode 100644 index 0000000000..f484e1de24 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-collection.ts.rst @@ -0,0 +1,5 @@ +.. code-block:: typescript + + // Find an item with the specified ObjectId value + // in the`items` collection + "oid(631a072f75120729dc9223d9) IN items._id" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-parameterized.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-parameterized.ts.rst new file mode 100644 index 0000000000..5dc01354ae --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-parameterized.ts.rst @@ -0,0 +1,10 @@ +.. code-block:: typescript + + const ids = [ + new BSON.ObjectId("631a072f75120729dc9223d9"), + new BSON.ObjectId("631a0737c98f89f5b81cd24d"), + new BSON.ObjectId("631a073c833a34ade21db2b2"), + ]; + // Find items with an ObjectId value matching any value + // in the parameterized list + const parameterizedQuery = realm.objects(Item).filtered("_id IN $0", ids); diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-static.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-static.ts.rst new file mode 100644 index 0000000000..95e23c3fc5 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-static.ts.rst @@ -0,0 +1,5 @@ +.. code-block:: typescript + + // Find items with a priority value matching any value + // in the static list + "priority IN {0, 1, 2}" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.logical-operators.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.logical-operators.ts.rst new file mode 100644 index 0000000000..817b4fc9ea --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.logical-operators.ts.rst @@ -0,0 +1,7 @@ +.. code-block:: typescript + + // Find all items assigned to Ali AND marked completed + "assignee == $0 AND isComplete == $1", "Ali", true + + // Find all items assigned to Alex OR to Ali + "assignee == $0 OR assignee == $1", "Alex", "Ali" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.nil-type.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.nil-type.ts.rst new file mode 100644 index 0000000000..8c9df22d24 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.nil-type.ts.rst @@ -0,0 +1,4 @@ +.. code-block:: typescript + + "assignee == nil" + "assignee == $0", null // 'null' maps to SDK language's null pointer diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.oid.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.oid.ts.rst new file mode 100644 index 0000000000..d8865fd19d --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.oid.ts.rst @@ -0,0 +1,17 @@ +.. code-block:: typescript + + // Find an item whose `_id` matches the ObjectID value + // passed to 'oid()' + "_id == oid(6001c033600510df3bbfd864)" + + // Find an item whose `_id` matches the ObjectID passed as + // a parameterized query argument + "_id == $0", oidValue + + // Find an item whose `id` matches the UUID value + // passed to 'uuid()' + "id == uuid(d1b186e1-e9e0-4768-a1a7-c492519d47ee)" + + // Find an item whose `_id` matches the UUID passed as + // a parameterized query argument + "id == $0", uuidValue diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.parameterized-query.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.parameterized-query.ts.rst new file mode 100644 index 0000000000..69598f1ef6 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.parameterized-query.ts.rst @@ -0,0 +1,8 @@ +.. code-block:: typescript + + // Include one parameter with `$0` + "progressMinutes > 1 AND assignee == $0", "Ali" + + // Include multiple parameters using ascending integers, + // starting at`$0` + "progressMinutes > $0 AND assignee == $1", 1, "Alex" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.predicate.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.predicate.ts.rst new file mode 100644 index 0000000000..49e38c91c0 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.predicate.ts.rst @@ -0,0 +1,6 @@ +.. code-block:: typescript + + "priority == 1" + // Property Name: priority + // Operator: == + // Value: 1 diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.rql-fts.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.rql-fts.ts.rst new file mode 100644 index 0000000000..7efe0eeca7 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.rql-fts.ts.rst @@ -0,0 +1,12 @@ +.. code-block:: typescript + + // Find items with 'write' in the name. + "name TEXT $0", "write" + + // Use '-' to exclude: + // Find items with 'write' but not 'tests' in the name + "name TEXT $0", "write -tests" + + // Use '*' to match any characters after a prefix: + // Find items with a name that starts with 'wri' + "name TEXT $0", "wri*" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.serialized-query.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.serialized-query.ts.rst new file mode 100644 index 0000000000..e51d4723e7 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.serialized-query.ts.rst @@ -0,0 +1,3 @@ +.. code-block:: typescript + + "progressMinutes > 1 AND assignee == 'Ali'" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.set-operators.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.set-operators.ts.rst new file mode 100644 index 0000000000..f9fddbb007 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.set-operators.ts.rst @@ -0,0 +1,17 @@ +.. code-block:: typescript + + // Find projects with no complete items + "NONE items.isComplete == $0", true + + // Find projects that contain any item with priority 10 + "items.priority == $0", 10 // (ANY operator is implied) + + // Find projects that only contain completed items + "ALL items.isComplete == $0", true + + // Find projects with at least one item assigned to + // either Alex or Ali + "ANY items.assignee IN { $0 , $1 }", "Alex", "Ali" + + // Find projects with no items assigned to either Alex or Ali + "NONE items.assignee IN { $0 , $1 }", "Alex", "Ali" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.simple-query.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.simple-query.ts.rst new file mode 100644 index 0000000000..9b77d1e44a --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.simple-query.ts.rst @@ -0,0 +1,5 @@ +.. code-block:: typescript + + const items = realm.objects(Item); + // Get all items where 'priority' property is 7 or more + const importantItems = items.filtered("priority >= $0", 7); diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit-order-matters.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit-order-matters.ts.rst new file mode 100644 index 0000000000..68917c33fb --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit-order-matters.ts.rst @@ -0,0 +1,11 @@ +.. code-block:: typescript + + // 1. Sorts by highest priority + // 2. Returns the first item + // 3. Remove duplicate names (N/A - a single item is always distinct) + "assignee == null SORT(priority ASC) LIMIT(1) DISTINCT(name)" + + // 1. Removes any duplicates by name + // 2. Sorts by highest priority + // 3. Returns the first item + "assignee == null DISTINCT(name) SORT(priority ASC) LIMIT(1)" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit.ts.rst new file mode 100644 index 0000000000..5860a87bf8 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit.ts.rst @@ -0,0 +1,13 @@ +.. code-block:: typescript + + // Find incomplete items, sort by `priority` in descending order, + // then sort equal `priority` values by `progressMinutes` + // in ascending order + "isComplete == false SORT(priority DESC, progressMinutes ASC)" + + // Find high priority items, then remove from the results any items + // with duplicate values for both `name` AND `assignee` properties + "priority >= 5 DISTINCT(name, assignee)" + + // Find in-progress items, then return the first 10 results + "progressMinutes > 0 && isComplete != true LIMIT(10)" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.string-operators.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.string-operators.ts.rst new file mode 100644 index 0000000000..3731055a67 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.string-operators.ts.rst @@ -0,0 +1,17 @@ +.. code-block:: typescript + + // Find projects whose name starts with 'E' or 'e' + // (case-insensitive query) + "name BEGINSWITH[c] $0", "E" + + // Find projects whose name contains 'ie' + // (case-sensitive query) + "name CONTAINS $0", "ie" + + // Find items where the assignee name is lexicographically between + // 'Ali' and 'Chris'(case-sensitive) + "assignee BETWEEN { $0 , $1 }", "Ali", "Chris" + + // Find projects where the street address is lexicographically + // greater than '123 Main St'(case-sensitive) + "projectLocation.address.street > $0", "123 Main St" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.subquery.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.subquery.ts.rst new file mode 100644 index 0000000000..53e6b7e2ac --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.subquery.ts.rst @@ -0,0 +1,8 @@ +.. code-block:: typescript + + // Find projects with incomplete items with 'Demo' in the name + "SUBQUERY(items, $item, $item.isComplete == false AND $item.name CONTAINS[c] 'Demo').@count > 0" + + // Find projects where the number of completed items is + // greater than or equal to the project's `quota` property + "SUBQUERY(items, $item, $item.isComplete == true).@count >= quota" diff --git a/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.type-operator.ts.rst b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.type-operator.ts.rst new file mode 100644 index 0000000000..f321ed7245 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/realm-query-language.test.snippet.type-operator.ts.rst @@ -0,0 +1,12 @@ +.. code-block:: typescript + + // Find projects with an `additionalInfo` property of string type + "additionalInfo.@type == 'string'" + + // Find projects with an `additionalInfo` property of + // `collection` type, which matches list or dictionary types + "additionalInfo.@type == 'collection'" + + // Find projects with an `additionalInfo` property of list type, + // where any list element is of type 'bool' + "additionalInfo[*].@type == 'bool'" diff --git a/source/examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.js.rst b/source/examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.js.rst new file mode 100644 index 0000000000..af738f729f --- /dev/null +++ b/source/examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.js.rst @@ -0,0 +1,33 @@ +.. code-block:: javascript + + const Item = { + name: "Item", + properties: { + _id: "objectId", + name: { type: "string", indexed: "full-text" }, + isComplete: { type: "bool", default: false }, + assignee: "string?", + priority: { type: "int", default: 0 }, + progressMinutes: { type: "int", default: 0 }, + projects: { + type: "linkingObjects", + objectType: "Project", + property: "items", + }, + }, + primaryKey: "_id", + }; + + const Project = { + name: "Project", + properties: { + _id: "objectId", + name: "string", + items: "Item[]", + quota: "int?", + comments: "string?{}", + projectLocation: "Office?", + additionalInfo: "mixed", + }, + primaryKey: "_id", + }; diff --git a/source/examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.ts.rst b/source/examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.ts.rst new file mode 100644 index 0000000000..4c74ff4715 --- /dev/null +++ b/source/examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.ts.rst @@ -0,0 +1,51 @@ +.. code-block:: typescript + + export class Item extends Realm.Object { + _id!: BSON.ObjectId; + name!: string; + isComplete!: boolean; + assignee?: string; + priority!: number; + progressMinutes?: number; + + static schema: ObjectSchema = { + name: "Item", + properties: { + _id: "objectId", + name: { type: "string", indexed: "full-text" }, + isComplete: { type: "bool", default: false }, + assignee: "string?", + priority: { type: "int", default: 0 }, + progressMinutes: { type: "int", default: 0 }, + projects: { + type: "linkingObjects", + objectType: "Project", + property: "items", + }, + }, + primaryKey: "_id", + }; + } + export class Project extends Realm.Object { + _id!: BSON.ObjectId; + name!: string; + items!: Realm.List; + quota?: number; + comments?: Realm.Dictionary; + projectLocation?: Office; + additionalInfo!: Realm.Mixed; + + static schema: ObjectSchema = { + name: "Project", + properties: { + _id: "objectId", + name: "string", + items: "Item[]", + quota: "int?", + comments: "string?{}", + projectLocation: "Office?", + additionalInfo: "mixed", + }, + primaryKey: "_id", + }; + } diff --git a/source/includes/sdk-examples/query/rql-example-data-model.rst b/source/includes/sdk-examples/query/rql-example-data-model.rst new file mode 100644 index 0000000000..8cec6893b2 --- /dev/null +++ b/source/includes/sdk-examples/query/rql-example-data-model.rst @@ -0,0 +1,80 @@ +.. tabs-drivers:: + + tabs: + - id: cpp + content: | + + .. literalinclude:: /examples/generated/cpp/filter-data.snippet.models.cpp + :language: cpp-sdk + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/RqlSchemaExamples.snippet.rql-schema-examples.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/task_project_models_test.snippet.task-project-models.dart + :language: dart + + - id: java + content: | + + .. code-block:: java + + public class Item extends RealmObject { + ObjectId id = new ObjectId(); + String name; + Boolean isComplete = false; + String assignee; + Integer priority = 0; + Integer progressMinutes = 0; + @LinkingObjects("items") + final RealmResults projects = null; + } + public class Project extends RealmObject { + ObjectId id = new ObjectId(); + String name; + RealmList items; + Integer quota = null; + } + + - id: java-kotlin + content: | + + .. code-block:: kotlin + + open class Item(): RealmObject() { + var id: ObjectId = new ObjectId() + @FullText + lateinit var name: String + var isComplete: Boolean = false + var assignee: String? = null + var priority: Int = 0 + var progressMinutes: Int = 0 + } + + open class Project(): RealmObject() { + var id: ObjectId = new ObjectId() + lateinit var name: String + lateinit var items: RealmList + var quota: Int? = null + } + + - id: javascript + content: | + + .. include:: /examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.js.rst + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/RQLTest.snippet.rql-schema-example.kt + :language: kotlin + + - id: typescript + content: | + + .. include:: /examples/generated/node/v12/formatted/rql-data-models.snippet.rql-data-models.ts.rst diff --git a/source/sdk/crud/query-engines/realm-query-language.txt b/source/sdk/crud/query-engines/realm-query-language.txt index a7c2cdd014..fded46e8a1 100644 --- a/source/sdk/crud/query-engines/realm-query-language.txt +++ b/source/sdk/crud/query-engines/realm-query-language.txt @@ -1,203 +1,136 @@ .. _realm-query-language: .. _rql: -==================== -Realm Query Language -==================== +========================== +Realm Query Language (RQL) +========================== .. meta:: - :description: Learn how to use Realm Query Language (RQL) to retrieve objects from the database. - -.. facet:: - :name: genre + :description: Use Realm Query Language (RQL) with Atlas Device SDK methods to retrieve objects from the database. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, .NET SDK, Java SDK, Node.js SDK, code example + +.. facet:: + :name: genre :values: reference +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin + .. contents:: On this page :local: :backlinks: none :depth: 3 :class: singlecol -Realm Query Language (RQL) is a string-based query language to constrain -searches when retrieving objects from a realm. SDK-specific methods pass queries -to the Realm query engine, which retrieves matching objects from the realm. -Realm Query Language syntax is based on `NSPredicate -`__. +.. tabs-selector:: drivers -Queries evaluate a predicate for every object in the collection being queried. -If the predicate resolves to ``true``, the results collection includes the object. +Realm Query Language (RQL) is a string-based query language that you can use +to construct queries for Atlas Device SDK. Each SDK provides language-specific +filter or query methods that pass the queries to the Realm database query +engine. For more information about SDK-specific query methods, refer to +:ref:`sdks-crud-read`. -You can use Realm Query Language in most Realm SDKs with your SDK's filter -or query methods. The Swift SDK is the exception, as it uses the -:ref:`NSPredicate query API `. -Some SDKs also support idiomatic APIs for querying realms in their language. +.. important:: Swift SDK Does Not Support Realm Query Language (RQL) -Query with Realm SDKs ---------------------- + The Swift SDK does *not* support querying with Realm Query Language. + Instead, it uses NSPredicate to query a database. For more information, refer + to :ref:`Type-Safe and NSPredicate Queries (Swift SDK) `. -For language and SDK-specific methods for querying data, refer to the related -documentation: +The following SDKs also support language-specific idiomatic APIs for querying +databases: -- :ref:`sdks-crud-read` - :ref:`Fluent Interface (Java SDK) ` - :ref:`LINQ (.NET SDK) ` -- :ref:`Type-Safe and NSPredicate Queries (Swift SDK) ` - -.. note:: Swift SDK does not support Realm Query Language - The Swift SDK does not support querying with Realm Query Language. - You can instead use NSPredicate to query Realm. For examples of querying - Realm in the Swift SDK, refer to :ref:`Filter Data - Swift SDK `. - -You can also use Realm Query Language to browse for data in -:ref:`Realm Studio `. Realm Studio is a visual tool -to view, edit, and design Realm files. +In addition to using RQL in your client code, you can also use RQL in +:ref:`Realm Studio ` to browse for data. Examples on This Page --------------------- -Many of the examples in this page use a simple data set for a to-do list app. -The two Realm object types are ``Project`` and ``Item``. - -- An ``Item`` has a name, assignee's name, and completed flag. - There is also an arbitrary number for priority (higher is more important) - and a count of minutes spent working on it. -- A ``Project`` has zero or more ``Items`` and an optional quota - for minimum number of to-do items expected to be completed. - -See the schema for these two classes, ``Project`` and ``Item``, below: - -.. tabs:: - - .. tab:: Java SDK - :tabid: java - - .. tabs-realm-languages:: +Most of the examples on this page use a simple data set for a to-do list app +that include the following database object types: - .. tab:: - :tabid: java +- ``Item``: Each item object has a name, assignee's name, and completed flag. + There is also an arbitrary number for priority (where higher is more + important) and a count of minutes spent working on it. +- ``Project``: Each project object has zero or more ``Items`` and an optional + quota for minimum number of to-do items expected to be completed. - .. code-block:: java +.. include:: /includes/sdk-examples/query/rql-example-data-model.rst - public class Item extends RealmObject { - ObjectId id = new ObjectId(); - String name; - Boolean isComplete = false; - String assignee; - Integer priority = 0; - Integer progressMinutes = 0; - @LinkingObjects("items") - final RealmResults projects = null; - } - public class Project extends RealmObject { - ObjectId id = new ObjectId(); - String name; - RealmList items; - Integer quota = null; - } - .. tab:: - :tabid: kotlin - - .. code-block:: kotlin - - open class Item(): RealmObject() { - var id: ObjectId = new ObjectId() - @FullText - lateinit var name: String - var isComplete: Boolean = false - var assignee: String? = null - var priority: Int = 0 - var progressMinutes: Int = 0 - } - - open class Project(): RealmObject() { - var id: ObjectId = new ObjectId() - lateinit var name: String - lateinit var items: RealmList - var quota: Int? = null - } - - .. tab:: .NET SDK - :tabid: dotnet - - .. literalinclude:: /examples/generated/dotnet/RqlSchemaExamples.snippet.rql-schema-examples.cs - :language: csharp - - .. tab:: Node.js SDK - :tabid: node +Query Syntax +------------ - .. literalinclude:: /examples/generated/node/rql-data-models.snippet.rql-data-models.js - :language: javascript +Realm Query Language syntax is based on `NSPredicate +`__. - .. tab:: React Native SDK - :tabid: react-native +Queries evaluate a predicate for every object in the collection being queried. +If the predicate resolves to ``true``, the results collection includes the +object. - .. literalinclude:: /examples/generated/node/rql-data-models.snippet.rql-data-models.js - :language: javascript +Realm Query Language uses expressions and predicates to filter objects. Filters +consist of expressions within a predicate that evaluate to ``true`` or +``false``. - .. tab:: Kotlin SDK - :tabid: kotlin +Each expression contains the following elements: - .. literalinclude:: /examples/generated/kotlin/RQLTest.snippet.rql-schema-example.kt - :language: kotlin +- **Property name**: The name of the object property to evaluate. +- **Operator** and **argument expression**: A valid operator and *up to two* + argument expressions. For example, in the expression ``A + B``, the entirety + of ``A + B`` is an expression, but ``A`` and ``B`` are also argument + expressions to the operator ``+``. +- **Value**: The value, such as a string (``'hello'``) or a number (``5``), to + use in the evaluation. - .. tab:: Flutter SDK - :tabid: Flutter +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.predicate.ts.rst - .. literalinclude:: /examples/generated/flutter/task_project_models_test.snippet.task-project-models.dart - :language: dart +Expressions can be combined with :ref:`logical operators ` +to create compound predicates. -Expressions ------------ +Realm Query Language also supports the following special predicates: -Filters consist of **expressions** in a predicate. An expression consists of -one of the following: +- ``TRUEPREDICATE`` - Always evaluates to ``true`` (returns all objects). +- ``FALSEPREDICATE`` - Always evaluates to ``false`` (returns no objects). -- The name of a property of the object currently being evaluated. -- An operator and up to two argument expression(s). For example, in the - expression ``A + B``, the entirety of ``A + B`` is an expression, but ``A`` - and ``B`` are also argument expressions to the operator ``+``. -- A value, such as a string (``'hello'``) or a number (``5``). - -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.predicate.js - :language: javascript .. _rql-parameterized-queries: -Parameterized Queries ---------------------- +Parameterized vs. Serialized Queries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Create parameterized queries to interpolate variables into prepared -Realm Query Language statements. The syntax for interpolated variables is -``$``, starting at ``0``. Pass the positional arguments as -additional arguments to Realm SDK methods that use Realm Query Language. +You can format queries in serialized or parameterized format. -Include just one parameter with ``$0``. +- Serialized queries pass values directly in the expression. -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.predicate.js - :language: js + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.serialized-query.ts.rst -Include multiple parameters with ascending integers starting at ``$0``. +- Parameterized queries pass interpolated variables as additional + arguments. The syntax for interpolated variables is + ``$``, starting at ``0`` and incrementing for each additional variable. -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.multiple-predicate.js - :language: js - -Query Formats -~~~~~~~~~~~~~ + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.parameterized-query.ts.rst The following table shows how a query should be formatted when serialized and -parameterized for the following data types: +parameterized for the specific data types: .. list-table:: :header-rows: 1 :widths: 15 25 25 35 - + * - Type - Parameterized Example - Serialized Example - Note + * - :ref:`Nil ` + - "assignee == $0", null + - "assignee == nil" + - For parameterized queries, ``null`` maps to each SDK's respective null + pointer. + * - Boolean - "setting == $0", false - "setting == false" @@ -211,191 +144,249 @@ parameterized for the following data types: * - :ref:`Number ` - "age > $0", 5.50 - "age > 5.50" - - Applies to ``int``, ``short``, ``long``, ``double``, ``Decimal128``, and ``float`` data types. + - Applies to ``int``, ``short``, ``long``, ``double``, ``Decimal128``, and + ``float`` data types. * - :ref:`Date ` - "date < $0", dateObject - "date < 2021-02-20\@17:30:15:0" - - For parameterized date queries, you must pass in a date object. - For serialized date queries, you can represented the date in the following formats: - - - As an explicit date and time- YYYY-MM-DD\@HH:mm:ss:nn - (year-month-day@hours:minutes:seconds:nanoseconds) - - As a ``datetime`` relative to the :wikipedia:`Unix epoch `- Ts:n - (T, designates the start of the time; ``s``, seconds; ``n``, nanoseconds) - - Parameterized ``Date`` object + - For parameterized queries, you must pass in a date object. + For serialized queries, the representation can be a + :ref:`supported Date format ` or a parameterized + ``Date`` object. * - :ref:`ObjectID ` - "_id == $0", oidValue - "_id == oid(507f1f77bcf86cd799439011)" - - For parameterized ObjectId queries, you must pass in an ObjectId. - For serialized ObjectId queries, the string representation is ``oid()``. + - For parameterized queries, you must pass in an ObjectId. + For serialized queries, the string representation is ``oid()``. * - :ref:`UUID ` - "id == $0", uuidValue - "id == uuid(d1b186e1-e9e0-4768-a1a7-c492519d47ee)" - - For parameterized UUID queries, you must pass in a UUID. - For serialized UUID queries, the string representation is ``uuid()``. - + - For parameterized queries, you must pass in a UUID. + For serialized queries, the string representation is ``uuid()``. + * - Binary - "value == $0", "binary" - "value == 'binary'" - For ASCII characters, RQL serializes the binary value like a string, - with quotes. For non-printable characters, + with quotes. For non-printable characters, RQL serializes the binary to a base 64 value. - * - :ref:`List ` + * - :ref:`Collection ` - "ANY items.name == {$0, $1}", "milk", "bread" - "ANY items.name == {'milk', 'bread'}" - - Applies for list, collections, and sets. A parameterized value should be used - for each member of the list. - + - Applies to collections, dictionaries, lists, and sets. Use a parameterized + value for each member of the list. + * - RealmObject - "ANY items == $0", obj("Item", oid(6489f036f7bd0546377303ab)) - "ANY items == obj('Item', oid(6489f036f7bd0546377303ab))" - - To pass in a RealmObject, you need the class and primary key of the object. - + - To pass in a RealmObject, you need the class and primary key of the + object. + .. _rql-dot-notation: Dot Notation ------------- +~~~~~~~~~~~~ + +You can use **dot notation** to refer to child properties of an object, +including the properties of embedded objects and relationships: + +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.dot-notation.ts.rst -When referring to an object property, you can use **dot notation** to refer -to child properties of that object. You can even refer to the properties of -embedded objects and relationships with dot notation. +You can also chain these notations for nested properties. +For example, each Project has a ``projectLocation`` property that +refers to an Office object, which itself contains an embedded object +property ``address``. You can chain dot notations to query the deeply nested +``zipcode`` property of an embedded address: -For example, consider a query on an object with a ``workplace`` property that -refers to a Workplace object. The Workplace object has an embedded object -property, ``address``. You can chain dot notations to refer to the zipcode -property of that address: +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.deep-dot-notation.ts.rst -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.deep-dot-notation.js - :language: js .. _rql-nil-type: Nil Type --------- +~~~~~~~~ -Realm Query Language include the ``nil`` type to represent a null pointer. -You can either reference ``nil`` directly in your queries or with a parameterized query. -If you're using a parameterized query, each SDK maps its respective null pointer -to ``nil``. +Realm Query Language includes the ``nil`` type to represent a null pointer. +You can either reference ``nil`` directly in your queries or with a +parameterized query. If you're using a parameterized query, each SDK maps its +respective null pointer to ``nil``. -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.nil-type.js - :language: js +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.nil-type.ts.rst -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.nil-type-parameterized-query.js - :language: js .. _rql-operators: -.. _rql-comparison-operators: -Comparison Operators --------------------- +General Operators +----------------- -The most straightforward operation in a search is to compare -values. +.. _rql-aggregate-operators: -.. important:: Types Must Match +Aggregate Operators +~~~~~~~~~~~~~~~~~~~ - The type on both sides of the operator must be equivalent. For - example, comparing an ObjectId with string will result in a precondition - failure with a message like: +Use aggregate operators to traverse a collection and reduce it to a single +value. - .. code-block:: - :copyable: false +.. list-table:: + :header-rows: 1 + :widths: 20 80 - "Expected object of type object id for property 'id' on object of type - 'User', but received: 11223344556677889900aabb (Invalid value)" + * - Operator + - Description - You can compare any numeric type with any other numeric type, - including decimal, float, and Decimal128. + * - | ``@avg`` + - Evaluates to the average value of a given numerical property across + a collection. ``null`` values are ignored. + + * - | ``@count`` + - Evaluates to the number of objects in the given collection. + + * - | ``@max`` + - Evaluates to the highest value of a given numerical property + across a collection. ``null`` values are ignored. + + * - | ``@min`` + - Evaluates to the lowest value of a given numerical property + across a collection. ``null`` values are ignored. + + * - | ``@sum`` + - Evaluates to the sum of a given numerical property across a collection. + ``null`` values are ignored. + +The following example uses aggregate operators to find projects whose ``items`` +collection property meets certain criteria: + +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.aggregate-operators.ts.rst + +.. _rql-arithmetic-operators: + +Arithmetic Operators +~~~~~~~~~~~~~~~~~~~~ + +Use arithmetic operators to perform basic arithmetic in an expression when +evaluating numeric data types, including object properties. .. list-table:: :header-rows: 1 - :widths: 30 70 + :widths: 20 80 * - Operator - Description - * - ``BETWEEN {number1, number2}`` - - Evaluates to ``true`` if the left-hand numerical or date expression - is between or equal to the right-hand range. For dates, this evaluates - to ``true`` if the left-hand date is within the right-hand date range. + * - | ``*`` + - Multiplication. + * - | ``/`` + - Division. + * - | ``+`` + - Addition. + * - | ``-`` + - Subtraction. + * - | ``()`` + - Group expressions together. + +The following example uses arithmetic operators on Item object properties +containing numeric values: + +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.basic-arithmetic.ts.rst + +.. _rql-comparison-operators: + +Comparison Operators +~~~~~~~~~~~~~~~~~~~~ + +Use comparison operators to compare values of matching data types. String values +are compared :wikipedia:`lexicographically `. + +.. list-table:: + :header-rows: 1 + :widths: 20 80 + + * - Operator + - Description + + * - ``BETWEEN {X, Y}`` + - Evaluates to ``true`` if the left-hand expression (``X``) + is between or equal to the right-hand expression (``Y``) range. * - | ``==``, ``=`` - - Evaluates to ``true`` if the left-hand expression is equal - to the right-hand expression. + - Evaluates to ``true`` if the left-hand expression is equal to the + right-hand expression. * - | ``>`` - - Evaluates to ``true`` if the left-hand numerical or date expression - is greater than the right-hand numerical or date expression. - For dates, this evaluates to ``true`` if the left-hand date is later - than the right-hand date. + - Evaluates to ``true`` if the left-hand expression is greater than the + right-hand expression. For dates, this evaluates to ``true`` if the + left-hand date is later than the right-hand date. * - | ``>=`` - - Evaluates to ``true`` if the left-hand numerical or date expression - is greater than or equal to the right-hand numerical or date expression. - For dates, this evaluates to ``true`` if the left-hand date is later than - or the same as the right-hand date. + - Evaluates to ``true`` if the left-hand expression is greater than or + equal to the right-hand expression. For dates, this evaluates to + ``true`` if the left-hand date is later than or the same as the + right-hand date. * - | ``IN`` - Evaluates to ``true`` if the left-hand expression is in the right-hand list. This is equivalent to and used as a shorthand - for ``== ANY``. + for ``== ANY`` :ref:`collection operator `. * - | ``<`` - Evaluates to ``true`` if the left-hand numerical or date expression - is less than the right-hand numerical or date expression. - For dates, this evaluates to ``true`` if the left-hand date is earlier - than the right-hand date. + is less than the right-hand numerical or date expression. For dates, this + evaluates to ``true`` if the left-hand date is earlier than the + right-hand date. * - | ``<=`` - Evaluates to ``true`` if the left-hand numeric expression is less than or equal to the right-hand numeric expression. For dates, this evaluates - to ``true`` if the left-hand date is earlier than or the same - as the right-hand date. + to ``true`` if the left-hand date is earlier than or the same as the + right-hand date. * - | ``!=``, ``<>`` - Evaluates to ``true`` if the left-hand expression is not equal to the right-hand expression. -.. example:: +The following example uses comparison operators to find to-do items whose +property values match certain criteria: - The following example uses Realm Query Language's comparison operators to: +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.comparison-operators.ts.rst - - Find high priority to-do items by comparing the value of the ``priority`` - property value with a threshold number, above which priority can be considered high. - - Find long-running to-do items by seeing if the ``progressMinutes`` property - is at or above a certain value. - - Find unassigned to-do items by finding items where the ``assignee`` property - is equal to ``null``. - - Find to-do items within a certain time range by finding items where the - ``progressMinutes`` property is between two numbers. - - Find to-do items with a certain amount of ``progressMinutes`` from the - given list. +.. important:: Types Must Match + + The type on both sides of the operator must be equivalent. For + example, comparing an ObjectId with string will result in a precondition + failure with a message similar to the following: + + .. code-block:: + :copyable: false + + "Expected object of type object id for property 'id' on object of type + 'User', but received: 11223344556677889900aabb (Invalid value)" + + You can compare any numeric type with any other numeric type, + including decimal, float, and Decimal128. - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.comparison-operators.js - :language: javascript .. _rql-logical-operators: Logical Operators ------------------ +~~~~~~~~~~~~~~~~~ -Make compound predicates using logical operators. +Use logical operators to create compound predicates. .. list-table:: :header-rows: 1 - :widths: 30 70 + :widths: 20 80 * - Operator - Description * - | ``AND`` | ``&&`` - - Evaluates to ``true`` if both left-hand and right-hand expressions are ``true``. + - Evaluates to ``true`` if both left-hand and right-hand expressions are + ``true``. * - | ``NOT`` | ``!`` @@ -405,398 +396,448 @@ Make compound predicates using logical operators. | ``||`` - Evaluates to ``true`` if either expression returns ``true``. -.. example:: +The following example uses logical operators to combine multiple predicates: - We can use the query language's logical operators to find - all of Ali's completed to-do items. That is, we find all items - where the ``assignee`` property value is equal to 'Ali' AND - the ``isComplete`` property value is ``true``: +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.logical-operators.ts.rst - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.logical-operators.js - :language: javascript -.. _rql-string-operators: +.. _rql-sort-distinct-limit: -String Operators ----------------- +Results Operators +~~~~~~~~~~~~~~~~~ -Compare string values using these string operators. -Regex-like wildcards allow more flexibility in search. +Use the sort, distinct, and limit operators to shape your query results +collection. You can combine these operators in a single query across multiple +properties. Operators are applied in the order they appear in the query. -.. note:: +.. list-table:: + :header-rows: 1 + :widths: 20 80 + + * - Suffix + - Description + + * - ``SORT`` + - Sort the results collection in the specified order for one or more + comma-separated properties. The SDK applies the sort operation for each + property in order, one at a time. Specify the sort order for each + property as either: - You can use the following modifiers with the string operators: + - ``ASC`` (ascending) + - ``DESC`` (descending) + + * - ``DISTINCT`` + - Remove duplicates of the one or more comma-separated properties from the + results collection. The SDK applies all distinct operations as a single + AND condition, where duplicates must match *all* specified properties. + + * - ``LIMIT`` + - Limit the results collection to the specified number. - - ``[c]`` for case insensitivity. +The following example finds all incomplete items, then shapes the returned +results: - .. code-block:: javascript +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit.ts.rst - "name CONTAINS[c] $0", 'a' +.. important:: Order Matters + + The SDK executes queries in order. This includes the order of any ``SORT``, + ``DISTINCT``, and ``LIMIT`` operators in the query *and* the order of any + properties within those operators. This can greatly impact the results + returned. For example, sorting a query before limiting it can return very + different results than sorting *after* limiting it. + + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.sort-distinct-limit-order-matters.ts.rst + +Type-Specific Operators +----------------------- + +.. _rql-collection-operators: + +Collection Operators +~~~~~~~~~~~~~~~~~~~~ + +A collection operator lets you query list properties within a collection of +objects. Collection operators filter a collection by applying a predicate to +every element of a given list property of the object. If the predicate returns +true, the object is included in the output collection. .. list-table:: :header-rows: 1 - :widths: 40 60 + :widths: 20 80 * - Operator - Description - * - | ``BEGINSWITH`` - - Evaluates to ``true`` if the left-hand string expression begins with - the right-hand string expression. This is similar to ``contains``, - but only matches if the right-hand string expression is found - at the beginning of the left-hand string expression. + * - ``ALL`` + - Returns objects where the predicate evaluates to ``true`` for all objects + in the collection. - * - | ``CONTAINS`` - - Evaluates to ``true`` if the right-hand string expression - is found anywhere in the left-hand string expression. + * - ``ANY``, ``SOME`` + - Returns objects where the predicate evaluates to ``true`` for any objects + in the collection. ``ANY`` is the default operator for list comparisons. - * - | ``ENDSWITH`` - - Evaluates to ``true`` if the left-hand string expression ends - with the right-hand string expression. This is similar to ``contains``, - but only matches if the left-hand string expression is found - at the very end of the right-hand string expression. + * - ``NONE`` + - Returns objects where the predicate evaluates to false for all objects + in the collection. - * - | ``LIKE`` - - Evaluates to ``true`` if the left-hand string expression - matches the right-hand string wildcard string - expression. A wildcard string expression is a string - that uses normal characters with two special wildcard - characters: +The following example uses collection operators to find projects whose ``items`` +collection property meets certain criteria - - The ``*`` wildcard matches zero or more of any character - - The ``?`` wildcard matches any character. +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.set-operators.ts.rst - For example, the wildcard string "d?g" matches "dog", - "dig", and "dug", but not "ding", "dg", or "a dog". - * - | ``==``, ``=`` - - Evaluates to ``true`` if the left-hand string is lexicographically equal - to the right-hand string. +.. _rql-dictionary-operators: - * - | ``!=``, ``<>`` - - Evaluates to ``true`` if the left-hand string is not lexicographically - equal to the right-hand string. +Dictionary Operators +~~~~~~~~~~~~~~~~~~~~ -.. example:: +Use dictionary operators in combination with +:ref:`comparison operators ` to filter objects +based on dictionary keys and values. - We use the query engine's string operators to find: +.. list-table:: + :header-rows: 1 + :widths: 40 60 - - Projects with a name starting with the letter 'e' - - Projects with names that contain 'ie' + * - Operator + - Description - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.string-operators.js - :language: javascript + * - ``@values`` + - Returns objects that have a specified dictionary value. -.. _rql-objectid-uuid-operators: + * - ``@keys`` + - Returns objects that have a specified dictionary key. -ObjectId and UUID Operators ---------------------------- + * - ``@size``, ``@count`` + - The number of elements in a dictionary. + + * - ``Dictionary['key']`` + - The value of a dictionary key. -Query :manual:`BSON ObjectIds ` and -:manual:`UUIDs `. -These data types are often used as primary keys. + * - ``ALL | ANY | NONE .@type`` + - Checks if the dictionary contains properties of certain type. -To query with ObjectIds, use a parameterized query. Pass the ObjectId or UUID -you're querying against as the argument. +The following example uses dictionary operators with comparison operators to +find projects based on the ``comments`` dictionary property: -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.oid-literal.js - :language: js +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.dictionary-operators.ts.rst -You can also put a string representation of the ObjectId you're evaluating -in ``oid()``. -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.oid.js - :language: js +.. _rql-string-operators: -To query with UUIDs, put a string representation of the UUID you're evaluating -in ``uuid()``. +String Operators +~~~~~~~~~~~~~~~~ -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.uuid.js - :language: js +Use string operators or :ref:`comparison operators ` +to filter objects based on string values. SDKs evaluate string values +:wikipedia:`lexicographically `. .. list-table:: :header-rows: 1 - :widths: 40 60 + :widths: 20 80 - * - Operator + * - Operator or Modifier - Description - * - | ``==``, ``=`` - - Evaluates to ``true`` if the left-hand value is equal - to the right-hand value. + * - | ``BEGINSWITH`` + - Evaluates to ``true`` if the left-hand string begins with + the right-hand string. This is similar to ``contains``, + but only matches if the right-hand string is found + at the beginning of the left-hand string. - * - | ``!=``, ``<>`` - - Evaluates to ``true`` if the left-hand value is not equal - to the right-hand value. + * - | ``CONTAINS`` + - Evaluates to ``true`` if the right-hand string + is found anywhere in the left-hand string. -.. _rql-arithmetic-operators: + * - | ``ENDSWITH`` + - Evaluates to ``true`` if the left-hand string ends + with the right-hand string. This is similar to ``contains``, + but only matches if the left-hand string is found + at the very end of the right-hand string. -Arithmetic Operators --------------------- + * - | ``LIKE`` + - Evaluates to ``true`` if the left-hand string + matches the right-hand string wildcard string. A wildcard string + expression is a string that uses normal characters with two special + wildcard characters: -Perform basic arithmetic in one side of a RQL expression when evaluating -numeric data types. + - The ``*`` wildcard matches zero or more of any character + - The ``?`` wildcard matches any character. -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.basic-arithmetic.js - :language: js + For example, the wildcard string "d?g" matches "dog", + "dig", and "dug", but not "ding", "dg", or "a dog". -You can also use multiple object properties together in a mathematic operation. + * - | ``[c]`` + - Modifier that indicates a string value is *not* case sensitive. String + values are case sensitive by default. -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.arithmetic-obj-properties.js - :language: js +The following example uses string and comparison operators to find projects +based on the project name: -.. list-table:: - :header-rows: 1 - :widths: 40 60 +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.string-operators.ts.rst - * - Operator - - Description +.. tip:: String Values are Case Sensitive + + String values are case sensitive by default. Use the ``[c]`` modifier to + specify that values are *not* case sensitive. + + For example, ``"name CONTAINS[c] $0", "da"`` would return "David" and "Ida", + but ``"name CONTAINS $0", "da"`` would only return "Ida". - * - | ``*`` - - Multiplication. - * - | ``/`` - - Division. - * - | ``+`` - - Addition. - * - | ``-`` - - Subtraction. - * - | ``()`` - - Group expressions together. .. _rql-type-operator: Type Operator -------------- +~~~~~~~~~~~~~ -Check the type of a property using the ``@type`` operator. -You can only use the type operator with mixed types and dictionaries. +.. note:: Only Supported for Mixed Data Types and Dictionaries -Evaluate the property against a string representation of the data type name. -Refer to SDK documentation on the mapping from the SDK language's data types -to Realm data types. + You can currently only use the ``@type`` operator with mixed data types and + dictionary properties. + +Check the data type of a mixed type or dictionary property using the +``@type`` operator. Evaluate the property against a string representation of the +data type name using string comparison operators. For information on how each +SDK language's data types map to database-specific data types, refer to +:ref:`sdks-supported-data-types`. .. list-table:: :header-rows: 1 - :widths: 40 60 + :widths: 20 80 * - Operator - Description * - ``@type`` - - Check if type of a property is the property name as a string. + - Check if type of a mixed type or dictionary property is the specified + data type represented as a string. + Use ``==`` and ``!=`` to compare equality. -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.type-operator.js - :language: js +The following example uses the ``@type`` operator to find projects +whose mixed data type ``additionalInfo`` property type matches specific +criteria: -.. _rql-dictionary-operators: +.. include:: examples/generated/node/v12/formatted/realm-query-language.test.snippet.type-operator.ts.rst -Dictionary Operators --------------------- -Compare dictionary values using these dictionary operators. +Type-Specific Queries +--------------------- -.. list-table:: - :header-rows: 1 - :widths: 40 60 +.. _rql-date-operators: - * - Operator - - Description +Date Queries +~~~~~~~~~~~~ - * - ``@values`` - - Returns objects that have the value specified in the right-hand expression. +Use :ref:`comparison operators ` to query date types. - * - ``@keys`` - - Returns objects that have the key specified in the right-hand expression. +Specify dates in the following formats: - * - ``@size``, ``@count`` - - The number of elements in a dictionary. +- As a date in UTC, with the date and time separated by ``@`` or ``T``: + ``YYYY-MM-DD@HH:mm:ss:nnnnnnnnnn`` + (year-month-day@hours:minutes:seconds:nanoseconds), UTC. +- As a time in seconds since the :wikipedia:`Unix epoch `: + ``Ts:n`` + (``T`` designates the start of the time, ``s`` is the number of seconds, and + ``n`` is the number of nanoseconds). - * - ``Dictionary['key']`` - - Access the value at a key of a dictionary. +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-alt-representation.ts.rst - * - ``ALL | ANY | NONE .@type`` - - Checks if the dictionary contains properties of certain type. +The following example uses a parameterized query to find items based on a new +``dateCreated`` property that populates when an item is marked as complete: -You can also use dictionary operators in combination with -:ref:`comparison operators ` to filter objects -based on dictionary keys and values. The following examples show some ways -to use dictionary operators with comparison operators. All examples query -a collection of Realm objects with a dictionary property named ``dict``. +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.date-parameterized-query.ts.rst -.. example:: +.. tip:: Parameterize Date Queries - The following examples use various dictionary operators. + We recommend using a :ref:`parameterized query ` + to pass the date data type from the SDK language you are using to your + query. - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.dictionary-operators.js - :language: js -.. _rql-date-operators: +.. _rql-fts: -Date Operators --------------- +Full Text Search (FTS) Queries +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Query date types in a realm. +Perform boolean match word searches to query on properties that have a full-text +search (FTS) annotation. For information on enabling FTS on a property, refer to +:ref:`sdks-fts-property`. -Generally, you should use a parameterized query to pass a date data type -from the SDK language you are using to a query. +.. list-table:: + :header-rows: 1 + :widths: 20 80 -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.date-parameterized-query.js - :language: js + * - Operator + - Description -You can also specify dates in the following two ways: + * - ``TEXT`` + - Evaluates to ``true`` if the left-hand FTS-enabled string property + matches the right-hand string or wildcard string. A wildcard string + expression is a string that uses normal characters with two special + wildcard characters: -- As a specific date (in UTC)- ``YYYY-MM-DD@HH:mm:ss:nnnnnnnnnn`` (year-month-day@hours:minutes:seconds:nanoseconds), UTC. - You can also use ``T`` instead of ``@`` to separate the date from the time. -- As a time in seconds since the :wikipedia:`Unix epoch `- ``Ts:n``, where ``T`` designates the start of the time, - ``s`` is the number of seconds, and ``n`` is the number of nanoseconds. + - The ``*`` wildcard matches zero or more of any character that occur + after the string. + - The ``-`` wildcard matches all characters for exclusion from results. -Date supports :ref:`comparison operators `. +Query strings are converted to tokens by a tokenizer using the following rules: -.. example:: +- Tokens can only consist of characters from ASCII and the Latin-1 supplement + western languages). All other characters are considered whitespace. +- Strings split by a hyphen (``-``) are split into two tokens. For example, + ``full-text`` splits into ``full`` and ``text``. +- Tokens are diacritics insensitive and case insensitive. - The following example shows how to use a parameterized query with - a date object: +You can search for entire words or phrases, or limit your results with the +following wildcard characters: - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.date-alt-representation.js - :language: js +- Exclude results for a word by placing the ``-`` character in front of the word. +- Specify prefixes by placing the ``*`` wildcard at the end of a prefix. Suffix + searching is not currently supported. -.. _rql-aggregate-operators: +The following example uses the ``TEXT`` operator to find items based on their +FTS-enabled ``name`` property: -Aggregate Operators -------------------- +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.rql-fts.ts.rst + + +.. _rql-geospatial: + +Geospatial Queries +~~~~~~~~~~~~~~~~~~ -Apply an aggregate operator to a collection property of a Realm -object. Aggregate operators traverse a collection and reduce it to a -single value. +Use the ``geoWithin`` operator to query geospatial data. For more information on +defining geospatial data, refer to :ref:`sdks-define-geospatial-object`. .. list-table:: :header-rows: 1 - :widths: 40 60 + :widths: 20 80 * - Operator - Description - * - | ``@avg`` - - Evaluates to the average value of a given numerical property across - a collection. If any values are ``null``, they are not counted - in the result. + * - ``geoWithin`` + - Returns objects where the latitude/longitude pair in a custom embedded + object's ``coordinates`` property + is contained within a specified geospatial shape. - * - | ``@count`` - - Evaluates to the number of objects in the given collection. + The following geospatial shapes are supported: - * - | ``@max`` - - Evaluates to the highest value of a given numerical property - across a collection. ``null`` values are ignored. + - ``GeoCircle`` + - ``GeoBox`` + - ``GeoPolygon`` - * - | ``@min`` - - Evaluates to the lowest value of a given numerical property - across a collection. ``null`` values are ignored. +A geospatial query consists of: - * - | ``@sum`` - - Evaluates to the sum of a given numerical property across a collection, - excluding ``null`` values. +- An object with a property containing the embedded geospatial data. +- A defined geospatial shape to set the boundary for the query: -.. example:: + - ``GeoCircle`` + - ``GeoBox`` + - ``GeoPolygon`` - These examples all query for projects containing to-do items that meet - this criteria: +The query evaluates ``true`` if the coordinates of the embedded property are +within the boundaries of the geospatial shape. - - Projects with average item priority above 5. - - Projects with an item whose priority is less than 5. - - Projects with an item whose priority is greater than 5. - - Projects with more than 5 items. - - Projects with long-running items. +The following example compares the coordinates of the embedded ``location`` +property against the boundaries of the ``GeoCircle`` shape named +``smallCircle``: - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.aggregate-operators.js - :language: javascript +.. include:: /examples/generated/node/v12/formatted/geospatial.test.snippet.rql-geospatial.js.rst -.. _rql-collection-operators: +.. important:: Geospatial Queries Do Not Support Parameterized Queries -Collection Operators --------------------- + You cannot use :ref:`parameterized queries ` with + geospatial data. -A **collection operator** lets you query list properties within a collection of objects. -Collection operators filter a collection by applying a predicate -to every element of a given list property of the object. -If the predicate returns true, the object is included in the output collection. + +.. _rql-backlinks: + +Inverse Relationship Queries (Backlinks) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can query an object's :ref:`inverse relationship ` to +another object through its **backlink**. Backlinks use the to-one +and to-many relationships defined in your object schemas but reverse the +direction. Every relationship that you define in your schema implicitly has a +corresponding backlink. .. list-table:: :header-rows: 1 - :widths: 30 70 + :widths: 20 80 * - Operator - Description - * - ``ALL`` - - Returns objects where the predicate evaluates to ``true`` for all objects - in the collection. + * - ``@links`` + - Accesses the inverse relationship specified by the object type and + property name (``@links..``). + * - ``@count`` + - The number of elements in a backlink collection. You can use the + ``@count`` operator directly on ``@links`` to query the count of all + relationships that point to an object. - * - ``ANY``, ``SOME`` - - Returns objects where the predicate evaluates to ``true`` for any objects - in the collection. +You can access an inverse relationship: - * - ``NONE`` - - Returns objects where the predicate evaluates to false for all objects - in the collection. +- Using the ``@links..`` syntax, where + ```` and ```` refer to a specific property on an + object type that references the queried object type. + + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-atLinks.ts.rst + +- Using the ``linkingObjects`` property to explicitly include the backlink in + your data model. This lets you reference the backlink through an assigned + property name using :ref:`dot notation `. + + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-linkingObjects.ts.rst -.. example:: +The result is treated like a collection and supports :ref:`collection operators +` and :ref:`aggregate operators +`. - This example uses collection operators to find projects that contain to-do items - matching certain criteria: +The following examples find items based on the projects they belong to through +the ``@links`` operator or the ``projects`` property: + +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.backlinks-collection-operators.ts.rst - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.set-operators.js - :language: js .. _rql-list-queries: -List Comparisons ----------------- +List Comparison Queries +~~~~~~~~~~~~~~~~~~~~~~~ -You can use :ref:`comparison operators ` and +Use :ref:`comparison operators ` and :ref:`collection operators ` to filter based -on lists of data. - -You can compare any type of valid list. This includes: +on lists of data. You can compare any type of valid list, including: -- collections of Realm objects, which let you filter against other data - in the realm. +- Collections of objects, which let you filter against other data + in the database. - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.list-comparisons-collection.js - :language: js + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-collection.ts.rst -- lists defined directly in the query, which let you filter against +- Lists defined directly in the query, which let you filter against static data. You define static lists as a comma-separated list of literal values enclosed in opening (``{``) and closing (``}``) braces. - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.list-comparisons-static.js - :language: js + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-static.ts.rst -- native list objects passed in a :ref:`parameterized expression +- Native list objects passed in a :ref:`parameterized expression `, which let you pass application data directly to your queries. - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.list-comparisons-parameterized.js - :language: js - -If you do not define a collection operator, a list expression defaults -to the ``ANY`` operator. + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.list-comparisons-parameterized.ts.rst -.. example:: - - These two list queries are equivalent: - - - ``age == ANY {18, 21}`` - - ``age == {18, 21}`` +.. note:: Defaults to ``ANY`` - Both of these queries return objects with an age property equal to - either 18 or 21. You could also do the opposite by returning objects - only if the age is not equal to either 18 or 21: + If you do not define a collection operator, a list expression defaults + to the ``ANY`` operator. - - ``age == NONE {18, 21}`` + .. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.equivalent-lists-any-operator.ts.rst -The following table includes examples that illustrate how collection -operators interact with lists and comparison operators: +The following table demonstrates how collection operators interact with +lists and comparison operators: .. list-table:: :widths: 45 10 45 @@ -804,254 +845,174 @@ operators interact with lists and comparison operators: * - Expression - Match? - Reason - + * - ``ANY {1, 2, 3} > ALL {1, 2}`` - true - - A value on the left (3) is greater than some value on the right (both 1 and 2) - + - A value on the left (3) is greater than some value on the right (both 1 + and 2) + * - ``ANY {1, 2, 3} == NONE {1, 2}`` - true - 3 does not match either of 1 or 2 - + * - ``ANY {4, 8} == ANY {5, 9, 11}`` - false - Neither 4 nor 8 matches any value on the right (5, 9 or 11) - + * - ``ANY {1, 2, 7} <= NONE {1, 2}`` - true - A value on the left (7) is not less than or equal to both 1 and 2 - + * - ``ALL {1, 2} IN ANY {1, 2, 3}`` - true - Every value on the left (1 and 2) is equal to 1, 2 or 3 - + * - ``ALL {3, 1, 4, 3} == NONE {1, 2}`` - false - 1 matches a value in the NONE list (1 or 2) - + * - ``ALL {} in ALL {1, 2}`` - true - An empty list matches all lists - + * - ``NONE {1, 2, 3, 12} > ALL {5, 9, 11}`` - false - 12 is bigger than all values on the right (5, 9, and 11) - + * - ``NONE {4, 8} > ALL {5, 9, 11}`` - true - 4 and 8 are both less than some value on the right (5, 9, or 11) - + * - ``NONE {0, 1} < NONE {1, 2}`` - true - 0 and 1 are both less than none of 1 and 2 -.. _rql-fts: - -Full Text Search ----------------- - -You can use RQL to query on properties that have a full-text search (FTS) -annotation. FTS supports boolean match word searches, rather than searches for relevance. -For information on enabling FTS on a property, refer to :ref:`sdks-fts-property`. - -To query these properties, use the ``TEXT`` predicate in your query. - -You can search for entire words or phrases, or limit your results with the following characters: - -- Exclude results for a word by placing the ``-`` character in front of the word. -- Specify prefixes by placing the ``*`` character at the end of a prefix. Suffix - searching is not currently supported. - -In the following example, we query the ``Item.name`` property: - -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.test.snippet.rql-fts.js - :language: js - -Full-Text Search Tokenizer Details -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -Full-Text Search (FTS) indexes support: - -- Tokens are diacritics- and case-insensitive. -- Tokens can only consist of characters from ASCII and the Latin-1 supplement (western languages). - All other characters are considered whitespace. -- Words split by a hyphen (-) are split into two tokens. For example, ``full-text`` - splits into ``full`` and ``text``. -.. _rql-geospatial: - -Geospatial Queries ------------------- - -You can query against geospatial data using the ``geoWithin`` operator. -The ``geoWithin`` operator takes the latitude/longitude pair in a custom -embedded object's ``coordinates`` property and a geospatial shape. The -operator checks whether the ``cordinates`` point is contained within the -geospatial shape. - -The following geospatial shapes are supported for querying: - -- ``GeoCircle`` -- ``GeoBox`` -- ``GeoPolygon`` - -To query geospatial data: - -1. Create an object with a property containing the embedded geospatial data. -2. Define the geospatial shape to set the boundary for the query. -3. Query using the ``geoWithin`` RQL operator. - -In the following query, we are checking that the coordinates of the embeddeded -``location`` property are contained within the ``GeoCircle`` shape, ``smallCircle``: - -.. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.rql-geospatial.js - :language: js - -For more information on defining geospatial shapes and objects with embedded -geospatial data, refer to :ref:`sdks-define-geospatial-object`. - -.. _rql-backlinks: - -Backlink Queries ----------------- - -A backlink is an inverse relationship link that lets you look up objects -that reference another object. Backlinks use the to-one and to-many -relationships defined in your object schemas but reverse the direction. -Every relationship that you define in your schema implicitly has a -corresponding backlink. - -You can access backlinks in queries using the -``@links..`` syntax, where ```` -and ```` refer to a specific property on an object type -that references the queried object type. - -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.backlinks-atLinks.js - :language: js +.. _rql-subqueries: -You can also define a ``linkingObjects`` property to explicitly include -the backlink in your data model. This lets you reference the backlink -through an assigned property name using standard :ref:`dot notation -`. +List Subqueries +~~~~~~~~~~~~~~~ -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.backlinks-linkingObjects.js - :language: js +Use the ``SUBQUERY()`` predicate function to iterate through list properties +with an additional query. Subqueries are useful when you need to match objects +in a list property based on multiple conditions. -The result of a backlink is treated like a collection and supports -:ref:`collection operators `. +Subqueries use the following syntax: -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.backlinks-collection-operators.js - :language: js +``SUBQUERY(, $, ).@count`` -You can use :ref:`aggregate operators ` on the backlink collection. +.. list-table:: + :header-rows: 1 + :widths: 20 80 -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.backlinks-aggregate-operators.js - :language: js + * - Operator + - Description -You can query the count of all relationships that point to an object by -using the ``@count`` operator directly on ``@links``. + * - ``SUBQUERY()`` + - Returns list objects for the specified collection where the predicate + evaluates to ``true``. Contains the following parameters: -.. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.backlinks-atCount.js - :language: js + - ``collection``: The name of the list property to iterate through. This + must be a list of objects, not a list of primitive types. + - ``variableName``: A variable name of the element to use in the + subquery, prefixed with ``$``. + - ``predicate``: The subquery predicate. Use the variable specified by + ``variableName`` to refer to the currently-iterated element. -.. _rql-subqueries: + * - ``@count`` + - The number of objects in the subquery results collection. This is + required for subquery filters. You can use the count of the subquery + result as you would any other number in a valid expression. -Subqueries ----------- +The following example uses subquery filters to find projects based on the +``items`` collection property using the ``$item`` variable name: -Iterate through list properties with another query using the -``SUBQUERY()`` predicate function. +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.subquery.ts.rst -Subqueries are useful for the following scenarios: +.. tip:: Compare Count to ``0`` to Return All Matching Objects -- Matching each object in a list property on multiple conditions -- Counting the number of objects that match a subquery + The ``@count`` aggregate operator returns the number of objects in the + subquery results collection. You can compare the count with the number ``0`` + to return all matching objects. -``SUBQUERY()`` has the following structure: +.. _rql-objectid-uuid-operators: -.. code-block:: js +ObjectId and UUID Queries +~~~~~~~~~~~~~~~~~~~~~~~~~ - SUBQUERY(, , ) +Use :ref:`comparison operators ` to compare +:manual:`BSON ObjectIds ` and +:manual:`UUIDs ` for equality. These data types are +often used as primary keys. -- ``collection``: The name of the property to iterate through -- ``variableName``: A variable name of the element to use in the subquery -- ``predicate``: The subquery predicate. - Use the variable specified by ``variableName`` to refer to the - currently-iterated element. +You can use pass ``ObjectId`` and ``UUID`` values either as parameterized query +arguments or to the ``oid()`` or ``uuid()`` predicate functions, respectively. -A subquery iterates through the given collection and checks the given predicate -against each object in the collection. The predicate can refer to the current -iterated object with the variable name passed to ``SUBQUERY()``. +.. list-table:: + :header-rows: 1 + :widths: 30 70 -A subquery expression resolves to a list of objects. -Realm only supports the ``@count`` aggregate operator on the result -of a subquery. This allows you to count how many objects in the subquery -input collection matched the predicate. + * - Operator + - Description -You can use the count of the subquery result as you would any other number -in a valid expression. In particular, you can compare the count with the -number ``0`` to return all matching objects. + * - | ``oid()`` + - The string representation of the ``ObjectID`` to evaluate. + * - | ``uuid()`` + - The string representation of the ``UUID`` to evaluate. -.. example:: +The following examples use equality comparison operators to find items based on +their ``_id`` property: - The following example shows two subquery filters on a collection of projects. +.. include:: /examples/generated/node/v12/formatted/realm-query-language.test.snippet.oid.ts.rst - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.subquery.js - :language: js -.. _rql-sort-distinct-limit: +.. _flexible-sync-rql-limitations: -Sort, Distinct & Limit ----------------------- +Device Sync Subscription Queries +--------------------------------- -Sort and limit the results collection of your query using additional operators. +If your app uses Atlas :ref:`Device Sync`, you can use +Realm Query Language to construct your :ref:`sync subscription +queries`. However, App Services does not support +all RQL operators or functionality in a subscription query. -.. list-table:: - :header-rows: 1 - :widths: 40 60 +Device Sync does *not* support the following in a subscription query: - * - Operator - - Description +- :ref:`Aggregate operators ` (``@avg``, + ``@count``, ``@max``, ``@min``, or ``@sum``) +- :ref:`Results operators ` (``DISTINCT``, + ``SORT``, or ``LIMIT``) +- :ref:`List comparisons ` (for example, + ``"{'comedy', 'horror', 'suspense'} IN genres"``) +- Querying for embedded objects or links (for example, ``obj1.field == "foo"``). - * - ``SORT`` - - Specify the name of the property to compare, and whether to sort by - ascending (``ASC``) or descending (``DESC``) order. If you specify - multiple SORT fields, you must specify sort order for each field. - With multiple sort fields, the query sorts by the first field, and - then the second. - - For example, if you ``SORT (priority DESC, name DESC)``, the query - returns sorted by priority, and then by name when priority - value is the same. +However, you can use the following: - * - ``DISTINCT`` - - Specify a name of the property to compare. Remove duplicates - for that property in the results collection. If you specify multiple - DISTINCT fields, the query removes duplicates by the first field, and - then the second. For example, if you ``DISTINCT (name, assignee)``, - the query only removes duplicates where the values of both properties - are the same. +- You can use ``@count`` for array fields. +- You can query lists using the ``IN`` operator: - * - ``LIMIT`` - - Limit the results collection to the specified number. + .. code-block:: javascript -.. example:: + // Query a constant list for a queryable field value + "priority IN { 1, 2, 3 }" - Use the query engine's sort, distinct, and limit operators to find to-do items - where the assignee is Ali: + // Query an array-valued queryable field for a constant value + "'comedy' IN genres" - - Sorted by priority in descending order - - Enforcing uniqueness by name - - Limiting the results to 5 items +.. tip:: Case-Insensitive Queries Not Recommended - .. literalinclude:: /examples/generated/realm-query-language/realm-query-language.snippet.sort-distinct-limit.js - :language: javascript + Although :ref:`case-insensitive string queries` (using + the ``[c]`` modifier) are supported in sync queries, they do not use indexes + effectively and can lead to performance problems. As a result, they are not + recommended. -.. _flexible-sync-rql-limitations: +Additionally, note the following if you are using an :ref:`indexed queryable +field` in your app: -Flexible Sync RQL Limitations ------------------------------ +- Every query must include the indexed queryable field. +- Every query must directly compare the indexed queryable field + against a constant using an ``==`` or ``IN`` operator at least once. +- You can optionally include an ``AND`` comparison as well. -.. include:: /includes/flex-sync-limitations.rst From f8eb607f9622441bb4b57ff8ad370bdfa478281b Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 19 Jul 2024 13:58:18 -0400 Subject: [PATCH 46/63] (DOCSP-39530): Consolidate Multi-User Applications page (#3323) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39530 *Staged Page* - [Multi-User Applications](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39530/sdk/users/multi-user-applications/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [Flutter: Work with Multiple Users](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/multiple-users/) - [Java: Multi-User Applications](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/users/multi-user-applications/) - [Kotlin: Manage Multi-User Apps](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/users/multi-user-applications/) - [.NET: Multi-User Applications](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/manage-users/multi-user-applications/) - [Node.js: Multi-User Applications](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/users/multi-user-applications/) - [Swift: Multi-User Applications](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/users/multi-user-applications/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: cbullinger <115956901+cbullinger@users.noreply.github.com> --- ...cations-add-user-to-device-description.rst | 3 + ...cations-change-active-user-description.rst | 3 + ...lications-check-user-state-description.rst | 5 + ...plications-get-active-user-description.rst | 3 + ...s-list-all-users-on-device-description.rst | 3 + ...-applications-log-user-out-description.rst | 2 + ...ns-remove-user-from-device-description.rst | 3 + ...cations-change-active-user-description.rst | 2 + ...lications-check-user-state-description.rst | 4 + ...plications-get-active-user-description.rst | 2 + ...s-list-all-users-on-device-description.rst | 4 + ...-applications-log-user-out-description.rst | 2 + ...ns-remove-user-from-device-description.rst | 2 + ...cations-add-user-to-device-description.rst | 2 + ...cations-change-active-user-description.rst | 3 + ...lications-check-user-state-description.rst | 5 + ...plications-get-active-user-description.rst | 2 + ...s-list-all-users-on-device-description.rst | 2 + ...-applications-log-user-out-description.rst | 3 + ...ns-remove-user-from-device-description.rst | 4 + ...s-add-user-to-device-js-ts-description.rst | 3 + ...s-change-active-user-js-ts-description.rst | 3 + ...ons-check-user-state-js-ts-description.rst | 4 + ...ions-get-active-user-js-ts-description.rst | 2 + ...-all-users-on-device-js-ts-description.rst | 3 + ...cations-log-user-out-js-ts-description.rst | 2 + ...ove-user-from-device-js-ts-description.rst | 2 + ...cations-add-user-to-device-description.rst | 2 + ...tions-change-active-user-not-supported.rst | 1 + ...lications-check-user-state-description.rst | 4 + ...plications-get-active-user-description.rst | 2 + ...s-list-all-users-on-device-description.rst | 9 + ...-applications-log-user-out-description.rst | 7 + ...ns-remove-user-from-device-description.rst | 7 + ...cations-add-user-to-device-description.rst | 3 + ...cations-change-active-user-description.rst | 1 + ...lications-check-user-state-description.rst | 3 + ...plications-get-active-user-description.rst | 3 + ...s-list-all-users-on-device-description.rst | 8 + ...-applications-log-user-out-description.rst | 4 + ...ns-remove-user-from-device-description.rst | 4 + ...er-applications-add-new-user-to-device.rst | 58 +++ ...i-user-applications-change-active-user.rst | 51 ++ ...lti-user-applications-check-user-state.rst | 58 +++ ...ulti-user-applications-get-active-user.rst | 53 +++ ...-applications-list-all-users-on-device.rst | 58 +++ .../multi-user-applications-log-user-out.rst | 58 +++ ...r-applications-remove-user-from-device.rst | 62 +++ source/sdk/users/multi-user-applications.txt | 447 +++++++++++++++++- 49 files changed, 980 insertions(+), 1 deletion(-) create mode 100644 source/includes/api-details/csharp/users/multi-user-applications-add-user-to-device-description.rst create mode 100644 source/includes/api-details/csharp/users/multi-user-applications-change-active-user-description.rst create mode 100644 source/includes/api-details/csharp/users/multi-user-applications-check-user-state-description.rst create mode 100644 source/includes/api-details/csharp/users/multi-user-applications-get-active-user-description.rst create mode 100644 source/includes/api-details/csharp/users/multi-user-applications-list-all-users-on-device-description.rst create mode 100644 source/includes/api-details/csharp/users/multi-user-applications-log-user-out-description.rst create mode 100644 source/includes/api-details/csharp/users/multi-user-applications-remove-user-from-device-description.rst create mode 100644 source/includes/api-details/dart/users/multi-user-applications-change-active-user-description.rst create mode 100644 source/includes/api-details/dart/users/multi-user-applications-check-user-state-description.rst create mode 100644 source/includes/api-details/dart/users/multi-user-applications-get-active-user-description.rst create mode 100644 source/includes/api-details/dart/users/multi-user-applications-list-all-users-on-device-description.rst create mode 100644 source/includes/api-details/dart/users/multi-user-applications-log-user-out-description.rst create mode 100644 source/includes/api-details/dart/users/multi-user-applications-remove-user-from-device-description.rst create mode 100644 source/includes/api-details/java/users/multi-user-applications-add-user-to-device-description.rst create mode 100644 source/includes/api-details/java/users/multi-user-applications-change-active-user-description.rst create mode 100644 source/includes/api-details/java/users/multi-user-applications-check-user-state-description.rst create mode 100644 source/includes/api-details/java/users/multi-user-applications-get-active-user-description.rst create mode 100644 source/includes/api-details/java/users/multi-user-applications-list-all-users-on-device-description.rst create mode 100644 source/includes/api-details/java/users/multi-user-applications-log-user-out-description.rst create mode 100644 source/includes/api-details/java/users/multi-user-applications-remove-user-from-device-description.rst create mode 100644 source/includes/api-details/javascript/users/multi-user-applications-add-user-to-device-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/multi-user-applications-change-active-user-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/multi-user-applications-check-user-state-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/multi-user-applications-get-active-user-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/multi-user-applications-list-all-users-on-device-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/multi-user-applications-log-user-out-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/multi-user-applications-remove-user-from-device-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/users/multi-user-applications-add-user-to-device-description.rst create mode 100644 source/includes/api-details/kotlin/users/multi-user-applications-change-active-user-not-supported.rst create mode 100644 source/includes/api-details/kotlin/users/multi-user-applications-check-user-state-description.rst create mode 100644 source/includes/api-details/kotlin/users/multi-user-applications-get-active-user-description.rst create mode 100644 source/includes/api-details/kotlin/users/multi-user-applications-list-all-users-on-device-description.rst create mode 100644 source/includes/api-details/kotlin/users/multi-user-applications-log-user-out-description.rst create mode 100644 source/includes/api-details/kotlin/users/multi-user-applications-remove-user-from-device-description.rst create mode 100644 source/includes/api-details/swift/users/multi-user-applications-add-user-to-device-description.rst create mode 100644 source/includes/api-details/swift/users/multi-user-applications-change-active-user-description.rst create mode 100644 source/includes/api-details/swift/users/multi-user-applications-check-user-state-description.rst create mode 100644 source/includes/api-details/swift/users/multi-user-applications-get-active-user-description.rst create mode 100644 source/includes/api-details/swift/users/multi-user-applications-list-all-users-on-device-description.rst create mode 100644 source/includes/api-details/swift/users/multi-user-applications-log-user-out-description.rst create mode 100644 source/includes/api-details/swift/users/multi-user-applications-remove-user-from-device-description.rst create mode 100644 source/includes/sdk-examples/users/multi-user-applications-add-new-user-to-device.rst create mode 100644 source/includes/sdk-examples/users/multi-user-applications-change-active-user.rst create mode 100644 source/includes/sdk-examples/users/multi-user-applications-check-user-state.rst create mode 100644 source/includes/sdk-examples/users/multi-user-applications-get-active-user.rst create mode 100644 source/includes/sdk-examples/users/multi-user-applications-list-all-users-on-device.rst create mode 100644 source/includes/sdk-examples/users/multi-user-applications-log-user-out.rst create mode 100644 source/includes/sdk-examples/users/multi-user-applications-remove-user-from-device.rst diff --git a/source/includes/api-details/csharp/users/multi-user-applications-add-user-to-device-description.rst b/source/includes/api-details/csharp/users/multi-user-applications-add-user-to-device-description.rst new file mode 100644 index 0000000000..c1bb97cc31 --- /dev/null +++ b/source/includes/api-details/csharp/users/multi-user-applications-add-user-to-device-description.rst @@ -0,0 +1,3 @@ +In the example below, a user with the email ``aimee@example.com`` logs in and +becomes the active user. Later, a user with the email ``elvis@example.com`` +logs in and becomes the active user. diff --git a/source/includes/api-details/csharp/users/multi-user-applications-change-active-user-description.rst b/source/includes/api-details/csharp/users/multi-user-applications-change-active-user-description.rst new file mode 100644 index 0000000000..fecf495053 --- /dev/null +++ b/source/includes/api-details/csharp/users/multi-user-applications-change-active-user-description.rst @@ -0,0 +1,3 @@ +To change the active user, call +:dotnet-sdk:`SwitchUser() +`. diff --git a/source/includes/api-details/csharp/users/multi-user-applications-check-user-state-description.rst b/source/includes/api-details/csharp/users/multi-user-applications-check-user-state-description.rst new file mode 100644 index 0000000000..cf7b3c8fcf --- /dev/null +++ b/source/includes/api-details/csharp/users/multi-user-applications-check-user-state-description.rst @@ -0,0 +1,5 @@ +You can check the user's state through the :dotnet-sdk:`User.State +` property. This +property's value is a :dotnet-sdk:`UserState +` enum whose values indicate +whether the user is ``LoggedOut``, ``LoggedIn``, or ``Removed``. diff --git a/source/includes/api-details/csharp/users/multi-user-applications-get-active-user-description.rst b/source/includes/api-details/csharp/users/multi-user-applications-get-active-user-description.rst new file mode 100644 index 0000000000..c41ab7d021 --- /dev/null +++ b/source/includes/api-details/csharp/users/multi-user-applications-get-active-user-description.rst @@ -0,0 +1,3 @@ +You can get the current active user through the +:dotnet-sdk:`App.CurrentUser +` property. diff --git a/source/includes/api-details/csharp/users/multi-user-applications-list-all-users-on-device-description.rst b/source/includes/api-details/csharp/users/multi-user-applications-list-all-users-on-device-description.rst new file mode 100644 index 0000000000..d7df0b81ce --- /dev/null +++ b/source/includes/api-details/csharp/users/multi-user-applications-list-all-users-on-device-description.rst @@ -0,0 +1,3 @@ +To list all users on the device, read the +:dotnet-sdk:`App.AllUsers ` +property. diff --git a/source/includes/api-details/csharp/users/multi-user-applications-log-user-out-description.rst b/source/includes/api-details/csharp/users/multi-user-applications-log-user-out-description.rst new file mode 100644 index 0000000000..c0bb1efa32 --- /dev/null +++ b/source/includes/api-details/csharp/users/multi-user-applications-log-user-out-description.rst @@ -0,0 +1,2 @@ +To log out a logged-in user, call :dotnet-sdk:`User.LogOutAsync() +`. diff --git a/source/includes/api-details/csharp/users/multi-user-applications-remove-user-from-device-description.rst b/source/includes/api-details/csharp/users/multi-user-applications-remove-user-from-device-description.rst new file mode 100644 index 0000000000..cb0eadd9bb --- /dev/null +++ b/source/includes/api-details/csharp/users/multi-user-applications-remove-user-from-device-description.rst @@ -0,0 +1,3 @@ +To log out and remove the user, call +:dotnet-sdk:`RemoveUserAsync() +`. diff --git a/source/includes/api-details/dart/users/multi-user-applications-change-active-user-description.rst b/source/includes/api-details/dart/users/multi-user-applications-change-active-user-description.rst new file mode 100644 index 0000000000..aede4550a4 --- /dev/null +++ b/source/includes/api-details/dart/users/multi-user-applications-change-active-user-description.rst @@ -0,0 +1,2 @@ +To change the active user, call :flutter-sdk:`app.switchUser() +` on the ``User`` object you are switching to: diff --git a/source/includes/api-details/dart/users/multi-user-applications-check-user-state-description.rst b/source/includes/api-details/dart/users/multi-user-applications-check-user-state-description.rst new file mode 100644 index 0000000000..bcf7856594 --- /dev/null +++ b/source/includes/api-details/dart/users/multi-user-applications-check-user-state-description.rst @@ -0,0 +1,4 @@ +You can check the user's state through the :flutter-sdk:`User.state +` property. This property's value is a +:flutter-sdk:`UserState ` enum whose values indicate +whether the user is ``loggedOut``, ``loggedIn``, or ``removed``. diff --git a/source/includes/api-details/dart/users/multi-user-applications-get-active-user-description.rst b/source/includes/api-details/dart/users/multi-user-applications-get-active-user-description.rst new file mode 100644 index 0000000000..e52a18b381 --- /dev/null +++ b/source/includes/api-details/dart/users/multi-user-applications-get-active-user-description.rst @@ -0,0 +1,2 @@ +You can get the current active user through the +:flutter-sdk:`App.currentUser ` property. diff --git a/source/includes/api-details/dart/users/multi-user-applications-list-all-users-on-device-description.rst b/source/includes/api-details/dart/users/multi-user-applications-list-all-users-on-device-description.rst new file mode 100644 index 0000000000..b42f117d96 --- /dev/null +++ b/source/includes/api-details/dart/users/multi-user-applications-list-all-users-on-device-description.rst @@ -0,0 +1,4 @@ +To list users on the device, read your app's :flutter-sdk:`App.users +` property. This provides access to an +`Iterable `__ +that includes all users that have logged in to the client app. diff --git a/source/includes/api-details/dart/users/multi-user-applications-log-user-out-description.rst b/source/includes/api-details/dart/users/multi-user-applications-log-user-out-description.rst new file mode 100644 index 0000000000..de09866576 --- /dev/null +++ b/source/includes/api-details/dart/users/multi-user-applications-log-user-out-description.rst @@ -0,0 +1,2 @@ +To log out a logged-in user, call the :flutter-sdk:`user.logOut() +` method. diff --git a/source/includes/api-details/dart/users/multi-user-applications-remove-user-from-device-description.rst b/source/includes/api-details/dart/users/multi-user-applications-remove-user-from-device-description.rst new file mode 100644 index 0000000000..2c5a2a6682 --- /dev/null +++ b/source/includes/api-details/dart/users/multi-user-applications-remove-user-from-device-description.rst @@ -0,0 +1,2 @@ +To log out and remove the user, pass the ``User`` object to +:flutter-sdk:`app.removeUser() `. diff --git a/source/includes/api-details/java/users/multi-user-applications-add-user-to-device-description.rst b/source/includes/api-details/java/users/multi-user-applications-add-user-to-device-description.rst new file mode 100644 index 0000000000..25ad77e4d5 --- /dev/null +++ b/source/includes/api-details/java/users/multi-user-applications-add-user-to-device-description.rst @@ -0,0 +1,2 @@ +In the example below, a user named Joe logs in and becomes the active user. +Later, a user named Emma logs in and becomes the active user. diff --git a/source/includes/api-details/java/users/multi-user-applications-change-active-user-description.rst b/source/includes/api-details/java/users/multi-user-applications-change-active-user-description.rst new file mode 100644 index 0000000000..e4dd0b8461 --- /dev/null +++ b/source/includes/api-details/java/users/multi-user-applications-change-active-user-description.rst @@ -0,0 +1,3 @@ +To change the active user, call :java-sdk:`App.switchUser() +` with the new +user's ``User`` object. diff --git a/source/includes/api-details/java/users/multi-user-applications-check-user-state-description.rst b/source/includes/api-details/java/users/multi-user-applications-check-user-state-description.rst new file mode 100644 index 0000000000..01d1861970 --- /dev/null +++ b/source/includes/api-details/java/users/multi-user-applications-check-user-state-description.rst @@ -0,0 +1,5 @@ +You can check the user's state by calling the :java-sdk:`User.getState() +` method. This +property's value is a :java-sdk:`User.State +` enum whose values indicate +whether the user is ``LOGGED_IN``, ``REMOVED``, or ``LOGGED_OUT``. diff --git a/source/includes/api-details/java/users/multi-user-applications-get-active-user-description.rst b/source/includes/api-details/java/users/multi-user-applications-get-active-user-description.rst new file mode 100644 index 0000000000..8fc3a49b0a --- /dev/null +++ b/source/includes/api-details/java/users/multi-user-applications-get-active-user-description.rst @@ -0,0 +1,2 @@ +You can get the current active user by calling the +:java-sdk:`App.currentUser() ` method. diff --git a/source/includes/api-details/java/users/multi-user-applications-list-all-users-on-device-description.rst b/source/includes/api-details/java/users/multi-user-applications-list-all-users-on-device-description.rst new file mode 100644 index 0000000000..a831c49915 --- /dev/null +++ b/source/includes/api-details/java/users/multi-user-applications-list-all-users-on-device-description.rst @@ -0,0 +1,2 @@ +To list all users on the device, call the +:java-sdk:`App.allUsers() ` method. diff --git a/source/includes/api-details/java/users/multi-user-applications-log-user-out-description.rst b/source/includes/api-details/java/users/multi-user-applications-log-user-out-description.rst new file mode 100644 index 0000000000..84df266845 --- /dev/null +++ b/source/includes/api-details/java/users/multi-user-applications-log-user-out-description.rst @@ -0,0 +1,3 @@ +To log the user out, call :java-sdk:`User.logOut() +` or :java-sdk:`User.logOutAsync() +`. diff --git a/source/includes/api-details/java/users/multi-user-applications-remove-user-from-device-description.rst b/source/includes/api-details/java/users/multi-user-applications-remove-user-from-device-description.rst new file mode 100644 index 0000000000..0d7c87012c --- /dev/null +++ b/source/includes/api-details/java/users/multi-user-applications-remove-user-from-device-description.rst @@ -0,0 +1,4 @@ +To remove all information about a user from a device, +use :java-sdk:`user.remove() ` +or :java-sdk:`user.removeAsync() +`. diff --git a/source/includes/api-details/javascript/users/multi-user-applications-add-user-to-device-js-ts-description.rst b/source/includes/api-details/javascript/users/multi-user-applications-add-user-to-device-js-ts-description.rst new file mode 100644 index 0000000000..e352836d65 --- /dev/null +++ b/source/includes/api-details/javascript/users/multi-user-applications-add-user-to-device-js-ts-description.rst @@ -0,0 +1,3 @@ +In the example below, a user with the email ``joe@example.com`` logs in and +becomes the active user. Later, a user with the email ``emma@example.com`` +logs in and becomes the active user. diff --git a/source/includes/api-details/javascript/users/multi-user-applications-change-active-user-js-ts-description.rst b/source/includes/api-details/javascript/users/multi-user-applications-change-active-user-js-ts-description.rst new file mode 100644 index 0000000000..05082e792a --- /dev/null +++ b/source/includes/api-details/javascript/users/multi-user-applications-change-active-user-js-ts-description.rst @@ -0,0 +1,3 @@ +In the example below, the active user is initially switched to ``user1`` +using the :js-sdk:`Realm.App.switchUser() ` method. +Later, the active user is switched to ``user2``. diff --git a/source/includes/api-details/javascript/users/multi-user-applications-check-user-state-js-ts-description.rst b/source/includes/api-details/javascript/users/multi-user-applications-check-user-state-js-ts-description.rst new file mode 100644 index 0000000000..c49e91e5a6 --- /dev/null +++ b/source/includes/api-details/javascript/users/multi-user-applications-check-user-state-js-ts-description.rst @@ -0,0 +1,4 @@ +You can check the user's state through the :js-sdk:`User.state +` property. This property's value is a +:js-sdk:`UserState ` enum whose values indicate +whether the user is ``LoggedIn``, ``LoggedOut``, or ``Removed``. \ No newline at end of file diff --git a/source/includes/api-details/javascript/users/multi-user-applications-get-active-user-js-ts-description.rst b/source/includes/api-details/javascript/users/multi-user-applications-get-active-user-js-ts-description.rst new file mode 100644 index 0000000000..eaf7e08046 --- /dev/null +++ b/source/includes/api-details/javascript/users/multi-user-applications-get-active-user-js-ts-description.rst @@ -0,0 +1,2 @@ +You can get the current active user through the +:js-sdk:`App.currentUser() ` accessor. diff --git a/source/includes/api-details/javascript/users/multi-user-applications-list-all-users-on-device-js-ts-description.rst b/source/includes/api-details/javascript/users/multi-user-applications-list-all-users-on-device-js-ts-description.rst new file mode 100644 index 0000000000..a39aa2d3f8 --- /dev/null +++ b/source/includes/api-details/javascript/users/multi-user-applications-list-all-users-on-device-js-ts-description.rst @@ -0,0 +1,3 @@ +In the example below, a developer prints out all the logged-in users on the +device by looping through :js-sdk:`Realm.App.allUsers +`. diff --git a/source/includes/api-details/javascript/users/multi-user-applications-log-user-out-js-ts-description.rst b/source/includes/api-details/javascript/users/multi-user-applications-log-user-out-js-ts-description.rst new file mode 100644 index 0000000000..b31fef8fdc --- /dev/null +++ b/source/includes/api-details/javascript/users/multi-user-applications-log-user-out-js-ts-description.rst @@ -0,0 +1,2 @@ +To log out a logged-in user, call the :js-sdk:`User.logOut() +` method. diff --git a/source/includes/api-details/javascript/users/multi-user-applications-remove-user-from-device-js-ts-description.rst b/source/includes/api-details/javascript/users/multi-user-applications-remove-user-from-device-js-ts-description.rst new file mode 100644 index 0000000000..f5b1590adb --- /dev/null +++ b/source/includes/api-details/javascript/users/multi-user-applications-remove-user-from-device-js-ts-description.rst @@ -0,0 +1,2 @@ +In the example below, the current user is removed from the device using the +:js-sdk:`Realm.App.removeUser() ` method. diff --git a/source/includes/api-details/kotlin/users/multi-user-applications-add-user-to-device-description.rst b/source/includes/api-details/kotlin/users/multi-user-applications-add-user-to-device-description.rst new file mode 100644 index 0000000000..888091f83f --- /dev/null +++ b/source/includes/api-details/kotlin/users/multi-user-applications-add-user-to-device-description.rst @@ -0,0 +1,2 @@ +In the following example, Joe logs in to the app and becomes the +active user. Then, Emma logs in and replaces Joe as the active user. diff --git a/source/includes/api-details/kotlin/users/multi-user-applications-change-active-user-not-supported.rst b/source/includes/api-details/kotlin/users/multi-user-applications-change-active-user-not-supported.rst new file mode 100644 index 0000000000..7c97773431 --- /dev/null +++ b/source/includes/api-details/kotlin/users/multi-user-applications-change-active-user-not-supported.rst @@ -0,0 +1 @@ +Kotlin does not currently provide a method to switch users. \ No newline at end of file diff --git a/source/includes/api-details/kotlin/users/multi-user-applications-check-user-state-description.rst b/source/includes/api-details/kotlin/users/multi-user-applications-check-user-state-description.rst new file mode 100644 index 0000000000..ee57440770 --- /dev/null +++ b/source/includes/api-details/kotlin/users/multi-user-applications-check-user-state-description.rst @@ -0,0 +1,4 @@ +To check the user state, read the +:kotlin-sync-sdk:`user.state +` property. This property is +an enum whose values can be ``LOGGED_OUT``, ``LOGGED_IN``, or ``REMOVED``. diff --git a/source/includes/api-details/kotlin/users/multi-user-applications-get-active-user-description.rst b/source/includes/api-details/kotlin/users/multi-user-applications-get-active-user-description.rst new file mode 100644 index 0000000000..0ebb1539b4 --- /dev/null +++ b/source/includes/api-details/kotlin/users/multi-user-applications-get-active-user-description.rst @@ -0,0 +1,2 @@ +You can get the current active user using :kotlin-sync-sdk:`App.currentUser +`. diff --git a/source/includes/api-details/kotlin/users/multi-user-applications-list-all-users-on-device-description.rst b/source/includes/api-details/kotlin/users/multi-user-applications-list-all-users-on-device-description.rst new file mode 100644 index 0000000000..4d005cd7f8 --- /dev/null +++ b/source/includes/api-details/kotlin/users/multi-user-applications-list-all-users-on-device-description.rst @@ -0,0 +1,9 @@ +You can access a map of all known user accounts that are stored on +the device using the +:kotlin-sync-sdk:`app.allUsers() ` +method. This method returns all users that have logged in to the +client app on a given device regardless of whether they are currently +authenticated (the ``user.state`` is ``LOGGED_IN`` or ``LOGGED_OUT``). + +In the following example, the SDK returns both Emma and Joe's +:kotlin-sync-sdk:`user.id `: diff --git a/source/includes/api-details/kotlin/users/multi-user-applications-log-user-out-description.rst b/source/includes/api-details/kotlin/users/multi-user-applications-log-user-out-description.rst new file mode 100644 index 0000000000..e3581875af --- /dev/null +++ b/source/includes/api-details/kotlin/users/multi-user-applications-log-user-out-description.rst @@ -0,0 +1,7 @@ +To log out a logged-in user, call the +:kotlin-sync-sdk:`user.logOut() ` +method. + +In the following example, Joe is currently logged-in as the current user. +After we log Joe out of the app, we confirm that he is still stored on +the device as a user and that Emma is now the current user: diff --git a/source/includes/api-details/kotlin/users/multi-user-applications-remove-user-from-device-description.rst b/source/includes/api-details/kotlin/users/multi-user-applications-remove-user-from-device-description.rst new file mode 100644 index 0000000000..cdd93a889b --- /dev/null +++ b/source/includes/api-details/kotlin/users/multi-user-applications-remove-user-from-device-description.rst @@ -0,0 +1,7 @@ +You can actively remove a user, and all information about that user, from +a device using +:kotlin-sync-sdk:`user.remove() `. + +In the following example, Emma is the current (and only) logged-in user +on the device. After we remove her, we confirm that Emma is removed from the +device and that there is no current user, as Joe is still logged out: diff --git a/source/includes/api-details/swift/users/multi-user-applications-add-user-to-device-description.rst b/source/includes/api-details/swift/users/multi-user-applications-add-user-to-device-description.rst new file mode 100644 index 0000000000..e352836d65 --- /dev/null +++ b/source/includes/api-details/swift/users/multi-user-applications-add-user-to-device-description.rst @@ -0,0 +1,3 @@ +In the example below, a user with the email ``joe@example.com`` logs in and +becomes the active user. Later, a user with the email ``emma@example.com`` +logs in and becomes the active user. diff --git a/source/includes/api-details/swift/users/multi-user-applications-change-active-user-description.rst b/source/includes/api-details/swift/users/multi-user-applications-change-active-user-description.rst new file mode 100644 index 0000000000..7c19a81538 --- /dev/null +++ b/source/includes/api-details/swift/users/multi-user-applications-change-active-user-description.rst @@ -0,0 +1 @@ +You can change the active user with the ``App.switch(to: User)`` method. \ No newline at end of file diff --git a/source/includes/api-details/swift/users/multi-user-applications-check-user-state-description.rst b/source/includes/api-details/swift/users/multi-user-applications-check-user-state-description.rst new file mode 100644 index 0000000000..65243be5a3 --- /dev/null +++ b/source/includes/api-details/swift/users/multi-user-applications-check-user-state-description.rst @@ -0,0 +1,3 @@ +To check the user state, read the ``user.state`` property. This property's +value is an :objc-sdk:`RLMUserState ` enum whose +cases reflect whether the user is logged out, logged in, or removed. diff --git a/source/includes/api-details/swift/users/multi-user-applications-get-active-user-description.rst b/source/includes/api-details/swift/users/multi-user-applications-get-active-user-description.rst new file mode 100644 index 0000000000..955034f1d8 --- /dev/null +++ b/source/includes/api-details/swift/users/multi-user-applications-get-active-user-description.rst @@ -0,0 +1,3 @@ +You can get the current active user through the +:objc-sdk:`App.currentUser +` property. diff --git a/source/includes/api-details/swift/users/multi-user-applications-list-all-users-on-device-description.rst b/source/includes/api-details/swift/users/multi-user-applications-list-all-users-on-device-description.rst new file mode 100644 index 0000000000..b22e2986d0 --- /dev/null +++ b/source/includes/api-details/swift/users/multi-user-applications-list-all-users-on-device-description.rst @@ -0,0 +1,8 @@ +You can access a map of all known user accounts that are stored on +the device through the ``app.allUsers`` property. This property returns all +users that have logged in to the client app on a given device regardless of +whether they are currently authenticated (the ``user.state`` is logged in or +logged out). + +In the following example, the SDK returns both Emma and Joe's +:objc-sdk:`user.identifier `: diff --git a/source/includes/api-details/swift/users/multi-user-applications-log-user-out-description.rst b/source/includes/api-details/swift/users/multi-user-applications-log-user-out-description.rst new file mode 100644 index 0000000000..15495375ed --- /dev/null +++ b/source/includes/api-details/swift/users/multi-user-applications-log-user-out-description.rst @@ -0,0 +1,4 @@ +To log out a logged-in user, call the +:swift-sdk:`user.logOut() +` +method. diff --git a/source/includes/api-details/swift/users/multi-user-applications-remove-user-from-device-description.rst b/source/includes/api-details/swift/users/multi-user-applications-remove-user-from-device-description.rst new file mode 100644 index 0000000000..1abb9bc4a4 --- /dev/null +++ b/source/includes/api-details/swift/users/multi-user-applications-remove-user-from-device-description.rst @@ -0,0 +1,4 @@ +You can actively remove a user, and all information about that user, from +a device using +:swift-sdk:`user.remove() +`. diff --git a/source/includes/sdk-examples/users/multi-user-applications-add-new-user-to-device.rst b/source/includes/sdk-examples/users/multi-user-applications-add-new-user-to-device.rst new file mode 100644 index 0000000000..baaaa451ff --- /dev/null +++ b/source/includes/sdk-examples/users/multi-user-applications-add-new-user-to-device.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/MultiUserExamples.snippet.multi-add.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.email-password-credentials.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.add-a-new-user.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.add-a-new-user.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MultiUser/AddUser/AddUser.js + :language: javascript + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/AuthenticationTest.snippet.add-a-new-user.kt + :language: kotlin + + .. output:: + :language: console + + Successfully logged in. User state: LOGGED_IN. Current user is now: 65133e130075a51f12a9e635 + Successfully logged in. User state: LOGGED_IN. Current user is now: 65133e1357aaf22529343c1b + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.add-user.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MultiUser/AddUser/AddUser.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/multi-user-applications-change-active-user.rst b/source/includes/sdk-examples/users/multi-user-applications-change-active-user.rst new file mode 100644 index 0000000000..8792b9901b --- /dev/null +++ b/source/includes/sdk-examples/users/multi-user-applications-change-active-user.rst @@ -0,0 +1,51 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/MultiUserExamples.snippet.multi-switch.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.change-active-user.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.switch-the-active-user.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.switch-the-active-user.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MultiUser/SwitchUser/SwitchUser.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.switch-user.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MultiUser/SwitchUser/SwitchUser.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/multi-user-applications-check-user-state.rst b/source/includes/sdk-examples/users/multi-user-applications-check-user-state.rst new file mode 100644 index 0000000000..5c42fac49b --- /dev/null +++ b/source/includes/sdk-examples/users/multi-user-applications-check-user-state.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/users/multi-user-applications-get-active-user.rst b/source/includes/sdk-examples/users/multi-user-applications-get-active-user.rst new file mode 100644 index 0000000000..3e66b6e858 --- /dev/null +++ b/source/includes/sdk-examples/users/multi-user-applications-get-active-user.rst @@ -0,0 +1,53 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.retrieve-current-user.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.switch-the-active-user.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.switch-the-active-user.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.retrieve-current-user.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/users/multi-user-applications-list-all-users-on-device.rst b/source/includes/sdk-examples/users/multi-user-applications-list-all-users-on-device.rst new file mode 100644 index 0000000000..8b7581fdcc --- /dev/null +++ b/source/includes/sdk-examples/users/multi-user-applications-list-all-users-on-device.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/MultiUserExamples.snippet.multi-list.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.list-all-users.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.list-all-on-device-users.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.list-all-on-device-users.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MultiUser/ListUsers/ListUsers.js + :language: javascript + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/AuthenticationTest.snippet.list-all-users.kt + :language: kotlin + + .. output:: + :language: console + + User on Device 651330cebe1d42b24b8d510f: 65133e1357aaf22529343c1b + User on Device 651330cebe1d42b24b8d510f: 65133e130075a51f12a9e635 + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.list-users.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MultiUser/ListUsers/ListUsers.ts + :language: typescript diff --git a/source/includes/sdk-examples/users/multi-user-applications-log-user-out.rst b/source/includes/sdk-examples/users/multi-user-applications-log-user-out.rst new file mode 100644 index 0000000000..2161abc729 --- /dev/null +++ b/source/includes/sdk-examples/users/multi-user-applications-log-user-out.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.logout.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.log-out.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.switch-the-active-user.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.switch-the-active-user.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.logout-current-user.js + :language: javascript + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/AuthenticationTest.snippet.log-out-a-user.kt + :language: kotlin + + .. output:: + :language: console + + Successfully logged out user. User state: LOGGED_OUT. Current user is now: 65133e1357aaf22529343c1b + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.logout.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/users/multi-user-applications-remove-user-from-device.rst b/source/includes/sdk-examples/users/multi-user-applications-remove-user-from-device.rst new file mode 100644 index 0000000000..c4a63a5ecc --- /dev/null +++ b/source/includes/sdk-examples/users/multi-user-applications-remove-user-from-device.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/MultiUserExamples.snippet.multi-remove.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.remove-user.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.remove-a-user-from-device.java + :language: java + :emphasize-lines: 4 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/MultipleUsersTest.snippet.remove-a-user-from-device.kt + :language: kotlin + :emphasize-lines: 4 + + - id: javascript + content: | + + .. literalinclude:: /examples/MultiUser/LogoutUser/LogoutUser.js + :language: javascript + :emphasize-lines: 3 + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/AuthenticationTest.snippet.remove-a-user.kt + :language: kotlin + + .. output:: + :language: console + + Successfully removed user. User state: REMOVED. Current user is now: null + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MultiUser/LogoutUser/LogoutUser.ts + :language: typescript + :emphasize-lines: 3 diff --git a/source/sdk/users/multi-user-applications.txt b/source/sdk/users/multi-user-applications.txt index f31968abbe..2b4cdee6e6 100644 --- a/source/sdk/users/multi-user-applications.txt +++ b/source/sdk/users/multi-user-applications.txt @@ -4,10 +4,455 @@ Multi-User Applications ======================= +.. meta:: + :description: Build an app that supports multiple users, including the ability switch the active user, with Atlas Device SDK. + :keywords: Realm, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: csharp, dart, java, javascript/typescript, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for multi-user application content. +.. tabs-selector:: drivers + +Atlas Device SDK allows multiple :ref:`users ` to be logged in +to an app simultaneously on a given device. Client applications run +in the context of a single active user even if multiple users are logged in +simultaneously. You can quickly switch between authenticated users without +requiring them to log in again. + +.. important:: + + C++ does not currently support multi-user applications. + +.. important:: + + **Any logged-in user may become the active user without re-authenticating.** + Depending on your app, this may be a security vulnerability. For example, a + user on a shared device may switch to a coworker's logged in account without + providing their credentials or requiring their explicit permission. If your + application requires stricter authentication, avoid switching between users + and prefer to explicitly log the active user out before authenticating + another user. + +.. _sdks-multi-user-user-account-states: + +User Account States +------------------- + +When a user first logs in through Atlas App Services on a given device or +browser, the SDK saves the user's information and keeps track of the user's +state on the device. The user's data remains on the device, even if they log +out, unless you actively remove the user. + +The following states describe an on-device user at any given time: + +- **Authenticated:** any user that has logged in on the device + and has not logged out or had its session revoked. + + - **Active**: a single authenticated user that is currently using the + app on a given device. The SDK associates this user with outgoing + requests and Atlas evaluates data access permissions and runs Functions in + this user's context. See :ref:`active user ` for more + information. + + - **Inactive**: all authenticated users that are not the current + active user. You switch the active user to a currently inactive user at + any time. + +- **Logged Out:** any user that authenticated on the device but + has since logged out or had their session revoked. + +The following diagram shows how users within a client app +transition between states when certain events occur: + +.. figure:: /images/multi-user.png + :alt: A diagram the outlines the different states a user can be in: logged out, logged in and active, & logged in and inactive. + +.. _sdks-multi-user-account-check-user-state: + +Check User State +~~~~~~~~~~~~~~~~ + +The SDK provides a property you can check to determine the user's current state. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/multi-user-applications-check-user-state-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/multi-user-applications-check-user-state-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/multi-user-applications-check-user-state-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/multi-user-applications-check-user-state-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-check-user-state-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/multi-user-applications-check-user-state-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/multi-user-applications-check-user-state-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-check-user-state-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/multi-user-applications-check-user-state.rst + +.. _sdks-multi-user-add-new-user-to-device: + +Add a New User to the Device +---------------------------- + +The SDK automatically adds users to a device when they log in for the first +time on that device. When a user logs in, they immediately become the +application's active user. For details about authenticating a user, refer to +:ref:`sdks-authenticate-users`. + +.. TODO: Add an API description to the Dart tab in the consolidation gaps follow-up ticket when we update the code example + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/multi-user-applications-add-user-to-device-description.rst + + .. tab:: + :tabid: dart + + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/multi-user-applications-add-user-to-device-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/multi-user-applications-add-user-to-device-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-add-user-to-device-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/multi-user-applications-add-user-to-device-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/multi-user-applications-add-user-to-device-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-add-user-to-device-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/multi-user-applications-add-new-user-to-device.rst + +.. _sdks-multi-user-list-all-users-on-device: + +List All Users on the Device +---------------------------- + +You can access a list of all :ref:`user accounts ` that are +stored on the device. This list includes all users that have logged in to the +app on a given device regardless of whether they are currently authenticated. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/multi-user-applications-list-all-users-on-device-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/multi-user-applications-list-all-users-on-device-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/multi-user-applications-list-all-users-on-device-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/multi-user-applications-list-all-users-on-device-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-list-all-users-on-device-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/multi-user-applications-list-all-users-on-device-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/multi-user-applications-list-all-users-on-device-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-list-all-users-on-device-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/multi-user-applications-list-all-users-on-device.rst + +.. _sdks-multi-user-get-active-user: + +Get the Active User +------------------- + +You can get the current active user in your app. If multiple users are +logged in, this returns the last valid user that logged in to the device. This +method returns the language's implementation of ``nil`` or ``null`` if there +are no logged-in users. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/multi-user-applications-get-active-user-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/multi-user-applications-get-active-user-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/multi-user-applications-get-active-user-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/multi-user-applications-get-active-user-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-get-active-user-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/multi-user-applications-get-active-user-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/multi-user-applications-get-active-user-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-get-active-user-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/multi-user-applications-get-active-user.rst + +.. _sdks-multi-user-change-active-user: + +Change the Active User +---------------------- + +You can change an app's :ref:`active user ` to another +logged-in user at any time. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/multi-user-applications-change-active-user-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/multi-user-applications-change-active-user-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/multi-user-applications-change-active-user-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/multi-user-applications-change-active-user-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-change-active-user-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/multi-user-applications-change-active-user-not-supported.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/multi-user-applications-change-active-user-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-change-active-user-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/multi-user-applications-change-active-user.rst + +.. _sdks-multi-user-log-user-out: + +Log a User Out +-------------- + +You can log a logged-in user out of an app. Once logged out, the user is still +stored on the device but must log back in to use the app. If another logged-in +user exists on the device, logging a user out automatically sets the remaining +logged-in user as the active user. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/multi-user-applications-log-user-out-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/multi-user-applications-log-user-out-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/multi-user-applications-log-user-out-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/multi-user-applications-log-user-out-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-log-user-out-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/multi-user-applications-log-user-out-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/multi-user-applications-log-user-out-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-log-user-out-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/multi-user-applications-log-user-out.rst + +For more information, refer to :ref:`sdks-logout`. + +.. _sdks-multi-user-remove-user-from-device: + +Remove a User from the Device +----------------------------- + +You can remove all information about a user from the device and automatically +log the user out. Once removed, the user must re-authenticate to use the app +again. This *does not* delete the user from Atlas. If another logged-in +user exists on the device, removing a user out automatically sets the remaining +logged-in user as the active user. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/multi-user-applications-remove-user-from-device-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/multi-user-applications-remove-user-from-device-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/multi-user-applications-remove-user-from-device-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/multi-user-applications-remove-user-from-device-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-remove-user-from-device-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/multi-user-applications-remove-user-from-device-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/multi-user-applications-remove-user-from-device-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/multi-user-applications-remove-user-from-device-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/multi-user-applications-remove-user-from-device.rst + +For more information on removing and deleting users, refer to +:ref:`sdks-create-and-delete-users`. From 07d21c7b96fc13bce011c6bac400448bc5cb0c9a Mon Sep 17 00:00:00 2001 From: dacharyc Date: Fri, 19 Jul 2024 16:51:09 -0400 Subject: [PATCH 47/63] Don't run Java tests in CI anymore, but keep the workflows just in case --- {.github/workflows => examples/java}/java_local.yml | 0 {.github/workflows => examples/java}/java_sync.yml | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename {.github/workflows => examples/java}/java_local.yml (100%) rename {.github/workflows => examples/java}/java_sync.yml (100%) diff --git a/.github/workflows/java_local.yml b/examples/java/java_local.yml similarity index 100% rename from .github/workflows/java_local.yml rename to examples/java/java_local.yml diff --git a/.github/workflows/java_sync.yml b/examples/java/java_sync.yml similarity index 100% rename from .github/workflows/java_sync.yml rename to examples/java/java_sync.yml From 78520c0cb9bbbe2ef97d4ae7091bc601b7f3d947 Mon Sep 17 00:00:00 2001 From: dacharyc Date: Fri, 19 Jul 2024 16:52:59 -0400 Subject: [PATCH 48/63] Fix build error related to changed ref target --- source/sdk/crud/query-engines/realm-query-language.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/sdk/crud/query-engines/realm-query-language.txt b/source/sdk/crud/query-engines/realm-query-language.txt index fded46e8a1..cc18750539 100644 --- a/source/sdk/crud/query-engines/realm-query-language.txt +++ b/source/sdk/crud/query-engines/realm-query-language.txt @@ -600,7 +600,7 @@ Check the data type of a mixed type or dictionary property using the ``@type`` operator. Evaluate the property against a string representation of the data type name using string comparison operators. For information on how each SDK language's data types map to database-specific data types, refer to -:ref:`sdks-supported-data-types`. +:ref:`sdks-define-property-types`. .. list-table:: :header-rows: 1 From c63b55c563ecb9cfbeda07c4f395e1e7d4f23e50 Mon Sep 17 00:00:00 2001 From: Dachary Date: Mon, 22 Jul 2024 18:01:40 -0400 Subject: [PATCH 49/63] (DOCSP-41633): Consolidation: Incorporate Counter and Progress Notifications updates (#3331) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-41633 Re: counters, the only info I'm pulling in here is for the "Create" page. The rest of the Counter info will be incorporated as we work on other PRs in the consolidation project (for defining a counter property and updating a counter property). *Staged Page* - [Create Property Types/Counters](https://preview-mongodbdacharyc.gatsbyjs.io/realm/incorporate-counters/sdk/crud/create/create-property-types/#create-a-counter-property): Add info for JavaScript and TypeScript about creating objects with the new JS counter type. - [Manage Sync Sessions](https://preview-mongodbdacharyc.gatsbyjs.io/realm/incorporate-counters/sdk/sync/manage-sync-sessions/#check-upload-and-download-progress): Add the .NET example for the new estimate-based progress notifications. *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [.NET: Monitor Sync Progress](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/sync/sync-progress/#monitor-sync-progress) - [Node.js: Counters](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/counters/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --- ...check-upload-and-download-progress-description.rst | 4 ++++ .../crud/create-counter-property-type-description.rst | 11 +++++++++++ .../create-counter-property-type-not-supported.rst | 1 - .../create-counter-property-type-not-supported.rst | 1 - .../crud/create-counter-property-type.rst | 6 ++---- ...e-sync-sessions-check-upload-download-progress.rst | 2 +- source/sdk/crud/create/create-property-types.txt | 4 ++-- 7 files changed, 20 insertions(+), 9 deletions(-) create mode 100644 source/includes/api-details/javascript/crud/create-counter-property-type-description.rst delete mode 100644 source/includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst delete mode 100644 source/includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst diff --git a/source/includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst b/source/includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst index 7fac246cf2..cd0de13ac4 100644 --- a/source/includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst +++ b/source/includes/api-details/csharp/sync/manage-sync-sessions-check-upload-and-download-progress-description.rst @@ -24,3 +24,7 @@ as a double between 0.0 and 1.0. Once you no longer wish to receive notifications, unregister the token with ``token.Dispose()``. + +In the following example, we subscribe to a progress observable on the +``session`` to listen for upload events. When this callback is triggered, it +prints the upload progress as a percentage. diff --git a/source/includes/api-details/javascript/crud/create-counter-property-type-description.rst b/source/includes/api-details/javascript/crud/create-counter-property-type-description.rst new file mode 100644 index 0000000000..87b89bcacb --- /dev/null +++ b/source/includes/api-details/javascript/crud/create-counter-property-type-description.rst @@ -0,0 +1,11 @@ +To initialize a :js-sdk:`Counter `, create +your object using the ``realm.create()`` method. Pass in your :ref:`object +schema ` and initial counter value, as well as initial +values for any other properties the object has. + +After initialization, you can use the following methods to modify the counter +value: + +- ``increment()`` and ``decrement()`` update the underlying value by a + specified number. +- ``set()`` reassigns the counter to a specified value. diff --git a/source/includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst b/source/includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst deleted file mode 100644 index 08187be898..0000000000 --- a/source/includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst +++ /dev/null @@ -1 +0,0 @@ -JavaScript does not currently have a dedicated counter property type. diff --git a/source/includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst b/source/includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst deleted file mode 100644 index 2fddba5e74..0000000000 --- a/source/includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst +++ /dev/null @@ -1 +0,0 @@ -TypeScript does not currently have a dedicated counter property type. diff --git a/source/includes/sdk-examples/crud/create-counter-property-type.rst b/source/includes/sdk-examples/crud/create-counter-property-type.rst index 341c05b2fc..052f38dc5c 100644 --- a/source/includes/sdk-examples/crud/create-counter-property-type.rst +++ b/source/includes/sdk-examples/crud/create-counter-property-type.rst @@ -36,9 +36,8 @@ - id: javascript content: | - .. literalinclude:: /examples/MissingPlaceholders/api.js + .. literalinclude:: /examples/generated/node/data-types.test.snippet.initialize-counter.js :language: javascript - :copyable: false - id: kotlin content: | @@ -63,6 +62,5 @@ - id: typescript content: | - .. literalinclude:: /examples/MissingPlaceholders/api.ts + .. literalinclude:: /examples/generated/node/data-types.test.snippet.initialize-counter.ts :language: typescript - :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst index f69cc86741..8b0cac19cf 100644 --- a/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst @@ -10,7 +10,7 @@ - id: csharp content: | - .. literalinclude:: /examples/MissingPlaceholders/example.cs + .. literalinclude:: /examples/generated/dotnet/ProgressNotifications.snippet.upload-download-progress-notification.cs :language: csharp - id: dart diff --git a/source/sdk/crud/create/create-property-types.txt b/source/sdk/crud/create/create-property-types.txt index 4229f7e3b4..69b202d01b 100644 --- a/source/sdk/crud/create/create-property-types.txt +++ b/source/sdk/crud/create/create-property-types.txt @@ -154,7 +154,7 @@ counter. .. tab:: :tabid: javascript - .. include:: /includes/api-details/javascript/crud/create-counter-property-type-not-supported.rst + .. include:: /includes/api-details/javascript/crud/create-counter-property-type-description.rst .. tab:: :tabid: kotlin @@ -174,7 +174,7 @@ counter. .. tab:: :tabid: typescript - .. include:: /includes/api-details/typescript/crud/create-counter-property-type-not-supported.rst + .. include:: /includes/api-details/javascript/crud/create-counter-property-type-description.rst .. include:: /includes/sdk-examples/crud/create-counter-property-type.rst From e7fa389c25875c9a6cdd5588796cc901fa1df2e7 Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 23 Jul 2024 11:44:54 -0400 Subject: [PATCH 50/63] (DOCSP-39523): Consolidate Call a Function page (#3322) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39523 *Staged Page* - [Call an Atlas Function](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39523/sdk/atlas/call-function/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Call a Function](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/app-services/call-a-function/) - [Flutter: Call a Function](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/app-services/call-function/) - [Java: Call a Function](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/app-services/call-a-function/) - [Kotlin: Call a Function](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/app-services/call-function/) - [.NET: Call a Function](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/app-services/call-a-function/) - [Node.js: Call a Function](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/app-services/connect-to-app-services-backend/) - [Swift: Call a Function](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/app-services/call-a-function/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: Kyle Rollins <115574589+krollins-mdb@users.noreply.github.com> --- ...las-function-call-function-description.rst | 8 ++ ...las-function-call-function-description.rst | 23 ++++ ...las-function-call-function-description.rst | 11 ++ ...las-function-call-function-description.rst | 8 ++ ...nction-call-function-js-ts-description.rst | 3 + ...las-function-call-function-description.rst | 7 ++ ...las-function-call-function-description.rst | 6 + ...las-function-call-function-description.rst | 18 +++ ...tant-sanitize-client-data-in-functions.rst | 4 - .../call-atlas-function-call-function.rst | 80 ++++++++++++++ source/sdk/atlas/call-function.txt | 104 +++++++++++++++++- source/sdk/serialization.txt | 5 + 12 files changed, 268 insertions(+), 9 deletions(-) create mode 100644 source/includes/api-details/cpp/atlas/call-atlas-function-call-function-description.rst create mode 100644 source/includes/api-details/csharp/atlas/call-atlas-function-call-function-description.rst create mode 100644 source/includes/api-details/dart/atlas/call-atlas-function-call-function-description.rst create mode 100644 source/includes/api-details/java/atlas/call-atlas-function-call-function-description.rst create mode 100644 source/includes/api-details/javascript/atlas/call-atlas-function-call-function-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/atlas/call-atlas-function-call-function-description.rst create mode 100644 source/includes/api-details/objectivec/atlas/call-atlas-function-call-function-description.rst create mode 100644 source/includes/api-details/swift/atlas/call-atlas-function-call-function-description.rst delete mode 100644 source/includes/important-sanitize-client-data-in-functions.rst create mode 100644 source/includes/sdk-examples/atlas/call-atlas-function-call-function.rst diff --git a/source/includes/api-details/cpp/atlas/call-atlas-function-call-function-description.rst b/source/includes/api-details/cpp/atlas/call-atlas-function-call-function-description.rst new file mode 100644 index 0000000000..debb2b5729 --- /dev/null +++ b/source/includes/api-details/cpp/atlas/call-atlas-function-call-function-description.rst @@ -0,0 +1,8 @@ +To call an Atlas Function, use the +:cpp-sdk:`call_function() ` +member function on the ``user`` object. Pass in the name of the +function as a string for the first parameter. This function takes two arguments, +which we provide as a string array of arguments. + +The callback can provide an optional string result, or an optional error. +In this example, we check that the result has a value. diff --git a/source/includes/api-details/csharp/atlas/call-atlas-function-call-function-description.rst b/source/includes/api-details/csharp/atlas/call-atlas-function-call-function-description.rst new file mode 100644 index 0000000000..e613ba25ce --- /dev/null +++ b/source/includes/api-details/csharp/atlas/call-atlas-function-call-function-description.rst @@ -0,0 +1,23 @@ +To call an Atlas Function, use the +:dotnet-sdk:`Functions.CallAsync() ` +method on the ``User`` object, passing in the name of the function as the first +parameter and the arguments as the remaining parameters: + +.. literalinclude:: /examples/generated/dotnet/FunctionExamples.snippet.callfunc.cs + :language: csharp + +.. note:: + + The ``CallAsync()`` method returns a single ``BsonValue`` object, which you can + deserialize after calling the function or by using the generic + overload. Both of these approaches to deserialization are shown in the + code above. + +A ``BsonValue`` object can hold a single primitive value (as shown in the +example above), or hold a complete BSON document. If +you have a class that maps to the returned object, you can deserialize +to that class by using the generic overload. For example, the following code +calls a function that returns an object from a collection of "RealmTasks". +Since we know the shape of the returned object, we we can deserialize the +``BsonValue`` to a class that we have created, and then we have +access to the properties and methods on that object: diff --git a/source/includes/api-details/dart/atlas/call-atlas-function-call-function-description.rst b/source/includes/api-details/dart/atlas/call-atlas-function-call-function-description.rst new file mode 100644 index 0000000000..50c3d28692 --- /dev/null +++ b/source/includes/api-details/dart/atlas/call-atlas-function-call-function-description.rst @@ -0,0 +1,11 @@ +To call a Function, call :flutter-sdk:`User.functions.call() `. +Pass the Function name as the first argument and all arguments for the Function +in a List as the second argument. + +To include objects as arguments to the Function, +convert them to JSON first. You can do this using the `jsonEncode() +`__ +function included in the built-in ``dart:convert`` library. + +The Function returns a ``dynamic`` value containing :manual:`MongoDB Extended JSON (EJSON) +` deserialized to a native Dart object. diff --git a/source/includes/api-details/java/atlas/call-atlas-function-call-function-description.rst b/source/includes/api-details/java/atlas/call-atlas-function-call-function-description.rst new file mode 100644 index 0000000000..c1dd254832 --- /dev/null +++ b/source/includes/api-details/java/atlas/call-atlas-function-call-function-description.rst @@ -0,0 +1,8 @@ +To execute a function from the SDK, use the +:java-sdk:`getFunctions() ` +method of the your :java-sdk:`App ` +to retrieve a :java-sdk:`Functions manager `. + +Pass the name and parameters of the function you would like to call to +:java-sdk:`callFunction() ` +or :java-sdk:`callFunctionAsync() `: diff --git a/source/includes/api-details/javascript/atlas/call-atlas-function-call-function-js-ts-description.rst b/source/includes/api-details/javascript/atlas/call-atlas-function-call-function-js-ts-description.rst new file mode 100644 index 0000000000..b696350cfe --- /dev/null +++ b/source/includes/api-details/javascript/atlas/call-atlas-function-call-function-js-ts-description.rst @@ -0,0 +1,3 @@ +To call a function, you can either pass its name and arguments to +``User.callFunction()`` or call the function as if it was a method on the +:js-sdk:`User.functions ` property. diff --git a/source/includes/api-details/kotlin/atlas/call-atlas-function-call-function-description.rst b/source/includes/api-details/kotlin/atlas/call-atlas-function-call-function-description.rst new file mode 100644 index 0000000000..813667d119 --- /dev/null +++ b/source/includes/api-details/kotlin/atlas/call-atlas-function-call-function-description.rst @@ -0,0 +1,7 @@ +To call an Atlas Function, pass its name and all arguments to +:kotlin-sync-sdk:`Functions.call() `. + +You can serialize Function arguments and return values using an EJSON encoder. +For more information, including examples, refer to :ref:`sdks-ejson-encoding-for-atlas`. + +To call this Atlas Function from the SDK: diff --git a/source/includes/api-details/objectivec/atlas/call-atlas-function-call-function-description.rst b/source/includes/api-details/objectivec/atlas/call-atlas-function-call-function-description.rst new file mode 100644 index 0000000000..f44365592d --- /dev/null +++ b/source/includes/api-details/objectivec/atlas/call-atlas-function-call-function-description.rst @@ -0,0 +1,6 @@ +To execute a function in Objective-C, call the :objc-sdk:`callFunctionNamed:arguments:completionBlock: +`. +method on the :objc-sdk:`RLMUser ` object. + +Provide the Function name, arguments, and completion block to execute when the +Function call is complete. diff --git a/source/includes/api-details/swift/atlas/call-atlas-function-call-function-description.rst b/source/includes/api-details/swift/atlas/call-atlas-function-call-function-description.rst new file mode 100644 index 0000000000..b27ba672b3 --- /dev/null +++ b/source/includes/api-details/swift/atlas/call-atlas-function-call-function-description.rst @@ -0,0 +1,18 @@ +To execute a function in Swift, use the :swift-sdk:`functions +` object on the currently logged-in user. + +The ``functions`` object has dynamic members corresponding to functions. +In this case, ``functions.concatenate()`` refers to the ``concatenate`` +function. Pass a ``BSONArray`` of arguments. + +Async/Await +``````````` + +.. literalinclude:: /examples/generated/code/start/Functions.snippet.async-call-a-function.swift + :language: swift + +Completion Handler +`````````````````` + +The trailing closure is the completion handler to call when the function call +is complete. This handler is executed on a non-main global ``DispatchQueue``. diff --git a/source/includes/important-sanitize-client-data-in-functions.rst b/source/includes/important-sanitize-client-data-in-functions.rst deleted file mode 100644 index ba905434f5..0000000000 --- a/source/includes/important-sanitize-client-data-in-functions.rst +++ /dev/null @@ -1,4 +0,0 @@ -.. important:: - - Make sure to sanitize client data to protect against code injection when using - Functions. \ No newline at end of file diff --git a/source/includes/sdk-examples/atlas/call-atlas-function-call-function.rst b/source/includes/sdk-examples/atlas/call-atlas-function-call-function.rst new file mode 100644 index 0000000000..f227b13d30 --- /dev/null +++ b/source/includes/sdk-examples/atlas/call-atlas-function-call-function.rst @@ -0,0 +1,80 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/call-function.snippet.call-a-function.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FunctionExamples.snippet.callfuncWithPOCO.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/functions_test.snippet.call-function.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/FunctionTest.snippet.call-a-function.java + :language: java + :emphasize-lines: 10-17 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/FunctionTest.snippet.call-a-function.kt + :language: kotlin + :emphasize-lines: 8,9,10,11,12,13,14,15,16,17 + + - id: javascript + content: | + + .. io-code-block:: + + .. input:: /examples/generated/node/call-a-function.snippet.call-a-function-by-name.js + :language: javascript + + .. output:: + :language: console + + Using the "functions.sum()" method: the sum of 2 + 3 = 5 + Using the "callFunction()" method: the sum of 2 + 3 = 5 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/FunctionsTest.snippet.call-function.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/Functions.snippet.call-a-function.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Functions.snippet.call-a-function.swift + :language: swift + + - id: typescript + content: | + + .. io-code-block:: + + .. input:: /examples/generated/node/call-a-function.snippet.call-a-function-by-name.js + :language: javascript + + .. output:: + :language: console + + Using the "functions.sum()" method: the sum of 2 + 3 = 5 + Using the "callFunction()" method: the sum of 2 + 3 = 5 diff --git a/source/sdk/atlas/call-function.txt b/source/sdk/atlas/call-function.txt index c31a89ed61..c96db002b3 100644 --- a/source/sdk/atlas/call-function.txt +++ b/source/sdk/atlas/call-function.txt @@ -1,13 +1,107 @@ .. _sdks-call-function: -=============== -Call a Function -=============== +====================== +Call an Atlas Function +====================== + +.. meta:: + :description: Call serverless Atlas Functions from a client application with Atlas Device SDK. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift .. contents:: On this page :local: :backlinks: none - :depth: 2 + :depth: 1 :class: singlecol -Placeholder page for the call a Function content. +.. tabs-selector:: drivers + +You can call an **Atlas Function** from a client application using Atlas +Device SDK. Functions are serverless JavaScript functions that let you define +and execute server-side logic. These server-side Functions can run in the +context of the authenticated user, and thus honor the rules, roles, and +permissions that you have assigned to your data in Atlas. + +For more information on configuring and writing Atlas Functions, refer to +:ref:`Atlas Functions ` in the App Services documentation. + +Before You Begin +---------------- + +#. In an App Services App, :ref:`define an Atlas Function `. +#. In your client project, :ref:`initialize the App client `. +#. Then, :ref:`authenticate a user `. You access + Functions through the user object. + +The example on this page demonstrates calling an :ref:`Atlas Function ` +that takes two arguments, performs some work, and returns the result. + +Call a Function +--------------- + +.. important:: + + Make sure to sanitize client data to protect against code injection when using + Functions. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/atlas/call-atlas-function-call-function-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/atlas/call-atlas-function-call-function-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/atlas/call-atlas-function-call-function-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/atlas/call-atlas-function-call-function-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/atlas/call-atlas-function-call-function-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/atlas/call-atlas-function-call-function-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/atlas/call-atlas-function-call-function-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/atlas/call-atlas-function-call-function-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/atlas/call-atlas-function-call-function-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/atlas/call-atlas-function-call-function-js-ts-description.rst + +.. include:: /includes/sdk-examples/atlas/call-atlas-function-call-function.rst diff --git a/source/sdk/serialization.txt b/source/sdk/serialization.txt index fbbc0e03e5..0fe8d69edf 100644 --- a/source/sdk/serialization.txt +++ b/source/sdk/serialization.txt @@ -11,3 +11,8 @@ Serialization :class: singlecol Placeholder page for information about serialization in the SDKs. + +.. _sdks-ejson-encoding-for-atlas: + +EJSON Encoding +-------------- From fc3abb9a44700bcec51fe8fbf48ff332ce36ed8e Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 30 Jul 2024 15:21:37 -0400 Subject: [PATCH 51/63] (DOCSP-41466): Create: Use third-party libraries for some C# operations (#3343) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-41466 *Staged Page* - [Create](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-41466/sdk/crud/create/): New C# API descriptions for "Create an unmanaged copy of an object" and "Copy an object to another database" advising developers to use third-party libraries for this functionality. --- .../create-copy-object-to-another-database-not-supported.rst | 4 ++++ .../crud/create-unmanaged-copy-of-object-not-supported.rst | 3 +++ source/sdk/crud/create.txt | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 source/includes/api-details/csharp/crud/create-copy-object-to-another-database-not-supported.rst create mode 100644 source/includes/api-details/csharp/crud/create-unmanaged-copy-of-object-not-supported.rst diff --git a/source/includes/api-details/csharp/crud/create-copy-object-to-another-database-not-supported.rst b/source/includes/api-details/csharp/crud/create-copy-object-to-another-database-not-supported.rst new file mode 100644 index 0000000000..31fa4e8830 --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-copy-object-to-another-database-not-supported.rst @@ -0,0 +1,4 @@ +The SDK does not provide a C# API to directly copy an object to another +database instance. Instead, you can use a third-party library such as +`AutoMapper `__ to create unmanaged objects and +then copy them into another database instance. diff --git a/source/includes/api-details/csharp/crud/create-unmanaged-copy-of-object-not-supported.rst b/source/includes/api-details/csharp/crud/create-unmanaged-copy-of-object-not-supported.rst new file mode 100644 index 0000000000..981f8268b8 --- /dev/null +++ b/source/includes/api-details/csharp/crud/create-unmanaged-copy-of-object-not-supported.rst @@ -0,0 +1,3 @@ +The SDK does not provide a C# API to directly create an unmanaged copy of +an object. Instead, you can use a third-party library such as +`AutoMapper `__ to create unmanaged objects. diff --git a/source/sdk/crud/create.txt b/source/sdk/crud/create.txt index 444109eb7f..185f66ada1 100644 --- a/source/sdk/crud/create.txt +++ b/source/sdk/crud/create.txt @@ -466,7 +466,7 @@ currently implemented. .. tab:: :tabid: csharp - .. include:: /includes/api-details/generic/crud/create-unmanaged-copy-not-supported.rst + .. include:: /includes/api-details/csharp/crud/create-unmanaged-copy-of-object-not-supported.rst .. tab:: :tabid: dart @@ -528,7 +528,7 @@ database instance. .. tab:: :tabid: csharp - .. include:: /includes/api-details/generic/crud/create-copy-object-to-another-database-no-example.rst + .. include:: /includes/api-details/csharp/crud/create-copy-object-to-another-database-not-supported.rst .. tab:: :tabid: dart From 7f294fed624073ba068ae48d037d8b37b1aaaf24 Mon Sep 17 00:00:00 2001 From: Dachary Date: Wed, 31 Jul 2024 09:18:09 -0400 Subject: [PATCH 52/63] (DOCSP-39500): Consolidate Install page (#3326) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39500 **Notes for Reviewer** Only five of the pages listed here should be considered to be in a "complete" state as of this PR: - Install - Apple Privacy Manifest - Build for tvOS - Install Atlas Device SDK for Flutter - Upgrade to Flutter SDK v2.0.0 I moved content off of existing install pages onto a bunch of other pages, but those pages will get more updates in the future to make them coherent pages. For now, you only need to confirm that the content got moved successfully and everything is still working. Also, noting here that per conversations with the product and engineering teams, we are intentionally omitting the Java SDK (Java and Java-Kotlin) from the Install page. *Staged Page* - [Install](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/sdk/install/) - Build for Platforms - [Android](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/platforms/android/) - [Apple](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/platforms/apple/) - [Apple Privacy Manifest](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/platforms/apple/privacy-manifest/) - [Build for tvOS](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/platforms/apple/tvos/) - [IoT](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/platforms/iot/) - [Build for Unity](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/platforms/unity/) - Build for Frameworks - [Install Atlas Device SDK for Flutter](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/frameworks/flutter/install/) - [Upgrade to Flutter v 2.0.0](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39500/hidden-pages/upgrade-to-v2/): I intentionally orphaned this one in a new `hidden-pages` directory. I don't think this is necessarily important enough to surface in the ToC, and we don't have a good pattern for doing that in the new consolidated world. It's available in the "Upgrade" section, and we could link to it elsewhere if we come up with a better pattern later. *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Install](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/install/) - [.NET: Install](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/install/) - [Flutter: Install](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/install/) - [Flutter: Troubleshooting](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/troubleshooting/#std-label-flutter-macos-development) - [Upgrade to SDK v2.0.0](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/upgrade-to-v2/) - [Kotlin: Install](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/install/) - [Node.js: Install](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/install/) - [Swift: Install](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/install/) - [Swift: Build for tvOS](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/realm-files/tvos/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --- snooty.toml | 5 + source/frameworks/flutter.txt | 1 + source/frameworks/flutter/install.txt | 154 +++++++++ source/hidden-pages/upgrade-to-v2.txt | 206 +++++++++++ .../install-import-sdk-description.rst | 2 + .../install-install-sdk-procedure-cmake.rst | 83 +++++ ...ll-sdk-procedure-swift-package-manager.rst | 23 ++ .../cpp/install/install-intro-description.rst | 3 + ...rm-specific-considerations-description.rst | 1 + .../install-requirements-description.rst | 4 + .../android-build-android-app-description.rst | 32 ++ .../install-import-sdk-description.rst | 1 + ...ll-sdk-procedure-visual-studio-for-mac.rst | 23 ++ ...dk-procedure-visual-studio-for-windows.rst | 27 ++ .../install/install-intro-description.rst | 7 + ...rm-specific-considerations-description.rst | 18 + .../install-requirements-description.rst | 4 + .../install-import-sdk-description.rst | 1 + .../install/install-install-sdk-procedure.rst | 45 +++ .../install/install-intro-description.rst | 4 + ...rm-specific-considerations-description.rst | 16 + .../install-requirements-description.rst | 11 + ...nstall-supported-platforms-description.rst | 24 ++ ...all-update-package-version-description.rst | 44 +++ .../install-import-sdk-js-ts-description.rst | 2 + .../install-intro-js-ts-description.rst | 6 + ...install-requirements-js-ts-description.rst | 5 + .../install/install-sdk-procedure-js-ts.rst | 33 ++ ...-supported-platforms-js-ts-description.rst | 16 + .../install-import-sdk-description.rst | 13 + .../install-install-sdk-procedure-android.rst | 54 +++ ...all-sdk-procedure-kotlin-multiplatform.rst | 64 ++++ .../install/install-intro-description.rst | 5 + ...rm-specific-considerations-description.rst | 19 ++ .../install-requirements-description.rst | 34 ++ ...ported-target-environments-description.rst | 67 ++++ .../install-import-sdk-description.rst | 1 + ...rm-specific-considerations-description.rst | 20 ++ .../install-sdk-procedure-cocoapods.rst | 62 ++++ ...ll-sdk-procedure-swift-package-manager.rst | 48 +++ .../install-import-sdk-description.rst | 9 + .../install/install-intro-description.rst | 4 + ...rm-specific-considerations-description.rst | 41 +++ .../install-requirements-description.rst | 22 ++ .../install-resolve-build-issues-carthage.rst | 47 +++ ...install-resolve-build-issues-cocoapods.rst | 44 +++ .../install-sdk-procedure-carthage.rst | 47 +++ .../install-sdk-procedure-cocoapods.rst | 58 ++++ ...nstall-sdk-procedure-dynamic-framework.rst | 22 ++ ...ll-sdk-procedure-swift-package-manager.rst | 48 +++ ...all-supported-os-and-xcode-description.rst | 42 +++ .../includes/flutter-v2-breaking-change.rst | 13 +- .../install/install-import-sdk.rst | 55 +++ source/platforms.txt | 2 +- source/platforms/android.txt | 69 ++++ source/platforms/apple.txt | 40 +++ source/platforms/apple/privacy-manifest.txt | 71 ++++ source/platforms/apple/swift-concurrency.txt | 3 +- source/platforms/apple/tvos.txt | 70 ++++ source/platforms/iot.txt | 56 +++ source/platforms/unity.txt | 8 +- source/sdk/install.txt | 320 +++++++++++++++++- 62 files changed, 2266 insertions(+), 13 deletions(-) create mode 100644 source/frameworks/flutter/install.txt create mode 100644 source/hidden-pages/upgrade-to-v2.txt create mode 100644 source/includes/api-details/cpp/install/install-import-sdk-description.rst create mode 100644 source/includes/api-details/cpp/install/install-install-sdk-procedure-cmake.rst create mode 100644 source/includes/api-details/cpp/install/install-install-sdk-procedure-swift-package-manager.rst create mode 100644 source/includes/api-details/cpp/install/install-intro-description.rst create mode 100644 source/includes/api-details/cpp/install/install-platform-specific-considerations-description.rst create mode 100644 source/includes/api-details/cpp/install/install-requirements-description.rst create mode 100644 source/includes/api-details/cpp/platforms/android-build-android-app-description.rst create mode 100644 source/includes/api-details/csharp/install/install-import-sdk-description.rst create mode 100644 source/includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-mac.rst create mode 100644 source/includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-windows.rst create mode 100644 source/includes/api-details/csharp/install/install-intro-description.rst create mode 100644 source/includes/api-details/csharp/install/install-platform-specific-considerations-description.rst create mode 100644 source/includes/api-details/csharp/install/install-requirements-description.rst create mode 100644 source/includes/api-details/dart/install/install-import-sdk-description.rst create mode 100644 source/includes/api-details/dart/install/install-install-sdk-procedure.rst create mode 100644 source/includes/api-details/dart/install/install-intro-description.rst create mode 100644 source/includes/api-details/dart/install/install-platform-specific-considerations-description.rst create mode 100644 source/includes/api-details/dart/install/install-requirements-description.rst create mode 100644 source/includes/api-details/dart/install/install-supported-platforms-description.rst create mode 100644 source/includes/api-details/dart/install/install-update-package-version-description.rst create mode 100644 source/includes/api-details/javascript/install/install-import-sdk-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/install/install-intro-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/install/install-requirements-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/install/install-sdk-procedure-js-ts.rst create mode 100644 source/includes/api-details/javascript/install/install-supported-platforms-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/install/install-import-sdk-description.rst create mode 100644 source/includes/api-details/kotlin/install/install-install-sdk-procedure-android.rst create mode 100644 source/includes/api-details/kotlin/install/install-install-sdk-procedure-kotlin-multiplatform.rst create mode 100644 source/includes/api-details/kotlin/install/install-intro-description.rst create mode 100644 source/includes/api-details/kotlin/install/install-platform-specific-considerations-description.rst create mode 100644 source/includes/api-details/kotlin/install/install-requirements-description.rst create mode 100644 source/includes/api-details/kotlin/install/install-supported-target-environments-description.rst create mode 100644 source/includes/api-details/objectivec/install/install-import-sdk-description.rst create mode 100644 source/includes/api-details/objectivec/install/install-platform-specific-considerations-description.rst create mode 100644 source/includes/api-details/objectivec/install/install-sdk-procedure-cocoapods.rst create mode 100644 source/includes/api-details/objectivec/install/install-sdk-procedure-swift-package-manager.rst create mode 100644 source/includes/api-details/swift/install/install-import-sdk-description.rst create mode 100644 source/includes/api-details/swift/install/install-intro-description.rst create mode 100644 source/includes/api-details/swift/install/install-platform-specific-considerations-description.rst create mode 100644 source/includes/api-details/swift/install/install-requirements-description.rst create mode 100644 source/includes/api-details/swift/install/install-resolve-build-issues-carthage.rst create mode 100644 source/includes/api-details/swift/install/install-resolve-build-issues-cocoapods.rst create mode 100644 source/includes/api-details/swift/install/install-sdk-procedure-carthage.rst create mode 100644 source/includes/api-details/swift/install/install-sdk-procedure-cocoapods.rst create mode 100644 source/includes/api-details/swift/install/install-sdk-procedure-dynamic-framework.rst create mode 100644 source/includes/api-details/swift/install/install-sdk-procedure-swift-package-manager.rst create mode 100644 source/includes/api-details/swift/install/install-supported-os-and-xcode-description.rst create mode 100644 source/includes/sdk-examples/install/install-import-sdk.rst create mode 100644 source/platforms/apple/privacy-manifest.txt create mode 100644 source/platforms/apple/tvos.txt diff --git a/snooty.toml b/snooty.toml index e44369c119..f03ff33085 100644 --- a/snooty.toml +++ b/snooty.toml @@ -11,6 +11,9 @@ intersphinx = [ toc_landing_pages = [ # New IA "/sdk/crud/create", + "/sdk/platforms/android", + "/sdk/platforms/apple", + "/sdk/platforms/unity", # Tutorial "/tutorial", @@ -86,6 +89,8 @@ atlas = "Atlas" admin-api-page = "/admin/api/v3/#" base-url = "https://www.mongodb.com/docs/realm" cpp-prefix = "https://www.mongodb.com/docs/realm-sdks/cpp/latest" +dart-minimum-version="3.3.0" +flutter-minimum-version="3.19.0" kotlin-sdk-version = "1.16.0" kotlinx-coroutines-version = "1.7.0" kotlin-sync-prefix = "https://www.mongodb.com/docs/realm-sdks/kotlin/latest/library-sync/" diff --git a/source/frameworks/flutter.txt b/source/frameworks/flutter.txt index fe10d1acbc..a2cd360fcf 100644 --- a/source/frameworks/flutter.txt +++ b/source/frameworks/flutter.txt @@ -7,4 +7,5 @@ Build with Flutter .. toctree:: :titlesonly: + Install Quick Start diff --git a/source/frameworks/flutter/install.txt b/source/frameworks/flutter/install.txt new file mode 100644 index 0000000000..e01371658d --- /dev/null +++ b/source/frameworks/flutter/install.txt @@ -0,0 +1,154 @@ +.. _sdks-install-sdk-in-flutter-project: + +==================================== +Install Atlas Device SDK for Flutter +==================================== + +.. meta:: + :description: Install the Atlas Device SDK in a Flutter application. + :keywords: Realm, Flutter SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: dart + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Use Atlas Device SDK in a Flutter project to build cross-platform +applications with Flutter and Dart. This guide provides instructions for +installing the SDK in a Flutter project. For details about installing the SDK +in a standalone Dart project, refer to +:ref:`sdks-install`. + +Requirements +------------ + +Install Flutter with Dart in your development environment. The Flutter +installation includes Dart. To learn how, refer to the official +`Flutter Installation Guide `__. + +When building a project with Flutter, the SDK requires the following minimum +versions: + +- Flutter version {+flutter-minimum-version+} or later. +- Dart version {+dart-minimum-version+} or later. + +Supported Platforms +~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/api-details/dart/install/install-supported-platforms-description.rst + +Install the SDK +--------------- + +.. procedure:: + + .. step:: Create a Project + + To create a Flutter project, run the following commands: + + .. code-block:: bash + + flutter create + cd + + For more information, refer to Flutter's `Get Started Guide + `__. + + .. step:: Add the SDK to the Project + + To add the Flutter SDK to your project, run the following command: + + .. code-block:: bash + + flutter pub add realm + + This downloads the `realm `__ + package, and adds it to your project. + + In your ``pubspec.yaml`` file, you should see: + + .. code-block:: yaml + :caption: pubspec.yaml + + dependencies: + realm: + + .. note:: Using Networking in your macOS App + + If you are developing with Flutter in the macOS App Sandbox and + require network access, you must enable network entitlements in your + app. By default, network requests are not allowed due to built-in + macOS security settings. + + To learn how to change your app's macOS entitlements, refer to + :ref:`Device Sync and App Sandbox Entitlements + `. + +Update the Package Version +-------------------------- + +To change the version of the SDK in your project, perform the following steps: + +.. procedure:: + + .. step:: Update the ``pubspec.yaml`` File + + Update the package version in your :file:`pubspec.yaml` file dependencies. + + .. code-block:: yaml + :caption: pubspec.yaml + + dependencies: + realm: + + .. step:: Install the Updated Package + + From the command line, run the following command to install the updated + version: + + .. code-block:: + + dart pub upgrade realm + + Then, run the following command to install the updated SDK's native + binaries: + + .. code-block:: + + dart run realm install + + .. step:: Regenerate Object Models + + Changes to the package version may affect the functionality of the object + models. From the command line, run the following command to regenerate + object models with new and updated functionality: + + .. code-block:: bash + + dart run realm generate + + .. include:: /includes/flutter-v2-breaking-change.rst + +Import the SDK +-------------- + +To use the SDK in your app, import the package into any files that use it: + +.. code-block:: dart + :caption: ExampleFile.dart + + import 'package:realm/realm.dart'; + +Platform-Specific Considerations +-------------------------------- + +.. include:: /includes/api-details/dart/install/install-platform-specific-considerations-description.rst diff --git a/source/hidden-pages/upgrade-to-v2.txt b/source/hidden-pages/upgrade-to-v2.txt new file mode 100644 index 0000000000..f7a339147b --- /dev/null +++ b/source/hidden-pages/upgrade-to-v2.txt @@ -0,0 +1,206 @@ +:orphan: + +.. _flutter-upgrade-v2: + +============================= +Upgrade to Flutter SDK v2.0.0 +============================= + +.. meta:: + :description: Upgrade your existing Flutter or Dart app to Flutter SDK version 2.0.0 or later. + :keywords: code example, migration, migrate + +.. facet:: + :name: genre + :values: tutorial + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Atlas Device SDK for Flutter version 2.0.0 introduces several breaking changes +that impact existing apps upgrading from an earlier version. + +Notably, this version of the SDK: + +- Changes the part builder and how the SDK generates files for + your data model classes. This change impacts all apps upgrading from an + earlier version of the SDK. Refer to the :ref:`flutter-v2-builder-breaking-changes` + section on this page for information and instructions. + +- Removes or replaces several classes and members. These changes may or may not impact your + app. Refer to the :ref:`flutter-v2-removed-classes` section + on this page for information and instructions for impacted apps. + +.. _flutter-v2-builder-breaking-changes: + +Builder Changes +--------------- + +.. important:: + + This change impacts all apps upgrading from an earlier version of the SDK. + +Flutter SDK version 2.0.0 updates the SDK's ``realm_generator`` to use a +``PartBuilder`` instead of a ``SharedPartBuilder``. +This updated builder generates ``RealmModel`` data model files with a new +``.realm.dart`` file extension: + +.. list-table:: + :header-rows: 1 + :widths: 25 25 50 + + * - Version + - File Extension + - Example Part Directive + + * - SDK v2.0.0 and later + - ``.realm.dart`` + - .. literalinclude:: /examples/generated/flutter/migrate_parts.snippet.part-directive-new.dart + :language: dart + + * - SDK v1.9.0 and earlier + - ``.g.dart`` + - .. literalinclude:: /examples/generated/flutter/migrate_parts.snippet.part-directive-old.dart + :language: dart + +.. tip:: + + The update from ``SharedPartBuilder`` to ``PartBuilder`` makes it easier + to use multiple builders in your app. For example, combining ``realm_dart`` + with a serialization package builder such as ``dart_mappable`` or + ``json_serializable``. + +.. _flutter-v2-what-do-i-need-to-do: + +What Do I Need to Do? +~~~~~~~~~~~~~~~~~~~~~ + +When you upgrade an existing app from an earlier version of the Flutter SDK to +version 2.0.0 or later, you *must* update any existing part declarations, then +regenerate the object models with the new ``.realm.dart`` file extension: + +.. procedure:: + + .. step:: Update Your Existing Part Declarations + + Update all of the ``RealmObject`` part declarations in your app to + use the new naming convention: + + .. literalinclude:: /examples/generated/flutter/migrate_parts.snippet.migrate-model-dart-new.dart + :language: dart + :emphasize-lines: 3-5 + + .. step:: Regenerate Your Object Models + + .. tabs:: + + .. tab:: Flutter + :tabid: flutter + + After you update all of your declarations, regenerate your + object models with the new ``.realm.dart`` file extension. + You can safely delete any ``.g.dart`` files from your project. + + .. code-block:: + + dart run realm generate + + .. tab:: Dart Standalone + :tabid: dart + + After you update all of your declarations, regenerate your + object models with the new ``.realm.dart`` file extension. + You can safely delete any ``.g.dart`` files from your project. + + .. code-block:: + + dart run realm_dart generate + +.. _flutter-v2-removed-classes: + +Removed Classes and Members +--------------------------- + +Flutter SDK version 2.0.0 also removed or replaced several classes, members, and properties +from the SDK. These changes may or may not impact your app. + +The following table outlines what was removed and why, as well as a recommended solution +when upgrading an app that used the removed class or member, if any: + +.. list-table:: + :header-rows: 1 + :widths: 33 33 33 + + * - Removed Class or Member + - Reason + - Solution + + * - ``AppConfiguration.localAppName`` and ``AppConfiguration.localAppVersion`` + - Unused in SDK. + - Remove any instances. + + * - ``ClientResetError.isFatal`` + - Not needed. Always ``true``. + - Remove any instances. + + * - ``ClientResetError.sessionErrorCode`` + - Consolidated into ``SyncErrorCode`` in SDK v1.6.0. + - Use ``SyncErrorCode`` enum. See also the + :flutter-sdk:`SyncError ` API reference. + + * - ``Realm.logger.level`` + - Replaced by ``Realm.logger.setLogLevel``. + - Replace any instances. See also :ref:`sdks-logging`. + + * - ``RealmProperty.indexed`` + - Replaced by ``RealmProperty.indexType``. + - Replace any instances. + + * - ``RealmValue.type`` + - Changed to an enum of ``RealmValueType``. + - Replace any instances. See also :ref:`RealmValue Data Type `. + + * - ``RealmValue.uint8List`` + - Renamed to ``RealmValue.binary``. + - Replace any instances. See also :ref:`RealmValue Data Type `. + + * - ``SchemaObject.properties`` + - ``SchemaObject`` changed to an iterable collection of ``SchemaProperty``. + - Replace any instances. See also the + :flutter-sdk:`SchemaObject ` API reference. + + * - ``SyncError`` constructor and ``SyncError.create`` factory + - Sync errors should only be created internally by the SDK. + - Remove any instances. + + * - ``SyncClientError``, ``SyncConnectionError``, ``SyncSessionError``, + ``SyncResolveError``, ``SyncWebSocketError``, and ``GeneralSyncError`` + - Consolidated into ``SyncError`` in SDK v1.6.0. + - Use ``SyncError`` or its subclasses. See also the + :flutter-sdk:`SyncError ` API reference. + + * - ``SyncErrorCategory``, ``SyncClientErrorCode``, ``SyncConnectionErrorCode``, + ``SyncSessionErrorCode``, ``SyncResolveErrorCode``,``SyncWebsocketErrorCode``, + and ``GeneralSyncErrorCode`` + - Consolidated into ``SyncErrorCode`` in SDK v1.6.0. + - Use ``SyncErrorCode`` enum. See also the + :flutter-sdk:`SyncError ` API reference. + + * - ``SyncError.codeValue``, ``SyncError.category``, and ``SyncError.detailedMessage`` + - Consolidated into ``SyncError`` in SDK v1.6.0. Messages were unused. + - Remove any category or message instances. Replace ``SyncError.codeValue`` + with ``SyncError.code.code``. See also the + :flutter-sdk:`SyncError ` API reference. + + * - ``SyncProgress.transferredBytes`` and ``SyncProgress.transferableBytes`` + - Reported transferred and transferable values were incorrect. Consolidated + into a new ``SyncProgress.progressEstimate`` metric. + - Use ``SyncProgress.progressEstimate``. See also :ref:`sdks-check-upload-and-download-progress`. + + * - ``User.provider`` + - Provider is associated with each identity, so value was incorrect + for users with more than one identity. + - Remove any instances. diff --git a/source/includes/api-details/cpp/install/install-import-sdk-description.rst b/source/includes/api-details/cpp/install/install-import-sdk-description.rst new file mode 100644 index 0000000000..7040e39c8d --- /dev/null +++ b/source/includes/api-details/cpp/install/install-import-sdk-description.rst @@ -0,0 +1,2 @@ +Make the SDK available in your code by including the +``cpprealm/sdk.hpp`` header in the translation unit where you want to use it. diff --git a/source/includes/api-details/cpp/install/install-install-sdk-procedure-cmake.rst b/source/includes/api-details/cpp/install/install-install-sdk-procedure-cmake.rst new file mode 100644 index 0000000000..440a27d7ae --- /dev/null +++ b/source/includes/api-details/cpp/install/install-install-sdk-procedure-cmake.rst @@ -0,0 +1,83 @@ +You can use CMake with the FetchContent module to manage the SDK and its +dependencies in your C++ project. + +.. procedure:: + + .. step:: Create or Modify CMakeLists.txt + + Create or modify your ``CMakeLists.txt`` in the root directory of your + project: + + 1. Add ``Include(FetchContent)`` to include the FetchContent module + in your project build. + #. Use ``FetchContent_Declare`` to locate the SDK dependency + and specify the version tag you want to use. + #. Use the ``FetchContent_MakeAvailable()`` command to check whether + the named dependencies have been populated, and if not, populate them. + #. Finally, ``target_link_libraries()`` links the SDK dependency to + your target executable. + + To get the most recent version tag, refer to the releases on GitHub: + `realm/realm-cpp `__. + + Set the minimum C++ standard to 17 with ``set(CMAKE_CXX_STANDARD 17)``. + + In a Windows install, add the required compiler flag: + + .. code-block:: + + if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor /bigobj") + endif() + + .. example:: + + .. code-block:: cmake + :emphasize-lines: 14, 17-21, 24, 29 + + cmake_minimum_required(VERSION 3.15) + + project(MyDeviceSDKCppProject) + + # Minimum C++ standard + set(CMAKE_CXX_STANDARD 17) + + # In a Windows install, set these compiler flags: + if(MSVC) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Zc:preprocessor /bigobj") + endif() + + # Include the FetchContent module so you can download the C++ SDK + Include(FetchContent) + + # Declare the version of the C++ SDK you want to download + FetchContent_Declare( + cpprealm + GIT_REPOSITORY https://github.com/realm/realm-cpp.git + GIT_TAG v1.0.0 + ) + + # The MakeAvailable command ensures the named dependencies have been populated + FetchContent_MakeAvailable(cpprealm) + + # Create an executable target called myApp with the source file main.cpp + add_executable(myApp main.cpp) + + target_link_libraries(myApp PRIVATE cpprealm) + + .. step:: Run CMake + + Run CMake in a gitignored directory, such as ``build``, to generate the build + configurations that you can then use to compile your app: + + .. code-block:: + + # build/ is in .gitignore + mkdir build + cd build + cmake .. # Create Makefile by reading the CMakeLists.txt in the parent directory (../) + make # Actually build the app + + You can use CMake to generate more than simple Makefiles by using the ``-G`` + flag. See the `CMake documentation `_ for more + information. diff --git a/source/includes/api-details/cpp/install/install-install-sdk-procedure-swift-package-manager.rst b/source/includes/api-details/cpp/install/install-install-sdk-procedure-swift-package-manager.rst new file mode 100644 index 0000000000..77c730b95a --- /dev/null +++ b/source/includes/api-details/cpp/install/install-install-sdk-procedure-swift-package-manager.rst @@ -0,0 +1,23 @@ +When developing with Xcode, you can use Swift Package Manager (SPM) to +install the SDK's ``realm-cpp`` library. + +.. procedure:: + + .. step:: Add Package Dependency + + In Xcode, select ``File`` > ``Add Packages...``. + + .. step:: Specify the Repository + + Copy and paste the following into the search/input box. + + .. code-block:: + + https://github.com/realm/realm-cpp + + .. step:: Select the Package Products + + Under :guilabel:`Package Product`, select ``realm-cpp-sdk``. Under + :guilabel:`Add to Target`, select the target you would like to add + the SDK to. For example, the target might be the main executable of + your app. Click :guilabel:`Add Package`. diff --git a/source/includes/api-details/cpp/install/install-intro-description.rst b/source/includes/api-details/cpp/install/install-intro-description.rst new file mode 100644 index 0000000000..bf152df736 --- /dev/null +++ b/source/includes/api-details/cpp/install/install-intro-description.rst @@ -0,0 +1,3 @@ +Atlas Device SDK for C++ enables client applications written in C++ to access +data stored on devices and sync data with Atlas. This page details how to +install the C++ SDK in your project and get started. diff --git a/source/includes/api-details/cpp/install/install-platform-specific-considerations-description.rst b/source/includes/api-details/cpp/install/install-platform-specific-considerations-description.rst new file mode 100644 index 0000000000..f3932163ea --- /dev/null +++ b/source/includes/api-details/cpp/install/install-platform-specific-considerations-description.rst @@ -0,0 +1 @@ +- :ref:`sdks-build-for-android` diff --git a/source/includes/api-details/cpp/install/install-requirements-description.rst b/source/includes/api-details/cpp/install/install-requirements-description.rst new file mode 100644 index 0000000000..cd81052232 --- /dev/null +++ b/source/includes/api-details/cpp/install/install-requirements-description.rst @@ -0,0 +1,4 @@ +- Minimum C++ standard: C++17. +- For development on macOS: Xcode 11.x or later. +- For development on Windows: Microsoft Visual C++ (MSVC). +- Otherwise, we recommend git and `CMake `__. diff --git a/source/includes/api-details/cpp/platforms/android-build-android-app-description.rst b/source/includes/api-details/cpp/platforms/android-build-android-app-description.rst new file mode 100644 index 0000000000..284ccfff38 --- /dev/null +++ b/source/includes/api-details/cpp/platforms/android-build-android-app-description.rst @@ -0,0 +1,32 @@ +The SDK supports building Android apps with C++. To build an Android app: + +- :ref:`sdks-install` +- Add ```` to + your ``AndroidManifest.xml`` +- Add the SDK's subdirectory to your native library's ``CMakeLists.txt`` + and link it as a target library: + + .. code-block:: text + + set(CMAKE_CXX_STANDARD 17) + add_subdirectory("realm-cpp") + ... + target_link_libraries( + # Specifies the target library. + myapplication + # make sure to link the C++ SDK. + cpprealm + ) + +- Ensure that the git submodules are initialized inside of the ``realm-cpp`` + folder before building. +- When instantiating the database or the SDK App, you must pass the + ``filesDir.path`` as the ``path`` parameter in the respective constructor or + database open template. + +For an example of how to use the SDK in an Android app, refer to +the :github:`Android RealmExample App ` +in the ``realm-cpp`` GitHub repository. + +Specifically, refer to the ``MainActivity.kt`` & ``native-lib.cpp`` files +in the Android example app for code examples. diff --git a/source/includes/api-details/csharp/install/install-import-sdk-description.rst b/source/includes/api-details/csharp/install/install-import-sdk-description.rst new file mode 100644 index 0000000000..3bff9b4832 --- /dev/null +++ b/source/includes/api-details/csharp/install/install-import-sdk-description.rst @@ -0,0 +1 @@ +Add the following line to the top of your source files to use the SDK: diff --git a/source/includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-mac.rst b/source/includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-mac.rst new file mode 100644 index 0000000000..2a363f28aa --- /dev/null +++ b/source/includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-mac.rst @@ -0,0 +1,23 @@ +.. procedure:: + + .. step:: Open the NuGet Package Manager + + In the Solution Explorer, right-click your solution and select + :guilabel:`Manage NuGet Packages...` to open the NuGet + Package management window. + + .. figure:: /images/vs-mac-nuget.png + :alt: Open the NuGet Package management window. + :lightbox: + + .. note:: + + Adding the package at the Solution level allows you to add + it to every project in one step. + + .. step:: Add the Realm Package + + In the search bar, search for **Realm**. Select the + result and click :guilabel:`Add Package`. If you are using Xamarin, + you may be prompted to select which projects use the Realm + package. Select all of the projects, and then click :guilabel:`Ok`. diff --git a/source/includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-windows.rst b/source/includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-windows.rst new file mode 100644 index 0000000000..c7abe55167 --- /dev/null +++ b/source/includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-windows.rst @@ -0,0 +1,27 @@ +.. procedure:: + + .. step:: Open the NuGet Package Manager + + In the Solution Explorer, right-click your solution and + select :guilabel:`Manage NuGet Packages for Solution...` + to open the NuGet Package management window. + + .. figure:: /images/vs-win-nuget.png + :alt: Open the NuGet Package management window. + :lightbox: + + .. step:: Add the Realm Package + + + In the search bar, search for **Realm**. Select the + result and click :guilabel:`Install`. When prompted, + select all projects and click :guilabel:`Ok`. + + .. figure:: /images/vs-win-nuget-search.png + :alt: Search for Realm and add it to your project(s). + :lightbox: + +.. step:: Add the Realm Weaver to FodyWeavers.xml + + .. include:: /includes/add-realm-fody-weaver.rst + \ No newline at end of file diff --git a/source/includes/api-details/csharp/install/install-intro-description.rst b/source/includes/api-details/csharp/install/install-intro-description.rst new file mode 100644 index 0000000000..fb1e5943bc --- /dev/null +++ b/source/includes/api-details/csharp/install/install-intro-description.rst @@ -0,0 +1,7 @@ +You can use the Atlas Device SDK for .NET to develop apps in C# .NET with +several frameworks, including +`.NET MAUI `__, +`Xamarin `__, +`Avalonia UI `__, +`UWP `__, +`Unity `__, and others. diff --git a/source/includes/api-details/csharp/install/install-platform-specific-considerations-description.rst b/source/includes/api-details/csharp/install/install-platform-specific-considerations-description.rst new file mode 100644 index 0000000000..90ecae307a --- /dev/null +++ b/source/includes/api-details/csharp/install/install-platform-specific-considerations-description.rst @@ -0,0 +1,18 @@ +- :ref:`sdks-unity` + +Apple Privacy Manifest +~~~~~~~~~~~~~~~~~~~~~~ + +When building for Apple platforms, Apple requires any apps or third-party SDKs +that use *required reasons APIs* to provide a privacy manifest. The manifest +contains details about the app's or SDK's data collection and use practices, +and it must be included when submitting new apps or app updates to the Apple +App Store. + +Some of the SDK language and framework libraries provide a privacy manifest to +streamline this process. The .NET library does not provide a privacy manifest. +If your application is a cross-platform app that you intend to submit to the +Apple App Store, you may be required to provide your own version of this +privacy manifest. + +For details, refer to :ref:`sdks-apple-privacy-manifest`. diff --git a/source/includes/api-details/csharp/install/install-requirements-description.rst b/source/includes/api-details/csharp/install/install-requirements-description.rst new file mode 100644 index 0000000000..16ab598807 --- /dev/null +++ b/source/includes/api-details/csharp/install/install-requirements-description.rst @@ -0,0 +1,4 @@ +Before getting started, ensure you have installed Visual Studio: + +- `Visual Studio `__ 2015 Update 2 or later. +- `Visual Studio for Mac `__ 7.0 or later. diff --git a/source/includes/api-details/dart/install/install-import-sdk-description.rst b/source/includes/api-details/dart/install/install-import-sdk-description.rst new file mode 100644 index 0000000000..3bff9b4832 --- /dev/null +++ b/source/includes/api-details/dart/install/install-import-sdk-description.rst @@ -0,0 +1 @@ +Add the following line to the top of your source files to use the SDK: diff --git a/source/includes/api-details/dart/install/install-install-sdk-procedure.rst b/source/includes/api-details/dart/install/install-install-sdk-procedure.rst new file mode 100644 index 0000000000..ad8029ec28 --- /dev/null +++ b/source/includes/api-details/dart/install/install-install-sdk-procedure.rst @@ -0,0 +1,45 @@ +.. procedure:: + + .. step:: Create a Project + + To create a Dart project, run the following commands: + + .. code-block:: + + dart create + cd + + For more information, refer to Dart's `Get Started Guide + `__ for standalone + Dart command-line and server applications. + + .. step:: Add the SDK to the Project + + To add the SDK to your project, run the following command: + + .. code-block:: + + dart pub add realm_dart + + This downloads the `realm_dart + `__ package, and adds it to + your project. + + In your ``pubspec.yaml`` file, you should see: + + .. code-block:: + :caption: pubspec.yaml + + dependencies: + realm_dart: + + After the package is added, run the following command to install it: + + .. code-block:: + + dart run realm_dart install + + This downloads and copies the required native binaries to the app + directory. + +.. include:: /includes/api-details/dart/install/install-update-package-version-description.rst diff --git a/source/includes/api-details/dart/install/install-intro-description.rst b/source/includes/api-details/dart/install/install-intro-description.rst new file mode 100644 index 0000000000..874a9997d1 --- /dev/null +++ b/source/includes/api-details/dart/install/install-intro-description.rst @@ -0,0 +1,4 @@ +Use Atlas Device SDK to build a Flutter project or a standalone Dart project. +This guide provides instructions for installing the SDK in a standalone Dart +project. For details about installing the SDK in a Flutter project, refer to +:ref:`sdks-install-sdk-in-flutter-project`. diff --git a/source/includes/api-details/dart/install/install-platform-specific-considerations-description.rst b/source/includes/api-details/dart/install/install-platform-specific-considerations-description.rst new file mode 100644 index 0000000000..54785221d1 --- /dev/null +++ b/source/includes/api-details/dart/install/install-platform-specific-considerations-description.rst @@ -0,0 +1,16 @@ +- :ref:`macOS: Device Sync and App Sandbox Entitlements ` + +Apple Privacy Manifest +~~~~~~~~~~~~~~~~~~~~~~ + +When building for Apple platforms, Apple requires any apps or third-party SDKs +that use *required reasons APIs* to provide a privacy manifest. The manifest +contains details about the app's or SDK's data collection and use practices, +and it must be included when submitting new apps or app updates to the Apple +App Store. + +Some of the SDK language and framework libraries provide a privacy manifest to +streamline this process. Starting in version 2.2.0, the Dart and Flutter +libraries provide a privacy manifest. + +For details, refer to :ref:`sdks-apple-privacy-manifest`. diff --git a/source/includes/api-details/dart/install/install-requirements-description.rst b/source/includes/api-details/dart/install/install-requirements-description.rst new file mode 100644 index 0000000000..bee3848a35 --- /dev/null +++ b/source/includes/api-details/dart/install/install-requirements-description.rst @@ -0,0 +1,11 @@ +For standalone Dart apps, you can install Dart in your development +environment without Flutter. To learn how, refer to the official +`Dart Installation Guide `__. + +The latest version of Atlas Device SDK requires Dart version +{+dart-minimum-version+} or later. + +Supported Platforms +~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/api-details/dart/install/install-supported-platforms-description.rst diff --git a/source/includes/api-details/dart/install/install-supported-platforms-description.rst b/source/includes/api-details/dart/install/install-supported-platforms-description.rst new file mode 100644 index 0000000000..92ce207c3e --- /dev/null +++ b/source/includes/api-details/dart/install/install-supported-platforms-description.rst @@ -0,0 +1,24 @@ +When using the SDK in a Flutter or standalone Dart project, you can build for +the following platforms: + +- iOS +- Android +- macOS +- Windows running on 64-bit architecture +- Linux running on 64-bit architecture + +.. important:: Unsupported Platforms + + The SDK does *not* currently support the following platforms through the + Dart or Flutter libraries: + + - Web + - Windows running on ARM64 or 32-bit architectures + - Linux running on ARM64 or 32-bit architectures + + Visit the respective "Build for Platforms" page for more details about + library and language support: + + - :ref:`sdks-build-for-web` + - :ref:`sdks-build-for-windows` + - :ref:`sdks-build-for-linux` diff --git a/source/includes/api-details/dart/install/install-update-package-version-description.rst b/source/includes/api-details/dart/install/install-update-package-version-description.rst new file mode 100644 index 0000000000..c5a14b1c95 --- /dev/null +++ b/source/includes/api-details/dart/install/install-update-package-version-description.rst @@ -0,0 +1,44 @@ +Update the Package Version +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To change the version of the SDK in your project, perform the following steps: + +.. procedure:: + + .. step:: Update the ``pubspec.yaml`` File + + Update the package version in your :file:`pubspec.yaml` file dependencies. + + .. code-block:: + :caption: pubspec.yaml + + dependencies: + realm_dart: + + .. step:: Install the Updated Package + + From the command line, run the following command to install the updated + version: + + .. code-block:: + + dart pub upgrade realm_dart + + Then, run the following command to install the updated SDK's native + binaries: + + .. code-block:: + + dart run realm_dart install + + .. step:: Regenerate Object Models + + Changes to the package version may affect the functionality of the object + models. From the command line, run the following command to regenerate + object models with new and updated functionality: + + .. code-block:: + + dart run realm_dart generate + + .. include:: /includes/flutter-v2-breaking-change.rst diff --git a/source/includes/api-details/javascript/install/install-import-sdk-js-ts-description.rst b/source/includes/api-details/javascript/install/install-import-sdk-js-ts-description.rst new file mode 100644 index 0000000000..6638e9d0b3 --- /dev/null +++ b/source/includes/api-details/javascript/install/install-import-sdk-js-ts-description.rst @@ -0,0 +1,2 @@ +Add the following line to the top of your source files (JavaScript or +TypeScript) where you want to use the SDK: diff --git a/source/includes/api-details/javascript/install/install-intro-js-ts-description.rst b/source/includes/api-details/javascript/install/install-intro-js-ts-description.rst new file mode 100644 index 0000000000..77c1eed79e --- /dev/null +++ b/source/includes/api-details/javascript/install/install-intro-js-ts-description.rst @@ -0,0 +1,6 @@ +The Atlas Device SDK for JavaScript enables development of applications using +the JavaScript and TypeScript languages. The JavaScript library is best suited +for writing server-side applications. Your application could be one +component in a wider stack that also includes iOS and Android apps. + +The JavaScript library is not suitable for front-end application development. diff --git a/source/includes/api-details/javascript/install/install-requirements-js-ts-description.rst b/source/includes/api-details/javascript/install/install-requirements-js-ts-description.rst new file mode 100644 index 0000000000..d9fd9166da --- /dev/null +++ b/source/includes/api-details/javascript/install/install-requirements-js-ts-description.rst @@ -0,0 +1,5 @@ +Before getting started, ensure your environment meets the +following requirements: + +- `Node.js `__ version 12.x or later (including Node.js version 14) +- Linux, macOS 10.8 (or later), or Windows 8 (or later) diff --git a/source/includes/api-details/javascript/install/install-sdk-procedure-js-ts.rst b/source/includes/api-details/javascript/install/install-sdk-procedure-js-ts.rst new file mode 100644 index 0000000000..a624e081f2 --- /dev/null +++ b/source/includes/api-details/javascript/install/install-sdk-procedure-js-ts.rst @@ -0,0 +1,33 @@ +.. procedure:: + + .. step:: Create a Node.js Project + + Create your Node.js project by creating a new directory + for your project and running ``npm init`` in that + directory. In the example below, replace ``MyApp`` + with your desired project name. Answer all of the prompts + to fill out the details of your project. + + .. code-block:: + + mkdir MyApp && cd MyApp && npm init + + .. step:: Install the SDK with NPM + + In your Node.js project directory, use the following command + to add the SDK to your project: + + .. code-block:: + + npm install realm + + .. step:: Enable TypeScript (optional) + + TypeScript is a superset of JavaScript that adds static + type checking and other features intended to make + application-scale development more robust. If you'd like + to use TypeScript, follow the TypeScript team's official + `Node Starter guide + `__. + The SDK supports TypeScript natively and integrates easily + into a TypeScript project. diff --git a/source/includes/api-details/javascript/install/install-supported-platforms-js-ts-description.rst b/source/includes/api-details/javascript/install/install-supported-platforms-js-ts-description.rst new file mode 100644 index 0000000000..8bd5d9cb2d --- /dev/null +++ b/source/includes/api-details/javascript/install/install-supported-platforms-js-ts-description.rst @@ -0,0 +1,16 @@ +Supported Platforms +~~~~~~~~~~~~~~~~~~~ + +The installation instructions on this page assume you're using the JavaScript +library in a server-side environment. For instructions installing the library +for Internet of Things (IoT) devices, refer to :ref:`sdks-build-for-iot`. + +Unsupported Platforms +~~~~~~~~~~~~~~~~~~~~~ + +- **Front-end Web Applications**: due to limitations of the browser environment, + it is not possible to build a browser-based web app with this library. For + front-end web applications, refer to :ref:`sdks-build-for-web`. + +- **Mobile App Development**: For cross-platform mobile app development, refer + to :ref:`sdks-build-with-react-native`. diff --git a/source/includes/api-details/kotlin/install/install-import-sdk-description.rst b/source/includes/api-details/kotlin/install/install-import-sdk-description.rst new file mode 100644 index 0000000000..97d5577053 --- /dev/null +++ b/source/includes/api-details/kotlin/install/install-import-sdk-description.rst @@ -0,0 +1,13 @@ +In the files where you use the SDK, add the appropriate imports for the APIs +you're using. + +The Kotlin library APIs are divided into two modules: + +- :kotlin-sdk:`Realm Kotlin SDK `: APIs that deal with device + database functionality, such as modeling data, reacting to changes, and type + serializers. +- :kotlin-sync-sdk:`Realm Kotlin SDK - Sync `: APIs that deal with + connecting to MongoDB for Device Sync, user authentication, calling an + Atlas Function, and accessing MongoDB Atlas. + +Refer to the API documentation for each respective module for API details. diff --git a/source/includes/api-details/kotlin/install/install-install-sdk-procedure-android.rst b/source/includes/api-details/kotlin/install/install-install-sdk-procedure-android.rst new file mode 100644 index 0000000000..fff2b48a61 --- /dev/null +++ b/source/includes/api-details/kotlin/install/install-install-sdk-procedure-android.rst @@ -0,0 +1,54 @@ +.. procedure:: + + .. step:: Add the SDK to the Project + + Add :file:`io.realm.kotlin`, specifying the library version and + :file:`apply false`, to the list of plugins in your project-level Gradle + build file, typically found at :file:`/build.gradle`: + + .. code-block:: + :caption: Global build.gradle + + plugins { + id 'io.realm.kotlin' version '{+kotlin-sdk-version+}' apply false + } + + Add the following to your app-level Gradle build file, typically + found at :file:`/app/build.gradle`: + + - Add :file:`io.realm.kotlin` to the list of plugins. + - Add the following to the list of dependencies: + + - Add :file:`io.realm.kotlin:library-base` to the dependencies block. + - If using Device Sync in your application, add :file:`io.realm.kotlin:library-sync` to the dependencies block. + + - To use coroutines with the SDK, add :file:`org.jetbrains.kotlinx:kotlinx-coroutines-core` to the list of dependencies. + + .. code-block:: + :caption: Module build.gradle + :emphasize-lines: 4, 12-16 + + plugins { + id 'com.android.application' + id 'org.jetbrains.kotlin.android' + id 'io.realm.kotlin' + } + + android { + // ... build configuration settings + } + + dependencies { + implementation 'io.realm.kotlin:library-base:{+kotlin-sdk-version+}' + // If using Device Sync + implementation 'io.realm.kotlin:library-sync:{+kotlin-sdk-version+}' + // If using coroutines with the SDK + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:{+kotlinx-coroutines-version+}' + } + + .. step:: Sync Gradle Files + + After updating the Gradle configuration, + resolve the dependencies by clicking :guilabel:`File` > + :guilabel:`Sync Project with Gradle Files` in the Android Studio menu bar. + You can now use the SDK in your application. \ No newline at end of file diff --git a/source/includes/api-details/kotlin/install/install-install-sdk-procedure-kotlin-multiplatform.rst b/source/includes/api-details/kotlin/install/install-install-sdk-procedure-kotlin-multiplatform.rst new file mode 100644 index 0000000000..b1da4a7e7c --- /dev/null +++ b/source/includes/api-details/kotlin/install/install-install-sdk-procedure-kotlin-multiplatform.rst @@ -0,0 +1,64 @@ +.. procedure:: + + .. step:: Add the SDK to the Project + + 1. Add the following to your app-level Gradle build file, typically found at :file:`/app/build.gradle`: + + - Add :file:`io.realm.kotlin` to the list of plugins. + - Add the following to the list of dependencies: + + - Add :file:`io.realm.kotlin:library-base` to the dependencies block. + - If using Device Sync in your application, add :file:`io.realm.kotlin:library-sync` to the dependencies block. + + - To use coroutines with the SDK, add :file:`org.jetbrains.kotlinx:kotlinx-coroutines-core` to the list of dependencies. + + .. code-block:: + :caption: App build.gradle + :emphasize-lines: 5, 18-22 + + plugins { + kotlin("multiplatform") + kotlin("native.cocoapods") + id("com.android.library") + id("io.realm.kotlin") version "{+kotlin-sdk-version+}" + } + + version = "1.0" + + kotlin { + android() + iosX64() + iosArm64() + + sourceSets { + val commonMain by getting { + dependencies { + implementation("io.realm.kotlin:library-base:{+kotlin-sdk-version+}") + // If using Device Sync + implementation("io.realm.kotlin:library-sync:{+kotlin-sdk-version+}") + // If using coroutines with the SDK + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:{+kotlinx-coroutines-version+}") + } + } + } + } + + 2. If you use any part of the SDK inside the Android module, add the following compile-time dependencies to your module-level Gradle build file, typically found at :file:`/module/build.gradle`: + + .. code-block:: + :caption: Android Module build.gradle + + dependencies { + compileOnly("io.realm.kotlin:library-base:{+kotlin-sdk-version+}") + } + // If using Device Sync + dependencies { + compileOnly("io.realm.kotlin:library-sync:{+kotlin-sdk-version+}") + } + + .. step:: Sync Gradle Files + + After updating the Gradle configuration, + resolve the dependencies by clicking :guilabel:`File` > + :guilabel:`Sync Project with Gradle Files` in the Android Studio menu bar. + You can now use the SDK in your application. diff --git a/source/includes/api-details/kotlin/install/install-intro-description.rst b/source/includes/api-details/kotlin/install/install-intro-description.rst new file mode 100644 index 0000000000..c93469558e --- /dev/null +++ b/source/includes/api-details/kotlin/install/install-intro-description.rst @@ -0,0 +1,5 @@ +The Atlas Device SDK for Kotlin supports the following platforms. Each has its +own installation method and requirements: + +- Android +- Kotlin Multiplatform (KMP) diff --git a/source/includes/api-details/kotlin/install/install-platform-specific-considerations-description.rst b/source/includes/api-details/kotlin/install/install-platform-specific-considerations-description.rst new file mode 100644 index 0000000000..e6147d3924 --- /dev/null +++ b/source/includes/api-details/kotlin/install/install-platform-specific-considerations-description.rst @@ -0,0 +1,19 @@ +- :ref:`sdks-build-for-android` +- :ref:`sdks-build-for-apple` + +Apple Privacy Manifest +~~~~~~~~~~~~~~~~~~~~~~ + +When building for Apple platforms, Apple requires any apps or third-party SDKs +that use *required reasons APIs* to provide a privacy manifest. The manifest +contains details about the app's or SDK's data collection and use practices, +and it must be included when submitting new apps or app updates to the Apple +App Store. + +Some of the SDK language and framework libraries provide a privacy manifest to +streamline this process. The Kotlin library does not provide a privacy +manifest. If your application is a cross-platform app that you intend to +submit to the Apple App Store, you may be required to provide your own version +of this privacy manifest. + +For details, refer to :ref:`sdks-apple-privacy-manifest`. diff --git a/source/includes/api-details/kotlin/install/install-requirements-description.rst b/source/includes/api-details/kotlin/install/install-requirements-description.rst new file mode 100644 index 0000000000..9c7bbde8bb --- /dev/null +++ b/source/includes/api-details/kotlin/install/install-requirements-description.rst @@ -0,0 +1,34 @@ +Before getting started, ensure your development environment +meets the following prerequisites: + +- :android:`Android Studio ` Bumblebee 2021.1.1 or higher. +- JDK 11 or higher. +- Kotlin Plugin for Android Studio, version 1.6.10 or higher. +- An Android Virtual Device (AVD) using a supported CPU architecture. + +Additionally, Kotlin Multiplatform (KMP) for mobile projects require the following: + +- `Kotlin Multiplatform Mobile (KMM) Plugin + `__ + for Android Studio, version 0.3.1 or higher. +- A Kotlin Multiplatform (KMP) App created using the "Kotlin Multiplatform App" + template in Android Studio. Follow the instructions in the + `Kotlin Multiplatform documentation + `__. + +For more details on setting up your KMP environment, refer to the `official +Kotlin Multiplatform for mobile +`__ documentation. To verify your +environment setup, follow Kotlin's `guide to checking your +environment +`__. + +.. tip:: Kotlin Plugin Version + + The Kotlin Multiplatform (KMP) ecosystem frequently changes. If you experience + any issues installing the SDK, check your Kotlin Plugin version, since + outdated plugins can lead to difficult to debug errors. To see which + versions of the Kotlin Plugin are compatible with the SDK, refer to the + `Kotlin SDK changelog `__. + +.. include:: /includes/api-details/kotlin/install/install-supported-target-environments-description.rst diff --git a/source/includes/api-details/kotlin/install/install-supported-target-environments-description.rst b/source/includes/api-details/kotlin/install/install-supported-target-environments-description.rst new file mode 100644 index 0000000000..4eecaeb249 --- /dev/null +++ b/source/includes/api-details/kotlin/install/install-supported-target-environments-description.rst @@ -0,0 +1,67 @@ +Supported Target Environments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Kotlin Multiplatform (KMP) supports a wide range of application environments +Refer also to Kotlin's `Multiplatform Gradle DSL reference: Targets +`__ documentation. + +.. tabs:: + + .. tab:: Supported Environments + :tabid: kmp-supported-environments + + The Kotlin library supports the following environments: + + - :file:`android` + + - :file:`iosArm64` + - :file:`iosSimulatorArm64` + - :file:`iosX64` + + - :file:`jvm` + + - :file:`macosArm64` + - :file:`macosX64` + + .. tab:: Unsupported Environments + :tabid: kmp-unsupported-environments + + The Kotlin library does *not* support the following environments: + + - :file:`androidNativeArm32` + - :file:`androidNativeArm64` + - :file:`androidNativeX86` + - :file:`androidNativeX64` + + - :file:`iosArm32` + + - :file:`js` + + - :file:`linuxArm32Hfp` + - :file:`linuxArm64` + - :file:`linuxMips32` + - :file:`linuxMipsel32` + - :file:`linuxX64` + + - :file:`mingwX64` + - :file:`mingwX86` + + - :file:`tvosArm64` + - :file:`tvosSimulatorArm64` + - :file:`tvosX64` + + - :file:`wasm32` + + - :file:`watchosArm32` + - :file:`watchosArm64` + - :file:`watchosSimulatorArm64` + - :file:`watchosX86` + - :file:`watchosX64` + +If you want to build for an environment that the Kotlin library does not +support, consider using one of the other libraries. For more information, +refer to these "Build for Platform" pages: + +- :ref:`sdks-build-for-apple` +- :ref:`sdks-build-for-linux` +- :ref:`sdks-build-for-web` diff --git a/source/includes/api-details/objectivec/install/install-import-sdk-description.rst b/source/includes/api-details/objectivec/install/install-import-sdk-description.rst new file mode 100644 index 0000000000..fb34b4cd0f --- /dev/null +++ b/source/includes/api-details/objectivec/install/install-import-sdk-description.rst @@ -0,0 +1 @@ +Add the following line at the top of your source files to use the SDK: diff --git a/source/includes/api-details/objectivec/install/install-platform-specific-considerations-description.rst b/source/includes/api-details/objectivec/install/install-platform-specific-considerations-description.rst new file mode 100644 index 0000000000..33b5b15cfe --- /dev/null +++ b/source/includes/api-details/objectivec/install/install-platform-specific-considerations-description.rst @@ -0,0 +1,20 @@ +- :ref:`sdks-build-for-apple` +- :ref:`sdks-tvos` + +Apple Privacy Manifest +~~~~~~~~~~~~~~~~~~~~~~ + +Apple requires any apps or third-party SDKs that use *required reasons APIs* +to provide a privacy manifest. The manifest contains details about the app's +or SDK's data collection and use practices, and it must be included when +submitting new apps or app updates to the Apple App Store. + +The Swift and Objective-C libraries provide a privacy manifest to streamline +this process. + +To include these manifests in a build target that uses the ``Realm`` library, +you must build ``Realm`` as a dynamic framework. For details, refer to the +Swift Package Manager Installation instructions step +**(Optional) Build RealmSwift as a Dynamic Framework**. + +For additional details, refer to :ref:`sdks-apple-privacy-manifest`. diff --git a/source/includes/api-details/objectivec/install/install-sdk-procedure-cocoapods.rst b/source/includes/api-details/objectivec/install/install-sdk-procedure-cocoapods.rst new file mode 100644 index 0000000000..31112af4e2 --- /dev/null +++ b/source/includes/api-details/objectivec/install/install-sdk-procedure-cocoapods.rst @@ -0,0 +1,62 @@ +If you are installing with `CocoaPods +`__, you need +CocoaPods 1.10.1 or later. + +.. procedure:: + + .. step:: Update the CocoaPods repositories + + On the command line, run ``pod repo update`` to ensure + CocoaPods can access the latest available ``Realm`` library versions. + + .. step:: Initialize CocoaPods for Your Project + + If you do not already have a Podfile for your project, + run ``pod init`` in the root directory of your project to + create a Podfile for your project. A Podfile allows you + to specify project dependencies to CocoaPods. + + .. step:: Add the SDK as a Dependency in Your Podfile + + Add a ``use_frameworks!`` line to your Podfile if it is not + already there. + + Add the line ``pod 'Realm', '~>10'`` to your main and test + targets. + + When done, your Podfile should look similar to this: + + .. code-block:: + :emphasize-lines: 8 + + platform :ios, '12.0' + + target 'MyDeviceSDKProject' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for MyDeviceSDKProject + pod 'Realm', '~>10' + + target 'MyRealmProjectTests' do + inherit! :search_paths + # Pods for testing + pod 'Realm', '~>10' + end + + .. step:: Install the Dependencies + + From the command line, run ``pod install`` to fetch the + dependencies. + + .. step:: Use the CocoaPods-Generated ``.xcworkspace`` File + + CocoaPods generates an ``.xcworkspace`` file for you. This + file has all of the dependencies configured. From now on, + open this file -- not the ``.xcodeproj`` file -- to work + on your project. + +Resolve Build Issues +~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/api-details/swift/install/install-resolve-build-issues-cocoapods.rst diff --git a/source/includes/api-details/objectivec/install/install-sdk-procedure-swift-package-manager.rst b/source/includes/api-details/objectivec/install/install-sdk-procedure-swift-package-manager.rst new file mode 100644 index 0000000000..ca0a784b7a --- /dev/null +++ b/source/includes/api-details/objectivec/install/install-sdk-procedure-swift-package-manager.rst @@ -0,0 +1,48 @@ +.. procedure:: + + .. step:: Add Package Dependency + + In Xcode, select ``File`` > ``Add Packages...``. + + .. step:: Specify the Repository + + Copy and paste the following into the search/input box. + + .. code-block:: + + https://github.com/realm/realm-swift.git + + .. step:: Specify Options + + In the options for the ``realm-swift`` package, we recommend setting + the ``Dependency Rule`` to ``Up to Next Major Version``, + and enter the `current Swift library version + `__ . Then, click + ``Add Package``. + + .. step:: Select the Package Products + + .. versionchanged:: 10.49.3 + Instead of adding both, only add one package. + + Select either ``RealmSwift`` or ``Realm``, then click ``Add Package``. + + - If you use *only* Objective-C APIs, add ``Realm``. + - If you use Swift or Swift and Objective-C APIs, add ``RealmSwift``. + + .. step:: (Optional) Build Realm as a Dynamic Framework + + To use the Privacy Manifest supplied by the SDK, build ``Realm`` or + ``RealmSwift`` as a dynamic framework. If you build the library as a + static framework, you must supply your own Privacy Manifest. + + To build the library as a dynamic framework: + + 1. In your project :guilabel:`Targets`, select your build target. + 2. Go to the :guilabel:`General` tab. + 3. Expand the :guilabel:`Frameworks and Libraries` element. + 4. For the ``Realm`` framework, change the + :guilabel:`Embed` option from "Do Not Embed" to "Embed & Sign." + + Now, Xcode builds ``Realm`` dynamically, and can provide the + SDK-supplied Privacy Manifest. diff --git a/source/includes/api-details/swift/install/install-import-sdk-description.rst b/source/includes/api-details/swift/install/install-import-sdk-description.rst new file mode 100644 index 0000000000..7e6ec91e75 --- /dev/null +++ b/source/includes/api-details/swift/install/install-import-sdk-description.rst @@ -0,0 +1,9 @@ +Within your Swift files, you can access the Swift APIs and all required +wrappers. The vast majority of ``RealmSwift`` types are directly aliased from +their Objective-C counterparts. + +In some cases, the :swift-sdk:`Swift API reference <>` documentation does not +include details for the underlying Objective-C counterparts. You may need to +drop down to the :objc-sdk:`Objective-C API reference <>` for more details. + +Add the following line at the top of your source files to use the SDK: diff --git a/source/includes/api-details/swift/install/install-intro-description.rst b/source/includes/api-details/swift/install/install-intro-description.rst new file mode 100644 index 0000000000..20df889cd8 --- /dev/null +++ b/source/includes/api-details/swift/install/install-intro-description.rst @@ -0,0 +1,4 @@ +Atlas Device SDK for Swift enables you to build iOS, macOS, tvOS, +and watchOS applications using either the Swift or Objective-C programming +languages. This page details how to install the SDK in your project and get +started. diff --git a/source/includes/api-details/swift/install/install-platform-specific-considerations-description.rst b/source/includes/api-details/swift/install/install-platform-specific-considerations-description.rst new file mode 100644 index 0000000000..5049b6137e --- /dev/null +++ b/source/includes/api-details/swift/install/install-platform-specific-considerations-description.rst @@ -0,0 +1,41 @@ +- :ref:`sdks-build-for-apple` +- :ref:`sdks-tvos` + +Swift Concurrency Support +~~~~~~~~~~~~~~~~~~~~~~~~~ + +The Swift SDK supports Swift's concurrency-related language features. +For best practices on using the Swift SDK's concurrency features, refer +to the documentation below. + +Async/Await Support +``````````````````` + +.. include:: /includes/swift-async-await-support.rst + +For more information about async/await support in the Swift SDK, refer +to :ref:`Swift Concurrency: Async/Await APIs `. + +Actor Support +````````````` + +The Swift SDK supports actor-isolated realm instances. For more information, +refer to :ref:`swift-actor-isolated-realm`. + +Apple Privacy Manifest +~~~~~~~~~~~~~~~~~~~~~~ + +Apple requires any apps or third-party SDKs that use *required reasons APIs* +to provide a privacy manifest. The manifest contains details about the app's +or SDK's data collection and use practices, and it must be included when +submitting new apps or app updates to the Apple App Store. + +The Swift and Objective-C libraries provide a privacy manifest to streamline +this process. + +To include these manifests in a build target that uses ``RealmSwift``, you must +build ``RealmSwift`` as a dynamic framework. For details, refer to the Swift +Package Manager Installation instructions step +**(Optional) Build RealmSwift as a Dynamic Framework**. + +For additional details, refer to :ref:`sdks-apple-privacy-manifest`. diff --git a/source/includes/api-details/swift/install/install-requirements-description.rst b/source/includes/api-details/swift/install/install-requirements-description.rst new file mode 100644 index 0000000000..fa2e7c4c7f --- /dev/null +++ b/source/includes/api-details/swift/install/install-requirements-description.rst @@ -0,0 +1,22 @@ +Before getting started, ensure your development environment +meets the following prerequisites: + +- Your project uses an Xcode version and minimum OS version that the library + supports. Refer to **Supported Target Environments** on this page for more + details. +- Reflection is enabled in your project. The Swift SDK uses reflection to + determine your model's properties. Your project must not set + ``SWIFT_REFLECTION_METADATA_LEVEL = none``, or the SDK cannot see properties + in your model. Reflection is enabled by default if your project does + not specifically set a level for this setting. + +.. include:: /includes/api-details/swift/install/install-supported-os-and-xcode-description.rst + +App Download File Size +~~~~~~~~~~~~~~~~~~~~~~ + +The SDK should only add around 5 to 8 MB to your app's download +size. The releases we distribute are significantly larger because they +include support for the iOS, watchOS and tvOS simulators, some debug symbols, +and bitcode, all of which are stripped by the App Store automatically when +apps are downloaded. diff --git a/source/includes/api-details/swift/install/install-resolve-build-issues-carthage.rst b/source/includes/api-details/swift/install/install-resolve-build-issues-carthage.rst new file mode 100644 index 0000000000..958ec15081 --- /dev/null +++ b/source/includes/api-details/swift/install/install-resolve-build-issues-carthage.rst @@ -0,0 +1,47 @@ +Some developers experience build issues after installing the SDK via +CocoaPods or Carthage. Common causes of these issues include: + +- Installation issues: + + - Initial install failed + - Using an unsupported version of the dependency manager + +- Build tool issues: + + - Build tools have stale caches + - Updating build tool versions + +- Making changes to your project setup, such as: + + - Adding a new target + - Sharing dependencies across targets + +A fix that often clears these issues is to delete derived data +and clean the Xcode build folder. + +.. procedure:: + + .. step:: Reset Carthage-managed Dependency State + + Run these commands in the terminal, in the root of your project: + + .. code-block:: + + rm -rf Carthage + # Assumes default DerivedData location: + rm -rf ~/Library/Developer/Xcode/DerivedData + carthage update + + .. important:: + + This will update **all** of your Carthage-managed dependencies, not + just Atlas Device SDK. + + .. step:: Clean the Xcode Build Folder + + With your project open in Xcode, go to the Product drop-down menu, + and select Clean Build Folder. + + .. figure:: /images/xcode-clean-build-folder.png + :alt: Select Product, then Clean Build Folder. + :lightbox: diff --git a/source/includes/api-details/swift/install/install-resolve-build-issues-cocoapods.rst b/source/includes/api-details/swift/install/install-resolve-build-issues-cocoapods.rst new file mode 100644 index 0000000000..ebd4753665 --- /dev/null +++ b/source/includes/api-details/swift/install/install-resolve-build-issues-cocoapods.rst @@ -0,0 +1,44 @@ +Some developers experience build issues after installing the SDK via +CocoaPods or Carthage. Common causes of these issues include: + +- Installation issues: + + - Initial install failed + - Using an unsupported version of the dependency manager + +- Build tool issues: + + - Build tools have stale caches + - Updating build tool versions + +- Making changes to your project setup, such as: + + - Adding a new target + - Sharing dependencies across targets + +A fix that often clears these issues is to delete derived data +and clean the Xcode build folder. + +.. procedure:: + + .. step:: Reset the Cocoapods Integration State + + Run these commands in the terminal, in the root of your project: + + .. code-block:: + + pod cache clean Realm + pod cache clean RealmSwift + pod deintegrate || rm -rf Pods + pod install --repo-update --verbose + # Assumes the default DerivedData location: + rm -rf ~/Library/Developer/Xcode/DerivedData + + .. step:: Clean the Xcode Build Folder + + With your project open in Xcode, go to the Product drop-down menu, + and select Clean Build Folder. + + .. figure:: /images/xcode-clean-build-folder.png + :alt: Select Product, then Clean Build Folder. + :lightbox: diff --git a/source/includes/api-details/swift/install/install-sdk-procedure-carthage.rst b/source/includes/api-details/swift/install/install-sdk-procedure-carthage.rst new file mode 100644 index 0000000000..5f36d494a8 --- /dev/null +++ b/source/includes/api-details/swift/install/install-sdk-procedure-carthage.rst @@ -0,0 +1,47 @@ +If you are installing with `Carthage +`__, you need +Carthage 0.33 or later. + +.. procedure:: + + .. step:: Add the SDK as a Dependency in Your Cartfile + + Add the SDK as a dependency by appending the line ``github + "realm/realm-swift"`` to your Cartfile. + + You can create a Cartfile or append to an existing one by + running the following command in your project directory: + + .. code-block:: + + echo 'github "realm/realm-swift"' >> Cartfile + + .. step:: Install the Dependencies + + From the command line, run ``carthage update --use-xcframeworks`` + to fetch the dependencies. + + .. step:: Add the Frameworks to Your Project + + Carthage places the built dependencies in the ``Carthage/Build`` + directory. + + Open your project's ``xcodeproj`` file in Xcode. Go to + the Project Navigator panel and click your application + name to open the project settings editor. Select the + :guilabel:`General` tab. + + In Finder, open the ``Carthage/Build/`` directory. Drag the + ``RealmSwift.xcframework`` and ``Realm.xcframework`` files + found in that directory to the :guilabel:`Frameworks, + Libraries, and Embedded Content` section of your + project's :guilabel:`General` settings. + + .. figure:: /images/carthage-add-frameworks.png + :alt: Drag the xcframework files into the Xcode project. + :lightbox: + +Resolve Build Issues +~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/api-details/swift/install/install-resolve-build-issues-carthage.rst diff --git a/source/includes/api-details/swift/install/install-sdk-procedure-cocoapods.rst b/source/includes/api-details/swift/install/install-sdk-procedure-cocoapods.rst new file mode 100644 index 0000000000..0506e7bf17 --- /dev/null +++ b/source/includes/api-details/swift/install/install-sdk-procedure-cocoapods.rst @@ -0,0 +1,58 @@ +If you are installing with `CocoaPods +`__, you need +CocoaPods 1.10.1 or later. + +.. procedure:: + + .. step:: Update the CocoaPods repositories + + On the command line, run ``pod repo update`` to ensure + CocoaPods can access the latest available ``RealmSwift`` package versions. + + .. step:: Initialize CocoaPods for Your Project + + If you do not already have a Podfile for your project, + run ``pod init`` in the root directory of your project to + create a Podfile for your project. A Podfile allows you + to specify project dependencies to CocoaPods. + + .. step:: Add the SDK as a Dependency in Your Podfile + + Add a ``use_frameworks!`` line to your Podfile if it is not + already there. + + Add the line ``pod 'RealmSwift', '~>10'`` to your main and test + targets. + + When done, your Podfile should look similar to this: + + .. code-block:: + :emphasize-lines: 8 + + platform :ios, '12.0' + + target 'MyDeviceSDKProject' do + # Comment the next line if you don't want to use dynamic frameworks + use_frameworks! + + # Pods for MyDeviceSDKProject + pod 'RealmSwift', '~>10' + + end + + .. step:: Install the Dependencies + + From the command line, run ``pod install`` to fetch the + dependencies. + + .. step:: Use the CocoaPods-Generated ``.xcworkspace`` File + + CocoaPods generates an ``.xcworkspace`` file for you. This + file has all of the dependencies configured. From now on, + open this file -- not the ``.xcodeproj`` file -- to work + on your project. + +Resolve Build Issues +~~~~~~~~~~~~~~~~~~~~ + +.. include:: /includes/api-details/swift/install/install-resolve-build-issues-cocoapods.rst diff --git a/source/includes/api-details/swift/install/install-sdk-procedure-dynamic-framework.rst b/source/includes/api-details/swift/install/install-sdk-procedure-dynamic-framework.rst new file mode 100644 index 0000000000..b329df293f --- /dev/null +++ b/source/includes/api-details/swift/install/install-sdk-procedure-dynamic-framework.rst @@ -0,0 +1,22 @@ +.. procedure:: + + .. step:: Download and Extract the Framework + + Download the `latest release of the Swift library + `__ and extract the zip. + + .. step:: Copy Framework(s) Into Your Project + + Drag ``Realm.xcframework`` and ``RealmSwift.xcframework`` (if using) + to the File Navigator of your Xcode project. Select the + :guilabel:`Copy items if needed` checkbox and press :guilabel:`Finish`. + + .. tip:: + + If using the Objective-C API within a Swift project, we + recommend you include both Realm Swift and Realm Objective-C in your + project. Within your Swift files, you can access the Swift API and + all required wrappers. Using the RealmSwift API in mixed + Swift/Objective-C projects is possible because the vast majority of + RealmSwift types are directly aliased from their Objective-C + counterparts. diff --git a/source/includes/api-details/swift/install/install-sdk-procedure-swift-package-manager.rst b/source/includes/api-details/swift/install/install-sdk-procedure-swift-package-manager.rst new file mode 100644 index 0000000000..bb84f0686d --- /dev/null +++ b/source/includes/api-details/swift/install/install-sdk-procedure-swift-package-manager.rst @@ -0,0 +1,48 @@ +.. procedure:: + + .. step:: Add Package Dependency + + In Xcode, select ``File`` > ``Add Packages...``. + + .. step:: Specify the Repository + + Copy and paste the following into the search/input box. + + .. code-block:: + + https://github.com/realm/realm-swift.git + + .. step:: Specify Options + + In the options for the ``realm-swift`` package, we recommend setting + the ``Dependency Rule`` to ``Up to Next Major Version``, + and enter the `current Swift library version + `__ . Then, click + ``Add Package``. + + .. step:: Select the Package Products + + .. versionchanged:: 10.49.3 + Instead of adding both, only add one package. + + Select either ``RealmSwift`` or ``Realm``, then click ``Add Package``. + + - If you use Swift or Swift and Objective-C APIs, add ``RealmSwift``. + - If you use *only* Objective-C APIs, add ``Realm``. + + .. step:: (Optional) Build RealmSwift as a Dynamic Framework + + To use the Privacy Manifest supplied by the SDK, build the library + as a dynamic framework. If you build the library as a static + framework, you must supply your own Privacy Manifest. + + To build the library as a dynamic framework: + + 1. In your project :guilabel:`Targets`, select your build target. + 2. Go to the :guilabel:`General` tab. + 3. Expand the :guilabel:`Frameworks and Libraries` element. + 4. For the ``RealmSwift`` framework, change the + :guilabel:`Embed` option from "Do Not Embed" to "Embed & Sign." + + Now, Xcode builds ``RealmSwift`` dynamically, and can provide the + SDK-supplied Privacy Manifest. diff --git a/source/includes/api-details/swift/install/install-supported-os-and-xcode-description.rst b/source/includes/api-details/swift/install/install-supported-os-and-xcode-description.rst new file mode 100644 index 0000000000..11f9d7e2e9 --- /dev/null +++ b/source/includes/api-details/swift/install/install-supported-os-and-xcode-description.rst @@ -0,0 +1,42 @@ +Supported Target Environments +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. important:: + + There are special considerations when using the SDK with + tvOS. See :ref:`sdks-tvos` for more information. + +Xcode 15 +```````` + +.. versionchanged:: 10.50.0 + Minimum required Xcode version is 15.1 + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :class: index-table + + * - Supported OS + - Realm Database + - Atlas App Services + + * - iOS 12.0+ + - X + - X + + * - macOS 10.14+ + - X + - X + + * - tvOS 12.0+ + - X + - X + + * - watchOS 4.0+ + - X + - + + * - visionOS 1.0+ + - X + - X diff --git a/source/includes/flutter-v2-breaking-change.rst b/source/includes/flutter-v2-breaking-change.rst index 0edd624533..d8505b67cb 100644 --- a/source/includes/flutter-v2-breaking-change.rst +++ b/source/includes/flutter-v2-breaking-change.rst @@ -1,8 +1,9 @@ -.. important:: Flutter SDK v2.0.0 Breaking Change to Generated Files +.. important:: SDK v2.0.0 Breaking Change to Generated Files - Flutter SDK version 2.0.0 introduces an update to the - builder, which impacts how files generate. In v2.0.0 and later, all - generated files use the ``.realm.dart`` naming convention instead of ``.g.dart``. + SDK version 2.0.0 introduces an update to the + builder, which impacts how files generate. In v2.0.0 and later, all + generated files use the ``.realm.dart`` naming convention instead of ``.g.dart``. - This is a breaking change for existing apps. For information on how to upgrade an existing app from an earlier SDK version to v2.0.0 or later, - refer to :ref:`flutter-upgrade-v2`. + This is a breaking change for existing apps. For information on how to + upgrade an existing app from an earlier SDK version to v2.0.0 or later, + refer to :ref:`flutter-upgrade-v2`. diff --git a/source/includes/sdk-examples/install/install-import-sdk.rst b/source/includes/sdk-examples/install/install-import-sdk.rst new file mode 100644 index 0000000000..f9b0856eae --- /dev/null +++ b/source/includes/sdk-examples/install/install-import-sdk.rst @@ -0,0 +1,55 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/quick-start.snippet.include-header.cpp + :language: cpp + + - id: csharp + content: | + + .. code-block:: csharp + + using Realms; + + - id: dart + content: | + + .. code-block:: dart + :caption: ExampleFile.dart + + import 'package:realm_dart/realm.dart'; + + - id: javascript + content: | + + .. code-block:: javascript + + import Realm from "realm"; + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/MyRealmApp.snippet.import-realm.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/RealmApp.snippet.import-realm.swift + :language: swift + + - id: typescript + content: | + + .. code-block:: typescript + + import Realm from "realm"; diff --git a/source/platforms.txt b/source/platforms.txt index 8da0a2109c..519247049a 100644 --- a/source/platforms.txt +++ b/source/platforms.txt @@ -28,6 +28,6 @@ with Atlas Device SDK: - :ref:`sdks-build-for-apple` - :ref:`sdks-build-for-iot` - :ref:`sdks-build-for-linux` -- :ref:`dotnet-unity` +- :ref:`sdks-unity` - :ref:`sdks-build-for-web` - :ref:`sdks-build-for-windows` diff --git a/source/platforms/android.txt b/source/platforms/android.txt index 07e511aebf..8f771c7f35 100644 --- a/source/platforms/android.txt +++ b/source/platforms/android.txt @@ -4,13 +4,82 @@ Build for Android ================= +.. meta:: + :description: Provide a short description of the consolidated page. This is critical for SEO. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol +.. tabs-selector:: drivers + Placeholder page for information about building for Android. Include info about which frameworks we support building for Android, plus any specific version or compatibility info worth calling out? + +Build an Android App +-------------------- + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/platforms/android-build-android-app-description.rst + + .. tab:: + :tabid: csharp + + + + .. tab:: + :tabid: dart + + + + .. tab:: + :tabid: java + + + + .. tab:: + :tabid: java-kotlin + + + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + + + .. tab:: + :tabid: objectivec + + + + .. tab:: + :tabid: swift + + + + .. tab:: + :tabid: typescript + + diff --git a/source/platforms/apple.txt b/source/platforms/apple.txt index cb469465eb..338cd797a1 100644 --- a/source/platforms/apple.txt +++ b/source/platforms/apple.txt @@ -13,8 +13,10 @@ Build for Apple .. toctree:: :titlesonly: + Apple Privacy Manifest Swift Concurrency Swift Actor Support + Build for tvOS Placeholder page for information about building for Apple. @@ -23,3 +25,41 @@ any specific version or compatibility info worth calling out? Maybe make this a directory with Apple-specific content (Apple Privacy Manifest, build for tvOS, etc.?) + +Build for macOS +--------------- + +Device Sync and App Sandbox Entitlements +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If you are developing for macOS and require network access, you must enable +network entitlements in your application. By default, Apple's App Sandbox +does not allow network requests due to built-in security settings. + +Enable network entitlements to use these SDK features: + +- :ref:`Device Sync ` +- :ref:`Call an Atlas Function ` +- :ref:`Access MongoDB Atlas ` + +.. _sdks-macos-flutter-app-sandbox-entitlements: + +With Flutter +~~~~~~~~~~~~ + +To enable network requests in a Flutter application, add the following code +to **both** the files :file:`macos/Runner/DebugProfile.entitlements` and +:file:`macos/Runner/Release.entitlements`: + +.. code-block:: xml + :emphasize-lines: 2-3 + + + com.apple.security.network.client + + + +For more information about Flutter development for macOS, refer to +`Building macOS apps with Flutter +`__ +in the Flutter documentation. diff --git a/source/platforms/apple/privacy-manifest.txt b/source/platforms/apple/privacy-manifest.txt new file mode 100644 index 0000000000..3f00f65c76 --- /dev/null +++ b/source/platforms/apple/privacy-manifest.txt @@ -0,0 +1,71 @@ +.. _sdks-apple-privacy-manifest: + +=========================================== +The Atlas Device SDK Apple Privacy Manifest +=========================================== + +.. meta:: + :description: Learn about the SDK-provided Privacy Manifest when building for the Apple App Store, and any additional details you may be required to supply. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Apple may require apps that use Atlas Device SDK to provide a privacy manifest +containing details about the SDK's data collection and use practices. The +bundled manifest file must be included when submitting new apps or app updates +to the App Store. For more details about Apple's requirements, refer to +:apple:`Upcoming third-party SDK requirements ` +on the Apple Developer website. + +Some of the SDK libraries provide a privacy manifest to comply with Apple's +required API disclosures and the reasons for using those APIs. You can view +the privacy manifests in each package, or in the relevant GitHub repository: + +- Dart + + - ``realm-dart``/iOS: + `https://github.com/realm/realm-dart/blob/main/packages/realm/ios/Resources/PrivacyInfo.xcprivacy + `__ + - ``realm-dart``/macOS: + `https://github.com/realm/realm-dart/blob/main/packages/realm/macos/Resources/PrivacyInfo.xcprivacy + `__ + +- Swift: ``RealmSwift``: `https://github.com/realm/realm-swift/blob/master/RealmSwift/PrivacyInfo.xcprivacy `_ +- ObjectiveC: ``Realm``: `https://github.com/realm/realm-swift/blob/master/Realm/PrivacyInfo.xcprivacy `_ + +The SDK does not include analytics code in builds for the App Store. +The SDK does not log into Atlas on its own behalf. + +If you write an app that uses any App Services functionality, such as +:ref:`connecting to Atlas ` to: + +- :ref:`Call an Atlas Function ` +- :ref:`Authenticate and manage users ` +- :ref:`Access MongoDB Atlas ` +- :ref:`Open a synced database ` + +You may need to add additional disclosures to your app's privacy manifest +detailing your data collection and use practices when using these APIs. + +For more information, refer to Apple's +:apple:`Privacy manifest files documentation `. + +Special Build Instructions +-------------------------- + +To include these manifests in a build target that uses ``RealmSwift``, you must +build ``RealmSwift`` as a dynamic framework. For details, refer to the Swift +Package Manager Installation instructions step +**(Optional) Build RealmSwift as a Dynamic Framework**. diff --git a/source/platforms/apple/swift-concurrency.txt b/source/platforms/apple/swift-concurrency.txt index ba2cc0f255..f181ca42bb 100644 --- a/source/platforms/apple/swift-concurrency.txt +++ b/source/platforms/apple/swift-concurrency.txt @@ -139,7 +139,8 @@ Tasks and TaskGroups Swift concurrency provides APIs to manage :apple:`Tasks ` and :apple:`TaskGroups `. The `Swift concurrency -documentation `__ +documentation +`__ defines a task as a unit of work that can be run asynchronously as part of your program. Task allows you to specifically define a unit of asynchronous work. TaskGroup lets you define a collection of Tasks to execute as a unit diff --git a/source/platforms/apple/tvos.txt b/source/platforms/apple/tvos.txt new file mode 100644 index 0000000000..849f626755 --- /dev/null +++ b/source/platforms/apple/tvos.txt @@ -0,0 +1,70 @@ +.. _sdks-tvos: + +============== +Build for tvOS +============== + +.. meta:: + :description: When you're using Atlas Device SDK to build for Apple's tvOS, keep these important considerations in mind. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +When you're using Atlas Device SDK to build for Apple's tvOS, keep these +important considerations in mind. + +.. seealso:: + + :ref:`sdks-install` + +Avoid Storing Important User Data +--------------------------------- + +Avoid storing important user data in the database on tvOS. Instead, it's +best to treat the SDK as a rebuildable cache. + +.. note:: + + The reason for this has to do with where the SDK writes its + :ref:`database files `. On other Apple + platforms, the SDK writes its database files to the "Documents" + directory. Because tvOS restricts writes to that directory, the + default database file location on tvOS is instead ``NSCachesDirectory``. + tvOS can purge files in that directory at any time, so reliable + long-term persistence is not possible. For cloud-backed persistence + on tvOS, consider using :ref:`Device Sync `. + +You can also use the SDK as an initial data source by +:ref:`bundling prebuilt database files ` in your app. +Note that the :apple:`App Store guidelines ` limit your +app size to 4GB. + +.. tip:: + + Browse our :github:`tvOS examples + ` for sample tvOS apps + that demonstrate how to use the SDK as an offline cache. + +Share Database Files with TV Services Extensions +------------------------------------------------ + +To share a :ref:`database file ` between a +tvOS app and a TV services extension such as :apple:`Top Shelf +`, use the +``Library/Caches/`` directory in the shared container for the +application group: + +.. literalinclude:: /examples/generated/code/start/OpenCloseRealm.snippet.tvos-share-path.swift + :language: swift diff --git a/source/platforms/iot.txt b/source/platforms/iot.txt index 58cc1384fa..aee33e6e5f 100644 --- a/source/platforms/iot.txt +++ b/source/platforms/iot.txt @@ -14,3 +14,59 @@ Placeholder page for information about building for IoT. Include info about which frameworks we support building for IoT, plus any specific version or compatibility info worth calling out? + +Install the SDK for IoT +----------------------- + +.. TODO: Should also add details about C++ here + +JavaScript Library +~~~~~~~~~~~~~~~~~~ + +To create a Node.js project and add the Node.js SDK on an +Internet of Things (IoT) platform such as the Raspberry Pi 2, 3, or 4 +running Raspberry Pi OS (formerly Raspbian), follow the steps below: + +.. procedure:: + + .. step:: Install a C++ Compiler + + The Node.js SDK's IoT library is not distributed as a binary, so you + must build it from source. To do this, you'll need a working C++ compiler. + To install such a compiler on your IoT device, run the following command: + + .. code-block:: bash + + sudo apt install build-essential g++ libssl-dev + + .. step:: Create a Node.js Project + + Create your Node.js project by creating a new directory + for your project and running ``npm init`` in that + directory. In the example below, replace ``MyApp`` + with your desired project name. Answer all of the prompts + to fill out the details of your project. + + .. code-block:: bash + + mkdir MyApp && cd MyApp && npm init + + .. step:: Install the SDK with NPM + + In your Node.js project directory, use the following command + to add the SDK to your project: + + .. code-block:: bash + + npm install realm + + .. step:: Enable TypeScript (optional) + + TypeScript is a superset of JavaScript that adds static + type checking and other features intended to make + application-scale development more robust. If you'd like + to use TypeScript, follow the TypeScript team's official + `Node Starter guide + `__. + The SDK supports TypeScript natively and integrates easily + into a TypeScript project. diff --git a/source/platforms/unity.txt b/source/platforms/unity.txt index bdc51d845f..88283956a9 100644 --- a/source/platforms/unity.txt +++ b/source/platforms/unity.txt @@ -1,8 +1,8 @@ -.. _dotnet-unity: +.. _sdks-unity: -================================ -Quick Start for Unity - .NET SDK -================================ +========================= +Build for Unity with .NET +========================= .. meta:: :description: Get started using Atlas Device SDK for .NET with a Unity project. diff --git a/source/sdk/install.txt b/source/sdk/install.txt index b575168178..91cb0aaae0 100644 --- a/source/sdk/install.txt +++ b/source/sdk/install.txt @@ -6,15 +6,333 @@ Install Atlas Device SDK .. meta:: :description: Install Atlas Device SDK for your preferred language or framework using popular package managers and build tools. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, .NET SDK, Node.js SDK, Swift SDK, code example .. facet:: :name: genre :values: tutorial +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none :depth: 1 :class: singlecol -Placeholder page for Install content. +.. tabs-selector:: drivers + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/install/install-intro-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/install/install-intro-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/install/install-intro-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/install/install-intro-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/install/install-intro-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/swift/install/install-intro-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/install/install-intro-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/install/install-intro-js-ts-description.rst + +Requirements +------------ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/install/install-requirements-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/install/install-requirements-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/install/install-requirements-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/install/install-requirements-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/install/install-requirements-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/swift/install/install-requirements-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/install/install-requirements-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/install/install-requirements-js-ts-description.rst + +Install the SDK +--------------- + +.. tip:: Atlas Device SDK and Realm + + The SDK uses Realm Core database for data persistence on the device. When + you install the SDK, the package names reflect Realm naming. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tabs:: + + .. tab:: Swift Package Manager + :tabid: cpp-spm + + .. include:: /includes/api-details/cpp/install/install-install-sdk-procedure-swift-package-manager.rst + + .. tab:: CMake + :tabid: cpp-cmake + + .. include:: /includes/api-details/cpp/install/install-install-sdk-procedure-cmake.rst + + .. tab:: + :tabid: csharp + + .. important:: Install the SDK for all projects + + If you have a multi-platform solution, be sure to install the SDK for + **all of the platform projects**, even if the given project doesn't contain + any SDK-specific code. + + .. tabs:: + + .. tab:: Visual Studio for Mac + :tabid: vs-mac + + .. include:: /includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-mac.rst + + .. tab:: Visual Studio for Windows + :tabid: vs-windows + + .. include:: /includes/api-details/csharp/install/install-install-sdk-procedure-visual-studio-for-windows.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/install/install-install-sdk-procedure.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/install/install-sdk-procedure-js-ts.rst + + .. tab:: + :tabid: kotlin + + .. tabs:: + + .. tab:: Android + :tabid: kotlin-android + + .. include:: /includes/api-details/kotlin/install/install-install-sdk-procedure-android.rst + + .. tab:: Kotlin Multiplatform (KMP) + :tabid: kotlin-multiplatform + + .. include:: /includes/api-details/kotlin/install/install-install-sdk-procedure-kotlin-multiplatform.rst + + .. tab:: + :tabid: objectivec + + .. tabs:: + + .. tab:: SwiftPM + :tabid: objc-swiftpm + + .. include:: /includes/api-details/objectivec/install/install-sdk-procedure-swift-package-manager.rst + + .. tab:: CocoaPods + :tabid: objc-cocoapods + + .. include:: /includes/api-details/objectivec/install/install-sdk-procedure-cocoapods.rst + + .. tab:: Carthage + :tabid: objc-carthage + + .. include:: /includes/api-details/swift/install/install-sdk-procedure-carthage.rst + + .. tab:: Dynamic Framework + :tabid: objct-dynamic-framework + + .. include:: /includes/api-details/swift/install/install-sdk-procedure-dynamic-framework.rst + + .. tab:: + :tabid: swift + + .. tabs:: + + .. tab:: SwiftPM + :tabid: swift-swiftpm + + .. include:: /includes/api-details/swift/install/install-sdk-procedure-swift-package-manager.rst + + .. tab:: CocoaPods + :tabid: swift-cocoapods + + .. include:: /includes/api-details/swift/install/install-sdk-procedure-cocoapods.rst + + .. tab:: Carthage + :tabid: swift-carthage + + .. include:: /includes/api-details/swift/install/install-sdk-procedure-carthage.rst + + .. tab:: Dynamic Framework + :tabid: swift-dynamic-framework + + .. include:: /includes/api-details/swift/install/install-sdk-procedure-dynamic-framework.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/install/install-sdk-procedure-js-ts.rst + +Import the SDK +-------------- + +.. tip:: Atlas Device SDK and Realm + + The SDK uses Realm Core database for data persistence on the device. When + you import the SDK, the package names reflect Realm naming. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/install/install-import-sdk-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/install/install-import-sdk-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/install/install-import-sdk-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/install/install-import-sdk-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/install/install-import-sdk-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/install/install-import-sdk-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/install/install-import-sdk-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/install/install-import-sdk-js-ts-description.rst + +.. include:: /includes/sdk-examples/install/install-import-sdk.rst + +Platform-Specific Considerations +-------------------------------- + +For details about installing the SDK and building for a specific platform, +refer to the relevant platform pages: + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/install/install-platform-specific-considerations-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/install/install-platform-specific-considerations-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/install/install-platform-specific-considerations-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/install/install-supported-platforms-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/install/install-platform-specific-considerations-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/install/install-platform-specific-considerations-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/install/install-platform-specific-considerations-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/install/install-supported-platforms-js-ts-description.rst From 6411c1ca074b9821198949f7eaf7f6765fca110a Mon Sep 17 00:00:00 2001 From: Dachary Date: Thu, 1 Aug 2024 12:06:50 -0400 Subject: [PATCH 53/63] (DOCSP-39535): Consolidate Manage Sync Subscriptions page (#3320) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39535 *Staged Page* - [Manage Sync Subscriptions](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39535/sdk/sync/manage-sync-subscriptions/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Manage Sync Subscriptions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/sync/sync-subscriptions/) - [Flutter: Manage Sync Subscriptions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/sync/manage-sync-subscriptions/) - [Java: Manage Sync Subscriptions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/sync/flexible-sync/) - [Kotlin: Manage Sync Subscriptions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/sync/subscribe/) - [.NET: Manage Flexible Sync Subscriptions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/sync/flexible-sync/) - [Node.js: Manage Flexible Sync Subscriptions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/sync/flexible-sync/) - [Swift: Manage Flexible Sync Subscriptions](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/sync/flexible-sync/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: Kyle Rollins <115574589+krollins-mdb@users.noreply.github.com> --- ...ns-access-subscription-set-description.rst | 7 + ...criptions-add-subscription-description.rst | 10 + ...-change-named-subscription-description.rst | 8 + ...nge-unnamed-subscription-not-supported.rst | 7 + ...riptions-find-subscription-description.rst | 4 + ...ubscriptions-refresh-realm-description.rst | 6 + ...s-remove-all-subscriptions-description.rst | 2 + ...criptions-to-object-type-not-supported.rst | 8 + ...ll-unnamed-subscriptions-not-supported.rst | 5 + ...-remove-named-subscription-description.rst | 4 + ...ubscription-by-reference-not-supported.rst | 7 + ...ove-unnamed-subscription-not-supported.rst | 7 + ...s-subscription-set-state-not-supported.rst | 1 + ...cription-changes-to-sync-not-supported.rst | 1 + ...ns-access-subscription-set-description.rst | 5 + ...criptions-add-subscription-description.rst | 20 + ...-change-named-subscription-description.rst | 12 + ...nge-unnamed-subscription-not-supported.rst | 7 + ...riptions-find-subscription-description.rst | 8 + ...s-remove-all-subscriptions-description.rst | 8 + ...bscriptions-to-object-type-description.rst | 14 + ...-all-unnamed-subscriptions-description.rst | 5 + ...-remove-named-subscription-description.rst | 4 + ...-subscription-by-reference-description.rst | 4 + ...emove-unnamed-subscription-description.rst | 7 + ...-set-initial-subscriptions-description.rst | 8 + ...ons-subscription-set-state-description.rst | 9 + ...bscription-changes-to-sync-description.rst | 17 + ...ns-access-subscription-set-description.rst | 5 + ...criptions-add-subscription-description.rst | 11 + ...-change-named-subscription-description.rst | 10 + ...nge-unnamed-subscription-not-supported.rst | 7 + ...ns-duplicate-subscriptions-description.rst | 3 + ...riptions-find-subscription-description.rst | 7 + ...s-remove-all-subscriptions-description.rst | 2 + ...bscriptions-to-object-type-description.rst | 3 + ...-all-unnamed-subscriptions-description.rst | 4 + ...-remove-named-subscription-description.rst | 3 + ...-subscription-by-reference-description.rst | 4 + ...emove-unnamed-subscription-description.rst | 6 + ...iptions-subscribe-to-query-description.rst | 11 + ...bscribe-to-query-with-name-description.rst | 7 + ...ons-subscription-set-state-description.rst | 8 + ...ons-unsubscribe-from-query-description.rst | 2 + ...query-subscription-to-sync-description.rst | 21 + ...bscription-changes-to-sync-description.rst | 11 + ...et-initial-subscriptions-not-supported.rst | 3 + ...tions-subscribe-to-query-not-supported.rst | 3 + ...ns-access-subscription-set-description.rst | 4 + ...criptions-add-subscription-description.rst | 12 + ...-change-named-subscription-description.rst | 5 + ...nge-unnamed-subscription-not-supported.rst | 7 + ...ons-duplicate-subscription-description.rst | 9 + ...riptions-find-subscription-description.rst | 8 + ...s-remove-all-subscriptions-description.rst | 3 + ...bscriptions-to-object-type-description.rst | 4 + ...ll-unnamed-subscriptions-not-supported.rst | 6 + ...-remove-named-subscription-description.rst | 5 + ...-subscription-by-reference-description.rst | 4 + ...ove-unnamed-subscription-not-supported.rst | 5 + ...ons-subscription-set-state-description.rst | 17 + ...bscription-changes-to-sync-description.rst | 11 + ...ess-subscription-set-js-ts-description.rst | 4 + ...ons-add-subscription-js-ts-description.rst | 11 + ...e-named-subscription-js-ts-description.rst | 11 + ...named-subscription-js-ts-not-supported.rst | 7 + ...ns-find-subscription-js-ts-description.rst | 8 + ...ve-all-subscriptions-js-ts-description.rst | 4 + ...tions-to-object-type-js-ts-description.rst | 5 + ...nnamed-subscriptions-js-ts-description.rst | 3 + ...-remove-named-subscription-description.rst | 5 + ...ription-by-reference-js-ts-description.rst | 5 + ...emove-unnamed-subscription-description.rst | 7 + ...nitial-subscriptions-js-ts-description.rst | 10 + ...s-subscribe-to-query-js-ts-description.rst | 13 + ...e-to-query-with-name-js-ts-description.rst | 7 + ...bscription-set-state-js-ts-description.rst | 13 + ...subscribe-from-query-js-ts-description.rst | 1 + ...query-subscription-to-sync-description.rst | 16 + ...tion-changes-to-sync-js-ts-description.rst | 10 + ...ns-access-subscription-set-description.rst | 4 + ...criptions-add-subscription-description.rst | 10 + ...-change-named-subscription-description.rst | 10 + ...nge-unnamed-subscription-not-supported.rst | 7 + ...riptions-find-subscription-description.rst | 10 + ...s-remove-all-subscriptions-description.rst | 4 + ...bscriptions-to-object-type-description.rst | 4 + ...-all-unnamed-subscriptions-description.rst | 2 + ...-remove-named-subscription-description.rst | 3 + ...-subscription-by-reference-description.rst | 3 + ...ove-unnamed-subscription-not-supported.rst | 4 + ...-set-initial-subscriptions-description.rst | 22 + ...iptions-subscribe-to-query-description.rst | 15 + ...bscribe-to-query-with-name-description.rst | 1 + ...ons-subscription-set-state-description.rst | 9 + ...s-unsubscribe-from-query-not-supported.rst | 3 + ...bscription-changes-to-sync-description.rst | 10 + ...ns-access-subscription-set-description.rst | 5 + ...criptions-add-subscription-description.rst | 10 + ...-change-named-subscription-description.rst | 6 + ...hange-unnamed-subscription-description.rst | 5 + ...ns-duplicate-subscriptions-description.rst | 16 + ...riptions-find-subscription-description.rst | 10 + ...s-remove-all-subscriptions-description.rst | 2 + ...bscriptions-to-object-type-description.rst | 4 + ...-all-unnamed-subscriptions-description.rst | 2 + ...-remove-named-subscription-description.rst | 4 + ...-subscription-by-reference-description.rst | 3 + ...emove-unnamed-subscription-description.rst | 3 + ...-set-initial-subscriptions-description.rst | 22 + ...iptions-subscribe-to-query-description.rst | 20 + ...bscribe-to-query-with-name-description.rst | 4 + ...ons-subscription-set-state-description.rst | 9 + ...ons-unsubscribe-from-query-description.rst | 4 + ...query-subscription-to-sync-description.rst | 17 + ...bscription-changes-to-sync-description.rst | 32 + ...-remove-named-subscription-description.rst | 5 + ...emove-unnamed-subscription-description.rst | 4 + ...query-subscription-to-sync-description.rst | 22 + source/includes/flex-sync-limitations.rst | 29 +- source/includes/note-sync-state-complete.rst | 15 - ...migration-remove-and-add-subscriptions.rst | 4 +- ...-subscriptions-access-subscription-set.rst | 63 + ...bscriptions-add-multiple-subscriptions.rst | 66 + ...c-subscriptions-add-named-subscription.rst | 63 + ...ge-sync-subscriptions-add-subscription.rst | 60 + ...subscriptions-add-unnamed-subscription.rst | 65 + ...ubscriptions-change-named-subscription.rst | 60 + ...scriptions-change-unnamed-subscription.rst | 61 + ...e-sync-subscriptions-find-subscription.rst | 64 + ...emove-all-subscriptions-to-object-type.rst | 61 + ...subscriptions-remove-all-subscriptions.rst | 60 + ...tions-remove-all-unnamed-subscriptions.rst | 62 + ...ubscriptions-remove-named-subscription.rst | 60 + ...tions-remove-subscription-by-reference.rst | 64 + ...scriptions-remove-unnamed-subscription.rst | 63 + ...ubscriptions-set-initial-subscriptions.rst | 60 + ...tions-subscribe-to-all-objects-of-type.rst | 64 + ...criptions-subscribe-to-query-with-name.rst | 61 + ...-sync-subscriptions-subscribe-to-query.rst | 61 + ...c-subscriptions-unsubscribe-from-query.rst | 62 + ...s-wait-for-query-subscriptions-to-sync.rst | 62 + ...t-for-subscription-changes-to-sync.rst.rst | 62 + .../configure-and-open-synced-database.txt | 7 + source/sdk/sync/manage-sync-subscriptions.txt | 1448 ++++++++++++++++- 145 files changed, 3675 insertions(+), 38 deletions(-) create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-access-subscription-set-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-add-subscription-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-change-named-subscription-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-find-subscription-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-not-supported.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-subscription-by-reference-not-supported.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-subscription-set-state-not-supported.rst create mode 100644 source/includes/api-details/cpp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-not-supported.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-access-subscription-set-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-add-subscription-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-change-named-subscription-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-find-subscription-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-subscription-set-state-description.rst create mode 100644 source/includes/api-details/csharp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-access-subscription-set-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-add-subscription-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-change-named-subscription-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-find-subscription-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-named-subscription-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-subscription-set-state-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst create mode 100644 source/includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst create mode 100644 source/includes/api-details/generic/sync/manage-sync-subscriptions-set-initial-subscriptions-not-supported.rst create mode 100644 source/includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-access-subscription-set-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-add-subscription-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-change-named-subscription-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-duplicate-subscription-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-find-subscription-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-remove-named-subscription-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-subscription-set-state-description.rst create mode 100644 source/includes/api-details/java/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-access-subscription-set-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-add-subscription-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-change-named-subscription-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-change-unnamed-subscription-js-ts-not-supported.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-find-subscription-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-subscription-by-reference-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-set-initial-subscriptions-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-with-name-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscription-set-state-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-unsubscribe-from-query-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst create mode 100644 source/includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-access-subscription-set-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-add-subscription-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-change-named-subscription-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-find-subscription-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-named-subscription-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscription-set-state-description.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-unsubscribe-from-query-not-supported.rst create mode 100644 source/includes/api-details/kotlin/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-access-subscription-set-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-add-subscription-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-change-named-subscription-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-change-unnamed-subscription-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-find-subscription-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-named-subscription-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-subscription-set-state-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst create mode 100644 source/includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst create mode 100644 source/includes/api-details/typescript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst create mode 100644 source/includes/api-details/typescript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst create mode 100644 source/includes/api-details/typescript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst delete mode 100644 source/includes/note-sync-state-complete.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-access-subscription-set.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-add-multiple-subscriptions.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-add-named-subscription.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-add-subscription.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-add-unnamed-subscription.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-change-named-subscription.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-change-unnamed-subscription.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-find-subscription.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-named-subscription.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-subscription-by-reference.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-unnamed-subscription.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-set-initial-subscriptions.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-all-objects-of-type.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query-with-name.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-unsubscribe-from-query.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-query-subscriptions-to-sync.rst create mode 100644 source/includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync.rst.rst diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-access-subscription-set-description.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-access-subscription-set-description.rst new file mode 100644 index 0000000000..a4f70e5e3b --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-access-subscription-set-description.rst @@ -0,0 +1,7 @@ +You can access the subscription set through the ``subscriptions()`` public +member function of a :cpp-sdk:`realm `. This +provides the :cpp-sdk:`sync_subscription_set +` where you can use the +``size()``, ``find()``, or ``update()`` member functions. You perform all +operations to add, find, update, remove, or watch subscriptions through this +property. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-add-subscription-description.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-add-subscription-description.rst new file mode 100644 index 0000000000..6b5e2e0206 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-add-subscription-description.rst @@ -0,0 +1,10 @@ +To add a subscription: + +1. Open the synced database. +#. Access the database's ``subscriptions`` property. +#. Open a subscription ``update`` block. +#. Call the ``add`` method with the object type to append the new subscription + to the subscription set. Optionally, add a query to subscribe to only a + subset of the objects that match the query. + +.. include:: /includes/note-cpp-supports-subset-of-rql.rst diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-change-named-subscription-description.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-change-named-subscription-description.rst new file mode 100644 index 0000000000..2906771174 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-change-named-subscription-description.rst @@ -0,0 +1,8 @@ +To update a subscription set, use the ``subscription().updates()`` function. +This gives you access to a :cpp-sdk:`mutable_sync_subscription_set +` where you can use the +``update_subscription()`` function to update a specific :cpp-sdk:`sync_subscription +`. + +You can change a ``sync_subscription``'s query in an update. You can add, remove, +or update the query string for a given ``sync_subscription``. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst new file mode 100644 index 0000000000..65de4b06e9 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst @@ -0,0 +1,7 @@ +C++ does not provide the ability to change an unnamed subscription. If you know +in advance that your app may need to change subscriptions, :ref:`create the +subscription with a name `. + +Alternately, you can :ref:`remove all subscriptions +`, and :ref:`create new subscriptions +` with the desired query. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-find-subscription-description.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-find-subscription-description.rst new file mode 100644 index 0000000000..d066d646b6 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-find-subscription-description.rst @@ -0,0 +1,4 @@ +To find a specific subscription, call the ``subscriptions().find()`` method +with the name of a subscription. + +You cannot find unnamed subscriptions in C++. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst new file mode 100644 index 0000000000..7328eaf1a8 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst @@ -0,0 +1,6 @@ +After you update subscriptions, call ``refresh()`` on the :cpp-sdk:`realm +`. This updates the database and outstanding objects +managed by the database to point to the most recent data. + +.. literalinclude:: /examples/generated/cpp/flexible-sync.snippet.refresh-the-realm.cpp + :language: cpp diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst new file mode 100644 index 0000000000..f1a3ed12ff --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst @@ -0,0 +1,2 @@ +You can remove all subscriptions in a subscription set using the ``clear()`` +function. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-not-supported.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-not-supported.rst new file mode 100644 index 0000000000..cbdaf4abf7 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-not-supported.rst @@ -0,0 +1,8 @@ +C++ does not provide the ability to remove all subscriptions to a specific +object type. If you know in advance that your app may need to remove +subscriptions, :ref:`create the subscription with a name +`. + +Alternately, you can :ref:`remove all subscriptions +`, and then :ref:`add subscriptions +` that your app still needs. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst new file mode 100644 index 0000000000..1352044012 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst @@ -0,0 +1,5 @@ +C++ does not provide the ability to remove all unnamed subscriptions. + +Instead, you can :ref:`remove all subscriptions +`, and then :ref:`add subscriptions +` that your app still needs. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst new file mode 100644 index 0000000000..1cd8a4af8a --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst @@ -0,0 +1,4 @@ +You can remove a specific subscription by name using the ``remove()`` function +inside a ``subscription().updates()`` block. Removing a subscription by name +throws an error if the subscription does not exist, so you should check for a +subscription before removing it. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-subscription-by-reference-not-supported.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-subscription-by-reference-not-supported.rst new file mode 100644 index 0000000000..8f03828d03 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-subscription-by-reference-not-supported.rst @@ -0,0 +1,7 @@ +C++ does not provide the ability to remove a subscription by reference. If +you know in advance that your app may need to remove subscriptions, +:ref:`create the subscription with a name `. + +Alternately, you can :ref:`remove all subscriptions +`, and then :ref:`add subscriptions +` that your app still needs. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst new file mode 100644 index 0000000000..fe09a2d741 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst @@ -0,0 +1,7 @@ +C++ does not provide the ability to remove a single unnamed subscription. If +you know in advance that your app may need to remove subscriptions, +:ref:`create the subscription with a name `. + +Alternately, you can :ref:`remove all subscriptions +`, and then :ref:`add subscriptions +` that your app still needs. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-subscription-set-state-not-supported.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-subscription-set-state-not-supported.rst new file mode 100644 index 0000000000..39726ed371 --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-subscription-set-state-not-supported.rst @@ -0,0 +1 @@ +C++ does not currently provide an API to check the state of a subscription set. diff --git a/source/includes/api-details/cpp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-not-supported.rst b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-not-supported.rst new file mode 100644 index 0000000000..3dfc9d778b --- /dev/null +++ b/source/includes/api-details/cpp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-not-supported.rst @@ -0,0 +1 @@ +C++ does not currently provide an API to wait for subscription changes to sync. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-access-subscription-set-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-access-subscription-set-description.rst new file mode 100644 index 0000000000..a0db7d17f2 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-access-subscription-set-description.rst @@ -0,0 +1,5 @@ +You can access the :dotnet-sdk:`SubscriptionSet +` through the database +:dotnet-sdk:`Subscriptions ` +property. You perform all operations to add, find, update, remove, or watch +subscriptions through this property. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-add-subscription-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-add-subscription-description.rst new file mode 100644 index 0000000000..4d094bc13a --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-add-subscription-description.rst @@ -0,0 +1,20 @@ +To add a subscription: + +1. Open the synced database. +#. Access the database's :dotnet-sdk:`Realm.Subscriptions ` + property. +#. Open a subscription ``Update`` block. +#. Create a subscription to a specific object type. Optionally add a query to + subscribe to only a subset of the objects that match the query. +#. Call the ``Subscriptions.Add`` method with the subscription you just created + to append the new subscription to the subscription set. + +Alternately, to add a subscription to an existing subscription set, create +the query and then call :dotnet-sdk:`IQueryable.SubscribeAsync() +`. + +The ``SubscribeAsync`` method is shorthand for using :dotnet-sdk:`SubscriptionSet.Update() +` +to create an update block, and then calling the :dotnet-sdk:`SubscriptionSet.Add() +` +method on the ``SubscriptionSet``. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-change-named-subscription-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-change-named-subscription-description.rst new file mode 100644 index 0000000000..8c706fa020 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-change-named-subscription-description.rst @@ -0,0 +1,12 @@ +You can update a named subscription with a new query. To update a subscription's +query, pass the new query and a subscription option with the name of the +subscription that you want to update to the +``SubscriptionSet.Add()`` method. Like adding a new subscription, +you must update a subscription within an update block by calling +``SubscriptionSet.Update()`` method. + +The ``SubscriptionOptions.UpdateExisting`` field must be set to ``true``, or +else attempting to change the subscription throws an exception. + +In the following example, long running tasks are re-defined to be any tasks that +have taken more than 130 minutes. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst new file mode 100644 index 0000000000..a992561df3 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst @@ -0,0 +1,7 @@ +C# does not provide the ability to change an unnamed subscription. If you know +in advance that your app may need to change subscriptions, :ref:`create the +subscription with a name `. + +Alternately, you can :ref:`delete the unnamed subscription +`, and :ref:`create a new subscription +` with the desired query. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-find-subscription-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-find-subscription-description.rst new file mode 100644 index 0000000000..bfcf602047 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-find-subscription-description.rst @@ -0,0 +1,8 @@ +To find a specific subscription by name, call the +:dotnet-sdk:`Find() ` +method with the name of a subscription. + +You can also find a subscription matching a specific query by calling the +:dotnet-sdk:`Find() +` +method with an IQueryable argument. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst new file mode 100644 index 0000000000..ece7173f0e --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst @@ -0,0 +1,8 @@ +Within an update block, you can remove all subscriptions from the +subscriptions set. Call the :dotnet-sdk:`RemoveAll() +` +method on the ``SubscriptionSet``. + +By default, the ``RemoveAll()`` method only removes unnamed subscriptions. +Set the optional ``removedName`` boolean to ``true`` to also remove named +subscriptions. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst new file mode 100644 index 0000000000..8aecf715e7 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst @@ -0,0 +1,14 @@ +Within an update block, you can remove remove all unnamed subscriptions of a +class by passing the class name as a string to the +:dotnet-sdk:`RemoveAll("ClassName") +` +method. The ``RemoveAll()`` method has an optional second argument that is a +boolean, ``removedName``, which also removes the named subscriptions if it is +set to ``true``. ``removedName`` is set to false by default. + +Alternatively, you can remove all unnamed subscriptions of an object type +with :dotnet-sdk:`RemoveAll() +`. +The ``RemoveAll()`` method has an optional boolean ``removedName`` argument +that also removes the named subscriptions if it is set to ``true``. The ``removedName`` +argument is set to false by default. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst new file mode 100644 index 0000000000..40e1d2267a --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst @@ -0,0 +1,5 @@ +Within an update block, you can remove all unnamed subscriptions from the +subscriptions set. Call the :dotnet-sdk:`RemoveAll() +` +method on the ``SubscriptionSet``, with the optional boolean ``removedName`` +argument set to false. This removes only unnamed subscriptions. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst new file mode 100644 index 0000000000..12c9660706 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst @@ -0,0 +1,4 @@ +Within an update block, you can remove a specific subscription by name. Pass the +name to the :dotnet-sdk:`Remove() +` +method on the ``SubscriptionSet``. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst new file mode 100644 index 0000000000..89a887081b --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst @@ -0,0 +1,4 @@ +Within an update block, you can remove a specific subscription by reference. +Pass the subscription to the :dotnet-sdk:`Remove() +` +method on the ``SubscriptionSet``. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst new file mode 100644 index 0000000000..190c5885e8 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst @@ -0,0 +1,7 @@ +Within an update block, you can remove an unnamed subscription by its query. +Pass the query to the :dotnet-sdk:`Remove() +` +method on the ``SubscriptionSet``. + +In the following example, the subscription to tasks with an owner named 'Ben' is +removed from the subscriptions set. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst new file mode 100644 index 0000000000..096ded9576 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst @@ -0,0 +1,8 @@ +You can bootstrap the database with an initial subscription set +when you open it with a :dotnet-sdk:`FlexibleSyncConfiguration +`. Set the +:dotnet-sdk:`PopulateInitialSubscriptions +` +parameter to a callback that is invoked when the database instance is created. +Add the queries you want to use to bootstrap the database, as shown in the +following example. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-subscription-set-state-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-subscription-set-state-description.rst new file mode 100644 index 0000000000..970bb40b92 --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-subscription-set-state-description.rst @@ -0,0 +1,9 @@ +Use the :dotnet-sdk:`SubscriptionSet.State +` +property to read the current state of the subscription set. + +The ``Superseded`` state is a :dotnet-sdk:`SubscriptionSetState +` that can occur when another +thread updates a subscription on a different instance of the subscription set. +If the state becomes ``Superseded``, you must obtain a new instance of the +subscription set before you can update it. diff --git a/source/includes/api-details/csharp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst new file mode 100644 index 0000000000..fe50bbc2ab --- /dev/null +++ b/source/includes/api-details/csharp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst @@ -0,0 +1,17 @@ +Use the :dotnet-sdk:`SubscriptionSet.WaitForSynchronizationAsync() +` +method to wait for the server to acknowledge this set of subscriptions. If the +server rejects the change, the :dotnet-sdk:`SubscriptionSetState +` will be an error state, and +an exception will be thrown. + +An exception may occur if: + +- An unsupported query is subscribed to. Subscribing to an unsupported query + will pause synchronization. To resume synchronization, :ref:`remove the + unsupported query `. + +- You are performing an invalid action, such as adding an object that does not + match a subscription. This triggers a :ref:`client reset `: + data is erased from the device, and a new copy of the data is created without + any subscriptions in the set. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-access-subscription-set-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-access-subscription-set-description.rst new file mode 100644 index 0000000000..a75798c3c8 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-access-subscription-set-description.rst @@ -0,0 +1,5 @@ +you can access a +:flutter-sdk:`SubscriptionSet `, a +collection of subscriptions, through the ``Realm.subscriptions`` property. +You perform all operations to add, find, update, remove, or watch +subscriptions through this property. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-add-subscription-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-add-subscription-description.rst new file mode 100644 index 0000000000..3cf9f96457 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-add-subscription-description.rst @@ -0,0 +1,11 @@ +To add a subscription: + +1. Open the synced database. +#. Access the database's ``subscriptions`` property to interact with the + :flutter-sdk:`SubscriptionSet `. +#. Open a subscription ``update`` block by calling + :flutter-sdk:`SubscriptionSet.update() `. +#. Call the ``add`` method to append the new subscription to the + subscription set. +#. Pass a ``RealmResults`` query that you can create using the + :ref:`Realm Query Language query `. Optionally, add a query name. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-change-named-subscription-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-change-named-subscription-description.rst new file mode 100644 index 0000000000..4539d167ee --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-change-named-subscription-description.rst @@ -0,0 +1,10 @@ +You can update a named subscription with a new query. To update a subscription's +query, open an update block with ``SubscriptionSet.update()``. +In the callback function of the update block, pass the following arguments to ``MutableSubscriptionSet.add()``: + +- The new query +- The name of the subscription that you want to update +- ``update: true`` + +In the following example, long trains are re-defined to be any trains that +have more than 10 cars. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst new file mode 100644 index 0000000000..77d9e230dd --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst @@ -0,0 +1,7 @@ +Dart does not provide the ability to change an unnamed subscription. If you +know in advance that your app may need to change subscriptions, :ref:`create +the subscription with a name `. + +Alternately, you can :ref:`delete the unnamed subscription +`, and :ref:`create a new subscription +` with the desired query. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst new file mode 100644 index 0000000000..f6dcfc1c71 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst @@ -0,0 +1,3 @@ +If you add a duplicate **unnamed** subscription with the same query, the SDK +automatically removes it; adding an identical **named** subscription is a +no-op. Therefore, in both cases, duplicate subscriptions are ignored. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-find-subscription-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-find-subscription-description.rst new file mode 100644 index 0000000000..79cbe7901a --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-find-subscription-description.rst @@ -0,0 +1,7 @@ +To find a specific subscription by name, call the +:flutter-sdk:`findByName() ` +method with the name of a subscription. + +You can also find a subscription matching a specific query by calling the +:flutter-sdk:`find() ` method with an +RQL query. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst new file mode 100644 index 0000000000..e4e2bef0ea --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst @@ -0,0 +1,2 @@ +Within a subscription update block, you can remove all subscriptions from the +subscriptions set with :flutter-sdk:`MutableSubscriptionSet.clear() `. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst new file mode 100644 index 0000000000..48af685b31 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst @@ -0,0 +1,3 @@ +You can remove all subscriptions for a given SDK object type. Within a +subscription update block, call +:flutter-sdk:`MutableSubscriptionSet.removeByType() `. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst new file mode 100644 index 0000000000..2cf97aa4c8 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst @@ -0,0 +1,4 @@ +Within a subscription update block, you can remove all unnamed subscriptions +from the subscriptions set by calling :flutter-sdk:`MutableSubscriptionSet.clear() +` with an ``unnamedOnly`` argument +set to ``true``. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-named-subscription-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-named-subscription-description.rst new file mode 100644 index 0000000000..a72c42cf45 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-named-subscription-description.rst @@ -0,0 +1,3 @@ +Within an update block, you can remove a specific subscription by name. Pass +the name to :flutter-sdk:`MutableSubscriptionSet.removeByName() +`. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst new file mode 100644 index 0000000000..14ca6d8c65 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst @@ -0,0 +1,4 @@ +You can remove a subscription if you have a reference to its :flutter-sdk:`Subscription +` object. +Within a subscription update block, pass the ``Subscription`` reference to +:flutter-sdk:`MutableSubscriptionSet.remove() `. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst new file mode 100644 index 0000000000..703a0bba83 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst @@ -0,0 +1,6 @@ +Within an update block, you can remove a specific subscription by query. +Open an update block with ``SubscriptionSet.update()``. Pass the +``Subscription`` to :flutter-sdk:`MutableSubscriptionSet.removeByQuery() +`. + +In the following example, the subscription for all ``Plane`` objects is removed. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-description.rst new file mode 100644 index 0000000000..e6faa6f4c6 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-description.rst @@ -0,0 +1,11 @@ +To subscribe to a query, pass the following arguments to ``subscribe()``: + +- ``RealmResults query``: Required. A ``RealmResults`` object that you can + create using the :ref:`Realm Query Language `. +- ``String name``: Optional. Name for the subscription that you can refer to. +- ``bool update``: Optional. When true, adding a subscription with an existing + name replaces the existing query with the new query. When false, the SDK + throws an exception for duplicate subscriptions. Only use with named + subscriptions. + +In the following example, we subscribe to two new named queries. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst new file mode 100644 index 0000000000..8af0b49ddc --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst @@ -0,0 +1,7 @@ +To subscribe to a query with a name, pass the following arguments to ``subscribe()``: + +- ``RealmResults query``: Required. A ``RealmResults`` object that you can create using the + :ref:`Realm Query Language `. +- ``String name``: Optional. Name for the subscription that you can refer to. + +In the following example, we subscribe to two new named queries. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscription-set-state-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscription-set-state-description.rst new file mode 100644 index 0000000000..6b9a6dcd3d --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-subscription-set-state-description.rst @@ -0,0 +1,8 @@ +Use the :flutter-sdk:`Realm.subscriptions.state ` +property to read the current state of the subscription set. + +The ``superseded`` state is a :flutter-sdk:`SubscriptionSetState +` that can occur when another thread updates a +subscription on a different instance of the subscription set. If the state +becomes ``superseded``, you must obtain a new instance of the subscription set +before you can update it. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst new file mode 100644 index 0000000000..2ff60fb92c --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst @@ -0,0 +1,2 @@ +You can unsubscribe from a query's results using :flutter-sdk:`unsubscribe() +`. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst new file mode 100644 index 0000000000..3836c62430 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst @@ -0,0 +1,21 @@ +When you do need specify the desired sync behavior, configure the +:flutter-sdk:`waitForSyncMode ` option. + +This example uses the ``firstTime`` option, which is the default behavior. +A subscription with ``firstTime`` behavior only waits for sync to finish when a +subscription is first created. + +.. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.wait-first-time-subscribe-api.dart + :language: dart + :emphasize-lines: 5 + +The other supported ``waitForSyncMode`` options are: + +- ``always``: Wait to download matching objects every time your app launches. + The app must have an internet connection at every launch. +- ``never``: Never wait to download matching objects. The app needs an internet + connection for the user to authenticate the first time the app launches, but + can open offline on subsequent launches using cached credentials. + +You can optionally specify a :flutter-sdk:`cancellationToken ` +to limit how long the sync download runs. diff --git a/source/includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst b/source/includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst new file mode 100644 index 0000000000..23967457f8 --- /dev/null +++ b/source/includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst @@ -0,0 +1,11 @@ +Use :flutter-sdk:`Realm.subscriptions.waitForSynchronization() ` +to wait for the server to acknowledge this set of subscriptions. +If the server rejects the change, and an exception is thrown. + +An exception may occur if: + +- You subscribe to an unsupported query. Subscribing to an unsupported query will pause synchronization. + To resume synchronization, :ref:`remove the unsupported query `. +- You are performing an invalid action, such as adding an object that does not match a subscription. + This triggers a :ref:`client reset `: data is erased from the device, + and a new copy of the data is created without any subscriptions in the set. diff --git a/source/includes/api-details/generic/sync/manage-sync-subscriptions-set-initial-subscriptions-not-supported.rst b/source/includes/api-details/generic/sync/manage-sync-subscriptions-set-initial-subscriptions-not-supported.rst new file mode 100644 index 0000000000..e1e62323ee --- /dev/null +++ b/source/includes/api-details/generic/sync/manage-sync-subscriptions-set-initial-subscriptions-not-supported.rst @@ -0,0 +1,3 @@ +The selected language does not provide a dedicated API to set initial +subscriptions. Instead, refer to the :ref:`sdks-sync-subscriptions-add-subscription` +section on this page. diff --git a/source/includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst b/source/includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst new file mode 100644 index 0000000000..e51a3ebe76 --- /dev/null +++ b/source/includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst @@ -0,0 +1,3 @@ +The selected language does not support the API that enables you to subscribe +to a query. Instead, refer to :ref:`manually manage queries +`. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-access-subscription-set-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-access-subscription-set-description.rst new file mode 100644 index 0000000000..82b79ba8f6 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-access-subscription-set-description.rst @@ -0,0 +1,4 @@ +You can access the :java-sdk:`SubscriptionSet ` +through the :java-sdk:`Realm.getSubscriptions() ` +method. You perform all operations to add, find, update, remove, or watch +subscriptions through this property. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-add-subscription-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-add-subscription-description.rst new file mode 100644 index 0000000000..b382351c85 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-add-subscription-description.rst @@ -0,0 +1,12 @@ +To add a subscription: + +1. Open the synced database. +#. Call the ``getSubscriptions()`` method to interact with the subscription set. +#. Open a subscription ``update`` block using + :java-sdk:`SubscriptionSet.update() + `. +#. Use the :java-sdk:`MutableSubscriptionSet.addOrUpdate() + ` + method to append the new subscription to the subscription set. +#. Call ``Subscription.create()`` with a query to a specific object type. + Optionally, add a name for the query. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-change-named-subscription-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-change-named-subscription-description.rst new file mode 100644 index 0000000000..7d5f2b3775 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-change-named-subscription-description.rst @@ -0,0 +1,5 @@ +You can update subscriptions using :java-sdk:`SubscriptionSet.update() +`. +In this example, we use :java-sdk:`MutableSubscriptionSet.addOrUpdate() +` +to update the query for the subscription named "my frog subscription". diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst new file mode 100644 index 0000000000..71d788c522 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst @@ -0,0 +1,7 @@ +The Java SDK does not support updating subscriptions created without a name. +If you know in advance that your app may need to change subscriptions, +:ref:`create the subscription with a name `. + +Alternately, you can look up unnamed subscriptions by query, :ref:`remove them +from the subscription set `, and :ref:`create a new +subscription ` with the desired query. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-duplicate-subscription-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-duplicate-subscription-description.rst new file mode 100644 index 0000000000..37b53635a2 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-duplicate-subscription-description.rst @@ -0,0 +1,9 @@ +Subscription names must be unique. Adding a subscription +with the same name as an existing subscription throws an error. + +If you do not explicitly name a subscription, and instead subscribe +to the same unnamed query more than once, the SDD does not persist +duplicate queries to the subscription set. + +If you subscribe to the same query more than once under different names, +the SDK persists both subscriptions to the subscription set. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-find-subscription-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-find-subscription-description.rst new file mode 100644 index 0000000000..85746ac7ed --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-find-subscription-description.rst @@ -0,0 +1,8 @@ +To find a specific subscription by name, call the +:java-sdk:`find() ` +method with the name of a subscription. + +You can also find a subscription matching a specific query by calling the +:java-sdk:`find() +` method +with a :java-sdk:`RealmQuery ` argument. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst new file mode 100644 index 0000000000..a5d01f3365 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst @@ -0,0 +1,3 @@ +To remove all subscriptions from the subscription set, use +:java-sdk:`removeAll() ` +with no arguments. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst new file mode 100644 index 0000000000..f9cad38d10 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst @@ -0,0 +1,4 @@ +If you want to remove all subscriptions to a specific object type, pass +a class to the :java-sdk:`removeAll() +` +method. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst new file mode 100644 index 0000000000..8b4cf26586 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst @@ -0,0 +1,6 @@ +The Java SDK does not provide a method to remove all unnamed subscriptions. + +Instead, you can remove all subscriptions from the subscription set, with +:java-sdk:`removeAll() `. +Then, :ref:`create the new subscriptions +` that your app needs. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-named-subscription-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-named-subscription-description.rst new file mode 100644 index 0000000000..b3bc09b867 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-named-subscription-description.rst @@ -0,0 +1,5 @@ +You can remove a specific subscription query +using :java-sdk:`MutableSubscriptionSet.remove() +`. +The ``remove()`` method takes a subscription name, or a reference to the +subscription itself. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst new file mode 100644 index 0000000000..0c30406c98 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst @@ -0,0 +1,4 @@ +You can remove a subscription by reference when you pass the +subscription to the :java-sdk:`MutableSubscriptionSet.remove() +` +method. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst new file mode 100644 index 0000000000..bb3ea0c8e7 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst @@ -0,0 +1,5 @@ +The Java SDK does not provide a method to remove an unnamed subscription +directly. However, you can look up a subscription by query, and pass the +subscription to the :java-sdk:`MutableSubscriptionSet.remove() +` +method to remove it from the subscription set. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-subscription-set-state-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-subscription-set-state-description.rst new file mode 100644 index 0000000000..92eca87599 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-subscription-set-state-description.rst @@ -0,0 +1,17 @@ +You can watch the state of the subscription set with the +:java-sdk:`SubscriptionSet.State ` enum. +You can use subscription state to: + +- Show a progress indicator while data is downloading +- Find out when a subscription set becomes superseded + +You can access the state of your application's subscription set using +:java-sdk:`SubscriptionSet.getState() `. + +Superseded +`````````` + +``SUPERSEDED`` is a ``SubscriptionSet.State`` that can occur when another +thread writes a subscription on a different instance of the +subscription set. If the state becomes ``SUPERSEDED``, you must obtain +a new instance of the subscription set before you can write to it. diff --git a/source/includes/api-details/java/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst b/source/includes/api-details/java/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst new file mode 100644 index 0000000000..2afb9f60e3 --- /dev/null +++ b/source/includes/api-details/java/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst @@ -0,0 +1,11 @@ +Use the :java-sdk:`waitForInitialRemoteData() +` +builder method to force your application to block until client subscription +data synchronizes to the backend before opening the database. + +Alternately, you could use :java-sdk:`SubscriptionSet.waitForSynchronization() +` +or :java-sdk:`SubscriptionSet.waitForSynchronizationAsync() +` +to delay execution until subscription sync completes after instantiating +a sync connection. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-access-subscription-set-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-access-subscription-set-js-ts-description.rst new file mode 100644 index 0000000000..d08316c6ae --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-access-subscription-set-js-ts-description.rst @@ -0,0 +1,4 @@ +When using a synced database, you can access a ``SubscriptionSet``, a +collection of subscriptions, through the :js-sdk:`realm.subscriptions +` property. You perform all operations to +add, find, update, remove, or watch subscriptions through this property. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-add-subscription-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-add-subscription-js-ts-description.rst new file mode 100644 index 0000000000..a839d6898a --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-add-subscription-js-ts-description.rst @@ -0,0 +1,11 @@ +To add a subscription: + +1. Open the synced database. +#. Access the database's :js-sdk:`realm.subscriptions + ` property. +#. Open a subscription ``update`` block. +#. Create a subscription to a specific object type. Optionally add a query to + subscribe to only a subset of the objects that match the query. +#. Call the ``add()`` method with the subscription you just created + to append the new subscription to the subscription set. Optionally, you can + name the subscription. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-change-named-subscription-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-change-named-subscription-js-ts-description.rst new file mode 100644 index 0000000000..03cb2426f4 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-change-named-subscription-js-ts-description.rst @@ -0,0 +1,11 @@ +You can update a named subscription with a new query. To update a subscription's +query, pass the new query and a subscription option with the name of the +subscription that you want to update to the ``MutableSubscriptionSet.add()`` +method. Like adding a new subscription, you must update a subscription within a +transaction by calling ``subscriptions.update()``. + +The ``SubscriptionOptions.throwOnUpdate`` field must be set to ``false``, or +else attempting to change the subscription throws an exception. + +In the following example, long-running tasks are re-defined to be any tasks that +have taken more than 180 minutes. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-change-unnamed-subscription-js-ts-not-supported.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-change-unnamed-subscription-js-ts-not-supported.rst new file mode 100644 index 0000000000..2a69c057c4 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-change-unnamed-subscription-js-ts-not-supported.rst @@ -0,0 +1,7 @@ +The JS SDK does not provide the ability to change an unnamed subscription. If +you know in advance that your app may need to change subscriptions, :ref:`create +the subscription with a name `. + +Alternately, you can :ref:`delete the unnamed subscription +`, and :ref:`create a new subscription +` with the desired query. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-find-subscription-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-find-subscription-js-ts-description.rst new file mode 100644 index 0000000000..8492b6225e --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-find-subscription-js-ts-description.rst @@ -0,0 +1,8 @@ +To find a specific subscription by name, call the +:js-sdk:`findByName() ` +method with the name of a subscription. + +You can also find a subscription matching a specific query by calling the +:js-sdk:`findByQuery() +` method with a +query to match against. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-js-ts-description.rst new file mode 100644 index 0000000000..75ec192a8f --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-js-ts-description.rst @@ -0,0 +1,4 @@ +To remove all subscriptions from the subscriptions set, execute a transaction on +the subscriptions set. Call :js-sdk:`removeAll() +` on the +``MutableSubscriptionSet`` within the transaction. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-js-ts-description.rst new file mode 100644 index 0000000000..4cad711bff --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-js-ts-description.rst @@ -0,0 +1,5 @@ +To remove all subscriptions on a specific object type, execute a transaction on +the subscriptions set. Within the transaction, pass the object type as a string +to the :js-sdk:`removeByObjectType +` method on the +``MutableSubscriptionSet``. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-js-ts-description.rst new file mode 100644 index 0000000000..62124d90df --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-js-ts-description.rst @@ -0,0 +1,3 @@ +You can remove all unnamed subscriptions from the subscription set by +calling ``.removeUnnamed()`` on ``mutableSubs``. ``.removeUnnamed()`` returns +the number of unnamed subscriptions removed. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst new file mode 100644 index 0000000000..f97ec343a8 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst @@ -0,0 +1,5 @@ +To remove a specific subscription by name, execute a transaction on the +subscriptions set. Within the transaction, pass the name to the +:js-sdk:`removeByName() +` method on the +``MutableSubscriptionSet``. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-subscription-by-reference-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-subscription-by-reference-js-ts-description.rst new file mode 100644 index 0000000000..c95b0be89f --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-subscription-by-reference-js-ts-description.rst @@ -0,0 +1,5 @@ +If you have a reference to a subscription, you can remove that subscription. To +do so, execute a transaction on the subscriptions set. Within the transaction, +pass the reference variable to the :js-sdk:`removeSubscription +` method on the +``MutableSubscriptionSet``. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst new file mode 100644 index 0000000000..656bdcbaab --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst @@ -0,0 +1,7 @@ +You can remove a specific subscription by query by executing a transaction on +the subscriptions set. Pass the query to the :js-sdk:`remove() +` method on the +``MutableSubscriptionSet`` within a transaction. + +In the following example, the subscription to tasks with an owner named 'Ben' is +removed from the subscriptions set. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-set-initial-subscriptions-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-set-initial-subscriptions-js-ts-description.rst new file mode 100644 index 0000000000..014f56125a --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-set-initial-subscriptions-js-ts-description.rst @@ -0,0 +1,10 @@ +To set initial subscriptions, include the ``initialSubscriptions`` field in +your realm's :js-sdk:`SyncConfiguration `. +Within the ``initialSubscriptions`` object, add an ``update`` +field set to a callback that subscribes to queries. + +By default, initial subscriptions are only created the first time the database +is opened. If your app needs to rerun this initial subscription every time the app +starts, you can set ``rerunOnOpen`` to ``true``. You might need to do this to +re-run dynamic time ranges or other queries that require a re-computation of +static variables for the subscription. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-js-ts-description.rst new file mode 100644 index 0000000000..fceca4706a --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-js-ts-description.rst @@ -0,0 +1,13 @@ +To subscribe to a query: + +#. Query for the objects that you want to read and write. +#. Call ``subscribe()`` on the query results to create a sync subscription for + objects matching the query. +#. Pass a ``SubscriptionOptions`` object. + +Most of the time, you should give your subscriptions a name. If you don't, the +name is set to :mdn:`null `. + +If you use ``filtered()`` on an unnamed query subscription, the subscription +identifier is based on the ``filtered`` query. This means that every time your +query string changes, ``subscribe()`` will create a new subscription. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-with-name-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-with-name-js-ts-description.rst new file mode 100644 index 0000000000..055e5a5a88 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-with-name-js-ts-description.rst @@ -0,0 +1,7 @@ +To subscribe to a query: + +#. Query for the objects that you want to read and write. +#. Call ``subscribe()`` on the query results to create a sync subscription for + objects matching the query. +#. Pass a ``SubscriptionOptions`` object that contains the ``name`` property to + ``subscribe()``. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscription-set-state-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscription-set-state-js-ts-description.rst new file mode 100644 index 0000000000..6803e3ba45 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-subscription-set-state-js-ts-description.rst @@ -0,0 +1,13 @@ +You can check the :js-sdk:`subscription state ` +to see if the server has acknowledged the subscription and the device has +downloaded the data locally. + +You can use subscription state to: + +- Trigger error handling +- Show if the transaction is pending or has completed +- Find out when a subscription set is superseded, and you should obtain a + new instance of the subscription set to write a subscription change + +The :js-sdk:`SubscriptionSetState enum ` +provides information about the status of a subscription. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-unsubscribe-from-query-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-unsubscribe-from-query-js-ts-description.rst new file mode 100644 index 0000000000..777a390204 --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-unsubscribe-from-query-js-ts-description.rst @@ -0,0 +1 @@ +To unsubscribe from a query's results, call the ``unsubscribe()`` method. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst new file mode 100644 index 0000000000..6f4f742c8c --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst @@ -0,0 +1,16 @@ +When you call the ``.subscribe()`` method on a query, you can optionally +specify the ``WaitForSync`` behavior, which is an enum of options describing +different sync behaviors. + +The supported ``WaitForSync`` options are: + +- ``FirstTime``: Wait for sync to finish when a subscription is first created. +- ``Always``: Wait to download matching objects every time your app launches. + The app must have an internet connection at every launch. +- ``Never``: Never wait to download matching objects. The app needs an internet + connection for the user to authenticate the first time the app launches, but + can :ref:`open offline ` on subsequent + launches using cached credentials. + +You can optionally specify a ``timeout`` value to limit how long the sync +download runs. diff --git a/source/includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-js-ts-description.rst b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-js-ts-description.rst new file mode 100644 index 0000000000..b0efe1a73d --- /dev/null +++ b/source/includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-js-ts-description.rst @@ -0,0 +1,10 @@ +You can wait for subscription changes to sync in two ways: + +- ``await`` the call to :js-sdk:`SubscriptionSet.update() + `, which returns a promise + that resolves when the ``SubscriptionSet`` is synchronized, or is rejected if + there was an error during synchronization. +- Explicitly call :js-sdk:`SubscriptionSet.waitForSynchronization() + ` to + wait for the server to acknowledge this set of subscriptions and return the + matching objects, or throw an error. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-access-subscription-set-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-access-subscription-set-description.rst new file mode 100644 index 0000000000..0dc2e2e433 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-access-subscription-set-description.rst @@ -0,0 +1,4 @@ +You can access a :kotlin-sync-sdk:`SubscriptionSet +` through the +database ``subscriptions`` property. You perform all operations to add, find, +update, remove, or watch subscriptions through this property. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-add-subscription-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-add-subscription-description.rst new file mode 100644 index 0000000000..2a40bef164 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-add-subscription-description.rst @@ -0,0 +1,10 @@ +To add a subscription: + +1. Open the synced database. +#. Access the database's ``subscriptions`` property. +#. Open a subscription ``update`` block. +#. Call the ``add`` method to append the new subscription to the + subscription set. +#. Pass a query with the name of the object type. Optionally, use + :ref:`Realm Query Language ` to query only a subset of the objects. + You can also add an optional query name. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-change-named-subscription-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-change-named-subscription-description.rst new file mode 100644 index 0000000000..44328b0aa0 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-change-named-subscription-description.rst @@ -0,0 +1,10 @@ +You can update subscriptions using +:kotlin-sync-sdk:`SubscriptionSet.update() +`. + +In this example, we use :kotlin-sync-sdk:`MutableSubscriptionSet.add() +`. +to update the query for the subscription named ``"bob_smith_teams"``. + +You must set the ``updateExisting`` parameter to ``true`` to update +a subscription - otherwise the SDK throws an exception. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst new file mode 100644 index 0000000000..41ff017cf1 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst @@ -0,0 +1,7 @@ +Kotlin does not provide the ability to change an unnamed subscription. If you +know in advance that your app may need to change subscriptions, :ref:`create the +subscription with a name `. + +Alternately, you can :ref:`delete the unnamed subscription +`, and :ref:`create a new subscription +` with the desired query. \ No newline at end of file diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-find-subscription-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-find-subscription-description.rst new file mode 100644 index 0000000000..1d706baa57 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-find-subscription-description.rst @@ -0,0 +1,10 @@ +To find a specific subscription by name, call the +:kotlin-sync-sdk:`findByName() +` +method with the name of a subscription. + +You can also find a subscription matching a specific query by calling the +:kotlin-sync-sdk:`findByQuery() +` +method with a :kotlin-sdk:`RealmQuery ` +argument. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst new file mode 100644 index 0000000000..792c44ad45 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst @@ -0,0 +1,4 @@ +To remove all subscriptions from the subscription set, use +:kotlin-sync-sdk:`MutableSubscriptionSet.removeAll() +` +with no arguments. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst new file mode 100644 index 0000000000..ceb4bb97ce --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst @@ -0,0 +1,4 @@ +If you want to remove all subscriptions to a specific object type, pass +a class to the :kotlin-sync-sdk:`MutableSubscriptionSet.removeAll() +` +method. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst new file mode 100644 index 0000000000..c28ae9c786 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst @@ -0,0 +1,2 @@ +You can remove all unnamed (anonymous) subscriptions from the subscription set by +setting ``anonymousOnly`` to ``true`` when you call the ``removeAll`` method. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-named-subscription-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-named-subscription-description.rst new file mode 100644 index 0000000000..bd58a591ba --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-named-subscription-description.rst @@ -0,0 +1,3 @@ +You can remove a named subscription query by passing the subscription +name to :kotlin-sync-sdk:`MutableSubscriptionSet.remove() +`. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst new file mode 100644 index 0000000000..897416d887 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst @@ -0,0 +1,3 @@ +You can remove a subscription by reference by passing the subscription +to :kotlin-sync-sdk:`MutableSubscriptionSet.remove() +`. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst new file mode 100644 index 0000000000..b6194b8f72 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst @@ -0,0 +1,4 @@ +Kotlin does not provide an API to directly remove an unnamed subscription. +However, you can you can look up the subscription by query and then pass +the reference to the subscription to :kotlin-sync-sdk:`MutableSubscriptionSet.remove() +`. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst new file mode 100644 index 0000000000..af1d87010f --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst @@ -0,0 +1,22 @@ +You can bootstrap the database with an initial subscription set when you open +it with the +:kotlin-sync-sdk:`SyncConfiguration() `. + +Pass the ``initialSubscriptions`` parameter with the +subscription queries you want to use to bootstrap the database: + +.. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.initialize-subscribe-query-realm-app.kt + :language: kotlin + +If your app needs to rerun this initial subscription every +time the app starts, you can pass an additional parameter: +``rerunOnOpen``. This is a boolean that denotes whether the +initial subscription should re-run every time the +app starts. You might need to do this to re-run dynamic time +ranges or other queries that require a re-computation of +static variables for the subscription. + +In this example, we only want incomplete tasks. With +``rerunOnOpen`` set to ``true``, the query dynamically +recalculates the relevant objects to sync based on the +desired query results every time the app starts. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-description.rst new file mode 100644 index 0000000000..143644eb5f --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-description.rst @@ -0,0 +1,15 @@ +To subscribe to a ``RealmQuery`` or ``RealmResults`` set, call the +:kotlin-sync-sdk:`.subscribe() ` method. + +.. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.subscribe-unnamed-query.kt + :language: kotlin + +Update a Query Subscription +``````````````````````````` + +You can update a named query subscription with a new query +by setting ``updateExisting`` to ``true``. + +This updates the subscription automatically, instead of requiring you to +:ref:`manually update the subscription ` +in the subscription set. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst new file mode 100644 index 0000000000..c09b1846de --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst @@ -0,0 +1 @@ +To add a name to the subscription, pass a string when you call ``.subscribe()``. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscription-set-state-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscription-set-state-description.rst new file mode 100644 index 0000000000..92a9b7dc97 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-subscription-set-state-description.rst @@ -0,0 +1,9 @@ +Use the :kotlin-sync-sdk:`SubscriptionSet.state +` +property to read the current state of the subscription set. + +``SUPERCEDED`` (sic -- note alternate spelling) is a :kotlin-sync-sdk:`SubscriptionSetState +` +that can occur when another thread writes a subscription on a different instance +of the subscription set. If the state becomes ``SUPERCEDED``, you must obtain a +new instance of the subscription set before you can write to it. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-unsubscribe-from-query-not-supported.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-unsubscribe-from-query-not-supported.rst new file mode 100644 index 0000000000..c68cb245d1 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-unsubscribe-from-query-not-supported.rst @@ -0,0 +1,3 @@ +Kotlin does not currently support the unsubscribe API. Instead, you can +:ref:`manually remove subscriptions ` from the +subscription set. diff --git a/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst new file mode 100644 index 0000000000..3ff1ce2bc3 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst @@ -0,0 +1,10 @@ +Use the :kotlin-sync-sdk:`SyncConfiguration.waitForInitialRemoteData() +` +builder method to force your application to block until client subscription +data synchronizes to the backend before opening the database. + +Alternately, you can use :kotlin-sync-sdk:`SubscriptionSet.waitForSynchronization() +` +to delay execution until subscription sync completes after instantiating +a sync connection. + diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-access-subscription-set-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-access-subscription-set-description.rst new file mode 100644 index 0000000000..520e9d25fb --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-access-subscription-set-description.rst @@ -0,0 +1,5 @@ +You can access a :swift-sdk:`SyncSubscriptionSet +` through the database :swift-sdk:`subscriptions +` +property. You perform all operations to add, find, update, remove, or watch +subscriptions through this property. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-add-subscription-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-add-subscription-description.rst new file mode 100644 index 0000000000..064327fcec --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-add-subscription-description.rst @@ -0,0 +1,10 @@ +To add a subscription: + +1. Open the synced database. +#. Access the database's ``subscriptions`` property. +#. Open a subscription ``update`` block. +#. Call the ``append`` method to append the new subscription to the + subscription set. +#. Pass a ``QuerySubscription`` with the name of the object + type. Optionally, use the ``.where`` or ``NSPredicate`` query API to + subscribe to only a subset of the objects of the type. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-change-named-subscription-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-change-named-subscription-description.rst new file mode 100644 index 0000000000..f6bb0a9aac --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-change-named-subscription-description.rst @@ -0,0 +1,6 @@ +You can :swift-sdk:`search for a subscription by name +`, +and then update the named subscription. + +To change a subscription query, call the ``updateQuery`` method on an existing +query inside a ``subscriptions.update`` block. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-change-unnamed-subscription-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-change-unnamed-subscription-description.rst new file mode 100644 index 0000000000..fcec0ae0b7 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-change-unnamed-subscription-description.rst @@ -0,0 +1,5 @@ +To change a subscription query, call the ``updateQuery`` method on an existing +query inside a ``subscriptions.update`` block. + +In this example, we search for a subscription matching our query and then +update it with a new query. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst new file mode 100644 index 0000000000..caffbff8ab --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst @@ -0,0 +1,16 @@ +Subscription names must be unique. Trying to append a subscription +with the same name as an existing subscription throws an error. + +If you do not explicitly name a subscription, and instead subscribe +to the same unnamed query more than once, the SDK does not persist +duplicate queries to the subscription set. + +If you subscribe to the same query more than once under different names, +the SDK persists both subscriptions to the subscription set. + +If your application flow appends the same named subscription to the subscription +set every time you run the application, add a check for an existing subscription +before appending it. + +.. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.check-before-adding-subscription.swift + :language: swift diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-find-subscription-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-find-subscription-description.rst new file mode 100644 index 0000000000..2f2a7f2391 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-find-subscription-description.rst @@ -0,0 +1,10 @@ +To find a specific subscription by name, call the +:swift-sdk:`subscriptions.first(named: ) +` +method with the name of a subscription. + +You can also find a subscription matching a specific query by calling one of +the variants of :swift-sdk:`subscriptions.first(ofType: where:) +` +method with the SDK object type and a query, query builder, or NSPredicate +argument. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst new file mode 100644 index 0000000000..eeba7ff845 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst @@ -0,0 +1,2 @@ +To remove all subscriptions from the subscription set, use the ``removeAll`` +method in a subscription update block. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst new file mode 100644 index 0000000000..085a21bf36 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst @@ -0,0 +1,4 @@ +You can remove all subscriptions to a specific object type by calling the +:swift-sdk:`removeAll +` +method with an ``ofType`` argument in a subscription update block. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst new file mode 100644 index 0000000000..09f0ebeb74 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst @@ -0,0 +1,2 @@ +You can remove all unnamed subscriptions from the subscription set by +setting ``unnamedOnly`` to ``true`` when you call the ``removeAll`` method. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-named-subscription-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-named-subscription-description.rst new file mode 100644 index 0000000000..49f9f3b06c --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-named-subscription-description.rst @@ -0,0 +1,4 @@ +You can remove a specific named subscription by passing the name to the +:swift-sdk:`remove() +` +method in a subscription update block. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst new file mode 100644 index 0000000000..2489e8372c --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst @@ -0,0 +1,3 @@ +You can remove a subscription by reference by passing the subscription to the +:swift-sdk:`remove() ` +method in a subscription update block. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst new file mode 100644 index 0000000000..f7e20a1eb2 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst @@ -0,0 +1,3 @@ +You can remove a specific subscription query in a subscription update block +by calling ``remove``. You can find a subscription matching the query to remove +the appropriate subscription. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst new file mode 100644 index 0000000000..71668ef9b7 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst @@ -0,0 +1,22 @@ +You can set initial subscriptions through the +:swift-sdk:`flexibleSyncConfiguration() +`. +Pass the ``initialSubscriptions`` parameter with the subscription queries +you want to use to bootstrap the database: + +.. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.add-initial-subscriptions.swift + :language: swift + +If your app needs to rerun this initial subscription every time the app starts, +you can pass an additional parameter - ``rerunOnOpen``. This is a bool that +denotes whether the initial subscription should re-run every time the +app starts. You might need to do this to re-run dynamic time ranges +or other queries that require a re-computation of static variables for the +subscription. + +In this example, we don't want users to be overwhelmed by irrelevant tasks, +so we'll load only tasks due within the previous 7 days and the next 7 days. +Tasks that were due more than a week ago are no longer relevant, and tasks +that are due further out than the next week are also not relevant. With +``rerunOnOpen`` here, the query dynamically recalculates the relevant +objects to sync based on the desired date range every time the app starts. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-description.rst new file mode 100644 index 0000000000..344d761a4b --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-description.rst @@ -0,0 +1,20 @@ +Use the :swift-sdk:`.subscribe() +` +method to create a subscription for objects matching the query. + +.. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.subscribe-to-results-unnamed.swift + :language: swift + +Subscribe to an Actor-Confined Query +```````````````````````````````````` + +You can subscribe to actor-confined queries. For more information about +working with actor-confined database instances, refer to +:ref:`swift-actor-isolated-realm`. + +You can subscribe to an actor-confined query on the MainActor. + +.. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.subscribe-to-results-on-main-actor.swift + :language: swift + +Or subscribe to a query on a custom actor. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst new file mode 100644 index 0000000000..e267599a3e --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst @@ -0,0 +1,4 @@ +To give a query subscription a name, supply a string name argument for the +``name`` parameter when you call the :swift-sdk:`.subscribe() +` +method. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscription-set-state-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscription-set-state-description.rst new file mode 100644 index 0000000000..4a77164174 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-subscription-set-state-description.rst @@ -0,0 +1,9 @@ +Use the :swift-sdk:`SubscriptionSet.state +` +property to read the current state of the subscription set. + +The ``superseded`` state is a :swift-sdk:`SyncSubscriptionState +` +that can occur when another thread updates a subscription on a different +instance of the subscription set. If the state becomes ``superseded``, you must +obtain a new instance of the subscription set before you can update it. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst new file mode 100644 index 0000000000..5d1e903325 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst @@ -0,0 +1,4 @@ +You can unsubscribe from a query's ``Results`` set by calling +:swift-sdk:`.unsubscribe() +` on the query. +This removes the subscription from the ``MutableSubscriptionSet``. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst new file mode 100644 index 0000000000..344909a423 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst @@ -0,0 +1,17 @@ +To wait for a query subscription to sync, pass the ``waitForSync`` parameter +when you call the :swift-sdk:`.subscribe() +` +method. This takes a ``WaitForSyncMode`` enum argument, whose cases are: + +- **.onCreation**: Wait to download matching objects when your app creates the + subscription. Otherwise, return without waiting for new downloads. The + app must have an internet connection the first time you add the subscription. +- **.always**: Wait to download matching objects when ``.subscribe()`` is executed. + The app must have an internet connection when ``.subscribe()`` is executed. +- **.never**: Never wait to download matching objects. The app needs an internet + connection for the user to authenticate the first time the app launches, but + can :ref:`open offline ` on subsequent + launches using cached credentials. + +You can optionally specify a ``timeout`` value of type :apple:`TimeInterval +`. diff --git a/source/includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst b/source/includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst new file mode 100644 index 0000000000..6392d63492 --- /dev/null +++ b/source/includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst @@ -0,0 +1,32 @@ +Async/Await +``````````` + +If your application uses async/await, you don't need the ``onComplete`` +block. The update executes asynchronously and throws an +error if the update cannot complete successfully. + +.. code-block:: swift + + @MainActor + func changeSubscription() async throws { + let subscriptions = realm.subscriptions + try await subcriptions.update { + subscriptions.remove { + QuerySubscription { + $0.assignee == "Joe Doe" + } + } + } + } + +Completion +`````````` + +If your application does not use Swift's async/await feature, you can react +to subscription changes syncing with the server using the ``onComplete`` +block. This block is called after subscriptions are synchronized with the +server. If you want to react to subscription state changes by redrawing a +UI, for example, or taking another action based on changes to the data set, +take those actions in ``onComplete``. This is also where you can handle +optional errors that occur during synchronization. + diff --git a/source/includes/api-details/typescript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst b/source/includes/api-details/typescript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst new file mode 100644 index 0000000000..f97ec343a8 --- /dev/null +++ b/source/includes/api-details/typescript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst @@ -0,0 +1,5 @@ +To remove a specific subscription by name, execute a transaction on the +subscriptions set. Within the transaction, pass the name to the +:js-sdk:`removeByName() +` method on the +``MutableSubscriptionSet``. diff --git a/source/includes/api-details/typescript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst b/source/includes/api-details/typescript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst new file mode 100644 index 0000000000..3c3b6ba3ee --- /dev/null +++ b/source/includes/api-details/typescript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst @@ -0,0 +1,4 @@ +You can remove a specific subscription by query by executing a transaction on +the subscriptions set. Pass the query to the :js-sdk:`remove() +` method on the +``MutableSubscriptionSet`` within a transaction. diff --git a/source/includes/api-details/typescript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst b/source/includes/api-details/typescript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst new file mode 100644 index 0000000000..4a96cf8a8e --- /dev/null +++ b/source/includes/api-details/typescript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst @@ -0,0 +1,22 @@ +When you call the ``.subscribe()`` method on a query, you can optionally +specify the ``WaitForSync`` behavior, which is an enum of options describing +different sync behaviors. + +This example uses the ``FirstTime`` option, which is the default behavior. +A subscription with ``FirstTime`` behavior only waits for sync to finish when a +subscription is first created. + +.. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.sub-wait-first.ts + :language: typescript + +The other supported ``WaitForSync`` options are: + +- ``Always``: Wait to download matching objects every time your app launches. + The app must have an internet connection at every launch. +- ``Never``: Never wait to download matching objects. The app needs an internet + connection for the user to authenticate the first time the app launches, but + can :ref:`open offline ` on subsequent + launches using cached credentials. + +You can optionally specify a ``timeout`` value to limit how long the sync +download runs. diff --git a/source/includes/flex-sync-limitations.rst b/source/includes/flex-sync-limitations.rst index b862e019f2..5b6fe08ff1 100644 --- a/source/includes/flex-sync-limitations.rst +++ b/source/includes/flex-sync-limitations.rst @@ -8,7 +8,7 @@ store, or user, such as ``user_id == $0, “641374b03725038381d2e1fb”``, is a good candidate for an indexed queryable field. However, an indexed queryable field has specific requirements for use in a query subscription: -- The indexed queryable field must be used in every subscription query. It +- The indexed queryable field must be used in *every* subscription query. It cannot be missing from the query. - The indexed queryable field must use an ``==`` or ``IN`` comparison against a constant at least once in the subscription query. For example, @@ -20,7 +20,7 @@ queryable field is directly compared against a constant using ``==`` or ``IN`` at least once. For example, ``store_id IN {1,2,3} AND region=="Northeast"`` or ``store_id == 1 AND (active_promotions < 5 OR num_employees < 10)``. -*Invalid* Flexible Sync queries on an indexed queryable field include queries +*Invalid* Device Sync queries on an indexed queryable field include queries where: - The indexed queryable field does not use ``AND`` with the rest of the query. @@ -37,14 +37,14 @@ where: ``region=="Northeast`` or ``truepredicate`` are invalid because they do not contain the indexed queryable field. -Unsupported Query Operators in Flexible Sync -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Unsupported Sync Subscription Query Operators +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Flexible Sync has some limitations when using RQL operators. When you -write the :ref:`query subscription ` -that determines which data to sync, the server does not support these -query operators. However, you can still use the full range of RQL features -to query the synced data set in the client application. +Device Sync does not support all RQL operators when creating your subscription +queries. When you write the :ref:`query subscription ` +that determines which data to sync to the device, the server does not support +these query operators. However, you can use all RQL operators to query the +data set once it has synced to the client application. .. list-table:: :header-rows: 1 @@ -63,12 +63,12 @@ Case insensitive queries (``[c]``) cannot use indexes effectively. As a result, case insensitive queries are not recommended, since they could lead to performance problems. -Flexible Sync only supports ``@count`` for array fields. +Device Sync only supports ``@count`` for array fields. List Queries ~~~~~~~~~~~~ -Flexible Sync supports querying lists using the ``IN`` operator. +Device Sync supports querying lists using the ``IN`` operator. You can query a list of constants to see if it contains the value of a queryable field: @@ -88,8 +88,9 @@ contains a constant value: .. warning:: - You **cannot** compare two lists with each other in a Flexible Sync query. - Note that this is valid Realm Query Language syntax outside of Flexible Sync queries. + You **cannot** compare two lists with each other in a Device Sync query. + Note that this is valid Realm Query Language syntax outside of Device Sync + queries. .. code-block:: javascript :copyable: false @@ -103,5 +104,5 @@ contains a constant value: Embedded or Linked Objects ~~~~~~~~~~~~~~~~~~~~~~~~~~ -Flexible Sync does not support querying on properties in Embedded Objects +Device Sync does not support querying on properties in Embedded Objects or links. For example, ``obj1.field == "foo"``. diff --git a/source/includes/note-sync-state-complete.rst b/source/includes/note-sync-state-complete.rst deleted file mode 100644 index 61a660564f..0000000000 --- a/source/includes/note-sync-state-complete.rst +++ /dev/null @@ -1,15 +0,0 @@ -.. note:: Subscription State "Complete" - - The subscription set state "complete" does not mean "sync is done" or "all - documents have been synced". "Complete" means the following two things have - happened: - - - The subscription has become the active subscription set that is currently - being synchronized with the server. - - The documents that matched the subscription *at the time the subscription - was sent to the server* are now on the local device. Note that this does - not necessarily include all documents that currently match the - subscription. - - The Realm SDK does not provide a way to check whether all documents that - match a subscription have synced to the device. diff --git a/source/includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst b/source/includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst index 861f97a29e..fd9465f894 100644 --- a/source/includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst +++ b/source/includes/pbs-to-fs-migration-remove-and-add-subscriptions.rst @@ -2,8 +2,8 @@ When you migrate from Partition-Based Sync to Flexible Sync, the SDK automatically creates hidden Sync subscriptions for your app. The next time you add or change subscriptions, we recommend that you: -1. :ref:`Remove the automatically-generated subscriptions `. -2. :ref:`Manually add the relevant subscriptions in your client codebase `. +1. :ref:`Remove the automatically-generated subscriptions `. +2. :ref:`Manually add the relevant subscriptions in your client codebase `. This enables you to see all of your subscription logic together in your codebase for future iteration and debugging. diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-access-subscription-set.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-access-subscription-set.rst new file mode 100644 index 0000000000..e563809665 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-access-subscription-set.rst @@ -0,0 +1,63 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.get-subscriptions.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.get-subscriptions.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-multiple-subscriptions.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-multiple-subscriptions.rst new file mode 100644 index 0000000000..69964babed --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-multiple-subscriptions.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst + + - id: csharp + content: | + + While you can add a single query using ``SubscribeAsync``, you can + only batch multiple queries within a ``SubscriptionSet.Update`` block. + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.update-multiple-subscriptions.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.add-subscription.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.subscribe-to-queryable-fields.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.add-multiple-subscriptions.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-named-subscription.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-named-subscription.rst new file mode 100644 index 0000000000..536afacbea --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-named-subscription.rst @@ -0,0 +1,63 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/flexible-sync.snippet.subscribe-to-objects-matching-a-query.cpp + :language: cpp + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.subscribe-to-queryable-fields.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.add-a-named-subscription.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.query-subscription-by-name.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-subscription.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-subscription.rst new file mode 100644 index 0000000000..86bac7a5c0 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-subscription.rst @@ -0,0 +1,60 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/flexible-sync.snippet.subscribe-to-all-objects-of-a-type.cpp + :language: cpp + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.subasync.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.update-subscriptions-by-name.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.update-subscriptions-by-name.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.subscribe-to-queryable-fields.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.add-a-subscription.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.add-single-subscription.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-unnamed-subscription.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-unnamed-subscription.rst new file mode 100644 index 0000000000..8d8b1c7a50 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-add-unnamed-subscription.rst @@ -0,0 +1,65 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.add-a-subscription.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.query-subscription-without-name.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-change-named-subscription.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-change-named-subscription.rst new file mode 100644 index 0000000000..814b9cc802 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-change-named-subscription.rst @@ -0,0 +1,60 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/flexible-sync.snippet.change-subscription-query.cpp + :language: cpp + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.update-a-subscription.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.update-subscriptions-new-query.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.update-subscriptions-by-name.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.update-subscriptions-by-name.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.update-subscriptions.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.update-subscriptions-by-name.kt + :language: kotlin + :emphasize-lines: 14 + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.update-subscription-by-name.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-change-unnamed-subscription.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-change-unnamed-subscription.rst new file mode 100644 index 0000000000..2659e32773 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-change-unnamed-subscription.rst @@ -0,0 +1,61 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.update-subscriptions-by-query.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.update-subscriptions-by-query.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.update-subscriptions-by-query.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.update-subscription.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-find-subscription.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-find-subscription.rst new file mode 100644 index 0000000000..2a329445aa --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-find-subscription.rst @@ -0,0 +1,64 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/flexible-sync.snippet.subscription-count-and-find-subscription.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type.rst new file mode 100644 index 0000000000..f32b59e2d9 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type.rst @@ -0,0 +1,61 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.remove-all-subscriptions-of-object-type.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.remove-subscriptions-by-object-type.dart + :language: dart + :emphasize-lines: 2 + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.remove-all-subscriptions-to-an-object-type.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.remove-all-subscriptions-to-an-object-type.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.remove-all-subscriptions-of-object-type.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.remove-all-subscriptions-to-an-object-type.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.remove-subscriptions-to-object-type.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions.rst new file mode 100644 index 0000000000..587776fc1c --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions.rst @@ -0,0 +1,60 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/flexible-sync.snippet.clear-all-subscriptions.cpp + :language: cpp + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.remove-all-subscriptions.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.remove-all-subscriptions.dart + :language: dart + :emphasize-lines: 2 + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.remove-all-subscriptions.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.remove-all-subscriptions.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.remove-all-subscriptions.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.remove-all-subscriptions.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.remove-all-subscriptions.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions.rst new file mode 100644 index 0000000000..a90082d7ec --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.sub-remove-unnamed.ts + :language: typescript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.remove-all-unnamed-subscriptions.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.remove-all-unnamed-subscriptions.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-named-subscription.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-named-subscription.rst new file mode 100644 index 0000000000..eb836e54d4 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-named-subscription.rst @@ -0,0 +1,60 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/flexible-sync.snippet.remove-subscription-by-name.cpp + :language: cpp + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.remove-subscription-by-name.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.remove-subscriptions-by-name.dart + :language: dart + :emphasize-lines: 2 + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.remove-single-subscription.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.remove-single-subscription.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.remove-subscription-by-name.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.remove-single-subscription.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.remove-single-subscription.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-subscription-by-reference.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-subscription-by-reference.rst new file mode 100644 index 0000000000..cefaf4d975 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-subscription-by-reference.rst @@ -0,0 +1,64 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.remove-subscriptions-by-reference.dart + :language: dart + :emphasize-lines: 1, 3 + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.remove-subscription-by-reference.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-unnamed-subscription.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-unnamed-subscription.rst new file mode 100644 index 0000000000..6d32a4174c --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-remove-unnamed-subscription.rst @@ -0,0 +1,63 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.remove-subscription-by-query.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.remove-subscriptions-by-query.dart + :language: dart + :emphasize-lines: 2 + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.remove-single-subscription.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-set-initial-subscriptions.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-set-initial-subscriptions.rst new file mode 100644 index 0000000000..f2e8fc3daa --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-set-initial-subscriptions.rst @@ -0,0 +1,60 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.bootstrap-a-subscription.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.set-initial-subscriptions.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.initialize-subscribe-query-realm-app-rerun.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.add-initial-subscriptions-rerun-on-open.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.set-initial-subscriptions.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-all-objects-of-type.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-all-objects-of-type.rst new file mode 100644 index 0000000000..7d351e99ee --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-all-objects-of-type.rst @@ -0,0 +1,64 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/flexible-sync.snippet.subscribe-to-all-objects-of-a-type.cpp + :language: cpp + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-refresh-realm-description.rst + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/flexible-sync.snippet.subscribe-to-queryable-fields.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.subscribe-to-all-objects-of-a-type.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query-with-name.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query-with-name.rst new file mode 100644 index 0000000000..c42bbd8aad --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query-with-name.rst @@ -0,0 +1,61 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.add-subscription-subscribe-api.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.sub-name.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.subscribe-named-query.kt + :language: kotlin + :emphasize-lines: 3 + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.subscribe-to-results-with-name.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.sub-name.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query.rst new file mode 100644 index 0000000000..b67634726a --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query.rst @@ -0,0 +1,61 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.add-subscription-subscribe-api.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.sub-basic.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.update-query-by-name.kt + :language: kotlin + :emphasize-lines: 9 + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.subscribe-to-results-on-custom-actor.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.sub-basic.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-unsubscribe-from-query.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-unsubscribe-from-query.rst new file mode 100644 index 0000000000..a82dd6b396 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-unsubscribe-from-query.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.remove-subscription-unsubscribe-api.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.kt + :language: kotlin + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.subscribe-api-unsubscribe.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.sub-unsubscribe.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-query-subscriptions-to-sync.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-query-subscriptions-to-sync.rst new file mode 100644 index 0000000000..2237a88d00 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-query-subscriptions-to-sync.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.wait-with-timeout-subscribe-api.dart + :language: dart + :emphasize-lines: 5-6 + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.subscribe-unnamed-query.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.subscribe-wait-for-sync.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/manage-subscriptions.test.snippet.sub-with-timeout.ts + :language: typescript diff --git a/source/includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync.rst.rst b/source/includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync.rst.rst new file mode 100644 index 0000000000..a52c990a52 --- /dev/null +++ b/source/includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync.rst.rst @@ -0,0 +1,62 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.wait-for-synchronization.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/manage_sync_subscription_test.snippet.wait-for-subscription-change.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.wait-for-subscription-sync.java + :language: java + :emphasize-lines: 10 + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/FlexibleSyncTest.snippet.wait-for-subscription-sync.kt + :language: kotlin + :emphasize-lines: 11-14 + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.wait-for-subscription-changes.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/FlexibleSync.snippet.add-subscription-with-oncomplete.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/sdk/sync/configure-and-open-synced-database.txt b/source/sdk/sync/configure-and-open-synced-database.txt index e67848c7dc..8b32dfec50 100644 --- a/source/sdk/sync/configure-and-open-synced-database.txt +++ b/source/sdk/sync/configure-and-open-synced-database.txt @@ -25,7 +25,14 @@ Placeholder page for configuring and opening a synced database. Download Changes Before Open ---------------------------- + +.. _sdks-open-synced-database-offline: + +Open a Synced Database Offline +------------------------------ + .. _sdks-synced-dbs-vs-non-synced-dbs: Synced Databases vs. Non-Synced Databases ----------------------------------------- + diff --git a/source/sdk/sync/manage-sync-subscriptions.txt b/source/sdk/sync/manage-sync-subscriptions.txt index 436c09a9a3..cca7dc8fc9 100644 --- a/source/sdk/sync/manage-sync-subscriptions.txt +++ b/source/sdk/sync/manage-sync-subscriptions.txt @@ -4,20 +4,1454 @@ Manage Sync Subscriptions ========================= +.. meta:: + :description: Create, update, and delete query subscriptions to sync data between client devices and Atlas Device Sync. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for information about managing Flexible Sync subscriptions. +.. tabs-selector:: drivers + +Atlas Device Sync uses subscriptions and permissions to determine what +data to sync with your client application. + +After you :ref:`open a synced database `, +you must add subscriptions before you can read to and write from the database. + +You can manually add, update, and remove subscriptions to determine which +data syncs to the client device. Or you can subscribe to queries instead of +or in addition to manually managing subscriptions. + +.. _sdks-query-subscription-concept: + +What are Subscriptions? +----------------------- + +When you configure Device Sync in Atlas, you specify which fields your +client application can query. The SDK tracks these queries through a +**subscription**. When you subscribe to a query, the SDK automatically tracks +changes to data matching that subscription, and uploads and downloads relevant +data. + +Each subscription corresponds to a query on **queryable fields** for a +specific object type. See :ref:`Queryable Fields ` +in the Device Sync documentation for more information. + +For each query subscription, the SDK looks for data matching the query. +Data matching the subscription, where the user has the appropriate +permissions, syncs between clients and the backend application. + +The SDK tracks these queries through a **subscription set**, which is a +collection of subscriptions. You can add, remove, and update subscriptions in +the subscription set. + +You can construct subscription queries with Realm Query Language (RQL), or one +of the SDK-idiomatic query engines. + +- :ref:`realm-query-language` +- :ref:`java-filter-data` +- :ref:`dotnet-linq` +- :ref:`sdks-filter-data-swift` + +.. important:: RQL Support in Sync Subscription Queries + + Device Sync does not support the full range of RQL operators when constructing + a subscription query. For details about these limitations, refer to + :ref:`sdks-sync-subscription-query-rql-limitations`. + +Subscribe to Object Types +~~~~~~~~~~~~~~~~~~~~~~~~~ + +Subscription sets are based on your :ref:`data model object types `. +You might have multiple subscriptions if you have many types of SDK objects. +You can also have multiple subscriptions on the same object type. + +However, note the following if you use :ref:`relationships +` or :ref:`asymmetric objects +` in your app: + +Object Links +```````````` + +You must add both an object and its linked object to the subscription +set to see a linked object. + +If your subscription results contain an object with a property that links +to an object not contained in the results, the link appears to be nil. +The SDK does not provide a way to distinguish whether that property's value is +legitimately nil, or whether the object it links to exists but is out of +view of the query subscription. + +Asymmetric Objects +`````````````````` + +If your app uses :ref:`Data Ingest ` to +unidirectionally sync **asymmetric objects**, you *cannot* create subscriptions +for those objects. If your app contains asymmetric objects and non-asymmetric +objects in the same database, you can add subscription queries for the +non-asymmetric objects. + +Permissions +~~~~~~~~~~~ + +Subscriptions work hand-in-hand with permissions to determine what data to +Sync to your client application. The client application only sees the +subset of data that matches your subscriptions which *also* matches the +permissions of the logged-in user. For more information about the intersection +of subscriptions and user permissions, refer to :ref:`sdks-write-synced-database`. + +This page details how to manage client subscriptions for Device Sync. +For information about setting up permissions for Device Sync, see: +:ref:`Device Sync Rules & Permissions `. + +.. _sdks-manage-subscriptions-in-client: + +Manage Subscriptions in Your Client App +--------------------------------------- + +In the client application, you add, update, and remove subscriptions to specific +queries on the queryable fields. This determines which data syncs to the +client device. + +You can: + +- Add subscriptions with an optional subscription name: + + - You can subscribe to a database query. This automatically adds the + subscription to the subscription set. + - Manually add a subscription to the subscription set with the subscribe API. + Use this API if you need more control over subscriptions for performance + optimization or business-logic reasons. See :ref:`Performance Considerations + ` for more information. + +- React to subscription state changes. +- Update subscriptions with new queries. +- Remove individual subscriptions or all subscriptions for an object type. + +Subscriptions persist across user sessions unless you unsubscribe from them. + +Initial Subscriptions +~~~~~~~~~~~~~~~~~~~~~ + +Before you can read from or write to a synced database, you must provide at +least one subscription. Some of the SDK languages provide a dedicated API +to make it more convenient to set initial subscriptions. For details, refer +to :ref:`sdks-set-initial-subscriptions`. + +.. _sdks-sync-results-subscribe-api: + +Subscribe to Queries +-------------------- + +To simplify subscription management, the SDK offers APIs to subscribe to and +unsubscribe from a query directly. These APIs abstract away the details of +manually adding and removing subscriptions. This API is not available for all +languages. If your preferred language does not provide this API, refer to +:ref:`sdks-manually-manage-subscriptions`. + +.. important:: The Subscribe to Queries API is in Preview + + The APIs described here are currently in Preview. These APIs may be subject + to change in the future. + +.. _sdks-subscribe-to-query: + +Subscribe to a Query +~~~~~~~~~~~~~~~~~~~~ + +With an :ref:`authenticated user ` and a +:ref:`Sync configuration `, you can +open a synced database and query for the objects you want to read and write. +You can subscribe to the query to create a subscription for objects matching +the query. + +This creates an unnamed subscription and adds it to the subscription set, +similar to :ref:`manually creating a subscription +`. + +Subscriptions persist across user sessions unless you unsubscribe from them. + +.. tip:: + + If your app works with multiple subscriptions, or if you want to update + a subscription, you should add a name when you subscribe to a query. For + details, refer to the :ref:`sdks-subscribe-to-query-with-name` section on + this page. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query.rst + +.. _sdks-subscribe-to-query-with-name: + +Subscribe to a Query with a Subscription Name +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If your app works with multiple subscriptions, or if you want to update +a subscription, you should add a name when you subscribe to a query. + +You can later use this name to: + +- :ref:`Change a subscription's query ` +- :ref:`Remove the query by name ` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-with-name-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-subscribe-to-query-with-name-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-query-with-name.rst + +.. _sdks-wait-for-query-subscription-to-sync: + +Wait for a Query Subscription to Sync +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you subscribe to a query, that query's results do not contain objects +until the subscription syncs with Atlas. + +If your app creates objects, you may not need to download synced data before +the user works with it. However, if your app requires data from Atlas before +the user can work with your app, you can specify that the SDK should wait for +the subscription query data to sync before proceeding. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-subscribe-to-query-with-name-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/sync/manage-sync-subscriptions-wait-for-query-subscription-to-sync-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-query-subscriptions-to-sync.rst + +.. _sdks-unsubscribe-from-query: + +Unsubscribe from a Query +~~~~~~~~~~~~~~~~~~~~~~~~ + +You can unsubscribe from a query that you have previously subscribed to. +Unsubscribing removes the suscription from the subscription set, similar to +:ref:`manually removing a subscription `. + +A query results set may still contain objects after calling the unsubscribe +method if the subscription set contains another overlapping subscription. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-subscribe-to-query-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-unsubscribe-from-query-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-unsubscribe-from-query-not-supported.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-unsubscribe-from-query-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-unsubscribe-from-query-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-unsubscribe-from-query.rst + +The unsubscribe method returns before objects matching the removed subscription +are deleted from the database. Sync continues in the background based on the +new set of subscriptions. There is no API to wait for the unsubscribe method +to sync with the server. + +.. _sdks-manually-manage-subscriptions: + +Manually Manage Subscriptions +----------------------------- + +As an alternative to the subscribe to a query API, you can manually manage the +subscriptions in a subscription set. + +You can: + +- Add subscriptions +- React to subscription state change +- Update subscriptions with new queries +- Remove individual subscriptions or all subscriptions for an object type + +Data matching the subscription, where the user has the appropriate +permissions, syncs between devices and Atlas. + +You can specify an optional string name for your subscription. + +When you create a subscription, the SDK looks for data matching a query on a +specific object type. You can have multiple subscription sets on different +object types. You can also have multiple queries on the same object type. + +.. _sdks-get-sync-subscriptions: + +Access the Subscription Set +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can access the subscription set through the database ``subscriptions`` +property. You perform all operations to add, find, update, remove, or watch +subscriptions through this property. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-access-subscription-set-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-access-subscription-set-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-access-subscription-set-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-access-subscription-set-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-access-subscription-set-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-access-subscription-set-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-access-subscription-set-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-access-subscription-set-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-access-subscription-set-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-access-subscription-set.rst + +.. _sdks-find-sync-subscriptions: + +Find a Subscription +~~~~~~~~~~~~~~~~~~~ + +You can find a specific subscription in a subscription set. You might want to +find a specific subscription: + +- To avoid adding the same subscription again, which in some languages throws + an error. +- To update the subscription. +- To remove the subscription. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-find-subscription-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-find-subscription-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-find-subscription-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-find-subscription-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-find-subscription-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-find-subscription-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-find-subscription-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-find-subscription-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-find-subscription-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-find-subscription.rst + +.. _sdks-sync-subscriptions-add-subscription: + +Add a Subscription +~~~~~~~~~~~~~~~~~~ + +Add a subscription in a subscriptions update block. You append each +new subscription to the client's SDK subscriptions. + +Subscriptions persist across user sessions unless you remove them from the +subscription set. + +If your app is adding subscriptions for the first time, some SDK languages +provide a special parameter to set initial subscriptions or recalculate +initial subscriptions on app launch. For details, skip to the +:ref:`set initial subscriptions ` on this page. + +.. tip:: + + If your app works with multiple subscriptions, or if you want to update + a subscription, you should add a name when you subscribe to a query. For + details, refer to the :ref:`sdks-add-named-subscription` section on + this page. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-add-subscription-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-add-subscription-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-add-subscription-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-add-subscription-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-add-subscription-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-add-subscription-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-add-subscription-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-add-subscription-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-add-subscription-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-add-subscription.rst + +.. Some of the SDKs have special behavior around duplicate subs, but others don't. +.. Adding this tab set to show/hide relevant details. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. tab:: + :tabid: csharp + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-duplicate-subscription-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-duplicate-subscription-description.rst + + .. tab:: + :tabid: javascript + + .. tab:: + :tabid: kotlin + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-duplicate-subscriptions-description.rst + + .. tab:: + :tabid: typescript + +.. _sdks-add-unnamed-subscription: + +Add Unnamed Subscription +```````````````````````` + +If your app doesn't need to update or remove subscriptions, you can add a +subscription without a name. + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-add-unnamed-subscription.rst + +.. _sdks-add-named-subscription: + +Add a Named Subscription +```````````````````````` + +If your app might need to update or remove subscriptions, you should add a +name when you create a subscription. You can use the name to find and update +or remove the appropriate subscription later. + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-add-named-subscription.rst + +.. _sdks-add-multiple-subscriptions: + +Add Multiple Subscriptions +`````````````````````````` + +You can add multiple subscriptions within a subscription update block, +including subscriptions of different object types. + +Performing query updates requires Atlas to recalculate which documents match the +query. We strongly advise designing your application to minimize updates. You +can do this by batching additions and changes to the subscription set. + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-add-multiple-subscriptions.rst + +.. _sdks-subscribe-to-all-objects-of-type: + +Subscribe to All Objects of a Specific Type +``````````````````````````````````````````` + +In addition to syncing all objects that match a given query, you can subscribe +to all objects of a specific type. You do this by appending a subscription +without providing a query. + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-subscribe-to-all-objects-of-type.rst + +.. _sdks-set-initial-subscriptions: + +Set Initial Subscriptions +````````````````````````` + +You must have at least one subscription before you can read from or write +to the database. You can bootstrap the database with an initial subscription +set when you open it. This ensures your app can start working with the database +successfully right away. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-set-initial-subscriptions-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-set-initial-subscriptions-not-supported.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-set-initial-subscriptions-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/sync/manage-sync-subscriptions-set-initial-subscriptions-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-set-initial-subscriptions-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-set-initial-subscriptions-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-set-initial-subscriptions-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-set-initial-subscriptions.rst + +At any point after setting initial subscriptions, you can: + +- :ref:`Add more subscriptions to the subscription set. ` +- :ref:`Change existing subscriptions in the subscription set. ` +- :ref:`Remove subscriptions from the subscription set. ` + +.. _sdks-wait-for-subscription-changes-to-sync: + +Wait for Subscription Changes to Sync +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Updating the subscription set on the device is only one component +of changing a subscription. After the client app subscription change, the SDK +synchronizes with the server to resolve any updates to the data due to +the subscription change. This could mean adding or removing data from the +synced database. + +**Adding New Subscriptions** + +If your app creates objects, you may not need to download synced data before +the user works with it. However, if your app requires data from Atlas before +the user can work with your app, you can specify that the SDK should wait for +the subscription changes to sync before proceeding. + +**Updating Existing Subscriptions** + +When you update an existing subscription, this could mean adding new data or +removing data from the synced database. If this involves things like changing +user permissions to add or remove data, or if your app otherwise makes these +changes visible to users in the UI, you may want to wait for subscription +changes to update before proceeding with app execution. Otherwise, the changes +may appear to the user as unexpected changes to the data set later during +"normal" app execution. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-wait-for-subscription-changes-to-sync.rst + +.. _sdks-subscription-set-state: + +Check Subscription Set State +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can check the state of the subscription set through to find out the current +status of the subscription set. This provides information about whether +Atlas has registered the subscription that is on the device. It does not +make any guarantees about the state of the documents matching the subscription. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-subscription-set-state-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-subscription-set-state-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-subscription-set-state-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-subscription-set-state-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-subscription-set-state-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-subscription-set-state-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-subscription-set-state-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-subscription-set-state-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-subscription-set-state-js-ts-description.rst + +.. note:: Subscription State "Complete" + + The subscription set state "complete" does not mean "sync is done" or "all + documents have been synced". "Complete" means the following two things have + happened: + + - The subscription has become the active subscription set that is currently + being synchronized with the server. + - The documents that matched the subscription *at the time the subscription + was sent to the server* are now on the device. Note that this does + not necessarily include all documents that currently match the + subscription. + + The SDK does not provide a way to check whether all documents that + match a subscription have synced to the device. + +.. _sdks-change-subscription-queries: + +Change Subscription Queries +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can change the queries in a subscription set. You might want to do this +when business logic dictates syncing a different subset of objects, such as +when a user unlocks new features in an app. + +- Change a named query +- Change an unnamed query + +When you change a query, consider how it interacts with any other queries that +may be in the subscription set. You may need to +:ref:`add ` or +:ref:`remove ` other subscriptions, such as: + +- Adding a new subscription when a change to a query introduces new linked objects +- Removing a subscription when an overlapping query inadvertently exposes + objects you don't want to sync + +.. _sdks-change-named-subscription: + +Change a Named Subscription +``````````````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-change-named-subscription-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-change-named-subscription-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-change-named-subscription-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-change-named-subscription-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-change-named-subscription-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-change-named-subscription-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-change-named-subscription-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-change-named-subscription-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-change-named-subscription-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-change-named-subscription.rst + +.. _sdks-change-unnamed-subscription: + +Change an Unnamed Subscription +`````````````````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-change-unnamed-subscription-js-ts-not-supported.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-change-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-change-unnamed-subscription-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-change-unnamed-subscription-js-ts-not-supported.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-change-unnamed-subscription.rst + +.. _sdks-remove-subscriptions: + +Remove Subscriptions +~~~~~~~~~~~~~~~~~~~~ + +To remove subscriptions, you can: + +- Remove a specific subscription + + - Remove a named subscription + - Remove an unnamed subscription + - Remove a subscription by reference + +- Remove all subscriptions for a specific object type +- Remove all unnamed subscriptions +- Remove all subscriptions + +When you remove a subscription query, the SDK asynchronously removes the +synced data that matched the query from the client device. + +.. _sdks-remove-query-by-name: + +Remove a Named Subscription +```````````````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-remove-named-subscription-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-change-named-subscription-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-named-subscription-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-named-subscription-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-named-subscription-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-remove-named-subscription-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/sync/manage-sync-subscriptions-remove-named-subscription-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-remove-named-subscription.rst + +.. _sdks-remove-unnamed-subscription: + +Remove an Unnamed Subscription +`````````````````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-unnamed-subscription-not-supported.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/sync/manage-sync-subscriptions-remove-unnamed-subscription-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-remove-unnamed-subscription.rst + +.. _sdks-remove-subscription-by-reference: + +Remove a Subscription by Reference +`````````````````````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-remove-subscription-by-reference-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-subscription-by-reference-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-remove-subscription-by-reference-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-subscription-by-reference-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-remove-subscription-by-reference.rst + +.. _sdks-remove-all-subscriptions-for-object-type: + +Remove All Subscriptions to an Object Type +`````````````````````````````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions-to-object-type.rst + +.. _sdks-remove-all-unnamed-subscriptions: + +Remove All Unnamed Subscriptions +````````````````````````````````` + +You may want to remove unnamed subscriptions that are transient or dynamically +generated, but leave named subscriptions in place. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-unnamed-subscriptions.rst + +.. _sdks-remove-all-subscriptions: + +Remove All Subscriptions +```````````````````````` + +.. important:: + + If you remove all subscriptions and do not add a new one, you'll + get an error. A database opened with a flexible sync configuration needs + at least one subscription to sync with the server. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/manage-sync-subscriptions-remove-all-subscriptions-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/sync/manage-sync-subscriptions-remove-all-subscriptions-js-ts-description.rst + +.. include:: /includes/sdk-examples/sync/manage-sync-subscriptions-remove-all-subscriptions.rst + +.. _sdks-sync-subscription-performance-considerations: + +Performance Considerations +-------------------------- + +API Efficiency +~~~~~~~~~~~~~~ + +Adding several subscriptions with the ``.subscribe()`` and ``.unsubscribe()`` +APIs described in the :ref:`sdks-sync-results-subscribe-api` section +is less efficient than performing batch updates when you manually +manage subscriptions. On every call to ``.subscribe()``, the SDK opens a new +update block. For better performance adding multiple +subscriptions, use the ``subscriptions.update`` API described in the +:ref:`sdks-manually-manage-subscriptions` section. + +Group Updates for Improved Performance +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. _sdks-add-sync-subscriptions: +.. include:: /includes/sync-memory-performance.rst -Add Sync Subscriptions ----------------------- +.. _sdks-sync-subscription-query-rql-limitations: -.. _sdks-remove-sync-subscriptions: +Sync RQL Requirements and Limitations +------------------------------------- -Remove Sync Subscriptions -------------------------- +.. include:: /includes/flex-sync-limitations.rst From d492af48b4f8a4cc19bff9cc869992c75706a741 Mon Sep 17 00:00:00 2001 From: Dachary Date: Thu, 1 Aug 2024 15:59:59 -0400 Subject: [PATCH 54/63] (DOCSP-42045): Fix wrong C++ tab ID (#3353) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-42045 *Staged Page* - [Manage Sync Sessions](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-42045/sdk/sync/manage-sync-sessions/): Page correctly changes code examples when you switch language tabs. - [Help](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-42045/help/): The Help page was using realm-sdks tab set - I changed it to Drivers tab set so it would preserve the language selection when the user switched to the page. I also added a couple of notes related to naming because there are some naming things here that still reflect the old name, and we can't change them. --- source/help.txt | 91 +++++++++++-------- ...sync-sessions-check-network-connection.rst | 2 +- .../manage-sync-sessions-check-sync-state.rst | 2 +- ...essions-check-upload-download-progress.rst | 2 +- .../manage-sync-sessions-get-sync-session.rst | 2 +- ...sions-manually-reconnect-sync-sessions.rst | 2 +- .../manage-sync-sessions-pause-resume.rst | 2 +- ...wait-for-changes-to-upload-or-download.rst | 2 +- 8 files changed, 58 insertions(+), 47 deletions(-) diff --git a/source/help.txt b/source/help.txt index 9f43fb0478..def4292f00 100644 --- a/source/help.txt +++ b/source/help.txt @@ -4,16 +4,33 @@ Get Help ======== +.. meta:: + :description: Get help for Atlas Device SDK through community forums, sharing feedback, or professional support. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none - :depth: 1 + :depth: 2 :class: singlecol -Overview --------- +.. tabs-selector:: drivers + +MongoDB provides various resources for getting help with Atlas Device SDK and +Atlas App Services. + +.. tip:: Atlas Device SDK and Realm -MongoDB provides various resources for getting help with Atlas App Services. + While the SDK has been renamed to Atlas Device SDK, some resources still + reflect ``Realm`` naming. Professional Support -------------------- @@ -35,9 +52,9 @@ Community Forums The official `MongoDB Community Forums `__ are a great place to meet other developers, ask and answer questions, and stay -up-to-date with the latest Realm and App Services features and releases. You can also -interact with MongoDB employees, like our community team, engineers, and -product managers, who are active forum contributors. +up-to-date with the latest Atlas Device SDK and App Services features and +releases. You can also interact with MongoDB employees, like our community +team, engineers, and product managers, who are active forum contributors. Stack Overflow -------------- @@ -68,62 +85,56 @@ at the bottom right or right side of the page. Bug Reporting, and Changelogs ----------------------------- -.. tabs-realm-sdks:: +You can report bugs or view the changelog in the relevant ``realm-SDK`` +repository in GitHub. While the SDK has been renamed to Atlas Device SDK, the +GitHub repositories still reflect ``realm`` naming. - .. tab:: - :tabid: android - - For the Java SDK: - - - :github:`Report a bug ` - - :github:`View the changelog ` +.. tabs-drivers:: .. tab:: - :tabid: ios + :tabid: cpp-sdk - For the Swift SDK: - - - :github:`Report a bug ` - - :github:`View the changelog ` + - :github:`Report a bug ` + - :github:`View the changelog ` .. tab:: - :tabid: dotnet - - For the .NET SDK: + :tabid: csharp - :github:`Report a bug ` - :github:`View the changelog ` + + .. tab:: + :tabid: dart + + - :github:`Report a bug ` + - :github:`View the changelog ` .. tab:: :tabid: javascript - For the Node.js, React Native, or Web SDKs: - - :github:`Report a bug ` - :github:`View the changelog ` - .. tab:: - :tabid: flutter - - For the Flutter SDK: - - - :github:`Report a bug ` - - :github:`View the changelog ` - .. tab:: :tabid: kotlin - For the Kotlin SDK: - - :github:`Report a bug ` - :github:`View the changelog ` .. tab:: - :tabid: cpp + :tabid: objectivec - For the C++ SDK: + - :github:`Report a bug ` + - :github:`View the changelog ` - - :github:`Report a bug ` - - :github:`View the changelog ` + .. tab:: + :tabid: swift + + - :github:`Report a bug ` + - :github:`View the changelog ` - + .. tab:: + :tabid: typescript + + - :github:`Report a bug ` + - :github:`View the changelog ` diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst index cfebc51b5b..5c9746ff62 100644 --- a/source/includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-check-network-connection.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/sync-session.snippet.unregister-observation-token.cpp diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst index d6eaa8f7f8..8727e9dc74 100644 --- a/source/includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-check-sync-state.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/sync-session.snippet.sync-state.cpp diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst index 8b0cac19cf..9f2b8bce99 100644 --- a/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-check-upload-download-progress.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/MissingPlaceholders/api.cpp diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst index 6e70e78649..f38b5c633e 100644 --- a/source/includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-get-sync-session.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/sync-session.snippet.sync-session.cpp diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst index 7c1f791acc..3479d8bbb5 100644 --- a/source/includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-manually-reconnect-sync-sessions.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/sync-session.snippet.reconnect.cpp diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst index 1f341e208a..77c65164db 100644 --- a/source/includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-pause-resume.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/sync-session.snippet.resume.cpp diff --git a/source/includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst b/source/includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst index cd146d9662..ff3634ded2 100644 --- a/source/includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst +++ b/source/includes/sdk-examples/sync/manage-sync-sessions-wait-for-changes-to-upload-or-download.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/sync-session.snippet.wait-for-download.cpp From 6835ea9c76eb0716a22304081e2a93a1217f5f83 Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 6 Aug 2024 09:16:25 -0400 Subject: [PATCH 55/63] (DOCSP-39527): Consolidate Custom User Data page (#3346) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39527 *Staged Page* - [Custom User Data](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39527/sdk/users/custom-user-data/) Note for reviewer: a couple of the API descriptions are missing where we just don't have an example and there's nothing notable to say. I've added notes to the follow-up gap tickets to also fill in these API descriptions when we add examples. *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Custom User Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/users/custom-user-data/) - [.NET: Custom User Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/manage-users/custom-user-data/) - [Flutter: Custom User Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/custom-user-data/) - [Java: Custom User Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/users/custom-user-data/) - [Kotlin: Manage Custom User Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/users/custom-user-data/) - [Node.js: Access Custom User Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/users/access-custom-user-data/) - [Swift: Custom User Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/users/custom-user-data/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [ ] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: Kyle Rollins <115574589+krollins-mdb@users.noreply.github.com> --- ...ta-create-custom-user-data-description.rst | 12 + ...ta-delete-custom-user-data-description.rst | 11 + ...ta-read-custom-user-data-2-description.rst | 6 + ...data-read-custom-user-data-description.rst | 2 + ...ta-update-custom-user-data-description.rst | 5 + ...ta-create-custom-user-data-description.rst | 12 + ...ta-delete-custom-user-data-description.rst | 4 + ...ta-read-custom-user-data-2-description.rst | 6 + ...data-read-custom-user-data-description.rst | 3 + ...ta-update-custom-user-data-description.rst | 4 + ...ta-create-custom-user-data-description.rst | 11 + ...ta-read-custom-user-data-2-description.rst | 5 + ...data-read-custom-user-data-description.rst | 2 + ...ta-update-custom-user-data-description.rst | 11 + ...ta-create-custom-user-data-description.rst | 4 + ...ta-read-custom-user-data-2-description.rst | 6 + ...data-read-custom-user-data-description.rst | 3 + ...ta-update-custom-user-data-description.rst | 4 + ...d-custom-user-data-js-ts-2-description.rst | 5 + ...ead-custom-user-data-js-ts-description.rst | 2 + ...ta-update-custom-user-data-description.rst | 3 + ...ta-create-custom-user-data-description.rst | 11 + ...ta-delete-custom-user-data-description.rst | 11 + ...ta-read-custom-user-data-2-description.rst | 6 + ...data-read-custom-user-data-description.rst | 4 + ...ta-update-custom-user-data-description.rst | 11 + ...ta-create-custom-user-data-description.rst | 4 + ...ta-read-custom-user-data-2-description.rst | 6 + ...data-read-custom-user-data-description.rst | 2 + ...ta-update-custom-user-data-description.rst | 5 + ...ta-create-custom-user-data-description.rst | 4 + ...ta-read-custom-user-data-2-description.rst | 6 + ...data-read-custom-user-data-description.rst | 2 + ...ta-update-custom-user-data-description.rst | 5 + ...stom-user-data-create-custom-user-data.rst | 66 +++ ...stom-user-data-delete-custom-user-data.rst | 69 +++ ...custom-user-data-read-custom-user-data.rst | 65 +++ ...stom-user-data-update-custom-user-data.rst | 65 +++ source/sdk/users/custom-user-data.txt | 392 +++++++++++++++++- 39 files changed, 854 insertions(+), 1 deletion(-) create mode 100644 source/includes/api-details/cpp/users/custom-user-data-create-custom-user-data-description.rst create mode 100644 source/includes/api-details/cpp/users/custom-user-data-delete-custom-user-data-description.rst create mode 100644 source/includes/api-details/cpp/users/custom-user-data-read-custom-user-data-2-description.rst create mode 100644 source/includes/api-details/cpp/users/custom-user-data-read-custom-user-data-description.rst create mode 100644 source/includes/api-details/cpp/users/custom-user-data-update-custom-user-data-description.rst create mode 100644 source/includes/api-details/csharp/users/custom-user-data-create-custom-user-data-description.rst create mode 100644 source/includes/api-details/csharp/users/custom-user-data-delete-custom-user-data-description.rst create mode 100644 source/includes/api-details/csharp/users/custom-user-data-read-custom-user-data-2-description.rst create mode 100644 source/includes/api-details/csharp/users/custom-user-data-read-custom-user-data-description.rst create mode 100644 source/includes/api-details/csharp/users/custom-user-data-update-custom-user-data-description.rst create mode 100644 source/includes/api-details/dart/users/custom-user-data-create-custom-user-data-description.rst create mode 100644 source/includes/api-details/dart/users/custom-user-data-read-custom-user-data-2-description.rst create mode 100644 source/includes/api-details/dart/users/custom-user-data-read-custom-user-data-description.rst create mode 100644 source/includes/api-details/dart/users/custom-user-data-update-custom-user-data-description.rst create mode 100644 source/includes/api-details/java/users/custom-user-data-create-custom-user-data-description.rst create mode 100644 source/includes/api-details/java/users/custom-user-data-read-custom-user-data-2-description.rst create mode 100644 source/includes/api-details/java/users/custom-user-data-read-custom-user-data-description.rst create mode 100644 source/includes/api-details/java/users/custom-user-data-update-custom-user-data-description.rst create mode 100644 source/includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-2-description.rst create mode 100644 source/includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/users/custom-user-data-update-custom-user-data-description.rst create mode 100644 source/includes/api-details/kotlin/users/custom-user-data-create-custom-user-data-description.rst create mode 100644 source/includes/api-details/kotlin/users/custom-user-data-delete-custom-user-data-description.rst create mode 100644 source/includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-2-description.rst create mode 100644 source/includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-description.rst create mode 100644 source/includes/api-details/kotlin/users/custom-user-data-update-custom-user-data-description.rst create mode 100644 source/includes/api-details/objectivec/users/custom-user-data-create-custom-user-data-description.rst create mode 100644 source/includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-2-description.rst create mode 100644 source/includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-description.rst create mode 100644 source/includes/api-details/objectivec/users/custom-user-data-update-custom-user-data-description.rst create mode 100644 source/includes/api-details/swift/users/custom-user-data-create-custom-user-data-description.rst create mode 100644 source/includes/api-details/swift/users/custom-user-data-read-custom-user-data-2-description.rst create mode 100644 source/includes/api-details/swift/users/custom-user-data-read-custom-user-data-description.rst create mode 100644 source/includes/api-details/swift/users/custom-user-data-update-custom-user-data-description.rst create mode 100644 source/includes/sdk-examples/users/custom-user-data-create-custom-user-data.rst create mode 100644 source/includes/sdk-examples/users/custom-user-data-delete-custom-user-data.rst create mode 100644 source/includes/sdk-examples/users/custom-user-data-read-custom-user-data.rst create mode 100644 source/includes/sdk-examples/users/custom-user-data-update-custom-user-data.rst diff --git a/source/includes/api-details/cpp/users/custom-user-data-create-custom-user-data-description.rst b/source/includes/api-details/cpp/users/custom-user-data-create-custom-user-data-description.rst new file mode 100644 index 0000000000..33e3772fa8 --- /dev/null +++ b/source/includes/api-details/cpp/users/custom-user-data-create-custom-user-data-description.rst @@ -0,0 +1,12 @@ +In this example, we use an Atlas Function to create the custom user data. The +Function takes an object passed by the client add adds it to the custom user +data collection in Atlas. The Function creates the custom user data if it +doesn't already exist and replaces all data in it if it does exist. + +.. literalinclude:: /examples/generated/cpp/updateCustomUserData.snippet.update-custom-user-data.js + :language: js + :caption: updateCustomUserData.js - Atlas Function running on server (JavaScript) + +The following example :ref:`calls a function ` to +insert a document containing the user ID of the currently logged in user +and a ``favoriteColor`` value into the custom user data collection. diff --git a/source/includes/api-details/cpp/users/custom-user-data-delete-custom-user-data-description.rst b/source/includes/api-details/cpp/users/custom-user-data-delete-custom-user-data-description.rst new file mode 100644 index 0000000000..c2d40f1187 --- /dev/null +++ b/source/includes/api-details/cpp/users/custom-user-data-delete-custom-user-data-description.rst @@ -0,0 +1,11 @@ +In this example, we use an Atlas Function to delete the custom user data +document. The Atlas Function does not require any arguments. The +Function uses the Function context to determine the caller's user ID, and +deletes the custom user data document matching the user's ID. + +.. literalinclude:: /examples/generated/cpp/deleteCustomUserData.snippet.delete-custom-user-data.js + :language: js + :caption: deleteCustomUserData.js - Atlas Function running on server (JavaScript) + +The code that calls this Function requires only a logged-in user to call +the Function. diff --git a/source/includes/api-details/cpp/users/custom-user-data-read-custom-user-data-2-description.rst b/source/includes/api-details/cpp/users/custom-user-data-read-custom-user-data-2-description.rst new file mode 100644 index 0000000000..668dca5e3c --- /dev/null +++ b/source/includes/api-details/cpp/users/custom-user-data-read-custom-user-data-2-description.rst @@ -0,0 +1,6 @@ +.. note:: + + If you require the most recent version of custom user data, use the + :cpp-sdk:`refresh_custom_user_data() + ` + function to request the latest version of a user's custom data. diff --git a/source/includes/api-details/cpp/users/custom-user-data-read-custom-user-data-description.rst b/source/includes/api-details/cpp/users/custom-user-data-read-custom-user-data-description.rst new file mode 100644 index 0000000000..c64b179ec6 --- /dev/null +++ b/source/includes/api-details/cpp/users/custom-user-data-read-custom-user-data-description.rst @@ -0,0 +1,2 @@ +To read the data, access the ``custom_data`` property on the ``User`` object +of a logged-in user. diff --git a/source/includes/api-details/cpp/users/custom-user-data-update-custom-user-data-description.rst b/source/includes/api-details/cpp/users/custom-user-data-update-custom-user-data-description.rst new file mode 100644 index 0000000000..3f61d18321 --- /dev/null +++ b/source/includes/api-details/cpp/users/custom-user-data-update-custom-user-data-description.rst @@ -0,0 +1,5 @@ +To update a user's custom user data with an Atlas Function, edit the +MongoDB document whose user ID field contains the user ID of the user. +The following example calls the same function used to create the custom user +data document above. Here, we update the ``favoriteColor`` field of the +the document containing the user ID of the currently logged in user. diff --git a/source/includes/api-details/csharp/users/custom-user-data-create-custom-user-data-description.rst b/source/includes/api-details/csharp/users/custom-user-data-create-custom-user-data-description.rst new file mode 100644 index 0000000000..7e146d351a --- /dev/null +++ b/source/includes/api-details/csharp/users/custom-user-data-create-custom-user-data-description.rst @@ -0,0 +1,12 @@ +The following example uses +:ref:`MongoDB Data Access ` to insert a +document containing the user ID of the currently logged in user and several +custom properties into the custom user data collection: + +.. literalinclude:: /examples/generated/dotnet/CustomUserDataExamples.snippet.create.cs + :language: csharp + +You may find it helpful to create a C# class (POCO) that represents the custom +user data object. The SDK will serialize/deserialize this class to and from BSON +when writing, reading, and updating properties. The example above uses the +following class to map the properties. diff --git a/source/includes/api-details/csharp/users/custom-user-data-delete-custom-user-data-description.rst b/source/includes/api-details/csharp/users/custom-user-data-delete-custom-user-data-description.rst new file mode 100644 index 0000000000..129e0683ac --- /dev/null +++ b/source/includes/api-details/csharp/users/custom-user-data-delete-custom-user-data-description.rst @@ -0,0 +1,4 @@ +The following example uses :ref:`MongoDB Data Access ` to +find and deletes the data through the +:dotnet-sdk:`DeleteOneAsync() ` +method. diff --git a/source/includes/api-details/csharp/users/custom-user-data-read-custom-user-data-2-description.rst b/source/includes/api-details/csharp/users/custom-user-data-read-custom-user-data-2-description.rst new file mode 100644 index 0000000000..ad896b4c36 --- /dev/null +++ b/source/includes/api-details/csharp/users/custom-user-data-read-custom-user-data-2-description.rst @@ -0,0 +1,6 @@ +.. note:: + + If you require the most recent version of custom user data, call the + :dotnet-sdk:`RefreshCustomDataAsync() + ` + method to request the latest version of a user's custom data. diff --git a/source/includes/api-details/csharp/users/custom-user-data-read-custom-user-data-description.rst b/source/includes/api-details/csharp/users/custom-user-data-read-custom-user-data-description.rst new file mode 100644 index 0000000000..37b0485508 --- /dev/null +++ b/source/includes/api-details/csharp/users/custom-user-data-read-custom-user-data-description.rst @@ -0,0 +1,3 @@ +To read custom user data, call the +:dotnet-sdk:`GetCustomData() ` +method on the ``User`` object of a logged in user. diff --git a/source/includes/api-details/csharp/users/custom-user-data-update-custom-user-data-description.rst b/source/includes/api-details/csharp/users/custom-user-data-update-custom-user-data-description.rst new file mode 100644 index 0000000000..af7f2d2892 --- /dev/null +++ b/source/includes/api-details/csharp/users/custom-user-data-update-custom-user-data-description.rst @@ -0,0 +1,4 @@ +The following example +finds and updates the data by using the +:dotnet-sdk:`UpdateOneAsync() ` +method, and then refreshes the data to ensure the latest changes are available. diff --git a/source/includes/api-details/dart/users/custom-user-data-create-custom-user-data-description.rst b/source/includes/api-details/dart/users/custom-user-data-create-custom-user-data-description.rst new file mode 100644 index 0000000000..72b4f9b64e --- /dev/null +++ b/source/includes/api-details/dart/users/custom-user-data-create-custom-user-data-description.rst @@ -0,0 +1,11 @@ +This example uses an Atlas Function to create the custom user data document. +The Atlas Function takes an object passed by the client add adds +it to the custom user data collection in Atlas. The Function creates +the custom user data if it doesn't already exist and replaces all data in it +if it does exist. + +.. literalinclude:: /examples/generated/flutter/writeCustomUserData.snippet.write-custom-user-data.js + :language: js + :caption: writeCustomUserData.js - Atlas Function running on server (JavaScript) + +The client calls the Function to create the user data. diff --git a/source/includes/api-details/dart/users/custom-user-data-read-custom-user-data-2-description.rst b/source/includes/api-details/dart/users/custom-user-data-read-custom-user-data-2-description.rst new file mode 100644 index 0000000000..71ae01fc98 --- /dev/null +++ b/source/includes/api-details/dart/users/custom-user-data-read-custom-user-data-2-description.rst @@ -0,0 +1,5 @@ +.. note:: + + If you require the most recent version of custom user data, use the + :flutter-sdk:`refreshCustomData() ` + method to request the latest version of a user's custom data. diff --git a/source/includes/api-details/dart/users/custom-user-data-read-custom-user-data-description.rst b/source/includes/api-details/dart/users/custom-user-data-read-custom-user-data-description.rst new file mode 100644 index 0000000000..5d4c476b27 --- /dev/null +++ b/source/includes/api-details/dart/users/custom-user-data-read-custom-user-data-description.rst @@ -0,0 +1,2 @@ +To read custom user data, access the :flutter-sdk:`User.customData +` property of a logged in user. diff --git a/source/includes/api-details/dart/users/custom-user-data-update-custom-user-data-description.rst b/source/includes/api-details/dart/users/custom-user-data-update-custom-user-data-description.rst new file mode 100644 index 0000000000..0066a0819b --- /dev/null +++ b/source/includes/api-details/dart/users/custom-user-data-update-custom-user-data-description.rst @@ -0,0 +1,11 @@ +This example uses an Atlas Function to update the custom user data document. +The Atlas Function takes an object passed by the client add adds +it to the custom user data collection in Atlas. The Function creates +the custom user data if it doesn't already exist and replaces all data in it +if it does exist. + +.. literalinclude:: /examples/generated/flutter/writeCustomUserData.snippet.write-custom-user-data.js + :language: js + :caption: writeCustomUserData.js - Atlas Function running on server (JavaScript) + +The client calls the Function to update the user data. diff --git a/source/includes/api-details/java/users/custom-user-data-create-custom-user-data-description.rst b/source/includes/api-details/java/users/custom-user-data-create-custom-user-data-description.rst new file mode 100644 index 0000000000..c219f56536 --- /dev/null +++ b/source/includes/api-details/java/users/custom-user-data-create-custom-user-data-description.rst @@ -0,0 +1,4 @@ +The following example uses +:ref:`MongoDB Data Access ` to insert a +document containing the user ID of the currently logged in user and a +``favoriteColor`` value into the custom user data collection. diff --git a/source/includes/api-details/java/users/custom-user-data-read-custom-user-data-2-description.rst b/source/includes/api-details/java/users/custom-user-data-read-custom-user-data-2-description.rst new file mode 100644 index 0000000000..fc67410091 --- /dev/null +++ b/source/includes/api-details/java/users/custom-user-data-read-custom-user-data-2-description.rst @@ -0,0 +1,6 @@ +.. note:: + + If you require the most recent version of custom user data, use the + :java-sdk:`User.refreshCustomData() + ` + method to request the latest version of a user's custom data. diff --git a/source/includes/api-details/java/users/custom-user-data-read-custom-user-data-description.rst b/source/includes/api-details/java/users/custom-user-data-read-custom-user-data-description.rst new file mode 100644 index 0000000000..68469af4d7 --- /dev/null +++ b/source/includes/api-details/java/users/custom-user-data-read-custom-user-data-description.rst @@ -0,0 +1,3 @@ +To read custom user data, call the +:java-sdk:`User.getCustomData() ` +method on the ``User`` object of a logged in user. diff --git a/source/includes/api-details/java/users/custom-user-data-update-custom-user-data-description.rst b/source/includes/api-details/java/users/custom-user-data-update-custom-user-data-description.rst new file mode 100644 index 0000000000..2a1f3bf9b9 --- /dev/null +++ b/source/includes/api-details/java/users/custom-user-data-update-custom-user-data-description.rst @@ -0,0 +1,4 @@ +The following example uses :ref:`MongoDB Data Access +` to update the ``favoriteColor`` field of +the document containing the user ID of the currently logged in user +in the custom user data collection. diff --git a/source/includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-2-description.rst b/source/includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-2-description.rst new file mode 100644 index 0000000000..6bfad6375e --- /dev/null +++ b/source/includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-2-description.rst @@ -0,0 +1,5 @@ +.. note:: + + If you require the most recent version of custom user data, use the + :js-sdk:`User.refreshCustomData() ` + method to request the latest version of a user's custom data. diff --git a/source/includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-description.rst b/source/includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-description.rst new file mode 100644 index 0000000000..0fcb48a001 --- /dev/null +++ b/source/includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-description.rst @@ -0,0 +1,2 @@ +You retrieve custom user data in the :js-sdk:`customData ` +property of the ``User`` object. diff --git a/source/includes/api-details/javascript/users/custom-user-data-update-custom-user-data-description.rst b/source/includes/api-details/javascript/users/custom-user-data-update-custom-user-data-description.rst new file mode 100644 index 0000000000..37e09e3e7c --- /dev/null +++ b/source/includes/api-details/javascript/users/custom-user-data-update-custom-user-data-description.rst @@ -0,0 +1,3 @@ +This example uses :ref:`MongoDB remote access ` to update +a user's custom data. The following example updates the custom data to alter +the user's ``favoriteColor`` to pink. diff --git a/source/includes/api-details/kotlin/users/custom-user-data-create-custom-user-data-description.rst b/source/includes/api-details/kotlin/users/custom-user-data-create-custom-user-data-description.rst new file mode 100644 index 0000000000..5165fcb7c6 --- /dev/null +++ b/source/includes/api-details/kotlin/users/custom-user-data-create-custom-user-data-description.rst @@ -0,0 +1,11 @@ +This example calls an Atlas Function to create custom user data. In this +example, the Atlas Function takes an object passed by the client and +adds it to the custom user data collection in Atlas. +The Function creates the custom user data if it doesn't already exist and +replaces all data in it if it does exist. + +.. literalinclude:: /examples/generated/kotlin/customUserData.snippet.write-custom-user-data.js + :language: js + :caption: writeCustomUserData.js - Atlas Function running on server (JavaScript) + +The Kotlin SDK uses the following code to call this Function. diff --git a/source/includes/api-details/kotlin/users/custom-user-data-delete-custom-user-data-description.rst b/source/includes/api-details/kotlin/users/custom-user-data-delete-custom-user-data-description.rst new file mode 100644 index 0000000000..19165e7c1c --- /dev/null +++ b/source/includes/api-details/kotlin/users/custom-user-data-delete-custom-user-data-description.rst @@ -0,0 +1,11 @@ +This example calls an Atlas Function to delete custom user data. +In this example, the Atlas Function does not require any arguments. +The Function uses the function context to determine the caller's user ID, and +deletes the custom user data document matching the user's ID. + +.. literalinclude:: /examples/generated/kotlin/customUserData.snippet.delete-custom-user-data.js + :language: js + :caption: deleteCustomUserData.js - Atlas Function running on server (JavaScript) + +The SDK code that calls this function requires only a logged-in user to +call the function. diff --git a/source/includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-2-description.rst b/source/includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-2-description.rst new file mode 100644 index 0000000000..687e929221 --- /dev/null +++ b/source/includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-2-description.rst @@ -0,0 +1,6 @@ +.. note:: + + If you require the most recent version of custom user data, use the + :kotlin-sync-sdk:`User.refreshCustomData() + ` + method to request the latest version of a user's custom data. diff --git a/source/includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-description.rst b/source/includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-description.rst new file mode 100644 index 0000000000..06946f5c98 --- /dev/null +++ b/source/includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-description.rst @@ -0,0 +1,4 @@ +You can read the custom user data of a currently logged-in user using the +:kotlin-sync-sdk:`User.customDataAsBsonDocument() +` +extension function. diff --git a/source/includes/api-details/kotlin/users/custom-user-data-update-custom-user-data-description.rst b/source/includes/api-details/kotlin/users/custom-user-data-update-custom-user-data-description.rst new file mode 100644 index 0000000000..81bd367c2c --- /dev/null +++ b/source/includes/api-details/kotlin/users/custom-user-data-update-custom-user-data-description.rst @@ -0,0 +1,11 @@ +This example calls an Atlas Function to update custom user data. In this +example, the Atlas Function takes an object passed by the client and +adds it to the custom user data collection in Atlas. +The Function creates the custom user data if it doesn't already exist and +replaces all data in it if it does exist. + +.. literalinclude:: /examples/generated/kotlin/customUserData.snippet.write-custom-user-data.js + :language: js + :caption: writeCustomUserData.js - Atlas Function running on server (JavaScript) + +The Kotlin SDK uses the following code to call this Function. diff --git a/source/includes/api-details/objectivec/users/custom-user-data-create-custom-user-data-description.rst b/source/includes/api-details/objectivec/users/custom-user-data-create-custom-user-data-description.rst new file mode 100644 index 0000000000..a8a2dddb3f --- /dev/null +++ b/source/includes/api-details/objectivec/users/custom-user-data-create-custom-user-data-description.rst @@ -0,0 +1,4 @@ +The following example :ref:`accesses MongoDB ` through +the ``MongoClient`` to insert document a into the custom user data collection. +This document contains the user ID of the currently logged in user and a +``favoriteColor`` value. diff --git a/source/includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-2-description.rst b/source/includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-2-description.rst new file mode 100644 index 0000000000..d3034e7b21 --- /dev/null +++ b/source/includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-2-description.rst @@ -0,0 +1,6 @@ +.. note:: + + If you require the most recent version of custom user data, use the + :objc-sdk:`refreshCustomDataWithCompletion + ` + method to request the latest version of a user's custom data. diff --git a/source/includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-description.rst b/source/includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-description.rst new file mode 100644 index 0000000000..355038dc59 --- /dev/null +++ b/source/includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-description.rst @@ -0,0 +1,2 @@ +To read the data, access the ``customData`` property on the ``User`` object of +a logged-in user. diff --git a/source/includes/api-details/objectivec/users/custom-user-data-update-custom-user-data-description.rst b/source/includes/api-details/objectivec/users/custom-user-data-update-custom-user-data-description.rst new file mode 100644 index 0000000000..344c2b9eb0 --- /dev/null +++ b/source/includes/api-details/objectivec/users/custom-user-data-update-custom-user-data-description.rst @@ -0,0 +1,5 @@ +To update a user's custom user data with MongoDB Data Access, edit the +MongoDB document whose user ID field contains the user ID of the user. +The following example uses :ref:`MongoDB Data Access ` to +update the ``favoriteColor`` field of the the document containing the user ID +of the currently logged in user in the custom user data collection. diff --git a/source/includes/api-details/swift/users/custom-user-data-create-custom-user-data-description.rst b/source/includes/api-details/swift/users/custom-user-data-create-custom-user-data-description.rst new file mode 100644 index 0000000000..a8a2dddb3f --- /dev/null +++ b/source/includes/api-details/swift/users/custom-user-data-create-custom-user-data-description.rst @@ -0,0 +1,4 @@ +The following example :ref:`accesses MongoDB ` through +the ``MongoClient`` to insert document a into the custom user data collection. +This document contains the user ID of the currently logged in user and a +``favoriteColor`` value. diff --git a/source/includes/api-details/swift/users/custom-user-data-read-custom-user-data-2-description.rst b/source/includes/api-details/swift/users/custom-user-data-read-custom-user-data-2-description.rst new file mode 100644 index 0000000000..1dc3ab652c --- /dev/null +++ b/source/includes/api-details/swift/users/custom-user-data-read-custom-user-data-2-description.rst @@ -0,0 +1,6 @@ +.. note:: + + If you require the most recent version of custom user data, use the + :swift-sdk:`refreshCustomData() + ` + method to request the latest version of a user's custom data. diff --git a/source/includes/api-details/swift/users/custom-user-data-read-custom-user-data-description.rst b/source/includes/api-details/swift/users/custom-user-data-read-custom-user-data-description.rst new file mode 100644 index 0000000000..355038dc59 --- /dev/null +++ b/source/includes/api-details/swift/users/custom-user-data-read-custom-user-data-description.rst @@ -0,0 +1,2 @@ +To read the data, access the ``customData`` property on the ``User`` object of +a logged-in user. diff --git a/source/includes/api-details/swift/users/custom-user-data-update-custom-user-data-description.rst b/source/includes/api-details/swift/users/custom-user-data-update-custom-user-data-description.rst new file mode 100644 index 0000000000..344c2b9eb0 --- /dev/null +++ b/source/includes/api-details/swift/users/custom-user-data-update-custom-user-data-description.rst @@ -0,0 +1,5 @@ +To update a user's custom user data with MongoDB Data Access, edit the +MongoDB document whose user ID field contains the user ID of the user. +The following example uses :ref:`MongoDB Data Access ` to +update the ``favoriteColor`` field of the the document containing the user ID +of the currently logged in user in the custom user data collection. diff --git a/source/includes/sdk-examples/users/custom-user-data-create-custom-user-data.rst b/source/includes/sdk-examples/users/custom-user-data-create-custom-user-data.rst new file mode 100644 index 0000000000..f25d297e6d --- /dev/null +++ b/source/includes/sdk-examples/users/custom-user-data-create-custom-user-data.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/custom-user-data.snippet.create.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/CustomUserDataExamples.snippet.cud.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.write-custom-user-data-function.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AccessCustomUserDataTest.snippet.create-custom-user-data.java + :language: java + :emphasize-lines: 11,12 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AccessCustomUserDataTest.snippet.create-custom-user-data.kt + :language: kotlin + :emphasize-lines: 11 + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.write-custom-user-data.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/CustomUserData.snippet.create-custom-user-data.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CustomUserData.snippet.create-custom-user-data.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/users/custom-user-data-delete-custom-user-data.rst b/source/includes/sdk-examples/users/custom-user-data-delete-custom-user-data.rst new file mode 100644 index 0000000000..b8bb129bf5 --- /dev/null +++ b/source/includes/sdk-examples/users/custom-user-data-delete-custom-user-data.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/custom-user-data.snippet.delete.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/CustomUserDataExamples.snippet.delete.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.delete-custom-user-data.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/users/custom-user-data-read-custom-user-data.rst b/source/includes/sdk-examples/users/custom-user-data-read-custom-user-data.rst new file mode 100644 index 0000000000..7a4314eeaf --- /dev/null +++ b/source/includes/sdk-examples/users/custom-user-data-read-custom-user-data.rst @@ -0,0 +1,65 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/custom-user-data.snippet.read.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/CustomUserDataExamples.snippet.read.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.read-custom-user-data.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AccessCustomUserDataTest.snippet.read-custom-user-data.java + :language: java + :emphasize-lines: 6 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AccessCustomUserDataTest.snippet.read-custom-user-data.kt + :language: kotlin + :emphasize-lines: 6 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/custom-user-data.snippet.read-custom-user-data.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.read-custom-user-data.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/CustomUserData.snippet.read-custom-user-data.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CustomUserData.snippet.read-custom-user-data.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/users/custom-user-data-update-custom-user-data.rst b/source/includes/sdk-examples/users/custom-user-data-update-custom-user-data.rst new file mode 100644 index 0000000000..762ac38742 --- /dev/null +++ b/source/includes/sdk-examples/users/custom-user-data-update-custom-user-data.rst @@ -0,0 +1,65 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/custom-user-data.snippet.update.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/CustomUserDataExamples.snippet.update.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.write-custom-user-data-function.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/AccessCustomUserDataTest.snippet.update-custom-user-data.java + :language: java + :emphasize-lines: 11,12 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/AccessCustomUserDataTest.snippet.update-custom-user-data.kt + :language: kotlin + :emphasize-lines: 11 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/custom-user-data.snippet.write-custom-user-data.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.write-custom-user-data.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/CustomUserData.snippet.update-custom-user-data.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/CustomUserData.snippet.update-custom-user-data.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/sdk/users/custom-user-data.txt b/source/sdk/users/custom-user-data.txt index f2bf49e077..2983160c63 100644 --- a/source/sdk/users/custom-user-data.txt +++ b/source/sdk/users/custom-user-data.txt @@ -4,10 +4,400 @@ Custom User Data ================ +.. meta:: + :description: Learn how to store and access custom user data using Atlas Device SDK. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for information about custom user data. +.. tabs-selector:: drivers + +This page describes custom user data in an App Services App and how to manage it +with Atlas Device SDK. + +Atlas App Services lets you associate data with an authenticated user, such as +a user's preferred language, date of birth, or local timezone. You can store +this arbitrary **custom user data** about your users and read it from your +client application. + +Prerequisites +------------- + +To use custom user data, you must have an App Services App with custom user +data enabled. + +To set up an App Services App that uses custom user data, refer to the +following: + +#. :ref:`Enable Custom User Data ` + in the App Services documentation +#. :ref:`sdks-connect-to-atlas` + +.. _sdks-create-custom-user-data: + +Create Custom User Data +----------------------- + +When you configure custom user data in Atlas, you designate a database and +collection to store the custom user data. This data is stored as documents in +Atlas. + +To create custom user data for a user, create a MongoDB document in the +custom user data collection. The user ID field of the document should +contain the user's user ID. You can create custom user data documents in a few +ways: + +- Define a User Creation Function that automatically creates custom user data + as part of the user registration process. +- Define a Function that you call with the user data, perhaps sometime + after registration. +- Access MongoDB through the SDK, if your language supports it, and insert a + document directly into the custom user data collection. +- Manually create a custom data document through: + + - :compass:`MongoDB Compass ` + - :atlas:`MongoDB Atlas Data Explorer ` + +.. tip:: + + In the App Services UI, check the :guilabel:`App Users` page under the + :guilabel:`Custom User Data` tab to find and configure custom user + data settings, including: + + - The custom user data cluster, database, and collection + - The user ID field used to map custom user data documents to users + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/custom-user-data-create-custom-user-data-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/custom-user-data-create-custom-user-data-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/custom-user-data-create-custom-user-data-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/custom-user-data-create-custom-user-data-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/custom-user-data-create-custom-user-data-description.rst + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/custom-user-data-create-custom-user-data-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/users/custom-user-data-create-custom-user-data-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/custom-user-data-create-custom-user-data-description.rst + + .. tab:: + :tabid: typescript + + + +.. include:: /includes/sdk-examples/users/custom-user-data-create-custom-user-data.rst + +You can add any number of arbitrary fields and values to the custom user +data document when you create it. The user ID field is the only +requirement for the document to become available on the ``User`` object +as custom user data. + +.. _sdks-read-custom-user-data: + +Read Custom User Data +--------------------- + +You can read the :ref:`custom user data ` of a +currently logged-in user through that user's ``User`` object. You cannot +edit custom user data through a ``User`` object. To edit custom user +data, see the Update Custom User Data section on this page. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/custom-user-data-read-custom-user-data-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/custom-user-data-read-custom-user-data-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/custom-user-data-read-custom-user-data-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/custom-user-data-read-custom-user-data-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/custom-user-data-read-custom-user-data-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/custom-user-data-read-custom-user-data-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/custom-user-data-read-custom-user-data.rst + +.. warning:: Custom Data May Be Stale + + Atlas App Services does not dynamically update the value of the client-side + user custom data document immediately when underlying data changes. + Instead, App Services fetches the most recent version of custom user + data whenever a user refreshes their :ref:`access token + `, which is used by most SDK operations that contact + the App Services backend. If the token is not refreshed before its default + 30 minute expiration time, the SDK refreshes the token on the next call to + the backend. Custom user data could be stale for up to 30 minutes plus the + time until the next SDK call to the backend occurs. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/custom-user-data-read-custom-user-data-2-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/custom-user-data-read-custom-user-data-2-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/custom-user-data-read-custom-user-data-2-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/custom-user-data-read-custom-user-data-2-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/custom-user-data-read-custom-user-data-2-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-2-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/custom-user-data-read-custom-user-data-2-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/users/custom-user-data-read-custom-user-data-2-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/custom-user-data-read-custom-user-data-2-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/custom-user-data-read-custom-user-data-js-ts-2-description.rst + +.. _sdks-update-custom-user-data: + +Update Custom User Data +----------------------- + +You can update custom user data in a few ways: + +- Define a Function that you call with the updated user data. +- Access MongoDB through the SDK, if your language supports it, and update + the user data document in the custom user data collection directly. +- Manually update a custom data document through: + + - :compass:`MongoDB Compass ` + - :atlas:`MongoDB Atlas Data Explorer ` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/custom-user-data-update-custom-user-data-description.rst + + .. tab:: + :tabid: typescript + + + +.. include:: /includes/sdk-examples/users/custom-user-data-update-custom-user-data.rst + +.. _sdks-delete-custom-user-data: + +Delete Custom User Data +----------------------- + +Custom user data is stored in a document linked to the user object. +Deleting a user does not delete the custom user data. To fully delete user +data to comply with, for example, :apple:`Apple's Account deletion guidance +`, you must manually delete +the user's custom data document. + +You can delete custom user data in a few ways: + +- Define a Function that you call to delete custom user data. +- Access MongoDB through the SDK, if your language supports it, and delete + the user data document from the custom user data collection directly. +- Manually delete a custom data document through: + + - :compass:`MongoDB Compass ` + - :atlas:`MongoDB Atlas Data Explorer ` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/users/custom-user-data-delete-custom-user-data-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/custom-user-data-delete-custom-user-data-description.rst + + .. tab:: + :tabid: dart + + .. tab:: + :tabid: java + + + .. tab:: + :tabid: java-kotlin + + + .. tab:: + :tabid: javascript + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/custom-user-data-delete-custom-user-data-description.rst + + .. tab:: + :tabid: objectivec + + + .. tab:: + :tabid: swift + + + .. tab:: + :tabid: typescript + + +.. include:: /includes/sdk-examples/users/custom-user-data-delete-custom-user-data.rst From 8f7001a2de41d218be831b5ba998a2caa4a0be23 Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 6 Aug 2024 11:36:18 -0400 Subject: [PATCH 56/63] (DOCSP-39516): Consolidate Delete page (#3336) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39516 *Staged Page* - [Delete](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39516/sdk/crud/delete/) Note for reviewer: there are some API description tab sets where one or more tabs is missing a description. That's intentional. In some cases, there is no relevant info to provide because we're missing an example, and in other cases, it's because I needed to provide additional info for _one_ of the languages but didn't have anything relevant to say for the other languages. *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Delete](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/crud/delete/) - [Flutter: Delete](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/crud/delete/) - [Flutter: Data Types](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/data-types/#realmvalue) - [Java: Delete](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/crud/delete/) - [Kotlin: Delete](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/crud/delete/) - [.NET: Delete](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/crud/delete/) - [.NET: Lists](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/lists/) - [.NET: Dictionaries](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/dictionaries/) - [.NET: Sets](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/sets/) - [.NET: RealmValue](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/realm-value/) - [Node.js: Delete](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/crud/delete/) - [Node.js: Sets](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/sets/) - [Node.js: Dictionaries](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/dictionaries/) - [Swift: Delete](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/crud/delete/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [ ] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: Kyle Rollins <115574589+krollins-mdb@users.noreply.github.com> --- .../crud/delete-all-objects-not-supported.rst | 3 + ...lete-all-objects-of-type-not-supported.rst | 1 + ...elete-inverse-relationship-description.rst | 4 + .../delete-multiple-objects-description.rst | 1 + .../cpp/crud/delete-objects-procedure.rst | 25 + .../crud/delete-operations-description.rst | 3 + ...ove-dictionary-keys-values-description.rst | 3 + ...-remove-elements-from-list-description.rst | 3 + ...e-remove-elements-from-set-description.rst | 3 + .../crud/delete-single-object-description.rst | 3 + ...ll-objects-in-the-database-description.rst | 2 + ...delete-all-objects-of-type-description.rst | 2 + ...ct-and-its-related-objects-description.rst | 6 + ...lete-mixed-property-values-description.rst | 1 + .../delete-multiple-objects-description.rst | 3 + .../csharp/crud/delete-objects-procedure.rst | 35 + .../crud/delete-operations-description.rst | 10 + ...ove-dictionary-keys-values-description.rst | 1 + ...-remove-elements-from-list-description.rst | 16 + ...e-remove-elements-from-set-description.rst | 17 + .../crud/delete-single-object-description.rst | 4 + ...-objects-in-the-database-not-supported.rst | 6 + ...delete-all-objects-of-type-description.rst | 2 + ...lete-mixed-property-values-description.rst | 1 + .../delete-multiple-objects-description.rst | 2 + .../dart/crud/delete-objects-procedure.rst | 30 + .../crud/delete-operations-description.rst | 3 + ...ove-dictionary-keys-values-description.rst | 4 + ...-remove-elements-from-list-description.rst | 10 + ...e-remove-elements-from-set-description.rst | 6 + .../crud/delete-single-object-description.rst | 2 + ...ll-objects-in-the-database-description.rst | 3 + ...delete-all-objects-of-type-description.rst | 3 + ...ct-and-its-related-objects-description.rst | 3 + ...lete-mixed-property-values-description.rst | 0 .../delete-multiple-objects-description.rst | 9 + .../java/crud/delete-objects-procedure.rst | 30 + .../crud/delete-operations-description.rst | 3 + ...ove-dictionary-keys-values-description.rst | 2 + ...-remove-elements-from-list-description.rst | 2 + ...e-remove-elements-from-set-description.rst | 2 + .../crud/delete-single-object-description.rst | 7 + ...ects-in-the-database-js-ts-description.rst | 3 + ...-all-objects-of-type-js-ts-description.rst | 3 + ...ixed-property-values-js-ts-description.rst | 1 + ...ete-multiple-objects-js-ts-description.rst | 3 + .../crud/delete-objects-js-ts-procedure.rst | 24 + ...ctionary-keys-values-js-ts-description.rst | 2 + ...e-elements-from-list-js-ts-description.rst | 3 + ...e-remove-elements-from-set-description.rst | 8 + ...delete-single-object-js-ts-description.rst | 2 + ...ll-objects-in-the-database-description.rst | 4 + ...delete-all-objects-of-type-description.rst | 6 + ...ct-and-its-related-objects-description.rst | 3 + .../delete-embedded-object-description.rst | 15 + ...lete-mixed-property-values-description.rst | 2 + .../delete-multiple-objects-description.rst | 7 + .../kotlin/crud/delete-objects-procedure.rst | 42 + .../crud/delete-operations-description.rst | 11 + .../delete-related-objects-description.rst | 3 + ...ove-dictionary-keys-values-description.rst | 15 + ...-remove-elements-from-list-description.rst | 22 + ...e-remove-elements-from-set-description.rst | 22 + .../crud/delete-single-object-description.rst | 7 + ...ll-objects-in-the-database-description.rst | 5 + ...delete-all-objects-of-type-description.rst | 8 + ...ct-and-its-related-objects-description.rst | 4 + ...lete-mixed-property-values-description.rst | 1 + .../delete-multiple-objects-description.rst | 4 + .../crud/delete-objects-procedure.rst | 34 + .../crud/delete-operations-description.rst | 12 + ...ove-dictionary-keys-values-description.rst | 12 + ...-remove-elements-from-list-description.rst | 10 + ...e-remove-elements-from-set-description.rst | 18 + .../crud/delete-single-object-description.rst | 4 + ...ll-objects-in-the-database-description.rst | 5 + ...delete-all-objects-of-type-description.rst | 5 + ...ct-and-its-related-objects-description.rst | 3 + ...lete-mixed-property-values-description.rst | 1 + .../delete-multiple-objects-description.rst | 4 + .../swift/crud/delete-objects-procedure.rst | 35 + .../crud/delete-operations-description.rst | 13 + ...ove-dictionary-keys-values-description.rst | 10 + ...-remove-elements-from-list-description.rst | 16 + ...e-remove-elements-from-set-description.rst | 4 + .../crud/delete-single-object-description.rst | 4 + ...e-remove-elements-from-set-description.rst | 5 + .../delete-all-objects-in-the-database.rst | 68 ++ .../crud/delete-all-objects-of-type.rst | 67 ++ ...lete-an-object-and-its-related-objects.rst | 68 ++ .../crud/delete-embedded-object.rst | 71 ++ .../crud/delete-inverse-relationship.rst | 71 ++ .../crud/delete-mixed-property-values.rst | 70 ++ .../crud/delete-multiple-objects.rst | 67 ++ .../sdk-examples/crud/delete-operations.rst | 66 ++ .../crud/delete-related-objects.rst | 69 ++ .../delete-remove-dictionary-keys-values.rst | 68 ++ .../crud/delete-remove-elements-from-list.rst | 71 ++ .../crud/delete-remove-elements-from-set.rst | 68 ++ .../crud/delete-single-object.rst | 66 ++ source/sdk/crud/delete.txt | 972 +++++++++++++++++- source/sdk/crud/update.txt | 5 + 102 files changed, 2564 insertions(+), 4 deletions(-) create mode 100644 source/includes/api-details/cpp/crud/delete-all-objects-not-supported.rst create mode 100644 source/includes/api-details/cpp/crud/delete-all-objects-of-type-not-supported.rst create mode 100644 source/includes/api-details/cpp/crud/delete-inverse-relationship-description.rst create mode 100644 source/includes/api-details/cpp/crud/delete-multiple-objects-description.rst create mode 100644 source/includes/api-details/cpp/crud/delete-objects-procedure.rst create mode 100644 source/includes/api-details/cpp/crud/delete-operations-description.rst create mode 100644 source/includes/api-details/cpp/crud/delete-remove-dictionary-keys-values-description.rst create mode 100644 source/includes/api-details/cpp/crud/delete-remove-elements-from-list-description.rst create mode 100644 source/includes/api-details/cpp/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/api-details/cpp/crud/delete-single-object-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-all-objects-in-the-database-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-an-object-and-its-related-objects-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-mixed-property-values-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-multiple-objects-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-objects-procedure.rst create mode 100644 source/includes/api-details/csharp/crud/delete-operations-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-remove-dictionary-keys-values-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-remove-elements-from-list-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/api-details/csharp/crud/delete-single-object-description.rst create mode 100644 source/includes/api-details/dart/crud/delete-all-objects-in-the-database-not-supported.rst create mode 100644 source/includes/api-details/dart/crud/delete-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/dart/crud/delete-mixed-property-values-description.rst create mode 100644 source/includes/api-details/dart/crud/delete-multiple-objects-description.rst create mode 100644 source/includes/api-details/dart/crud/delete-objects-procedure.rst create mode 100644 source/includes/api-details/dart/crud/delete-operations-description.rst create mode 100644 source/includes/api-details/dart/crud/delete-remove-dictionary-keys-values-description.rst create mode 100644 source/includes/api-details/dart/crud/delete-remove-elements-from-list-description.rst create mode 100644 source/includes/api-details/dart/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/api-details/dart/crud/delete-single-object-description.rst create mode 100644 source/includes/api-details/java/crud/delete-all-objects-in-the-database-description.rst create mode 100644 source/includes/api-details/java/crud/delete-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/java/crud/delete-an-object-and-its-related-objects-description.rst create mode 100644 source/includes/api-details/java/crud/delete-mixed-property-values-description.rst create mode 100644 source/includes/api-details/java/crud/delete-multiple-objects-description.rst create mode 100644 source/includes/api-details/java/crud/delete-objects-procedure.rst create mode 100644 source/includes/api-details/java/crud/delete-operations-description.rst create mode 100644 source/includes/api-details/java/crud/delete-remove-dictionary-keys-values-description.rst create mode 100644 source/includes/api-details/java/crud/delete-remove-elements-from-list-description.rst create mode 100644 source/includes/api-details/java/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/api-details/java/crud/delete-single-object-description.rst create mode 100644 source/includes/api-details/javascript/crud/delete-all-objects-in-the-database-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/delete-all-objects-of-type-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/delete-mixed-property-values-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/delete-multiple-objects-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/delete-objects-js-ts-procedure.rst create mode 100644 source/includes/api-details/javascript/crud/delete-remove-dictionary-keys-values-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/delete-remove-elements-from-list-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/api-details/javascript/crud/delete-single-object-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-all-objects-in-the-database-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-an-object-and-its-related-objects-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-embedded-object-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-mixed-property-values-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-multiple-objects-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-objects-procedure.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-operations-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-related-objects-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-remove-dictionary-keys-values-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-remove-elements-from-list-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/api-details/kotlin/crud/delete-single-object-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-all-objects-in-the-database-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-an-object-and-its-related-objects-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-mixed-property-values-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-multiple-objects-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-objects-procedure.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-operations-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-remove-dictionary-keys-values-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-remove-elements-from-list-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/api-details/objectivec/crud/delete-single-object-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-all-objects-in-the-database-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-an-object-and-its-related-objects-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-mixed-property-values-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-multiple-objects-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-objects-procedure.rst create mode 100644 source/includes/api-details/swift/crud/delete-operations-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-remove-dictionary-keys-values-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-remove-elements-from-list-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/api-details/swift/crud/delete-single-object-description.rst create mode 100644 source/includes/api-details/typescript/crud/delete-remove-elements-from-set-description.rst create mode 100644 source/includes/sdk-examples/crud/delete-all-objects-in-the-database.rst create mode 100644 source/includes/sdk-examples/crud/delete-all-objects-of-type.rst create mode 100644 source/includes/sdk-examples/crud/delete-an-object-and-its-related-objects.rst create mode 100644 source/includes/sdk-examples/crud/delete-embedded-object.rst create mode 100644 source/includes/sdk-examples/crud/delete-inverse-relationship.rst create mode 100644 source/includes/sdk-examples/crud/delete-mixed-property-values.rst create mode 100644 source/includes/sdk-examples/crud/delete-multiple-objects.rst create mode 100644 source/includes/sdk-examples/crud/delete-operations.rst create mode 100644 source/includes/sdk-examples/crud/delete-related-objects.rst create mode 100644 source/includes/sdk-examples/crud/delete-remove-dictionary-keys-values.rst create mode 100644 source/includes/sdk-examples/crud/delete-remove-elements-from-list.rst create mode 100644 source/includes/sdk-examples/crud/delete-remove-elements-from-set.rst create mode 100644 source/includes/sdk-examples/crud/delete-single-object.rst diff --git a/source/includes/api-details/cpp/crud/delete-all-objects-not-supported.rst b/source/includes/api-details/cpp/crud/delete-all-objects-not-supported.rst new file mode 100644 index 0000000000..8652a07994 --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-all-objects-not-supported.rst @@ -0,0 +1,3 @@ +C++ does not currently provide a method to delete all objects in the database. +You can manually iterate through the objects and delete them if you need to +clear the database. diff --git a/source/includes/api-details/cpp/crud/delete-all-objects-of-type-not-supported.rst b/source/includes/api-details/cpp/crud/delete-all-objects-of-type-not-supported.rst new file mode 100644 index 0000000000..0ca1ab07aa --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-all-objects-of-type-not-supported.rst @@ -0,0 +1 @@ +C++ does not currently provide an API to delete all objects of a type. diff --git a/source/includes/api-details/cpp/crud/delete-inverse-relationship-description.rst b/source/includes/api-details/cpp/crud/delete-inverse-relationship-description.rst new file mode 100644 index 0000000000..22eb0a2254 --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-inverse-relationship-description.rst @@ -0,0 +1,4 @@ +In this example, a ``Person`` has a to-one relationship to a ``Dog``, +and the ``Dog`` has an inverse relationship to ``Person``. +Setting the ``Person.dog`` relationship to ``nullptr`` removes the inverse +relationship from the ``Dog`` object. diff --git a/source/includes/api-details/cpp/crud/delete-multiple-objects-description.rst b/source/includes/api-details/cpp/crud/delete-multiple-objects-description.rst new file mode 100644 index 0000000000..12d92e20f7 --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-multiple-objects-description.rst @@ -0,0 +1 @@ +You can delete multiple objects within a write transaction. \ No newline at end of file diff --git a/source/includes/api-details/cpp/crud/delete-objects-procedure.rst b/source/includes/api-details/cpp/crud/delete-objects-procedure.rst new file mode 100644 index 0000000000..f10dc52bc8 --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-objects-procedure.rst @@ -0,0 +1,25 @@ +1. Open a write transaction with :cpp-sdk:`db.write() + `. + +#. Pass the object(s) you want to delete into the write block, or query for + them inside the block. + + .. important:: Objects Must Be Live + + You can only delete live objects. If you are working with a frozen + object or thread-safe reference, you must ``thaw()`` the object or + ``resolve()`` the thread-safe reference before deleting the object. + For more details, refer to :ref:`sdks-threading`. + +#. Call the ``remove()`` method with the object you want to delete as an + argument. + +#. The specified objects are deleted from the database and can no longer be + accessed or modified. If you try to use a deleted object, the SDK throws an + error. + + If any deleted objects had a relationship with another object, the SDK + only deletes the reference to the other object. The referenced object + remains in the database, but it can no longer be queried through the deleted + parent property. Refer to the :ref:`sdks-delete-related-objects` section + for more information. diff --git a/source/includes/api-details/cpp/crud/delete-operations-description.rst b/source/includes/api-details/cpp/crud/delete-operations-description.rst new file mode 100644 index 0000000000..f22d8c9602 --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-operations-description.rst @@ -0,0 +1,3 @@ +To delete an object from the database, pass the object to the +:cpp-sdk:`db.remove() function ` +inside of a write transaction. diff --git a/source/includes/api-details/cpp/crud/delete-remove-dictionary-keys-values-description.rst b/source/includes/api-details/cpp/crud/delete-remove-dictionary-keys-values-description.rst new file mode 100644 index 0000000000..68486b7f90 --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-remove-dictionary-keys-values-description.rst @@ -0,0 +1,3 @@ +To delete a :cpp-sdk:`map key +`, +pass the key name to ``erase()``. diff --git a/source/includes/api-details/cpp/crud/delete-remove-elements-from-list-description.rst b/source/includes/api-details/cpp/crud/delete-remove-elements-from-list-description.rst new file mode 100644 index 0000000000..49bf1822d3 --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-remove-elements-from-list-description.rst @@ -0,0 +1,3 @@ +You can delete a :cpp-sdk:`list element +` +with ``erase()``, or remove all elements from the list with ``clear()``. diff --git a/source/includes/api-details/cpp/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/cpp/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..5cecc53bea --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,3 @@ +You can delete a :cpp-sdk:`set element +` +with ``erase()``, or remove all elements from a set with ``clear()``. diff --git a/source/includes/api-details/cpp/crud/delete-single-object-description.rst b/source/includes/api-details/cpp/crud/delete-single-object-description.rst new file mode 100644 index 0000000000..f22d8c9602 --- /dev/null +++ b/source/includes/api-details/cpp/crud/delete-single-object-description.rst @@ -0,0 +1,3 @@ +To delete an object from the database, pass the object to the +:cpp-sdk:`db.remove() function ` +inside of a write transaction. diff --git a/source/includes/api-details/csharp/crud/delete-all-objects-in-the-database-description.rst b/source/includes/api-details/csharp/crud/delete-all-objects-in-the-database-description.rst new file mode 100644 index 0000000000..5076099b62 --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-all-objects-in-the-database-description.rst @@ -0,0 +1,2 @@ +To delete all managed objects in the database, call :dotnet-sdk:`Realm.RemoveAll +`. diff --git a/source/includes/api-details/csharp/crud/delete-all-objects-of-type-description.rst b/source/includes/api-details/csharp/crud/delete-all-objects-of-type-description.rst new file mode 100644 index 0000000000..91c0400e63 --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-all-objects-of-type-description.rst @@ -0,0 +1,2 @@ +To delete all objects of a type, call :dotnet-sdk:`Realm.RemoveAll\ +`. \ No newline at end of file diff --git a/source/includes/api-details/csharp/crud/delete-an-object-and-its-related-objects-description.rst b/source/includes/api-details/csharp/crud/delete-an-object-and-its-related-objects-description.rst new file mode 100644 index 0000000000..f9075d7d2e --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-an-object-and-its-related-objects-description.rst @@ -0,0 +1,6 @@ +In the following example, we call :dotnet-sdk:`Realm.RemoveRange\ +` +to remove Ali's ``dogs`` collection, which is a to-many list property +containing one or more ``Dog`` objects. Then, we call :dotnet-sdk:`Realm.Remove() +` to +delete Ali's ``Person`` object itself. diff --git a/source/includes/api-details/csharp/crud/delete-mixed-property-values-description.rst b/source/includes/api-details/csharp/crud/delete-mixed-property-values-description.rst new file mode 100644 index 0000000000..0af96b9e4a --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-mixed-property-values-description.rst @@ -0,0 +1 @@ +To delete the value of a mixed property, set its value to ``Null``. \ No newline at end of file diff --git a/source/includes/api-details/csharp/crud/delete-multiple-objects-description.rst b/source/includes/api-details/csharp/crud/delete-multiple-objects-description.rst new file mode 100644 index 0000000000..40027667e8 --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-multiple-objects-description.rst @@ -0,0 +1,3 @@ +To delete multiple objects at the same time, pass an ``IQueryable`` query +for the objects you want to delete to :dotnet-sdk:`Realm.RemoveRange\ +`. diff --git a/source/includes/api-details/csharp/crud/delete-objects-procedure.rst b/source/includes/api-details/csharp/crud/delete-objects-procedure.rst new file mode 100644 index 0000000000..a5edfae82a --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-objects-procedure.rst @@ -0,0 +1,35 @@ +1. Open a write transaction with :dotnet-sdk:`Realm.Write + ` or + :dotnet-sdk:`Realm.WriteAsync + `. + +#. Pass the object(s) you want to delete into the write block, or query for + them inside the block. + + .. important:: Objects Must Be Live + + You can only delete live objects. If you are working with a frozen + object or thread-safe reference, you must query for the live object or + resolve the thread-safe reference before deleting the object. For more + details, refer to :ref:`sdks-threading`. + +#. Call the :dotnet-sdk:`Remove + ` + method with the object you want to delete as an argument. + +#. The specified objects are deleted from the database and can no longer be + accessed or modified. If you try to use a deleted object, the SDK throws an + error. + + If any deleted objects had a relationship with another object, the SDK + only deletes the reference to the other object. The referenced object + remains in the database, but it can no longer be queried through the deleted + parent property. Refer to the :ref:`sdks-delete-related-objects` section + for more information. + +.. tip:: + + You can check whether an object is still valid to use by calling + :dotnet-sdk:`isValid + `. + Deleted objects return ``false``. diff --git a/source/includes/api-details/csharp/crud/delete-operations-description.rst b/source/includes/api-details/csharp/crud/delete-operations-description.rst new file mode 100644 index 0000000000..43eb251e85 --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-operations-description.rst @@ -0,0 +1,10 @@ +You can only delete live objects. If you are working with a frozen object, +such as when passing an object across threads, you must query for the frozen +object on the new thread in order to delete it. + +Similarly, if you're passing a :dotnet-sdk:`ThreadSafeReference +` for an object you want to delete, +you must resolve the reference and then delete the resovled object. + +For more information about working with objects across threads, refer to +:ref:`sdks-threading`. diff --git a/source/includes/api-details/csharp/crud/delete-remove-dictionary-keys-values-description.rst b/source/includes/api-details/csharp/crud/delete-remove-dictionary-keys-values-description.rst new file mode 100644 index 0000000000..eac39af6c0 --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-remove-dictionary-keys-values-description.rst @@ -0,0 +1 @@ +You can remove dictionary keys and values within a write transaction. diff --git a/source/includes/api-details/csharp/crud/delete-remove-elements-from-list-description.rst b/source/includes/api-details/csharp/crud/delete-remove-elements-from-list-description.rst new file mode 100644 index 0000000000..7bbe645139 --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-remove-elements-from-list-description.rst @@ -0,0 +1,16 @@ +You can remove one or more elements from a list within a write transaction. + +Deleting an object from the database will remove it from any lists +where it existed. Therefore, a list of objects will never contain deleted objects. +However, lists of primitive types can contain null values. If you do not +want to allow null values in a list, then either use non-nullable types in +the list declaration (for example, use ``IList`` instead of +``IList``). If you are using the older schema +type definition (your classes derive from the ``RealmObject`` base class), +or you do not have nullability enabled, use the ``[Required]`` attribute if +the list contains nullable reference types, such as ``string`` or ``byte[]``. + +.. important:: Not Supported with Sync + + Non-synced databases support collections of nullable (optional) values, + but synced databases do not. diff --git a/source/includes/api-details/csharp/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/csharp/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..b2f970b395 --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,17 @@ +You can remove one or more elements from a set within a write transaction. + +Deleting an object from the database will remove it from any sets +in which it existed. Therefore, a set of objects will never contain null objects. +However, sets of primitive types can contain null values. If you do not +want to allow null values in a set, then either use non-nullable types in +the set declaration (for example, use ``ISet`` instead of +``ISet``). If you are using the older schema +type definition (your classes derive from the ``RealmObject`` base class), +or you do not have nullability enabled, you will need to use the +``[Required]`` attribute if the set contains nullable reference types, such as +``string`` or ``byte[]``. + +.. important:: Not Supported with Sync + + Non-synced databases support collections of nullable (optional) values, + but synced databases do not. diff --git a/source/includes/api-details/csharp/crud/delete-single-object-description.rst b/source/includes/api-details/csharp/crud/delete-single-object-description.rst new file mode 100644 index 0000000000..0af01a9970 --- /dev/null +++ b/source/includes/api-details/csharp/crud/delete-single-object-description.rst @@ -0,0 +1,4 @@ +To delete an object from the database, pass the object to +:dotnet-sdk:`Realm.Remove() +` +inside of a write transaction. diff --git a/source/includes/api-details/dart/crud/delete-all-objects-in-the-database-not-supported.rst b/source/includes/api-details/dart/crud/delete-all-objects-in-the-database-not-supported.rst new file mode 100644 index 0000000000..2762facd52 --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-all-objects-in-the-database-not-supported.rst @@ -0,0 +1,6 @@ +Dart does not provide an API to delete all objects in the database. Instead, +you can iterate through the object types that the database manages and +delete all objects of each type. + +For more information, refer to the Delete All Objects of a Type section on +this page. diff --git a/source/includes/api-details/dart/crud/delete-all-objects-of-type-description.rst b/source/includes/api-details/dart/crud/delete-all-objects-of-type-description.rst new file mode 100644 index 0000000000..689b32f720 --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-all-objects-of-type-description.rst @@ -0,0 +1,2 @@ +Delete all objects of a type in the database with :flutter-sdk:`Realm.deleteAll() ` +in a write transaction block. diff --git a/source/includes/api-details/dart/crud/delete-mixed-property-values-description.rst b/source/includes/api-details/dart/crud/delete-mixed-property-values-description.rst new file mode 100644 index 0000000000..26871b45a9 --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-mixed-property-values-description.rst @@ -0,0 +1 @@ +To delete the value of a mixed property, call ``RealmValue.nullValue()``. diff --git a/source/includes/api-details/dart/crud/delete-multiple-objects-description.rst b/source/includes/api-details/dart/crud/delete-multiple-objects-description.rst new file mode 100644 index 0000000000..7e839d0f1d --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-multiple-objects-description.rst @@ -0,0 +1,2 @@ +Delete multiple objects from the database by calling :flutter-sdk:`Realm.deleteMany() +` in a write transaction block. diff --git a/source/includes/api-details/dart/crud/delete-objects-procedure.rst b/source/includes/api-details/dart/crud/delete-objects-procedure.rst new file mode 100644 index 0000000000..7db23f1aec --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-objects-procedure.rst @@ -0,0 +1,30 @@ +1. Open a write transaction with :flutter-sdk:`realm.write + ` or :flutter-sdk:`realm.writeAsync + `. + +#. Pass the object(s) you want to delete into the write block, or query for + them inside the block. + + .. important:: Objects Must Be Live + + You can only delete live objects. If you are working with a frozen + object, you must query for the live object before deleting the object. + +#. Call the :flutter-sdk:`delete ` + method with the object you want to delete as an argument. + +#. The specified object is deleted from the database and can no longer be + accessed or modified. If you try to use a deleted object, the SDK throws an + error. + + If any deleted objects had a relationship with another object, the SDK + only deletes the reference to the other object. The referenced object + remains in the database, but it can no longer be queried through the deleted + parent property. Refer to the :ref:`sdks-delete-related-objects` section + for more information. + +.. tip:: + + You can check whether an object is still valid to use by checking the + object's :flutter-sdk:`isValid ` + property. Deleted objects return ``false``. diff --git a/source/includes/api-details/dart/crud/delete-operations-description.rst b/source/includes/api-details/dart/crud/delete-operations-description.rst new file mode 100644 index 0000000000..b3372f6ed0 --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-operations-description.rst @@ -0,0 +1,3 @@ +You can only delete live objects. If you are working with a frozen object, +such as when passing an object across isolates, you must query for the frozen +object in order to delete it. diff --git a/source/includes/api-details/dart/crud/delete-remove-dictionary-keys-values-description.rst b/source/includes/api-details/dart/crud/delete-remove-dictionary-keys-values-description.rst new file mode 100644 index 0000000000..0721e64f06 --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-remove-dictionary-keys-values-description.rst @@ -0,0 +1,4 @@ +You can remove keys and values from a :flutter-sdk:`RealmMap +` within a write transaction. To remove a key and +its associated value, call ``map.remove()``. To remove an element matching +a query, call ``map.removeWhere()``. diff --git a/source/includes/api-details/dart/crud/delete-remove-elements-from-list-description.rst b/source/includes/api-details/dart/crud/delete-remove-elements-from-list-description.rst new file mode 100644 index 0000000000..6ab413a4aa --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-remove-elements-from-list-description.rst @@ -0,0 +1,10 @@ +You can remove one or more elements from a :flutter-sdk:`RealmList +` within a write transaction: + +- To remove one element from the list, pass the element to ``list.remove()``. +- To remove one element at a specified index in the list, pass the index to + ``list.removeAt()``. +- To remove multiple contiguous elements from the list, pass the range to + ``list.removeRange()``. +- To remove the last element from the list, call ``list.removeLast()``. +- To remove specific elements from a list that match a query, call ``list.removeWhere()``. diff --git a/source/includes/api-details/dart/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/dart/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..e1124c31bb --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,6 @@ +You can remove one or more elements from a :flutter-sdk:`RealmSet +` within a write transaction: + +- To remove one element from the set, pass the element to ``set.remove()``. +- To remove specific elements from a set that match a query, call ``set.removeWhere()``. +- To remove all elements from the set, call ``set.removeAll()``. diff --git a/source/includes/api-details/dart/crud/delete-single-object-description.rst b/source/includes/api-details/dart/crud/delete-single-object-description.rst new file mode 100644 index 0000000000..8daeb52847 --- /dev/null +++ b/source/includes/api-details/dart/crud/delete-single-object-description.rst @@ -0,0 +1,2 @@ +Delete an object from the database by calling :flutter-sdk:`Realm.delete() +` in a write transaction block. diff --git a/source/includes/api-details/java/crud/delete-all-objects-in-the-database-description.rst b/source/includes/api-details/java/crud/delete-all-objects-in-the-database-description.rst new file mode 100644 index 0000000000..17b3337b60 --- /dev/null +++ b/source/includes/api-details/java/crud/delete-all-objects-in-the-database-description.rst @@ -0,0 +1,3 @@ +The following example demonstrates how to delete everything +from the database with :java-sdk:`deleteAll() +`. diff --git a/source/includes/api-details/java/crud/delete-all-objects-of-type-description.rst b/source/includes/api-details/java/crud/delete-all-objects-of-type-description.rst new file mode 100644 index 0000000000..cff6e77295 --- /dev/null +++ b/source/includes/api-details/java/crud/delete-all-objects-of-type-description.rst @@ -0,0 +1,3 @@ +The following example demonstrates how to delete all +Turtle instances from the database with :java-sdk:`delete() +`. diff --git a/source/includes/api-details/java/crud/delete-an-object-and-its-related-objects-description.rst b/source/includes/api-details/java/crud/delete-an-object-and-its-related-objects-description.rst new file mode 100644 index 0000000000..9ad58ecd01 --- /dev/null +++ b/source/includes/api-details/java/crud/delete-an-object-and-its-related-objects-description.rst @@ -0,0 +1,3 @@ +The following example demonstrates how to perform a +chaining delete by first deleting all of Ali's turtles, +then deleting Ali. diff --git a/source/includes/api-details/java/crud/delete-mixed-property-values-description.rst b/source/includes/api-details/java/crud/delete-mixed-property-values-description.rst new file mode 100644 index 0000000000..e69de29bb2 diff --git a/source/includes/api-details/java/crud/delete-multiple-objects-description.rst b/source/includes/api-details/java/crud/delete-multiple-objects-description.rst new file mode 100644 index 0000000000..f7fd4ae654 --- /dev/null +++ b/source/includes/api-details/java/crud/delete-multiple-objects-description.rst @@ -0,0 +1,9 @@ +To delete an object from the database, use the ``deleteAllFromRealm()`` +method of the :java-sdk:`RealmResults ` +instance that contains the objects you would like to delete. You can +filter the ``RealmResults`` down to a subset of objects using the +:java-sdk:`where() ` method. + +The following example demonstrates how to delete a +collection from the database with :java-sdk:`deleteAllFromRealm() +`. diff --git a/source/includes/api-details/java/crud/delete-objects-procedure.rst b/source/includes/api-details/java/crud/delete-objects-procedure.rst new file mode 100644 index 0000000000..6b9b338639 --- /dev/null +++ b/source/includes/api-details/java/crud/delete-objects-procedure.rst @@ -0,0 +1,30 @@ +1. Open a write transaction with one of the relevant APIs. + +#. Pass the object(s) you want to delete into the write block, or query for + them inside the block. + + .. important:: Objects Must Be Live + + You can only delete live objects. If you are working with a frozen + object, you query for the live version of the object on the local thread + before deleting the object. For more details, refer to + :ref:`sdks-threading`. + +#. Call the ``delete()`` method with the object you want to delete as an + argument. + +#. The specified objects are deleted from the database and can no longer be + accessed or modified. If you try to use a deleted object, the SDK throws an + error. + + If any deleted objects had a relationship with another object, the SDK + only deletes the reference to the other object. The referenced object + remains in the database, but it can no longer be queried through the deleted + parent property. Refer to the :ref:`sdks-delete-related-objects` section + for more information. + +.. tip:: + + You can check whether an object is still valid to use by calling + :java-sdk:`isValid() `. + Deleted objects return ``false``. diff --git a/source/includes/api-details/java/crud/delete-operations-description.rst b/source/includes/api-details/java/crud/delete-operations-description.rst new file mode 100644 index 0000000000..e75045386e --- /dev/null +++ b/source/includes/api-details/java/crud/delete-operations-description.rst @@ -0,0 +1,3 @@ +You can only delete live objects. If you are working with a frozen object, +such as when passing an object across threads, you must query for the frozen +object on the new thread in order to delete it. diff --git a/source/includes/api-details/java/crud/delete-remove-dictionary-keys-values-description.rst b/source/includes/api-details/java/crud/delete-remove-dictionary-keys-values-description.rst new file mode 100644 index 0000000000..b436a012b9 --- /dev/null +++ b/source/includes/api-details/java/crud/delete-remove-dictionary-keys-values-description.rst @@ -0,0 +1,2 @@ +For the available methods to remove dictionary keys and values, refer to the +:java-sdk:`RealmMap ` API reference. diff --git a/source/includes/api-details/java/crud/delete-remove-elements-from-list-description.rst b/source/includes/api-details/java/crud/delete-remove-elements-from-list-description.rst new file mode 100644 index 0000000000..7409189d2b --- /dev/null +++ b/source/includes/api-details/java/crud/delete-remove-elements-from-list-description.rst @@ -0,0 +1,2 @@ +For the available methods to remove elements from a list, refer to the +:java-sdk:`RealmList ` API reference. diff --git a/source/includes/api-details/java/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/java/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..aad52f26d5 --- /dev/null +++ b/source/includes/api-details/java/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,2 @@ +For the available methods to remove elements from a set, refer to the +:java-sdk:`RealmSet ` API reference. diff --git a/source/includes/api-details/java/crud/delete-single-object-description.rst b/source/includes/api-details/java/crud/delete-single-object-description.rst new file mode 100644 index 0000000000..7b69449458 --- /dev/null +++ b/source/includes/api-details/java/crud/delete-single-object-description.rst @@ -0,0 +1,7 @@ +To delete an object from the database, use either the dynamic or static +versions of the ``deleteFromRealm()`` method of a :java-sdk:`RealmObject +` subclass. + +The following example shows how to delete one object from +its realm with :java-sdk:`deleteFromRealm() +`. diff --git a/source/includes/api-details/javascript/crud/delete-all-objects-in-the-database-js-ts-description.rst b/source/includes/api-details/javascript/crud/delete-all-objects-in-the-database-js-ts-description.rst new file mode 100644 index 0000000000..ac6d24b129 --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-all-objects-in-the-database-js-ts-description.rst @@ -0,0 +1,3 @@ +To delete **all** objects from the database, call :js-sdk:`Realm.deleteAll() +` inside of a write transaction. This clears +the database of all object instances but does not affect the database schema. diff --git a/source/includes/api-details/javascript/crud/delete-all-objects-of-type-js-ts-description.rst b/source/includes/api-details/javascript/crud/delete-all-objects-of-type-js-ts-description.rst new file mode 100644 index 0000000000..b6bc053a41 --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-all-objects-of-type-js-ts-description.rst @@ -0,0 +1,3 @@ +To delete all objects of a given object type from the database, pass +``Realm.objects()`` to the :js-sdk:`Realm.delete() +` method inside of a write transaction. diff --git a/source/includes/api-details/javascript/crud/delete-mixed-property-values-js-ts-description.rst b/source/includes/api-details/javascript/crud/delete-mixed-property-values-js-ts-description.rst new file mode 100644 index 0000000000..b3fe5a1e8b --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-mixed-property-values-js-ts-description.rst @@ -0,0 +1 @@ +To delete the value of a ``Mixed`` property, set it to ``null``. \ No newline at end of file diff --git a/source/includes/api-details/javascript/crud/delete-multiple-objects-js-ts-description.rst b/source/includes/api-details/javascript/crud/delete-multiple-objects-js-ts-description.rst new file mode 100644 index 0000000000..3f3b3c41d1 --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-multiple-objects-js-ts-description.rst @@ -0,0 +1,3 @@ +To delete a collection of objects from the database, pass the collection to +:js-sdk:`Realm.delete() ` inside of a write +transaction. diff --git a/source/includes/api-details/javascript/crud/delete-objects-js-ts-procedure.rst b/source/includes/api-details/javascript/crud/delete-objects-js-ts-procedure.rst new file mode 100644 index 0000000000..4432669490 --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-objects-js-ts-procedure.rst @@ -0,0 +1,24 @@ +1. Open a write transaction with :js-sdk:`realm.write + `. + +#. Pass the object(s) you want to delete into the write block, or query for + them inside the block. + +#. Call the :js-sdk:`delete ` + method with the object you want to delete as an argument. + +#. The specified object is deleted from the database and can no longer be + accessed or modified. If you try to use a deleted object, the SDK throws an + error. + + If any deleted objects had a relationship with another object, the SDK + only deletes the reference to the other object. The referenced object + remains in the database, but it can no longer be queried through the deleted + parent property. Refer to the :ref:`sdks-delete-related-objects` section + for more information. + +.. tip:: + + You can check whether an object is still valid to use by calling + :js-sdk:`isValid ` + on the object. Deleted objects return ``false``. diff --git a/source/includes/api-details/javascript/crud/delete-remove-dictionary-keys-values-js-ts-description.rst b/source/includes/api-details/javascript/crud/delete-remove-dictionary-keys-values-js-ts-description.rst new file mode 100644 index 0000000000..53720b0dbe --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-remove-dictionary-keys-values-js-ts-description.rst @@ -0,0 +1,2 @@ +To delete members of a dictionary, use the ``dictionary.remove()`` method with +an array of properties to remove from the dictionary. diff --git a/source/includes/api-details/javascript/crud/delete-remove-elements-from-list-js-ts-description.rst b/source/includes/api-details/javascript/crud/delete-remove-elements-from-list-js-ts-description.rst new file mode 100644 index 0000000000..d6a6faea43 --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-remove-elements-from-list-js-ts-description.rst @@ -0,0 +1,3 @@ +You can remove one or more elements from a :js-sdk:`List ` +within a write transaction. Call :js-sdk:`list.remove() +` with the index of the element you want to remove. diff --git a/source/includes/api-details/javascript/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/javascript/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..1461aa1ac8 --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,8 @@ +To remove a specific value from a set, pass the value to the +``.delete()`` method within a write transaction. + +.. literalinclude:: /examples/generated/node/data-types.snippet.remove-specific-item-from-set.js + :language: javascript + +To remove all items from the set, run the ``.clear()`` method within +a write transaction. diff --git a/source/includes/api-details/javascript/crud/delete-single-object-js-ts-description.rst b/source/includes/api-details/javascript/crud/delete-single-object-js-ts-description.rst new file mode 100644 index 0000000000..e2ef7e2871 --- /dev/null +++ b/source/includes/api-details/javascript/crud/delete-single-object-js-ts-description.rst @@ -0,0 +1,2 @@ +To delete an object from the database, pass the object to :js-sdk:`Realm.delete() +` inside of a write transaction. diff --git a/source/includes/api-details/kotlin/crud/delete-all-objects-in-the-database-description.rst b/source/includes/api-details/kotlin/crud/delete-all-objects-in-the-database-description.rst new file mode 100644 index 0000000000..f19c2d868b --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-all-objects-in-the-database-description.rst @@ -0,0 +1,4 @@ +To delete *all* objects from the database at the same time, call +:kotlin-sdk:`mutableRealm.deleteAll() +`. This deletes all objects of +all types. diff --git a/source/includes/api-details/kotlin/crud/delete-all-objects-of-type-description.rst b/source/includes/api-details/kotlin/crud/delete-all-objects-of-type-description.rst new file mode 100644 index 0000000000..91b876ef3e --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-all-objects-of-type-description.rst @@ -0,0 +1,6 @@ +To delete all objects of a specific type from the database at the same time, +pass the object type to ``query()`` and leave the query filter empty to return +all objects of that type. + +In the following example, we query for all ``Frog`` objects, and then pass +the results to ``mutableRealm.delete()`` to delete them all from the database: diff --git a/source/includes/api-details/kotlin/crud/delete-an-object-and-its-related-objects-description.rst b/source/includes/api-details/kotlin/crud/delete-an-object-and-its-related-objects-description.rst new file mode 100644 index 0000000000..db0759664e --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-an-object-and-its-related-objects-description.rst @@ -0,0 +1,3 @@ +In the following example, we query for a ``Frog`` object named "Kermit", then +iterate through the object's ``favoritePonds`` property and delete +each ``Pond`` object. Then, we delete the ``Frog`` object itself: diff --git a/source/includes/api-details/kotlin/crud/delete-embedded-object-description.rst b/source/includes/api-details/kotlin/crud/delete-embedded-object-description.rst new file mode 100644 index 0000000000..46af648a18 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-embedded-object-description.rst @@ -0,0 +1,15 @@ +.. tip:: Get Embedded Object's Parent + + You can get the unique parent of an embedded object using + :kotlin-sdk:`parent() `. + +In the following example, we have a ``Business`` object with a list of +embedded ``EmbeddedAddress`` objects. We query for and delete the ``Business`` object, +which automatically deletes all of its embedded ``EmbeddedAddress`` objects: + +.. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-embedded-object-through-parent.kt + :language: kotlin + +In the following example, we have ``Contact`` objects with embedded +``EmbeddedAddress`` objects. We delete an ``EmbeddedAddress`` object directly and delete +another through the parent object: diff --git a/source/includes/api-details/kotlin/crud/delete-mixed-property-values-description.rst b/source/includes/api-details/kotlin/crud/delete-mixed-property-values-description.rst new file mode 100644 index 0000000000..87154d1918 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-mixed-property-values-description.rst @@ -0,0 +1,2 @@ +In the following example, we have a ``Frog`` object with a list of +``RealmAny`` properties, and we clear the first ``RealmAny`` property value: diff --git a/source/includes/api-details/kotlin/crud/delete-multiple-objects-description.rst b/source/includes/api-details/kotlin/crud/delete-multiple-objects-description.rst new file mode 100644 index 0000000000..ef3a326651 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-multiple-objects-description.rst @@ -0,0 +1,7 @@ +To delete multiple objects at the same time, pass the object type to +``query()`` and specify a query that returns all objects that you want +to delete. + +In the following example, we query for the first three ``Frog`` objects whose +``species`` is "bullfrog", and then pass the results to +``mutableRealm.delete()`` to delete them from the database: diff --git a/source/includes/api-details/kotlin/crud/delete-objects-procedure.rst b/source/includes/api-details/kotlin/crud/delete-objects-procedure.rst new file mode 100644 index 0000000000..be4c3649d7 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-objects-procedure.rst @@ -0,0 +1,42 @@ +1. Open a write transaction with :kotlin-sdk:`realm.write() + ` or + :kotlin-sdk:`realm.writeBlocking() + `. + +#. Get the live objects by querying the transaction's :kotlin-sdk:`MutableRealm + ` + for the objects that you want to delete using the + :kotlin-sdk:`query() ` method: + + #. Specify the object type as a type parameter passed to ``query()``. + #. (Optional) Filter the set of returned objects by specifying a query. + If you don't include a query filter, you return all objects of the + specified type. For more information on querying with the SDK, refer to + :ref:`sdks-crud-read`. + + .. important:: Objects Must Be Live + + You can only delete live objects. If your query occurs outside of the + write transaction, you must convert the frozen objects + to live objects in the transaction with + ``mutableRealm.findLatest()``. + +#. Pass the set of :kotlin-sdk:`RealmResults + ` returned by the query to + :kotlin-sdk:`mutableRealm.delete() `. + +#. The specified objects are deleted from the database and can no longer be + accessed or modified. If you try to use a deleted object, the SDK throws an + error. + + If any deleted objects had a relationship with another object, the SDK + only deletes the reference to the other object. The referenced object + remains in the database, but it can no longer be queried through the deleted + parent property. Refer to the :ref:`sdks-delete-related-objects` section + for more information. + +.. tip:: + + You can check whether an object is still valid to use by calling + :kotlin-sdk:`isValid() `. + Deleted objects return ``false``. diff --git a/source/includes/api-details/kotlin/crud/delete-operations-description.rst b/source/includes/api-details/kotlin/crud/delete-operations-description.rst new file mode 100644 index 0000000000..6e83fe39a5 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-operations-description.rst @@ -0,0 +1,11 @@ +Write transactions are passed to the database's +:kotlin-sdk:`write() ` or +:kotlin-sdk:`writeBlocking() ` +method. Within this callback, you can access a +:kotlin-sdk:`MutableRealm ` +instance and then delete objects within the database. + +You can only delete live objects, which are only accessible inside of a +write transaction. You can convert a frozen object to a +live object in a transaction with :kotlin-sdk:`mutableRealm.findLatest() +`. diff --git a/source/includes/api-details/kotlin/crud/delete-related-objects-description.rst b/source/includes/api-details/kotlin/crud/delete-related-objects-description.rst new file mode 100644 index 0000000000..91cad44161 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-related-objects-description.rst @@ -0,0 +1,3 @@ +In the following example, we have a ``Frog`` object with a list of +``Pond`` objects. After we delete the ``Frog`` object, we confirm that all +``Pond`` objects still remain in the database: diff --git a/source/includes/api-details/kotlin/crud/delete-remove-dictionary-keys-values-description.rst b/source/includes/api-details/kotlin/crud/delete-remove-dictionary-keys-values-description.rst new file mode 100644 index 0000000000..b149702ca7 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-remove-dictionary-keys-values-description.rst @@ -0,0 +1,15 @@ +You can remove +:kotlin-sdk:`RealmDictionary ` +entries in a few ways: + +- To remove the value but keep the key, set the key to ``null`` (the + dictionary's value must be nullable) +- To remove the key and the value, pass the key to + :kotlin-sdk:`remove() ` + +You can also remove *all* keys and values by calling +:kotlin-sdk:`clear() `. + +In the following example, we have a ``Frog`` object with a dictionary of +``String`` values. We remove the dictionary elements in a series of operations +until the dictionary is empty: diff --git a/source/includes/api-details/kotlin/crud/delete-remove-elements-from-list-description.rst b/source/includes/api-details/kotlin/crud/delete-remove-elements-from-list-description.rst new file mode 100644 index 0000000000..9a103be68c --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-remove-elements-from-list-description.rst @@ -0,0 +1,22 @@ +You can remove one or more elements in a single transaction from a +:kotlin-sdk:`RealmList `: + +- To remove one element from the list, pass the element to + :kotlin-sdk:`list.remove() `. +- To remove one element at a specified index in the list, pass the index to + :kotlin-sdk:`list.removeAt() `. +- To remove multiple elements from the list, pass the elements to + :kotlin-sdk:`list.removeAll() `. + +You can also remove *all* list elements at once by calling +:kotlin-sdk:`list.clear() `. + +In the following example, we have a ``Forest`` object with a list of +``Pond`` objects. We remove the list elements in a series of operations until the +list is empty: + +.. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.remove-items-from-list.kt + :language: kotlin + +In the following example, we have a ``Forest`` object with a list of +``Pond`` objects. We remove all list elements with the ``list.clear()`` method: diff --git a/source/includes/api-details/kotlin/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/kotlin/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..a9ade95d58 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,22 @@ +You can remove one or more elements in a single transaction from a +:kotlin-sdk:`RealmSet `: + +- To remove one element from the set, pass the element + you want to delete to + :kotlin-sdk:`set.remove() `. +- To remove multiple elements from the set, pass the + elements you want to delete to + :kotlin-sdk:`set.removeAll() `. + +You can also remove *all* set elements at once by calling +:kotlin-sdk:`set.clear() `. + +In the following example, we have a ``Frog`` object with a set of +``Snack`` objects. We remove the set elements in a series of operations until the +set is empty: + +.. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.remove-item-from-set.kt + :language: kotlin + +In the following example, we have a ``Frog`` object with a set of +``Snack`` objects. We remove all set elements with the ``set.clear()`` method: diff --git a/source/includes/api-details/kotlin/crud/delete-single-object-description.rst b/source/includes/api-details/kotlin/crud/delete-single-object-description.rst new file mode 100644 index 0000000000..42b1a289dc --- /dev/null +++ b/source/includes/api-details/kotlin/crud/delete-single-object-description.rst @@ -0,0 +1,7 @@ +To delete a single ``RealmObject`` object, +query for the object type using a filter +that returns the specific object that you want to delete. + +In the following example, we query for a ``Frog`` object with a specific +primary key, and then pass the returned object to ``mutableRealm.delete()`` to +delete it from the database: diff --git a/source/includes/api-details/objectivec/crud/delete-all-objects-in-the-database-description.rst b/source/includes/api-details/objectivec/crud/delete-all-objects-in-the-database-description.rst new file mode 100644 index 0000000000..6a2b548d2e --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-all-objects-in-the-database-description.rst @@ -0,0 +1,5 @@ +To delete all objects from the database, call :objc-sdk:`-[RLMRealm +deleteAllObjects] +` +inside of a write transaction. This clears the database of all object +instances but does not affect the database's schema. diff --git a/source/includes/api-details/objectivec/crud/delete-all-objects-of-type-description.rst b/source/includes/api-details/objectivec/crud/delete-all-objects-of-type-description.rst new file mode 100644 index 0000000000..d375aedb2a --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-all-objects-of-type-description.rst @@ -0,0 +1,8 @@ +To delete all objects of a given object type from the database, pass +the result of :objc-sdk:`+[YourSDKObjectClass +allObjectsInRealm:] +` +to :objc-sdk:`-[Realm deleteObjects:] +` +inside of a write transaction. Replace ``YourSDKObjectClass`` +with your SDK object class name. diff --git a/source/includes/api-details/objectivec/crud/delete-an-object-and-its-related-objects-description.rst b/source/includes/api-details/objectivec/crud/delete-an-object-and-its-related-objects-description.rst new file mode 100644 index 0000000000..d50d5e71d6 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-an-object-and-its-related-objects-description.rst @@ -0,0 +1,4 @@ +In the following example, we have a specific ``Person`` object - ``ali``. +We delete the objects in Ali's ``dogs`` collection, which is a to-many list +property containing one or more ``Dog`` objects. Then, we delete the ``ali`` +``Person`` object itself. diff --git a/source/includes/api-details/objectivec/crud/delete-mixed-property-values-description.rst b/source/includes/api-details/objectivec/crud/delete-mixed-property-values-description.rst new file mode 100644 index 0000000000..022d8de7f0 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-mixed-property-values-description.rst @@ -0,0 +1 @@ +To delete the value of an ``RLMValue``, set it to ``nil``. diff --git a/source/includes/api-details/objectivec/crud/delete-multiple-objects-description.rst b/source/includes/api-details/objectivec/crud/delete-multiple-objects-description.rst new file mode 100644 index 0000000000..0b0c20c760 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-multiple-objects-description.rst @@ -0,0 +1,4 @@ +To delete a collection of objects from the database, pass the +collection to :objc-sdk:`-[Realm deleteObjects:] +` +inside of a write transaction. diff --git a/source/includes/api-details/objectivec/crud/delete-objects-procedure.rst b/source/includes/api-details/objectivec/crud/delete-objects-procedure.rst new file mode 100644 index 0000000000..e9a8fb98af --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-objects-procedure.rst @@ -0,0 +1,34 @@ +1. Open a write transaction with :objc-sdk:`transactionWithBlock + ` or + :objc-sdk:`asyncTransactionWithBlock + `. + +#. Pass the object(s) you want to delete into the write block, or query for + them inside the block. + + .. important:: Objects Must Be Live + + You can only delete live objects. If you are working with a frozen + object or thread-safe reference, you must ``thaw`` the object or + resolve the thread-safe reference before deleting the object. For more + details, refer to :ref:`sdks-threading`. + +#. Call the :objc-sdk:`RLMRealm deleteObject + ` method with + the object to delete. + +#. The specified objects are deleted from the database and can no longer be + accessed or modified. If you try to use a deleted object, the SDK throws an + error. + + If any deleted objects had a relationship with another object, the SDK + only deletes the reference to the other object. The referenced object + remains in the database, but it can no longer be queried through the deleted + parent property. Refer to the :ref:`sdks-delete-related-objects` section + for more information. + +.. tip:: + + You can check whether an object is still valid to use by checking the + :objc-sdk:`invalidated ` + property. Deleted objects return ``true``. diff --git a/source/includes/api-details/objectivec/crud/delete-operations-description.rst b/source/includes/api-details/objectivec/crud/delete-operations-description.rst new file mode 100644 index 0000000000..799e6f7436 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-operations-description.rst @@ -0,0 +1,12 @@ +You can only delete live objects. If you are working with a frozen object, +such as when passing an object across threads, you can convert the frozen +object to a live object by calling the :objc-sdk:`thaw +` method. You can thaw +objects, collections, or database instances. + +Similarly, if you're passing an :objc-sdk:`RLMThreadSafeReference +` for an object you want to delete, you +must resolve the reference and then delete the resovled object. + +For more information about working with objects across threads, refer to +:ref:`sdks-threading`. diff --git a/source/includes/api-details/objectivec/crud/delete-remove-dictionary-keys-values-description.rst b/source/includes/api-details/objectivec/crud/delete-remove-dictionary-keys-values-description.rst new file mode 100644 index 0000000000..7ece98cd01 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-remove-dictionary-keys-values-description.rst @@ -0,0 +1,12 @@ +You can remove :objc-sdk:`RLMDictionary ` +entries in a few ways: + +- To remove the value but keep the key, set the key to ``null`` (the + dictionary's value must be nullable) +- To remove the key and the value, pass the key to + :objc-sdk:`removeObjectForKey ` +- To remove keys specified by elements in a given array, pass the array to + :objc-sdk:`removeObjectsForKeys ` + +You can also remove *all* keys and values by calling +:objc-sdk:`removeAllObjects `. diff --git a/source/includes/api-details/objectivec/crud/delete-remove-elements-from-list-description.rst b/source/includes/api-details/objectivec/crud/delete-remove-elements-from-list-description.rst new file mode 100644 index 0000000000..7465bff892 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-remove-elements-from-list-description.rst @@ -0,0 +1,10 @@ +You can remove one or more elements from a :objc-sdk:`RLMArray ` +within a write transaction: + +- To remove one element at a specified index in the list, pass the index to + :objc-sdk:`removeObjectAtIndex `. +- To remove the last element from the list, call + :objc-sdk:`removeLastObject `. + +You can also remove *all* list elements at once by calling +:objc-sdk:`removeAllObjects `. diff --git a/source/includes/api-details/objectivec/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/objectivec/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..d4a9609dbc --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,18 @@ +You can remove one or more elements from a :objc-sdk:`RLMSet +` in a write transaction. + +- To remove one element from the + set, call :objc-sdk:`removeObject + ` with the element + you want to delete. +- To remove from the receiving set elements that *aren't* a member of another + set, call :objc-sdk:`intersectSet + ` with the other set + as an argument. +- To remove from the receiving set elements that *are* a member of another set, + call :objc-sdk:`minusSet ` + with the other set as an argument. + +You can remove *all* set elements at once by calling +:objc-sdk:`removeAllObjects +`. \ No newline at end of file diff --git a/source/includes/api-details/objectivec/crud/delete-single-object-description.rst b/source/includes/api-details/objectivec/crud/delete-single-object-description.rst new file mode 100644 index 0000000000..8707f8a923 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/delete-single-object-description.rst @@ -0,0 +1,4 @@ +To delete an object from the database, pass the object to +:objc-sdk:`-[RLMRealm deleteObject:] +` +inside of a write transaction. diff --git a/source/includes/api-details/swift/crud/delete-all-objects-in-the-database-description.rst b/source/includes/api-details/swift/crud/delete-all-objects-in-the-database-description.rst new file mode 100644 index 0000000000..575b4c625a --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-all-objects-in-the-database-description.rst @@ -0,0 +1,5 @@ +To delete all objects from the database, call +:swift-sdk:`Realm.deleteAll() +` inside of a +write transaction. This clears the database of all object instances but does +not affect the database's schema. diff --git a/source/includes/api-details/swift/crud/delete-all-objects-of-type-description.rst b/source/includes/api-details/swift/crud/delete-all-objects-of-type-description.rst new file mode 100644 index 0000000000..db831b5732 --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-all-objects-of-type-description.rst @@ -0,0 +1,5 @@ +To delete all objects of a given object type from the database, query for +objects of the type you want to delete, and pass the result to +:swift-sdk:`Realm.delete(_:) +` +inside of a write transaction. diff --git a/source/includes/api-details/swift/crud/delete-an-object-and-its-related-objects-description.rst b/source/includes/api-details/swift/crud/delete-an-object-and-its-related-objects-description.rst new file mode 100644 index 0000000000..589a6c7867 --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-an-object-and-its-related-objects-description.rst @@ -0,0 +1,3 @@ +In the following example, we delete the objects in the ``person.dogs`` +collection, which is a to-many list property containing one or more ``Dog`` +objects. Then, we delete the ``Person`` object itself. diff --git a/source/includes/api-details/swift/crud/delete-mixed-property-values-description.rst b/source/includes/api-details/swift/crud/delete-mixed-property-values-description.rst new file mode 100644 index 0000000000..29cda0460f --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-mixed-property-values-description.rst @@ -0,0 +1 @@ +To delete the value of an ``AnyRealmValue``, set it to ``.none``. diff --git a/source/includes/api-details/swift/crud/delete-multiple-objects-description.rst b/source/includes/api-details/swift/crud/delete-multiple-objects-description.rst new file mode 100644 index 0000000000..b75f961c5a --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-multiple-objects-description.rst @@ -0,0 +1,4 @@ +To delete a collection of objects from the database, pass the +collection to :swift-sdk:`Realm.delete(_:) +` +inside of a write transaction. diff --git a/source/includes/api-details/swift/crud/delete-objects-procedure.rst b/source/includes/api-details/swift/crud/delete-objects-procedure.rst new file mode 100644 index 0000000000..6b0b9a1bd3 --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-objects-procedure.rst @@ -0,0 +1,35 @@ +1. Open a write transaction with one of the relevant APIs: + + - :swift-sdk:`write() ` + - :swift-sdk:`writeAsync() ` + - :swift-sdk:`asyncWrite() ` and friends + +#. Pass the object(s) you want to delete into the write block, or query for + them inside the block. + + .. important:: Objects Must Be Live + + You can only delete live objects. If you are working with a frozen + object or thread-safe reference, you must ``thaw()`` the object or + resolve the thread-safe reference before deleting the object. For more + details, refer to :ref:`sdks-threading`. + +#. Call the ``delete()`` method with the object you want to delete as an + argument. + +#. The specified objects are deleted from the database and can no longer be + accessed or modified. If you try to use a deleted object, the SDK throws an + error. + + If any deleted objects had a relationship with another object, the SDK + only deletes the reference to the other object. The referenced object + remains in the database, but it can no longer be queried through the deleted + parent property. Refer to the :ref:`sdks-delete-related-objects` section + for more information. + +.. tip:: + + You can check whether an object is still valid to use by calling + :swift-sdk:`isInvalidated() + `. + Deleted objects return ``true``. diff --git a/source/includes/api-details/swift/crud/delete-operations-description.rst b/source/includes/api-details/swift/crud/delete-operations-description.rst new file mode 100644 index 0000000000..8fa4448edf --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-operations-description.rst @@ -0,0 +1,13 @@ +You can only delete live objects. If you are working with a frozen object, +such as when passing an object across threads, you can convert the frozen +object to a live object by calling the :swift-sdk:`thaw() +` method. +You can thaw objects, collections, or database instances. + +Similarly, if you're passing a :swift-sdk:`ThreadSafeReference +` for an object you want to delete, you must +resolve the reference within the write transaction and then delete the resovled +object. + +For more information about working with objects across threads, refer to +:ref:`sdks-threading`. diff --git a/source/includes/api-details/swift/crud/delete-remove-dictionary-keys-values-description.rst b/source/includes/api-details/swift/crud/delete-remove-dictionary-keys-values-description.rst new file mode 100644 index 0000000000..2da117b1f3 --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-remove-dictionary-keys-values-description.rst @@ -0,0 +1,10 @@ +You can delete :swift-sdk:`map ` entries in a few ways: + +- Use ``removeObject(for:)`` to remove the key and the value +- If the dictionary's value is optional, you can set the value of the key to + ``.none`` to keep the key. This sets the key's value to ``nil`` but does + not delete the key. +- Like a Swift dictionary, if you set the key value to ``nil``, this deletes + both the key and the value. +- If the value of a dictionary key is another object, and you delete the + object, the key remains and its value is set to ``nil``. diff --git a/source/includes/api-details/swift/crud/delete-remove-elements-from-list-description.rst b/source/includes/api-details/swift/crud/delete-remove-elements-from-list-description.rst new file mode 100644 index 0000000000..d606ff81d4 --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-remove-elements-from-list-description.rst @@ -0,0 +1,16 @@ +You can remove one or more elements from a :swift-sdk:`List ` +within a write transaction: + +- To remove one element at a specified index in the list, pass the index to + :swift-sdk:`list.removeAt() `. +- To remove multiple contiguous elements from the list, pass the range to + :swift-sdk:`list.removeSubrange() `. +- To remove the first N elements from the beginning or end of a list, call the + :swift-sdk:`list.removeFirst() + ` or + :swift-sdk:`list.removeLast() + ` methods with an + Int number of items to remove from the beginning or end of the list. + +You can also remove *all* list elements at once by calling +:swift-sdk:`list.removeAll() `. diff --git a/source/includes/api-details/swift/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/swift/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..5b0c03a359 --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,4 @@ +You can delete specific elements from a :swift-sdk:`MutableSet +`, or clear all of the elements from the set. +If you are working with multiple sets, you can also remove elements in one +set from the other set; see: :ref:`sdks-update-set-property`. diff --git a/source/includes/api-details/swift/crud/delete-single-object-description.rst b/source/includes/api-details/swift/crud/delete-single-object-description.rst new file mode 100644 index 0000000000..403ffcce70 --- /dev/null +++ b/source/includes/api-details/swift/crud/delete-single-object-description.rst @@ -0,0 +1,4 @@ +To delete an object from the database, pass the object to +:swift-sdk:`Realm.delete(_:) +` +inside of a write transaction. diff --git a/source/includes/api-details/typescript/crud/delete-remove-elements-from-set-description.rst b/source/includes/api-details/typescript/crud/delete-remove-elements-from-set-description.rst new file mode 100644 index 0000000000..51c60dcf68 --- /dev/null +++ b/source/includes/api-details/typescript/crud/delete-remove-elements-from-set-description.rst @@ -0,0 +1,5 @@ +To remove a specific value from a set, pass the value to the +``.delete()`` method within a write transaction. + +To remove all items from the set, run the ``.clear()`` method within +a write transaction. diff --git a/source/includes/sdk-examples/crud/delete-all-objects-in-the-database.rst b/source/includes/sdk-examples/crud/delete-all-objects-in-the-database.rst new file mode 100644 index 0000000000..f20c8cdecf --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-all-objects-in-the-database.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/CRUD/DeleteAll.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-all.java + :language: java + :emphasize-lines: 2 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-all.kt + :language: kotlin + :emphasize-lines: 2 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-delete-all.js + :language: javascript + :emphasize-lines: 3 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-all-realm-objects.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.delete-all.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.delete-all.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-all-objects-of-type.rst b/source/includes/sdk-examples/crud/delete-all-objects-of-type.rst new file mode 100644 index 0000000000..352eae3714 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-all-objects-of-type.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/CRUD/DeleteAllOfClass.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.delete-all-objects-of-type.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-all-instances-of-a-type.java + :language: java + :emphasize-lines: 2 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-all-instances-of-a-type.kt + :language: kotlin + :emphasize-lines: 2 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-delete-all-objects-of-a-specific-type.js + :language: javascript + :emphasize-lines: 3 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-all-realm-object-types.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.delete-all-of-class.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.delete-all-of-class.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-an-object-and-its-related-objects.rst b/source/includes/sdk-examples/crud/delete-an-object-and-its-related-objects.rst new file mode 100644 index 0000000000..f53b74b0f2 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-an-object-and-its-related-objects.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/CRUD/ChainingDelete.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.cascading-deletes.java + :language: java + :emphasize-lines: 5 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.cascading-deletes.kt + :language: kotlin + :emphasize-lines: 6 + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.chain-delete-realm-list.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.cascading-delete.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.chaining-delete.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-embedded-object.rst b/source/includes/sdk-examples/crud/delete-embedded-object.rst new file mode 100644 index 0000000000..6f79cad6a5 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-embedded-object.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-embedded-object.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-inverse-relationship.rst b/source/includes/sdk-examples/crud/delete-inverse-relationship.rst new file mode 100644 index 0000000000..67b5dfa7d9 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-inverse-relationship.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/relationships.snippet.delete-inverse-relationship.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-mixed-property-values.rst b/source/includes/sdk-examples/crud/delete-mixed-property-values.rst new file mode 100644 index 0000000000..c977ca0061 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-mixed-property-values.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-realmany-property.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.mixed-data-type.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-multiple-objects.rst b/source/includes/sdk-examples/crud/delete-multiple-objects.rst new file mode 100644 index 0000000000..615fecdd29 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-multiple-objects.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/CRUD/DeleteCollection.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.delete-multiple-objects.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-a-collection.java + :language: java + :emphasize-lines: 4 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-a-collection.kt + :language: kotlin + :emphasize-lines: 6 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-delete-multiple-objects.js + :language: javascript + :emphasize-lines: 5 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-multiple-realm-objects.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.delete-collection.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.tsq-delete-collection.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-operations.rst b/source/includes/sdk-examples/crud/delete-operations.rst new file mode 100644 index 0000000000..208edf2a12 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-operations.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.delete-an-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/CRUD/Delete.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.delete-one-object.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-an-object.java + :language: java + :emphasize-lines: 4 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-an-object.kt + :language: kotlin + :emphasize-lines: 6 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-delete-object.js + :language: javascript + :emphasize-lines: 3 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.fetch-latest-to-delete-object.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.delete.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.delete.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-related-objects.rst b/source/includes/sdk-examples/crud/delete-related-objects.rst new file mode 100644 index 0000000000..22803f8dc0 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-related-objects.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-realm-object-with-related-objects.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-remove-dictionary-keys-values.rst b/source/includes/sdk-examples/crud/delete-remove-dictionary-keys-values.rst new file mode 100644 index 0000000000..cd96da2edc --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-remove-dictionary-keys-values.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.delete-map-value.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.remove-fields-of-the-dictionary.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-realm-dictionary.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.map.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-remove-elements-from-list.rst b/source/includes/sdk-examples/crud/delete-remove-elements-from-list.rst new file mode 100644 index 0000000000..c257b1d3bb --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-remove-elements-from-list.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.list-clear.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-remove-elements-from-set.rst b/source/includes/sdk-examples/crud/delete-remove-elements-from-set.rst new file mode 100644 index 0000000000..7b8ee84338 --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-remove-elements-from-set.rst @@ -0,0 +1,68 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.delete-set.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.remove-all-items-from-set.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.clear-set.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.set-collections.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/delete-single-object.rst b/source/includes/sdk-examples/crud/delete-single-object.rst new file mode 100644 index 0000000000..652f518a2a --- /dev/null +++ b/source/includes/sdk-examples/crud/delete-single-object.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.delete-an-object.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/CRUD/Delete.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.delete-one-object.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-an-object.java + :language: java + :emphasize-lines: 4 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/WritesTest.snippet.delete-an-object.kt + :language: kotlin + :emphasize-lines: 6 + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-delete-object.js + :language: javascript + :emphasize-lines: 3 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/DeleteTest.snippet.delete-one-realm-object.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.delete.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/DeleteRealmObjects.snippet.delete.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/sdk/crud/delete.txt b/source/sdk/crud/delete.txt index e873cb14c6..dbb0f12027 100644 --- a/source/sdk/crud/delete.txt +++ b/source/sdk/crud/delete.txt @@ -1,8 +1,20 @@ .. _sdks-crud-delete: -============== -Delete Objects -============== +================================== +Delete Objects and Property Values +================================== + +.. meta:: + :description: Learn how to delete objects from the database, clear property values, and remove elements from collections. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift .. contents:: On this page :local: @@ -10,4 +22,956 @@ Delete Objects :depth: 2 :class: singlecol -Placeholder page for content related to deleting objects. +.. tabs-selector:: drivers + +This page describes how to delete objects from a non-synced or synced database +using Atlas Device SDK. + +You can choose to delete a single object, multiple objects, or all +objects from the database. After you delete an object, you can no longer access +or modify it. If you try to use a deleted object, the SDK throws an error. + +Deleting objects from a database *does not* delete the database file or affect +the database schema. It only deletes the object instance from the database. If +you want to delete the database file itself, refer to :ref:`sdks-delete-file`. +If you want to remove objects or properties from the database schema, refer to +:ref:`sdks-change-object-model`. + +.. note:: Write to a Synced Database + + The syntax to delete an object from the database is the same for a non-synced + or a synced database. However, there are additional considerations that + determine whether the delete operation in a synced database is successful. + For more information, refer to :ref:`sdks-write-synced-database`. + +.. _sdks-delete-operations: + +Delete Operations +----------------- + +Delete operations must be performed inside of a **write transaction**. For more information on +write transactions and how the SDK handles them, refer to +:ref:`sdks-write-transactions`. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-operations-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-operations-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-operations-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-operations-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-operations-description.rst + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-operations-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-operations-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-operations-description.rst + + .. tab:: + :tabid: typescript + + + +.. include:: /includes/sdk-examples/crud/delete-operations.rst + +.. _sdks-related-objects-and-references: + +Related Objects and References +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you delete an object that has a :ref:`relationship ` +property with another object, the SDK *does not* automatically +delete the instance of the related object. Instead, the SDK only +deletes the *reference* to the other object. The referenced object instance +remains in the database, but it can no longer be queried through the +relationship property. + +:ref:`Embedded objects ` are handled differently. +When you delete an object that contains an embedded object, the SDK +automatically deletes the embedded object in a **cascading delete**. +This is because embedded objects do not have a lifecycle outside of their +parent object. For more information, refer to the +:ref:`sdks-delete-embedded-object` section on this page. + +Chaining Deletes with Related SDK Objects +````````````````````````````````````````` + +If you want to delete any related objects when you delete a parent object, +we recommend performing a **chaining delete**. A chaining delete consists +of manually deleting dependent objects by iterating through the +dependencies and deleting them before deleting the parent object. +For more information on chaining deletes, refer to the +:ref:`sdks-delete-related-objects` section on this page. + +If you do not delete the related objects yourself, they remain in your +database. Whether or not this is a problem depends on your application's +needs. + +.. _sdks-delete-objects-procedure: + +Delete Objects +-------------- + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-objects-procedure.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-objects-procedure.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-objects-procedure.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-objects-procedure.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-objects-procedure.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-objects-js-ts-procedure.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-objects-procedure.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-objects-procedure.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-objects-procedure.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/delete-objects-js-ts-procedure.rst + +.. _sdks-delete-single-object: + +Delete a Single Object +~~~~~~~~~~~~~~~~~~~~~~ + +.. tip:: Use Unique Identifying Information + + We recommend using unique identifying information to find the object you + want to delete, such as a :ref:`primary key ` value, to + ensure your query returns the correct object. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-single-object-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-single-object-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-single-object-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-single-object-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-single-object-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-single-object-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-single-object-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-single-object-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-single-object-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/delete-single-object-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/delete-single-object.rst + +.. _sdks-delete-multiple-objects: + +Delete Multiple Objects +~~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-multiple-objects-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-multiple-objects-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-multiple-objects-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-multiple-objects-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-multiple-objects-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-multiple-objects-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-multiple-objects-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-multiple-objects-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-multiple-objects-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/delete-multiple-objects-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/delete-multiple-objects.rst + +.. _sdks-delete-all-objects-of-type: + +Delete All Objects of a Type +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-all-objects-of-type-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-all-objects-of-type-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-all-objects-of-type-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-all-objects-of-type-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-all-objects-of-type-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-all-objects-of-type-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-all-objects-of-type-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-all-objects-of-type-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-all-objects-of-type-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/delete-all-objects-of-type-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/delete-all-objects-of-type.rst + +.. _sdks-delete-all-objects-in-database: + +Delete All Objects in the Database +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The SDK lets you delete all managed objects of all types, which is useful +for quickly clearing out your database while prototyping. For example, instead +of writing a migration to update objects to a new schema, it may be faster to +delete all, and then re-generate the objects with the app itself. + +This does not affect the database schema or any objects that are not managed +by the database instance. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-all-objects-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-all-objects-in-the-database-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-all-objects-in-the-database-not-supported.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-all-objects-in-the-database-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-all-objects-in-the-database-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-all-objects-in-the-database-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-all-objects-in-the-database-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-all-objects-in-the-database-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-all-objects-in-the-database-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/delete-all-objects-in-the-database-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/delete-all-objects-in-the-database.rst + +.. _sdks-delete-related-objects: + +Delete Related Objects +---------------------- + +Deleting an object *does not* automatically delete any objects that are +related to it unless the related object is embedded. Instead, the SDK only +deletes the reference to the related object. + +You can optionally define logic in your app to delete related objects. Or if +an object lifecycle should not outlive a parent object, model it as an embedded +object instead of an independent object with a relationship. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + + .. tab:: + :tabid: csharp + + + + .. tab:: + :tabid: dart + + + + .. tab:: + :tabid: java + + + + .. tab:: + :tabid: java-kotlin + + + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-related-objects-description.rst + + .. tab:: + :tabid: objectivec + + + + .. tab:: + :tabid: swift + + + + .. tab:: + :tabid: typescript + + +.. include:: /includes/sdk-examples/crud/delete-related-objects.rst + +.. _sdks-delete-object-and-its-related-objects: + +Delete an Object and Its Related Objects +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To delete related objects when you delete a parent object, you must manually +delete the related objects yourself. We recommend chaining deletes: +first query for the parent object that you want to delete, then iterate +through the parent object's relationships and delete each related object. +Finally, delete the parent object itself. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-an-object-and-its-related-objects-description.rst + + .. tab:: + :tabid: dart + + + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-an-object-and-its-related-objects-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-an-object-and-its-related-objects-description.rst + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-an-object-and-its-related-objects-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-an-object-and-its-related-objects-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-an-object-and-its-related-objects-description.rst + + .. tab:: + :tabid: typescript + + +.. include:: /includes/sdk-examples/crud/delete-an-object-and-its-related-objects.rst + +.. _sdks-delete-embedded-object: + +Delete an Embedded Object +~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. warning:: The SDK Uses Cascading Deletes for Embedded Objects + + When you delete a ``Realm`` object, the SDK automatically deletes any + embedded objects referenced by that object. This is because embedded objects + are objects tha do not exist independent of the ``Realm`` object, and do + not have their own lifecycle. If you want the referenced objects to persist + after the deletion of the main object, use a regular ``Realm`` object with a + :ref:`to-one relationship ` instead. + +You can delete an embedded object through the parent object in a cascading +delete or by deleting the embedded object directly. + +- To delete the embedded object through the parent object, fetch and delete + the parent object. The SDK automatically deletes all of its embedded objects + from the database. +- To delete an embedded object instance directly: + + - Fetch and delete a specific embedded object. + - Clear the parent's reference to the embedded object, which also + deletes the embedded object instance. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + + .. tab:: + :tabid: csharp + + + + .. tab:: + :tabid: dart + + + + .. tab:: + :tabid: java + + + + .. tab:: + :tabid: java-kotlin + + + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-embedded-object-description.rst + + .. tab:: + :tabid: objectivec + + + + .. tab:: + :tabid: swift + + + + .. tab:: + :tabid: typescript + + +.. include:: /includes/sdk-examples/crud/delete-embedded-object.rst + +.. _sdks-delete-property-values: + +Delete Property Values +---------------------- + +.. _sdks-delete-inverse-relationship: + +Delete an Inverse Relationship +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can't delete an inverse relationship directly. Instead, an +inverse relationship automatically updates by removing the relationship +through the related object. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-inverse-relationship-description.rst + + .. tab:: + :tabid: csharp + + + + .. tab:: + :tabid: dart + + + + .. tab:: + :tabid: java + + + + .. tab:: + :tabid: java-kotlin + + + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + + + .. tab:: + :tabid: objectivec + + + + .. tab:: + :tabid: swift + + + + .. tab:: + :tabid: typescript + + +.. include:: /includes/sdk-examples/crud/delete-inverse-relationship.rst + +.. _sdks-delete-mixed-property-values: + +Delete Mixed Property Values +~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Although mixed property instances *cannot* store null values, you can +delete a mixed property value by assigning your language's implementation of +``null`` or ``nil`` directly to the property. For more information on the +mixed data type, refer to :ref:`sdks-mixed-data-type`. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-mixed-property-values-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-mixed-property-values-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-mixed-property-values-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-mixed-property-values-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-mixed-property-values-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-mixed-property-values-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-mixed-property-values-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-mixed-property-values-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/delete-mixed-property-values-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/delete-mixed-property-values.rst + +.. _sdks-remove-elements-from-collections: + +Remove Elements from Collections +-------------------------------- + +SDK collection instances that contain objects only store references to those +objects. You can remove one or more referenced objects from a collection +without deleting the objects themselves. The objects that you remove from a +collection remain in the database until you manually delete them. +Alternatively, deleting an SDK object from a database also deletes that object +from any collection instances that contain the object. + +.. _sdks-remove-elements-from-list: + +Remove Elements from a List +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-remove-elements-from-list-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-remove-elements-from-list-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-remove-elements-from-list-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-remove-elements-from-list-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-remove-elements-from-list-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-remove-elements-from-list-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-remove-elements-from-list-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-remove-elements-from-list-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-remove-elements-from-list-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/delete-remove-elements-from-list-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/delete-remove-elements-from-list.rst + +.. _sdks-remove-elements-from-set: + +Remove Elements from a Set +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-remove-elements-from-set-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/delete-remove-elements-from-set-description.rst + +.. include:: /includes/sdk-examples/crud/delete-remove-elements-from-set.rst + +.. _sdks-remove-dictionary-keys-values: + +Remove Dictionary Keys/Values +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/delete-remove-dictionary-keys-values-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/delete-remove-dictionary-keys-values-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/delete-remove-dictionary-keys-values-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/delete-remove-dictionary-keys-values-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/delete-remove-dictionary-keys-values-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/delete-remove-dictionary-keys-values-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/delete-remove-dictionary-keys-values-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/delete-remove-dictionary-keys-values-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/delete-remove-dictionary-keys-values-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/delete-remove-dictionary-keys-values-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/delete-remove-dictionary-keys-values.rst diff --git a/source/sdk/crud/update.txt b/source/sdk/crud/update.txt index 2f17611c34..64e6d3abac 100644 --- a/source/sdk/crud/update.txt +++ b/source/sdk/crud/update.txt @@ -16,3 +16,8 @@ Placeholder page for content related to updating realm objects. Update Inverse Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-update-set-property: + +Update a Set Property +~~~~~~~~~~~~~~~~~~~~~ From 08af4229bea526445f0c73618b69671a5a115c2f Mon Sep 17 00:00:00 2001 From: Dachary Date: Thu, 8 Aug 2024 11:46:44 -0400 Subject: [PATCH 57/63] (DOCSP-39519): Port Swift Filter Data page for consolidated docs (#3349) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39519 This is a port of the existing Swift page - we decided to maintain these SDK-specific query engines as one-off pages because they are too dissimilar to consolidate. I have updated the Realm naming and refs to use the `sdk` ref targets. I switched from the Realm languages tab group to the Drivers tab group, so if someone has selected "Swift" or "Objective-C" from another page, I believe the selection should carry over. There are some examples that don't exist or apply in the other language, so if you have selected "Swift" you will still see some Objective-C examples in the NSPredicate part of the page, and if you have selected Objective-C, you will still see the entire Swift Type-Safe Query API and some Swift examples in the NSPredicate part of the page. I don't plan to go back and address these or add "missing example" placeholders, because it's the same behavior as the existing page. But I could be convinced otherwise if a reviewer feels strongly. *Staged Page* - [Type-Safe and NS Predicate Queries](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39519/sdk/crud/query-engines/filter-data-swift-sdk/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [Swift: Filter Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/crud/filter-data/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets ### Reviewer Checklist As a reviewer, please check these items: - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --- ...ealm-query-language-reference-examples.rst | 2 +- .../query-engines/filter-data-swift-sdk.txt | 866 +++++++++++++++++- source/sdk/crud/read.txt | 5 + 3 files changed, 861 insertions(+), 12 deletions(-) diff --git a/source/includes/tip-realm-query-language-reference-examples.rst b/source/includes/tip-realm-query-language-reference-examples.rst index b66182ef65..060eec5d96 100644 --- a/source/includes/tip-realm-query-language-reference-examples.rst +++ b/source/includes/tip-realm-query-language-reference-examples.rst @@ -2,5 +2,5 @@ You can also find useful Realm Query Language examples on the following pages: - - :ref:`iOS Query Examples ` + - :ref:`iOS Query Examples ` - :ref:`Node.js Query Engine ` diff --git a/source/sdk/crud/query-engines/filter-data-swift-sdk.txt b/source/sdk/crud/query-engines/filter-data-swift-sdk.txt index 91009f689d..bd79198a2b 100644 --- a/source/sdk/crud/query-engines/filter-data-swift-sdk.txt +++ b/source/sdk/crud/query-engines/filter-data-swift-sdk.txt @@ -1,29 +1,873 @@ -.. _ios-client-query-engine: -.. _ios-filter-data: .. _sdks-filter-data-swift: -======================= -Filter Data - Swift SDK -======================= +============================================= +Type-Safe and NSPredicate Queries - Swift SDK +============================================= .. meta:: :description: Atlas Device SDK for Swift uses a range of operators to query different data types through type-safe or NSPredicate query engines. - :keywords: code example + :keywords: Realm, Swift SDK, code example .. facet:: :name: genre :values: reference +.. facet:: + :name: programming_language + :values: objective-c, swift + .. contents:: On this page :local: :backlinks: none :depth: 3 :class: singlecol -Placeholder page for Swift query engine details. +.. tabs-selector:: drivers + +Atlas Device SDK provides Swift- and Objective-C-specific query engines +instead of the general :ref:`Realm Query Language `. + +The :ref:`Swift Query API ` offers an +idiomatic way for Swift developers to query data. Use Swift-style syntax +to query a database with the benefits of auto-completion and +type safety. The Swift Query API does not replace the NSPredicate Query API in +newer SDK versions; instead, you can use either. + +For SDK versions prior to 10.19.0, or for Objective-C developers, the SDK +provides the :ref:`NSPredicate Query engine `. + +About the Examples on This Page +------------------------------- + +The examples in this page use a simple data set for a +task list app. The two SDK object types are ``Project`` +and ``Task``. A ``Task`` has a name, assignee's name, and +completed flag. There is also an arbitrary number for +priority -- higher is more important -- and a count of +minutes spent working on it. Finally, a ``Task`` can have one +or more string ``labels`` and one or more integer ``ratings``. + +A ``Project`` has zero or more ``Tasks``. + +See the schema for these two classes, ``Project`` and +``Task``, below: + +.. tabs-drivers:: + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.models.m + :language: objectivec + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.models.swift + :language: swift + +You can set up the database for these examples with the following code: + +.. tabs-drivers:: + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.setup.m + :language: objectivec + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.setup.swift + :language: swift + +.. _sdks-swift-query-api: + +Swift Query API +--------------- + +.. versionadded:: 10.19.0 + + For SDK versions older than 10.19.0, use the :ref:`NSPredicate query API + `. + +You can build a filter with Swift-style syntax using the ``.where`` +:swift-sdk:`Swift query API `: + +.. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.realm-swift-query.swift + :language: swift + +This query API constructs an :ref:`NSPredicate ` +to perform the query. It gives developers a type-safe idiomatic API to +use directly, and abstracts away the NSPredicate construction. + +The ``.where`` API takes a callback that evaluates to true or false. The +callback receives an instance of the type being queried, and you can +leverage the compiler to statically check that you are creating valid queries +that reference valid properties. + +In the examples on this page, we use the ``$0`` shorthand to reference +the variable passed into the callback. + +.. _sdks-swift-where-operators: + +Operators +~~~~~~~~~ + +There are several types of operators available to query an +:ref:`SDK collection `. Queries +work by **evaluating** an operator expression for every +object in the collection being +queried. If the expression resolves to ``true``, the SDK includes the +object in the results collection. + +Comparison Operators +```````````````````` + +You can use Swift comparison operators with the Swift +Query API (``==``, ``!=``, ``>``, ``>=``, ``<``, ``<=``). + +.. example:: + + The following example uses the query engine's + comparison operators to: + + - Find high priority tasks by comparing the value of the ``priority`` property value with a threshold number, above which priority can be considered high. + - Find long-running tasks by seeing if the ``progressMinutes`` property is at or above a certain value. + - Find unassigned tasks by finding tasks where the ``assignee`` property is equal to ``null``. + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-comparison-operators.swift + :language: swift + +Collections +``````````` + +You can query for values within a collection using the ``.contains`` operators. +You can search for individual values by element, or search within a range. + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - | ``.in(_ collection:)`` + - Evaluates to ``true`` if the property referenced by the expression contains an element in the given array. + + * - | ``.contains(_ element:)`` + - Equivalent to the ``IN`` operator. Evaluates to ``true`` if the property referenced by the expression contains the value. + + * - ``.contains(_ range:)`` + - Equivalent to the ``BETWEEN`` operator. Evaluates to ``true`` if the property referenced by the expression contains a value that is within the range. + + * - ``.containsAny(in: )`` + - Equivalent to the ``IN`` operator combined with the ``ANY`` operator. Evaluates to ``true`` if any elements contained in the given array are present in the collection. + +.. example:: + + - Find tasks where the ``labels`` MutableSet collection property contains "quick win". + - Find tasks where the ``progressMinutes`` property is within a given range of minutes. + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-collections-contains.swift + :language: swift + + Find tasks where the ``labels`` MutableSet collection property contains any of the elements in the given array: "quick win" or "bug". + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-collections-contains-any.swift + :language: swift + +The Swift Query API supports the ``IN`` operator. Evaluates to ``true`` if the property referenced by the expression contains the value. + +.. example:: + + Find tasks assigned to specific teammates Ali or Jamie by seeing if the ``assignee`` property is in a list of names. + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-collections-in.swift + :language: swift + +Logical Operators +````````````````` + +You can make compound queries using Swift logical operators (``&&``, ``!``, +``||``). + +.. example:: + + We can use the query language's logical operators to find + all of Ali's completed tasks. That is, we find all tasks + where the ``assignee`` property value is equal to 'Ali' AND + the ``isComplete`` property value is ``true``: + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-logical-operators.swift + :language: swift + +String Operators +```````````````` + +You can compare string values using these string operators. +Regex-like wildcards allow more flexibility in search. + +.. note:: + + You can use the following options with string operators: + + - ``.caseInsensitive`` for case insensitivity. + + .. code-block:: swift + + $0.name.contains("f", options: .caseInsensitive) + + - ``.diacriticInsensitive`` for diacritic insensitivity: the SDK treats + special characters as the base character (e.g. ``é`` -> ``e``). + + .. code-block:: swift + + $0.name.contains("e", options: .diacriticInsensitive) + +.. list-table:: + :header-rows: 1 + :widths: 40 60 + + * - Operator + - Description + + * - | ``.starts(with value: String)`` + - Evaluates to ``true`` if the collection contains an element whose value begins with the specified string value. + + * - | ``.contains(_ value: String)`` + - Evaluates to ``true`` if the left-hand string expression is found anywhere in the right-hand string expression. + + * - | ``.ends(with value: String)`` + - Evaluates to ``true`` if the collection contains an element whose value ends with the specified string value. + + * - | ``.like(_ value: String)`` + - Evaluates to ``true`` if the left-hand string expression + matches the right-hand string wildcard string + expression. A wildcard string expression is a string + that uses normal characters with two special wildcard + characters: + + - The ``*`` wildcard matches zero or more of any character + - The ``?`` wildcard matches any character. + + For example, the wildcard string "d?g" matches "dog", + "dig", and "dug", but not "ding", "dg", or "a dog". + + * - | ``==`` + - Evaluates to ``true`` if the left-hand string is lexicographically equal to the right-hand string. + + * - | ``!=`` + - Evaluates to ``true`` if the left-hand string is not lexicographically equal to the right-hand string. + +.. example:: + + The following example uses the query engine's string operators to find: + + - Projects with a name starting with the letter 'e' + - Projects with names that contain 'ie' + - Projects with an ``assignee`` property whose value is similar to ``Al?x`` + - Projects that contain e-like characters with diacritic insensitivity + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-string-operators.swift + :language: swift + +.. include:: /includes/string-sort-and-query-limitations-note.rst + +Geospatial Operators +```````````````````` + +.. versionadded:: 10.47.0 + +Use the ``geoWithin`` operator to query geospatial data with one of the +SDK's provided shapes: + +- ``GeoCircle`` +- ``GeoBox`` +- ``GeoPolygon`` + +This operator evaluates to ``true`` if: + +- An object has a geospatial data "shape" containing a ``String`` property + with the value of Point and a ``List`` containing a longitude/latitude + pair. +- The longitude/latitude of the persisted object falls within the geospatial + query shape. + +.. literalinclude:: /examples/generated/code/start/Geospatial.snippet.geowithin.swift + :language: swift + +For more information about querying geospatial data, refer to +:ref:`sdks-query-geospatial`. + +Aggregate Operators +``````````````````` + +You can apply an aggregate operator to a collection property +of an SDK object. Aggregate operators traverse a +:ref:`collection ` and reduce it +to a single value. + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - | ``.avg`` + - Evaluates to the average value of a given numerical property across a collection. + + * - | ``.count`` + - Evaluates to the number of objects in the given collection. This + is currently only supported on :ref:`to-many relationship + collections ` and not on lists of + primitives. In order to use ``.count`` on a list of primitives, + consider wrapping the primitives in an :ref:`SDK + object `. + + * - | ``.max`` + - Evaluates to the highest value of a given numerical property across a collection. + + * - | ``.min`` + - Evaluates to the lowest value of a given numerical property across a collection. + + * - | ``.sum`` + - Evaluates to the sum of a given numerical property across a collection. + +.. example:: + + We create a couple of filters to show different facets of + the data: + + - Projects with average tasks priority above 5. + - Projects that contain only low-priority tasks below 5. + - Projects where all tasks are high-priority above 5. + - Projects that contain more than 5 tasks. + - Long running projects. + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-aggregate-operators.swift + :language: swift + +Set Operators +````````````` + +A **set operator** uses specific rules to determine whether +to pass each input collection object to the output +collection by applying a given query expression to every element of +a given :ref:`list ` property of +the object. + +.. example:: + + Running the following queries in ``projects`` collections returns: + + - Projects where a set of string ``labels`` contains any of "quick win", "bug". + - Projects where any element in a set of integer ``ratings`` is greater than 3. + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-set-operators.swift + :language: swift + +.. _sdks-swift-query-api-subquery: + +Subqueries +~~~~~~~~~~ + +You can iterate through a collection property with another query using a +subquery. To form a subquery, you must wrap the expression in parentheses +and immediately follow it with the ``.count`` aggregator. + +.. code-block:: swift + + ().count > n + +If the expression does not produce a valid subquery, you'll get an +exception at runtime. + +.. example:: + + Running the following query on a ``projects`` collection returns projects + with tasks that have not been completed by a user named Alex. + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.tsq-subquery.swift + :language: swift + +.. _sdks-nspredicate-query: + +NSPredicate Queries +------------------- + +You can build a filter with NSPredicate: + +.. tabs-drivers:: + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.predicates.swift + :language: swift + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.predicates.m + :language: objectivec + +Expressions +~~~~~~~~~~~ + +Filters consist of **expressions** in an NSPredicate. An expression consists of +one of the following: + +- The name (keypath) of a property of the object currently being evaluated. +- An operator and up to two argument expression(s). +- A value, such as a string (``'hello'``) or a number (``5``). + +Dot Notation +~~~~~~~~~~~~ + +When referring to an object property, you can use **dot notation** to refer +to child properties of that object. You can even refer to the properties of +:ref:`embedded objects ` and :ref:`relationships +` with dot notation. + +For example, consider a query on an object with a ``workplace`` property that +refers to a Workplace object. The Workplace object has an embedded object +property, ``address``. You can chain dot notations to refer to the zipcode +property of that address: + +.. code-block:: objective-c + + workplace.address.zipcode == 10012 + +Substitutions +~~~~~~~~~~~~~ + +You can use the following substitutions in your predicate format strings: + +- ``%@`` to specify values +- ``%K`` to specify `keypaths `_ + +.. tabs-drivers:: + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.substitutions.swift + :language: swift + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.substitutions.m + :language: objectivec + +.. _sdks-nspredicate-filter-data-operators: + +Operators +~~~~~~~~~ + +There are several types of operators available to filter an +:ref:`SDK collection `. Filters +work by **evaluating** an operator expression for every +object in the collection being +filtered. If the expression resolves to ``true``, the SDK includes the +object in the results collection. + +Comparison Operators +```````````````````` + +The most straightforward operation in a search is to compare +values. + +.. important:: Types Must Match + + The type on both sides of the operator must be equivalent. For + example, comparing an :ref:`ObjectId with string + ` will result in a precondition failure + with a message like: + + .. code-block:: + :copyable: false + + "Expected object of type object id for property 'id' on object of type + 'User', but received: 11223344556677889900aabb (Invalid value)" + + You can compare any :ref:`numeric type ` with + any other numeric type. + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - ``between`` + - Evaluates to ``true`` if the left-hand numerical or date expression is between or equal to the right-hand range. For dates, this evaluates to ``true`` if the left-hand date is within the right-hand date range. + + * - | ``==``, ``=`` + - Evaluates to ``true`` if the left-hand expression is equal to the right-hand expression. + + * - | ``>`` + - Evaluates to ``true`` if the left-hand numerical or date expression is greater than the right-hand numerical or date expression. For dates, this evaluates to ``true`` if the left-hand date is later than the right-hand date. + + * - | ``>=`` + - Evaluates to ``true`` if the left-hand numerical or date expression is greater than or equal to the right-hand numerical or date expression. For dates, this evaluates to ``true`` if the left-hand date is later than or the same as the right-hand date. + + * - ``in`` + - Evaluates to ``true`` if the left-hand expression is in the right-hand list or string. + + * - | ``<`` + - Evaluates to ``true`` if the left-hand numerical or date expression is less than the right-hand numerical or date expression. For dates, this evaluates to ``true`` if the left-hand date is earlier than the right-hand date. + + * - | ``<=`` + - Evaluates to ``true`` if the left-hand numeric expression is less than or equal to the right-hand numeric expression. For dates, this evaluates to ``true`` if the left-hand date is earlier than or the same as the right-hand date. + + * - | ``!=``, ``<>`` + - Evaluates to ``true`` if the left-hand expression is not equal to the right-hand expression. + +.. example:: + + The following example uses the query engine's + comparison operators to: + + - Find high priority tasks by comparing the value of the ``priority`` property value with a threshold number, above which priority can be considered high. + - Find long-running tasks by seeing if the ``progressMinutes`` property is at or above a certain value. + - Find unassigned tasks by finding tasks where the ``assignee`` property is equal to ``null``. + - Find tasks assigned to specific teammates Ali or Jamie by seeing if the ``assignee`` property is in a list of names. + + .. tabs-drivers:: + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.comparison-operators.m + :language: objectivec + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.comparison-operators.swift + :language: swift + + +Logical Operators +````````````````` + +You can make compound predicates using logical operators. + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - | ``and`` + | ``&&`` + - Evaluates to ``true`` if both left-hand and right-hand expressions are ``true``. + + * - | ``not`` + | ``!`` + - Negates the result of the given expression. + + * - | ``or`` + | ``||`` + - Evaluates to ``true`` if either expression returns ``true``. + +.. example:: + + We can use the query language's logical operators to find + all of Ali's completed tasks. That is, we find all tasks + where the ``assignee`` property value is equal to 'Ali' AND + the ``isComplete`` property value is ``true``: + + .. tabs-drivers:: + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.logical-operators.m + :language: objectivec + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.logical-operators.swift + :language: swift + + +String Operators +```````````````` + +You can compare string values using these string operators. +Regex-like wildcards allow more flexibility in search. + +.. note:: + + You can use the following modifiers with the string operators: + + - ``[c]`` for case insensitivity. + + .. tabs-drivers:: + + .. tab:: + :tabid: swift + + .. code-block:: swift + + NSPredicate(format: "name CONTAINS[c] 'f'") + + .. tab:: + :tabid: objectivec + + .. code-block:: objective-c + + [NSPredicate predicateWithFormat: @"name CONTAINS[c] 'f'"] + + + - ``[d]`` for diacritic insensitivity: the SDK treats special characters as the base character (e.g. ``é`` -> ``e``). + + .. tabs-drivers:: + + .. tab:: + :tabid: swift + + .. code-block:: swift + + NSPredicate(format: "name CONTAINS[d] 'e'") + + .. tab:: + :tabid: objectivec + + .. code-block:: objective-c + + [NSPredicate predicateWithFormat: @"name CONTAINS[d] 'e'"] + +.. list-table:: + :header-rows: 1 + :widths: 40 60 + + * - Operator + - Description + + * - | ``beginsWith`` + - Evaluates to ``true`` if the left-hand string expression begins with the right-hand string expression. This is similar to ``contains``, but only matches if the right-hand string expression is found at the beginning of the left-hand string expression. + + * - | ``contains``, ``in`` + - Evaluates to ``true`` if the left-hand string expression is found anywhere in the right-hand string expression. + + * - | ``endsWith`` + - Evaluates to ``true`` if the left-hand string expression ends with the right-hand string expression. This is similar to ``contains``, but only matches if the left-hand string expression is found at the very end of the right-hand string expression. + + * - | ``like`` + - Evaluates to ``true`` if the left-hand string expression + matches the right-hand string wildcard string + expression. A wildcard string expression is a string + that uses normal characters with two special wildcard + characters: + + - The ``*`` wildcard matches zero or more of any character + - The ``?`` wildcard matches any character. + + For example, the wildcard string "d?g" matches "dog", + "dig", and "dug", but not "ding", "dg", or "a dog". + + * - | ``==``, ``=`` + - Evaluates to ``true`` if the left-hand string is lexicographically equal to the right-hand string. + + * - | ``!=``, ``<>`` + - Evaluates to ``true`` if the left-hand string is not lexicographically equal to the right-hand string. + +.. example:: + + We use the query engine's string operators to find + projects with a name starting with the letter 'e' and + projects with names that contain 'ie': + + .. tabs-drivers:: + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.string-operators.m + :language: objectivec + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.string-operators.swift + :language: swift + +.. include:: /includes/string-sort-and-query-limitations-note.rst + +Geospatial Operators +```````````````````` + +.. versionadded:: 10.47.0 + +You can perform a geospatial query using the ``IN`` operator with one +of the SDK's provided shapes: + +- ``GeoCircle`` +- ``GeoBox`` +- ``GeoPolygon`` + +This operator evaluates to ``true`` if: + +- An object has a geospatial data "shape" containing a ``String`` property + with the value of Point and a ``List`` containing a longitude/latitude + pair. +- The longitude/latitude of the persisted object falls within the geospatial + query shape. + +.. literalinclude:: /examples/generated/code/start/Geospatial.snippet.nspredicate-query.swift + :language: swift + +For more information about querying geospatial data, refer to +:ref:`sdks-query-geospatial`. + +Aggregate Operators +``````````````````` + +You can apply an aggregate operator to a collection property +of an SDK object. Aggregate operators traverse a +:ref:`collection ` and reduce it +to a single value. + +.. list-table:: + :header-rows: 1 + :widths: 40 60 + + * - Operator + - Description + + * - | ``@avg`` + - Evaluates to the average value of a given numerical property across a collection. + + * - | ``@count`` + - Evaluates to the number of objects in the given collection. This + is currently only supported on :ref:`to-many relationship + collections ` and not on lists of + primitives. In order to use ``@count`` on a list of primitives, + consider wrapping the primitives in an :ref:`SDK + object `. + + * - | ``@max`` + - Evaluates to the highest value of a given numerical property across a collection. + + * - | ``@min`` + - Evaluates to the lowest value of a given numerical property across a collection. + + * - | ``@sum`` + - Evaluates to the sum of a given numerical property across a collection. + +.. example:: + + We create a couple of filters to show different facets of + the data: + + - Projects with average tasks priority above 5. + - Long running projects. + + .. tabs-drivers:: + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.aggregate-operators.m + :language: objectivec + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.aggregate-operators.swift + :language: swift + +.. _sdks-nspredicate-set-operators: + +Set Operators +````````````` + +A **set operator** uses specific rules to determine whether +to pass each input collection object to the output +collection by applying a given predicate to every element of +a given :ref:`list ` property of +the object. + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - ``ALL`` + - Returns objects where the predicate evaluates to ``true`` for all objects in the collection. + + * - ``ANY``, ``SOME`` + - Returns objects where the predicate evaluates to ``true`` for any objects in the collection. + + * - ``NONE`` + - Returns objects where the predicate evaluates to false for all objects in the collection. + + +.. example:: + + We use the query engine's set operators to find: + + - Projects with no complete tasks. + - Projects with any top priority tasks. + + .. tabs-drivers:: + + .. tab:: + :tabid: objectivec + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.set-operators.m + :language: objectivec + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.set-operators.swift + :language: swift + +.. _sdks-nspredicate-subquery: + +Subqueries +~~~~~~~~~~ + +You can iterate through a collection property with another query using the +``SUBQUERY()`` predicate function. ``SUBQUERY()`` has the following signature: + +.. code-block:: objective-c + + SUBQUERY(, , ) + +- ``collection``: the name of the list property to iterate through +- ``variableName``: a variable name of the current element to use in the subquery +- ``predicate``: a string that contains the subquery predicate. You can use the + variable name specified by ``variableName`` to refer to the currently iterated + element. + +.. example:: + + Running the following filter on a ``projects`` collection returns projects + with tasks that have not been completed by a user named Alex. + + .. tabs-drivers:: + + .. tab:: + :tabid: swift + + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.subquery.swift + :language: swift -- Remove the *many* ref targets here and settle on the most relevant ones for - each section. + .. tab:: + :tabid: objectivec -.. _ios-nspredicate-query: -.. _swift-query-geospatial: \ No newline at end of file + .. literalinclude:: /examples/generated/code/start/QueryEngine.snippet.subquery.m + :language: objectivec diff --git a/source/sdk/crud/read.txt b/source/sdk/crud/read.txt index fbc5798a14..56ea7c6e1a 100644 --- a/source/sdk/crud/read.txt +++ b/source/sdk/crud/read.txt @@ -54,3 +54,8 @@ Read Relationship Properties Query Inverse Relationships ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-query-geospatial: + +Query Geospatial Data +~~~~~~~~~~~~~~~~~~~~~ From 6ffd8b56b69230022d4db7cbf68a52527f1e8a83 Mon Sep 17 00:00:00 2001 From: Dachary Date: Thu, 8 Aug 2024 11:56:11 -0400 Subject: [PATCH 58/63] (DOCSP-39531): Consolidate Link User Identities page (#3350) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39531 Jira ticket: https://jira.mongodb.org/browse/DOCSP-37351 *Staged Page* - [Link User Identities](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39531/sdk/users/link-user-identities/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [Flutter: Link User Identities](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/link-user-identities/) - [Java: Link User Identities](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/users/link-user-identities/) - [Kotlin: Link User Identities](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/users/link-credentials/) - [.NET: Link User Identities](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/manage-users/link-user-identities/) - [Node.js: Link User Identities](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/users/link-identities/) - [Swift: Link User Identities](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/users/link-user-identities/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [x] Shared code example boxes contain language-specific snippets or placeholders for every language - [x] API reference details contain working API reference links or generic content - [x] Realm naming/language has been updated - [x] All relevant content from individual SDK pages is present on the consolidated page --------- Co-authored-by: Kyle Rollins <115574589+krollins-mdb@users.noreply.github.com> --- ...nk-user-identities-example-description.rst | 13 +++ ...nk-user-identities-example-description.rst | 8 ++ ...nk-user-identities-example-description.rst | 6 ++ ...r-identities-example-js-ts-description.rst | 4 + ...nk-user-identities-example-description.rst | 4 + ...nk-user-identities-example-description.rst | 4 + ...nk-user-identities-example-description.rst | 10 ++ source/includes/link-user-identities.rst | 24 ----- .../users/link-user-identities-example.rst | 58 ++++++++++++ source/sdk/users/link-user-identities.txt | 93 +++++++++++++++++-- 10 files changed, 194 insertions(+), 30 deletions(-) create mode 100644 source/includes/api-details/csharp/users/link-user-identities-example-description.rst create mode 100644 source/includes/api-details/dart/users/link-user-identities-example-description.rst create mode 100644 source/includes/api-details/java/users/link-user-identities-example-description.rst create mode 100644 source/includes/api-details/javascript/users/link-user-identities-example-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/users/link-user-identities-example-description.rst create mode 100644 source/includes/api-details/objectivec/users/link-user-identities-example-description.rst create mode 100644 source/includes/api-details/swift/users/link-user-identities-example-description.rst delete mode 100644 source/includes/link-user-identities.rst create mode 100644 source/includes/sdk-examples/users/link-user-identities-example.rst diff --git a/source/includes/api-details/csharp/users/link-user-identities-example-description.rst b/source/includes/api-details/csharp/users/link-user-identities-example-description.rst new file mode 100644 index 0000000000..02c230095c --- /dev/null +++ b/source/includes/api-details/csharp/users/link-user-identities-example-description.rst @@ -0,0 +1,13 @@ +You can link identities using the +:dotnet-sdk:`LinkCredentialsAsync() `. +This links the identity belonging to the credentials to the logged-in +:dotnet-sdk:`User ` object. + +.. literalinclude:: /examples/generated/dotnet/UserLinkExamples.snippet.link.cs + :language: csharp + +In the example above, we must first register the new :ref:`email/password +` user before linking. If you are using any of +the other :ref:`Auth Providers `, this step is +unnecessary. The following example uses :ref:`Google authentication +` instead of EmailPassword. diff --git a/source/includes/api-details/dart/users/link-user-identities-example-description.rst b/source/includes/api-details/dart/users/link-user-identities-example-description.rst new file mode 100644 index 0000000000..f499d9eb83 --- /dev/null +++ b/source/includes/api-details/dart/users/link-user-identities-example-description.rst @@ -0,0 +1,8 @@ +You can link identities by passing the :flutter-sdk:`Credentials ` +that you want to link to :flutter-sdk:`User.linkCredentials() `. + +.. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.link-user-credentials.dart + :language: dart + +In the example below, we register an anonymous user, then later register an +email/password user and link the credentials. diff --git a/source/includes/api-details/java/users/link-user-identities-example-description.rst b/source/includes/api-details/java/users/link-user-identities-example-description.rst new file mode 100644 index 0000000000..79961a546c --- /dev/null +++ b/source/includes/api-details/java/users/link-user-identities-example-description.rst @@ -0,0 +1,6 @@ +You link identities using +:java-sdk:`linkCredentials() ` +or :java-sdk:`linkCredentialsAsync() +` object. diff --git a/source/includes/api-details/javascript/users/link-user-identities-example-js-ts-description.rst b/source/includes/api-details/javascript/users/link-user-identities-example-js-ts-description.rst new file mode 100644 index 0000000000..261bbc0b8b --- /dev/null +++ b/source/includes/api-details/javascript/users/link-user-identities-example-js-ts-description.rst @@ -0,0 +1,4 @@ + +You can link identities using :js-sdk:`linkCredentials() +`. This links the identity that belongs +to the credential to a logged-in ``User`` object. diff --git a/source/includes/api-details/kotlin/users/link-user-identities-example-description.rst b/source/includes/api-details/kotlin/users/link-user-identities-example-description.rst new file mode 100644 index 0000000000..660256c9e0 --- /dev/null +++ b/source/includes/api-details/kotlin/users/link-user-identities-example-description.rst @@ -0,0 +1,4 @@ +You link identities using +:kotlin-sync-sdk:`linkCredentials `. +This links the identity belonging to the credential to the logged-in +:kotlin-sync-sdk:`User `. diff --git a/source/includes/api-details/objectivec/users/link-user-identities-example-description.rst b/source/includes/api-details/objectivec/users/link-user-identities-example-description.rst new file mode 100644 index 0000000000..364badc565 --- /dev/null +++ b/source/includes/api-details/objectivec/users/link-user-identities-example-description.rst @@ -0,0 +1,4 @@ +You can link identities using :objc-sdk:`-linkUserWithCredentials:completion: +`. +This links the identity that belongs to the credential to a logged-in ``User`` +object. diff --git a/source/includes/api-details/swift/users/link-user-identities-example-description.rst b/source/includes/api-details/swift/users/link-user-identities-example-description.rst new file mode 100644 index 0000000000..899ac48577 --- /dev/null +++ b/source/includes/api-details/swift/users/link-user-identities-example-description.rst @@ -0,0 +1,10 @@ +You can link identities using :swift-sdk:`linkUser(credentials:) +`. +This links the identity that belongs to the credential to a logged-in ``User`` +object. + +.. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.link-identity.swift + :language: swift + +The SDK also provides an :swift-sdk:`async/await version of +User.linkUser `. diff --git a/source/includes/link-user-identities.rst b/source/includes/link-user-identities.rst deleted file mode 100644 index d673ce95a5..0000000000 --- a/source/includes/link-user-identities.rst +++ /dev/null @@ -1,24 +0,0 @@ -Realm provides :ref:`many authentication providers ` -to log users into your app. Each provider creates a unique user identity. -Realm lets you merge multiple credentials into one user identity. - -Credentials must be linked prior to logging a user in. Once credentials are used -to login a user, you cannot link that credential anymore. -Also, you cannot link multiple email/password credentials together. - -Example -------- - -Consider an application that offers :ref:`anonymous login -`, which allows users to explore the app without -registering. If a user wants to continue using the application, they can create -a permanent account by using another authentication provider. Realm -creates a new ``User`` object. The app can then link the new identity with the -current user. - -.. note:: - - Depending on how you have configured email/password authentication, there may - be additional steps (confirming the email address, for example) before the - new account is created and can be linked. - \ No newline at end of file diff --git a/source/includes/sdk-examples/users/link-user-identities-example.rst b/source/includes/sdk-examples/users/link-user-identities-example.rst new file mode 100644 index 0000000000..5a2204de5b --- /dev/null +++ b/source/includes/sdk-examples/users/link-user-identities-example.rst @@ -0,0 +1,58 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/UserLinkExamples.snippet.link2.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.link-user-credentials-example.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/LinkUserIdentitiesTest.snippet.link-users.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/LinkUserIdentitiesTest.snippet.link-users.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/code/start/link-identities.snippet.link-identities.js + :language: javascript + :emphasize-lines: 6 + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.link-credentials.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.link-identity-objc.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/MultipleUsers.snippet.async-link-identity.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/code/start/link-identities.snippet.link-identities.ts + :language: typescript + :emphasize-lines: 10 diff --git a/source/sdk/users/link-user-identities.txt b/source/sdk/users/link-user-identities.txt index fcc8a8d129..4131432c39 100644 --- a/source/sdk/users/link-user-identities.txt +++ b/source/sdk/users/link-user-identities.txt @@ -4,10 +4,91 @@ Link User Identities ==================== -.. contents:: On this page - :local: - :backlinks: none - :depth: 2 - :class: singlecol +.. meta:: + :description: You can link user identities to associate multiple sets of credentials with the same user object. + :keywords: Realm, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example -Placeholder page for information about linking user identities. +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + +.. tabs-selector:: drivers + +Atlas Device SDK provides :ref:`many authentication providers +` to log users into your app. Each provider has its +own credentials that create a unique user identity. The SDK lets you merge +multiple identities into a single user account. + +User identities must be linked prior to logging a user in. Once the user is +logged in, you cannot link the credential used to login to the user account. +Also, you cannot link multiple email/password identities together. + +Example +------- + +Consider an application that offers :ref:`anonymous login +`, which allows users to explore the app without +registering. If a user wants to continue using the application, they can +create a permanent account with an authentication provider intended to +persist user data over a longer period, such as email/password authentication. +The SDK creates a new identity belonging to a new ``User`` object. The app can +then link the new identity with the current user. + +.. note:: + + Depending on how you have configured email/password authentication, there may + be additional steps (confirming the email address, for example) before the + new account is created and can be linked. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/link-user-identities-example-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/link-user-identities-example-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/users/link-user-identities-example-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/users/link-user-identities-example-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/link-user-identities-example-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/link-user-identities-example-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/users/link-user-identities-example-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/link-user-identities-example-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/link-user-identities-example-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/link-user-identities-example.rst From c2b62107b35c35c86f9e4a995d95abb344143578 Mon Sep 17 00:00:00 2001 From: osharaf-mdb Date: Fri, 9 Aug 2024 17:30:11 -0400 Subject: [PATCH 59/63] Consolidation Providers and Hooks (#3356) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-41470 *Staged Page* - [Providers & Hooks](https://preview-mongodbosharafmdb.gatsbyjs.io/realm/react-providers-and-hooks/frameworks/react/providers-hooks/) *Page Source* - [RealmProvider (@realm/react)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/api-reference/realm-provider/) - [AppProvider (@realm/react)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/api-reference/app-provider/) - [UserProvider (@realm/react)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/react-native/api-reference/user-provider/) *Note* This PR is built off a previous PR, [linked here](https://github.com/mongodb/docs-realm/pull/3339). The previous PR had feedback from the original draft and the second draft after that. The feedback from that second draft was then implemented to get what is seen here. ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [ ] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [ ] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [ ] Shared code boxes have snippets or placeholders for all 9 languages - [ ] API description sections have API details or a generic placeholder for all 9 languages - [ ] Check related pages for relevant content to include - [ ] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --- .../providers-hooks.snippet.use-providers.js | 15 + source/frameworks.txt | 7 +- source/frameworks/react.txt | 30 + source/frameworks/react/access-atlas.txt | 14 + source/frameworks/react/api-reference.txt | 10 + source/frameworks/react/install.txt | 14 + .../react/manage-database-files.txt | 14 + source/frameworks/react/manage-users.txt | 14 + source/frameworks/react/model-data.txt | 14 + source/frameworks/react/providers-hooks.txt | 777 ++++++++++++++++++ source/frameworks/react/quick-start.txt | 14 + source/frameworks/react/react-to-changes.txt | 14 + source/frameworks/react/read-write.txt | 14 + source/frameworks/react/sync-data.txt | 14 + source/frameworks/react/test-debug.txt | 14 + source/sdk/files/configure-and-open.txt | 5 + 16 files changed, 982 insertions(+), 2 deletions(-) create mode 100644 source/examples/generated/react/providers-hooks.snippet.use-providers.js create mode 100644 source/frameworks/react.txt create mode 100644 source/frameworks/react/access-atlas.txt create mode 100644 source/frameworks/react/api-reference.txt create mode 100644 source/frameworks/react/install.txt create mode 100644 source/frameworks/react/manage-database-files.txt create mode 100644 source/frameworks/react/manage-users.txt create mode 100644 source/frameworks/react/model-data.txt create mode 100644 source/frameworks/react/providers-hooks.txt create mode 100644 source/frameworks/react/quick-start.txt create mode 100644 source/frameworks/react/react-to-changes.txt create mode 100644 source/frameworks/react/read-write.txt create mode 100644 source/frameworks/react/sync-data.txt create mode 100644 source/frameworks/react/test-debug.txt diff --git a/source/examples/generated/react/providers-hooks.snippet.use-providers.js b/source/examples/generated/react/providers-hooks.snippet.use-providers.js new file mode 100644 index 0000000000..c6f6567bb6 --- /dev/null +++ b/source/examples/generated/react/providers-hooks.snippet.use-providers.js @@ -0,0 +1,15 @@ +import React from "react"; +import { APP_ID } from "../realm.config.json"; +import { AppProvider, UserProvider, RealmProvider, useRealm, useUser } from "@realm/react"; + +export const AppWrapper = () => { + return ( + {/* pass in your App ID as a prop */} + + + {/* call any app components here */} + + + + ); + }; diff --git a/source/frameworks.txt b/source/frameworks.txt index eb5aeacefe..baa81b32cf 100644 --- a/source/frameworks.txt +++ b/source/frameworks.txt @@ -13,19 +13,22 @@ Build with Frameworks .. toctree:: :titlesonly: + React + React Native Electron Flutter Maui .NET - React Native SwiftUI The following pages contain information about building with specific frameworks using Atlas Device SDK: +- :ref:`sdks-build-with-react` +- :ref:`sdks-build-with-react-native` - :ref:`sdks-build-with-electron` - :ref:`sdks-build-with-flutter` - :ref:`sdks-build-with-maui` - :ref:`sdks-build-with-dotnet` - :ref:`sdks-build-with-react-native` -- :ref:`sdks-build-with-swiftui` +- :ref:`sdks-build-with-swiftui` \ No newline at end of file diff --git a/source/frameworks/react.txt b/source/frameworks/react.txt new file mode 100644 index 0000000000..910f2507ff --- /dev/null +++ b/source/frameworks/react.txt @@ -0,0 +1,30 @@ +.. _sdks-build-with-react: + +================ +Build with React +================ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. toctree:: + :titlesonly: + + Install + Quick Start + Providers & Hooks + Model Data + Open & Manage Database Files + Read & Write Data + React to Changes + Access Atlas + Manage Users + Sync Data + Test & Debug + API Reference + +Placeholder page for information about building with React. (This may +be a directory depending on how much content we have/need.) \ No newline at end of file diff --git a/source/frameworks/react/access-atlas.txt b/source/frameworks/react/access-atlas.txt new file mode 100644 index 0000000000..49711e60a3 --- /dev/null +++ b/source/frameworks/react/access-atlas.txt @@ -0,0 +1,14 @@ +.. _sdks-react-access-atlas: + +============ +Access Atlas +============ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/api-reference.txt b/source/frameworks/react/api-reference.txt new file mode 100644 index 0000000000..9440f53fcb --- /dev/null +++ b/source/frameworks/react/api-reference.txt @@ -0,0 +1,10 @@ +.. _sdks-react-api-reference: + +=================================== +API Reference +=================================== + +.. toctree:: + :titlesonly: + + JavaScript SDK Reference (@realm) \ No newline at end of file diff --git a/source/frameworks/react/install.txt b/source/frameworks/react/install.txt new file mode 100644 index 0000000000..0259df8e69 --- /dev/null +++ b/source/frameworks/react/install.txt @@ -0,0 +1,14 @@ +.. _sdks-react-install: + +=================================== +Install @realm/react in a React App +=================================== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/manage-database-files.txt b/source/frameworks/react/manage-database-files.txt new file mode 100644 index 0000000000..dd06373449 --- /dev/null +++ b/source/frameworks/react/manage-database-files.txt @@ -0,0 +1,14 @@ +.. _sdks-react-manage-database-files: + +============================ +Open & Manage Database Files +============================ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/manage-users.txt b/source/frameworks/react/manage-users.txt new file mode 100644 index 0000000000..4c775c3b3f --- /dev/null +++ b/source/frameworks/react/manage-users.txt @@ -0,0 +1,14 @@ +.. _sdks-react-manage-users: + +============ +Manage Users +============ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/model-data.txt b/source/frameworks/react/model-data.txt new file mode 100644 index 0000000000..d9451a5f84 --- /dev/null +++ b/source/frameworks/react/model-data.txt @@ -0,0 +1,14 @@ +.. _sdks-react-model-data: + +========== +Model Data +========== + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/providers-hooks.txt b/source/frameworks/react/providers-hooks.txt new file mode 100644 index 0000000000..f70976a96a --- /dev/null +++ b/source/frameworks/react/providers-hooks.txt @@ -0,0 +1,777 @@ +.. _sdks-react-providers-hooks: + +================= +Providers & Hooks +================= + +.. meta:: + :description: Develop apps using the providers and Hooks available in the @realm/react library. + :keywords: Realm, JavaScript SDK, React, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: javascript/typescript + +.. contents:: On this page + :local: + :backlinks: none + :depth: 3 + :class: singlecol + +The ``@realm/react`` library offers custom React components that eliminate the boilerplate needed to +develop a React app using JavaScript-based Atlas Device SDKs. The components leverage the +Provider design pattern to manage your Atlas connection, user creation and authentication, and +data management. + +- ``AppProvider``: Used to connect to your :ref:`Atlas App Services App Client + `, including for user authentication. + +- ``UserProvider``: Used to access the logged-in :ref:`user object `. + +- ``RealmProvider``: Used to work with the configured database. + +Use these providers to develop with frameworks and for platforms that support a React +environment, including: React Native, Web, and Electron. + +Getting Started with Providers +------------------------------ + +Like all React components, you call providers using HTML opening and closing tags. Nesting a +component within another component's tags creates a parent-child relationship between them, +where child components can access the context created by their parent component. + +Context refers to the information made accessible by a provider. For example, the +``RealmProvider`` context is the Realm database it connects to, so all components nested in the +``RealmProvider`` have access to that database. + +Props +~~~~~ + +Components take parameters called props as input, passed into the opening tag. The props passed +into a parent component help create the context inherited by the components it wraps. Each +Provider has different props you can use for configuration. + +.. tabs:: + + .. tab:: RealmProvider Props + :tabid: realm-provider-props + + All properties of :realm-react-sdk:`BaseConfiguration ` can be passed as props. + + The most common BaseConfiguration properties used are: + + - ``schema?: (RealmObjectConstructor | ObjectSchema)[]`` + + Specifies all the object schemas in the database. Required when first creating a database. + If omitted, the schema will be read from the existing database file. + + - ``sync?: SyncConfiguration`` + + Defines Device Sync behavior for this database, including initial subscriptions. + + ``RealmProvider`` has more props that define its behavior: + + - ``fallback?: React.ComponentType | React.ReactElement | null | undefined`` + + The fallback component to render while the database is opening or if it fails to open. + + - ``closeOnUnmount?: boolean`` + + Default is ``true``. If set to ``false``, the open database will not close when the + component unmounts. + + - ``realmRef?: React.MutableRefObject`` + + A ref to the database instance. This is useful if you need to access the database + instance outside of the scope of the database. + + - ``children: React.ReactNode`` + + - ``realm?: Realm`` + + A configured Realm instance for the provider to connect to. Using this prop + eliminates the need to pass in other configuration parameters as props. + + ``closeOnUnmount`` will be set to ``false`` by default. + + For more details, see the :realm-react-sdk:`RealmProvider API Reference (@realm/react) ` + + .. tab:: AppProvider Props + :tabid: app-provider-props + + All properties of :realm-react-sdk:`AppConfiguration + ` can be passed as props to ``AppProvider``. + + The most common AppConfiguration property used is: + + - ``id: string`` + + Specifies the App Services App ID. + + ``AppProvider`` has more an additional prop that defines its behavior: + + - ``app?: Realm.App`` + + An Atlas App Services App for the provider to connect to. Using this prop + eliminates the need to pass in other configuration parameters as props. + + For more details, see the :realm-react-sdk:`AppProvider API Reference (@realm/react) ` + + .. tab:: UserProvider Props + :tabid: user-provider-props + + The only prop passed into ``UserProvider`` is an optional fallback component: + + - ``fallback?: React.ComponentType | React.ReactElement | null | undefined`` + + The fallback component to render if there is no authorized user. This can be + used to render a log in screen or otherwise handle authentication. + + For more details, see the :realm-react-sdk:`UserProvider API Reference (@realm/react) ` + +Configure your Providers +~~~~~~~~~~~~~~~~~~~~~~~~ + +Your app's needs determine what providers you use, as all three providers are not always +necessary. The example below walks through configuring all three providers. If your app does not need a +certain provider, you can skip the steps and omit the code for that provider. + +**To configure your providers:** + +1. Import ``RealmProvider``, ``AppProvider``, and ``UserProvider`` from ``@realm/react``. + +2. Configure ``AppProvider``. + + a. Pass your App Services App ID string to the ``id`` prop of the ``AppProvider``. + + b. Add other configuration object properties as props to ``AppProvider`` as needed. + +3. Configure ``UserProvider`` and nest it within ``AppProvider``. + + a. Pass a component that logs in a user to the ``fallback`` prop. The app renders this component if there is no authenticated user. + +4. Configure ``RealmProvider`` and nest it within ``UserProvider``. + + a. Pass your object models to the ``schema`` prop. + + b. If configuring a synced database, use the ``sync`` prop. Sync properties are defined by + a :ref:`Sync Config Object `. + + To sync data, you must set up a sync subscription. The example below uses an initial subscription, + but you can also set up subscriptions in ``RealmProvider`` child components. + + c. Add other configuration object properties as props to ``RealmProvider`` as needed. + +5. Nest your app components in the providers. + + Once your providers have been configured and nested as described above, nest your app components within the + provider whose context it needs to access. Generally, you can nest your components within the + ``RealmProvider`` to ensure they have access to all three providers' contexts. + +The rendering of each component is dependent on the successful +execution of its parent components' functionality. For example, while ``AppProvider`` is +connecting to your app's App Services backend, or if ``AppProvider`` is unable to connect, the +components it wraps will not render. In these cases, the provider's fallback component is +rendered instead. + +You *must* nest the providers as shown below to ensure each has access to its required context: + +.. literalinclude:: /examples/generated/react-native/ts/configure-realm-sync.test.snippet.configure-realm-sync-full.tsx + :language: javascript + +.. note:: Exposing more than one database using createRealmContext() + + The example above details how to configure and expose a single database using a ``RealmProvider`` + imported directly from ``@realm/react``. + For information about using ``createRealmContext()`` to configure a database or exposing more + than one database, see :ref:`Create Context with createRealmContext() + ` below. + +Working with Providers using Hooks +---------------------------------- + +To use the provider's context in your app's components, you can use Hooks. + +Hooks act as functions used to access states in your app. React offers built-in Hooks you can +use either on their own or to build custom Hooks. + +There are two important rules to consider when working with Hooks: + +- Hooks can only be used at the top level of a React component. +- Hooks can only be called in a React component or a custom Hook, not in regular JavaScript + functions. + +The ``@realm/react`` library has custom Hooks for each provider you can +use to access a provider's context in the components it wraps. + +RealmProvider Hooks +~~~~~~~~~~~~~~~~~~~ + +.. _sdks-react-use-realm-hook: + +useRealm() +`````````` + +.. code:: typescript + :copyable: false + :caption: Type signature + + useRealm(): Realm + +The ``useRealm()`` Hook returns an opened :js-sdk:`database instance`. The database instance +gives you access to database methods and properties. For example, you can call +``realm.write()`` to add a Realm Object to your database. + +To learn more about modifying data in your database, refer to :ref:`Write Transactions +`. + +.. literalinclude:: /examples/generated/react-native/ts/create-test.test.snippet.crud-create-object.tsx + :language: typescript + :emphasize-lines: 3, 6-8, 15 + +*Returns* + +- ``Realm`` Returns a database instance from the ``RealmProvider`` context. + +.. _sdks-react-use-object-hook: + +useObject() +``````````` + +.. code:: typescript + :copyable: false + :caption: Type signature + + useObject(type, sdks-open-synced-database-offlineKey): T & Realm.Object | null + +The ``useObject()`` Hook returns a :js-sdk:`Realm Object ` for a given +:ref:`primary key `. You can pass an object class +or the class name as a string and the primary key. + +The ``useObject()`` Hook returns ``null`` if the object doesn't exist or you have +deleted it. The Hook will automatically subscribe to updates and rerender the +component using the Hook on any change to the object. + +.. literalinclude:: /examples/generated/react-native/ts/read.test.snippet.crud-read-object-by-id.tsx + :language: typescript + +*Parameters* + +- ``type: string`` A string that matches your object model's class name or a reference to a + class that extends :js-sdk:`Realm.Object `. +- ``primaryKey: T[keyof T]`` The primary key of the desired object. + +*Returns* + +- ``Realm.Object | null`` A Realm Object or ``null`` if no object is found. + +.. _sdks-react-use-query-hook: + +useQuery() +`````````` + +.. code:: typescript + :copyable: false + :caption: Type signature + + useQuery(type, query?, deps?): Realm.Results> + +The ``useQuery()`` Hook returns a :js-sdk:`result ` that is a +collection of Realm Objects of a given type. These are the results of your query. A query can +be an object class or the class name as a string. + +The ``useQuery()`` method subscribes to updates to any objects in the collection +and rerenders the component using it on any change to the results. + +You can use ``.filtered()`` and ``.sorted()`` to filter and sort your query +results. Do this in the ``query`` argument of ``useQuery`` so that +they only run when there are changes in the dependency array. For more examples, +refer to the :ref:`Read Objects ` page. + +.. literalinclude:: /examples/generated/react-native/ts/read.test.snippet.crud-read-filter-data.tsx + :language: typescript + :emphasize-lines: 6-8, 14-18 + +*Parameters* + +- ``type: string`` A string that matches your object model's class name or a reference to a + class that extends :js-sdk:`Realm.Object `. +- ``query?: QueryCallback`` A query function that can filter and sort query results. Builds on + ``useCallback`` to memoize the query function. +- ``deps?: DependencyList`` A list of query function dependencies that's used to memoize + the query function. + +*Returns* + +- ``Realm.Results`` A Realm Object or ``null`` if no object is found. + +UserProvider Hooks +~~~~~~~~~~~~~~~~~~ + +.. _sdks-react-use-user-hook: + +useUser() +````````` + +.. code:: typescript + :copyable: false + :caption: Type signature + + useUser(): Realm.User + +The ``useUser()`` Hook provides access to the :js-sdk:`logged-in user `. For example, +you can use ``useUser()`` to log the current user out. + +When changes to the user object happen, this Hook will rerender its parent +component. For example, if you call ``user.refreshCustomData`` to get updated +custom user data, the ``useUser()`` parent component will rerender. + +.. include:: /examples/generated/react-native/v12/RealmWrapper.snippet.log-user-out.tsx.rst + +*Returns* + +- ``Realm.User`` An instance of the currently-authenticated Atlas user. + +AppProvider Hooks +~~~~~~~~~~~~~~~~~ + +.. _sdks-react-use-app-hook: + +useApp() +```````` + +.. code:: typescript + :copyable: false + :caption: Type signature + + useApp(): Realm.App + +*Example* + +The ``useApp()`` Hook provides access to a :js-sdk:`Realm.App ` +instance. + +.. include:: /examples/generated/react-native/v12/use-app.snippet.import-use-app.tsx.rst +.. include:: /examples/generated/react-native/v12/use-app.snippet.use-app.tsx.rst + +*Returns* + +- ``Realm.App`` An instance of the current ``Realm.App`` created by ``AppProvider``. + +.. _sdks-react-use-auth-hook: + +useAuth() +````````` + +.. code:: typescript + :copyable: false + :caption: Type signature + + useAuth(): UseAuth + +You destructure the ``useAuth()`` Hook result into a ``result`` and authentication method. + +result +++++++ + +.. code:: typescript + :copyable: false + :caption: Type signature + + result: AuthResult + +Result of authentication Hook operation. For example, ``result.operation`` gives +you the name of the current operation. + +*Enum values* + +- ``state``: Can be ``"not-started"``, ``"pending"``, ``"success"``, ``"error"``. +- ``operation``: For a list of all operation names, refer to the + :realm-react-sdk:`API documentation `. +- ``pending``: Can be ``true`` or ``false``. +- ``success``: Can be ``true`` or ``false``. +- ``error``: Error-based object or undefined. + +Authentication Methods +++++++++++++++++++++++ + +The authentication method specifies how you want users to login to your app. ``useAuth`` has an authentication method for every App Services authentication provider. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :widths: 23 20 57 + + * - Operation + - Parameter + - Example + + * - logIn + - ``credentials``: An Atlas credential supplied by any supported Atlas App Services + authentication provider. + - Logs in a user with any authentication mechanism supported by Atlas App Services. If called when a + user is logged in, the current user switches to the new user. Usually, it's better to use + the more specific login methods. + + .. code:: typescript + + const {logIn, result} = useAuth(); + + useEffect(() => logIn(Realm.Credentials.anonymous()), []); + + if(result.pending) { + return () + } + + if(result.error) { + return () + } + + if(result.success) { + return () + } + //... + + * - logInWithAnonymous + - None + - Log in with the anonymous authentication provider. + + .. code:: typescript + + const {logInWithAnonymous, result} = useAuth(); + const performLogin = () => { + logInWithAnonymous(); + }; + + * - logInWithApiKey + - ``key``: A string that is linked to an App Services user. + - Log in with an API key. + + .. code:: typescript + + const {logInWithApiKey, result} = useAuth(); + const performLogin = () => { + const key = getApiKey(); + // user defined function + logInWithApiKey(key); + }; + + * - logInWithEmailPassword + - ``credentials``: An object with ``email`` and ``password`` fields. + - Log in with Email/Password. + + .. code:: typescript + + const {logInWithEmailPassword, result} = useAuth(); + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + + const performLogin = () => { + logInWithEmailPassword({email, password}); + }; + + * - logInWithJWT + - ``credentials``: A string representation of a user's JWT. + - Log in with a JSON Web Token (JWT). + + .. code:: typescript + + const {logInWithJWT, result} = useAuth(); + + const performLogin = () => { + const token = authorizeWithCustomerProvider(); + // user defined function + logInWithJWT(token); + }; + + * - logInWithGoogle + - ``credentials``: An object with an ``idToken`` or ``authCode`` field that + should contain the string token you get from Google Identity Services. + - Log in with Google. + + .. code:: typescript + + const {logInWithGoogle, result} = useAuth(); + + const performLogin = () => { + const token = getGoogleToken(); + // user defined function + logInWithGoogle({idToken: token}); + }; + + * - logInWithApple + - ``idToken``: A string you get from the Apple SDK. + - Log in with Apple. + + .. code:: typescript + + const {logInWithApple, result} = useAuth(); + + const performLogin = () => { + const token = getAppleToken(); + // user defined function + logInWithApple(token); + }; + + * - logInWithFacebook + - ``accessToken``: A string you get from the Facebook SDK. + - Log in with Facebook. + + .. code:: typescript + + const {logInWithFacebook, result} = useAuth(); + + const performLogin = () => { + const token = getFacebookToken(); + // user defined function + logInWithFacebook(token); + }; + + * - logInWithFunction + - ``payload``: An object that contains user information you want to pass to + the App Services function that processes log in requests. + - Log in with a custom function. + + .. code:: typescript + + const {logInWithFunction, result} = useAuth(); + + const performLogin = () => { + const customPayload = getAuthParams(); + // user defined arguments + logInWithFunction(customPayload); + }; + + * - logOut + - None + - Logs out the current user. + + .. code:: typescript + + const {logOut, result} = useEmailPasswordAuth(); + const performLogout = () => { + logOut(); + } + +.. _sdks-react-use-emailpassword-auth-hook: + +useEmailPasswordAuth() +`````````````````````` + +You destructure the ``useEmailPasswordAuth()`` Hook result into a ``result`` and authentication operation. + +result +++++++ + +.. code:: typescript + :copyable: false + :caption: Type signature + + result: AuthResult + +Result of operation. For example, ``result.operation`` gives you the name of the current +operation. + +*Enum values* + +- ``state``: Can be ``"not-started"``, ``"pending"``, ``"success"``, ``"error"``. +- ``operation``: For a list of all operation names, refer to the + :realm-react-sdk:`API documentation `. +- ``pending``: Can be ``true`` or ``false``. +- ``success``: Can be ``true`` or ``false``. +- ``error``: Error-based object or undefined. + +Authentication Operations ++++++++++++++++++++++++++ + +``useEmailPasswordAuth`` has a number of operations to facilitate email and password user authentication. + +.. list-table:: + :header-rows: 1 + :stub-columns: 1 + :widths: 27 18 55 + + * - Operation + - Parameter + - Example + + * - logIn + - ``credentials``: An object that contains ``email`` and ``password`` properties. + - Logs a user in using an email and password. You could also call + ``logIn(Realm.Credentials.emailPassword(email, password))``. Returns a + ``Realm.User`` instance of the logged-in user. + + .. code:: typescript + + const {logIn, result} = useEmailPasswordAuth(); + + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + + const performLogin = () => { + logIn({email, password}); + }; + + if(result.pending) { + return () + } + + if(result.error) { + return () + } + + if(result.success) { + return () + } + //... + + * - logOut + - None + - Logs out the current user. + + .. code:: typescript + + const {logOut, result} = useEmailPasswordAuth(); + const performLogout = () => { + logOut(); + } + + * - register + - ``args``: An object that contains ``email`` and ``password`` properties. + - Registers a new user. Requires a user email and password. + + .. code:: typescript + + const {register, result} = useEmailPasswordAuth(); + + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + + const performRegister = () => { + register({email, password}); + }; + + * - confirm + - ``args``: An object that contains ``token`` and ``tokenId`` properties. + - Confirms a user account. Requires a ``token`` and ``tokenId``. + + .. code:: typescript + + const {confirm, result} = useEmailPasswordAuth(); + + const performConfirmation = () => { + confirm({token, tokenId}); + }; + + * - resendConfirmationEmail + - ``args``: An object that contains an ``email`` property. + - Resends a confirmation email. + + .. code:: typescript + + const {resendConfirmationEmail, result} = useEmailPasswordAuth(); + const [email, setEmail] = useState(''); + + const performResendConfirmationEmail = () => { + resendConfirmationEmail({email}); + }; + + * - retryCustomConfirmation + - ``args``: An object that contains an ``email`` property. + - Retries confirmation with a custom function. + + .. code:: typescript + + const {retryCustomConfirmation, result} = useEmailPasswordAuth(); + const [email, setEmail] = useState(''); + + const performRetryCustomConfirmation = () => { + retryCustomConfirmation({email}); + }; + + * - sendResetPasswordEmail + - ``args``: An object that contains an ``email`` property. + - Sends a password reset email. + + .. code:: typescript + + const {sendResetPasswordEmail, result} = useEmailPasswordAuth(); + const [email, setEmail] = useState(''); + + const performSendResetPasswordEmail = () => { + sendResetPasswordEmail({email}); + }; + + * - resetPassword + - ``args``: An object that contains ``token``, ``tokenId``, and ``password`` + properties. + - Resets a user's password. + + .. code:: typescript + + const {resetPassword, result} = useEmailPasswordAuth(); + const [password, setPassword] = useState(''); + + const performResetPassword = () => { + resetPassword({token, tokenId, password}); + }; + + * - callResetPasswordFunction + - ``args``: An object that contains ``email`` and ``password`` properties. + + ``restArgs``: Additional arguments that you need to pass to your custom + reset password function. + - Calls your App Services backend password reset function. Can pass arguments to + the function as needed. + + .. code:: typescript + + const {callResetPasswordFunction, result} = useEmailPasswordAuth(); + const [email, setEmail] = useState(''); + const [password, setPassword] = useState(''); + + const performResetPassword = () => { + callResetPasswordFunction({email, password}, "extraArg1", "extraArg2"); + }; + +.. _create_context_with_createrealmcontext: + +Create Context with createRealmContext() +---------------------------------------- + +.. code:: typescript + :copyable: false + :caption: Type signature + + createRealmContext(realmConfig?): RealmContext + +Use ``createRealmContext()`` to configure more than one database. The ``createRealmContext()`` +method creates a `React Context `__ +object for a database with a given :realm-react-sdk:`Configuration +`. The ``Context`` object contains the following: + +- A Context Provider component that wraps around child components + and provides them with access to Hooks. +- Various prebuilt Hooks that access the configured database. + +To work with more than one database, you need to destructure a new provider and its +associated Hooks from the result of ``createRealmContext()``. You can call this new database +provider and use its associated Hooks the same way you would with the ``RealmProvider`` +imported from the ``@realm/react`` library. Namespace your providers to avoid confusion about +which provider and Hooks you're working with. + +*Parameters* + +- ``realmConfig?: Realm.Configuration`` All properties of :realm-react-sdk:`BaseConfiguration + ` can be used. + +*Returns* + +- ``RealmContext`` An object containing a ``RealmProvider`` component, and the ``useRealm``, + ``useQuery`` and ``useObject`` Hooks. + +For a detailed guide, refer to :ref:`Expose More Than One Database `. \ No newline at end of file diff --git a/source/frameworks/react/quick-start.txt b/source/frameworks/react/quick-start.txt new file mode 100644 index 0000000000..6eb5c218ac --- /dev/null +++ b/source/frameworks/react/quick-start.txt @@ -0,0 +1,14 @@ +.. _sdks-react-quick-start: + +============================ +Quick Start for @realm/react +============================ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/react-to-changes.txt b/source/frameworks/react/react-to-changes.txt new file mode 100644 index 0000000000..cf7f39b459 --- /dev/null +++ b/source/frameworks/react/react-to-changes.txt @@ -0,0 +1,14 @@ +.. _sdks-react-react-to-changes: + +================ +React to Changes +================ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/read-write.txt b/source/frameworks/react/read-write.txt new file mode 100644 index 0000000000..36acafd058 --- /dev/null +++ b/source/frameworks/react/read-write.txt @@ -0,0 +1,14 @@ +.. _sdks-react-read-write: + +================= +Read & Write Data +================= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/sync-data.txt b/source/frameworks/react/sync-data.txt new file mode 100644 index 0000000000..71c89a76cc --- /dev/null +++ b/source/frameworks/react/sync-data.txt @@ -0,0 +1,14 @@ +.. _sdks-react-sync-data: + +========= +Sync Data +========= + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/frameworks/react/test-debug.txt b/source/frameworks/react/test-debug.txt new file mode 100644 index 0000000000..225137ecee --- /dev/null +++ b/source/frameworks/react/test-debug.txt @@ -0,0 +1,14 @@ +.. _sdks-react-test-debug: + +============ +Test & Debug +============ + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Placeholder page for information about building with @realm/react. (This may +be a directory as we have two pages for this?) \ No newline at end of file diff --git a/source/sdk/files/configure-and-open.txt b/source/sdk/files/configure-and-open.txt index 3d5c090a30..34625c94c7 100644 --- a/source/sdk/files/configure-and-open.txt +++ b/source/sdk/files/configure-and-open.txt @@ -42,3 +42,8 @@ Open a Database Asynchronously Provide a Subset of Models to a Database ---------------------------------------- +.. _sdks-expose-more-than-one-database: + +Expose More Than One Database +----------------------------- + From ccb45ee77d45ead6ba1c5e3d977d7e1e190d8b65 Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 16 Aug 2024 15:12:38 -0400 Subject: [PATCH 60/63] (DOCSP-39546): Port SwiftUI content for consolidated docs (#3365) ## Pull Request Info - SDK Docs Consolidation This PR ports the existing SwiftUI content over to the Frameworks section, updates Realm naming, and removes PBS mentions and examples. Jira ticket: https://jira.mongodb.org/browse/DOCSP-39546 ### Staging Links - [Object Models - SwiftUI](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/model-data/define-an-object-model/) - [Change an Object Model - SwiftUI](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/model-data/change-an-object-model/) - [Configure and Open a Database - SwiftUI](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/configure-and-open-database/) - [React to Changes - SwiftUI](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/react-to-changes/) - [Pass Data Between SwiftUI Views](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/pass-data-between-views/) - [Write Data - SwiftUI](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/write/) - [Filter Data - SwiftUI](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/filter-data/) - [Handle Sync Errors - SwiftUI](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/handle-sync-errors/) - [Sync Data in the Background - SwiftUI](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/background-sync/) - [Use the SDK with SwiftUI Previews](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39546/frameworks/swiftui/swiftui-previews/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [SwiftUI section](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/swiftui/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [ ] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [ ] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [ ] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [ ] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [ ] Shared code boxes have snippets or placeholders for all 9 languages - [ ] API description sections have API details or a generic placeholder for all 9 languages - [ ] Check related pages for relevant content to include - [ ] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --- source/frameworks/swiftui.txt | 9 + source/frameworks/swiftui/background-sync.txt | 311 +++++++++++++++++ .../swiftui/configure-and-open-database.txt | 165 +++++++++ source/frameworks/swiftui/filter-data.txt | 95 ++++++ .../frameworks/swiftui/handle-sync-errors.txt | 72 ++++ source/frameworks/swiftui/model-data.txt | 12 + .../model-data/change-an-object-model.txt | 145 ++++++++ .../model-data/define-an-object-model.txt | 133 ++++++++ .../swiftui/pass-data-between-views.txt | 79 +++++ source/frameworks/swiftui/quick-start.txt | 6 +- .../frameworks/swiftui/react-to-changes.txt | 116 +++++++ .../frameworks/swiftui/swiftui-previews.txt | 323 ++++++++++++++++++ source/frameworks/swiftui/write.txt | 209 ++++++++++++ ...ify-schema-properties-of-synced-realms.rst | 8 +- .../note-observedresults-swiftui-view.rst | 2 +- .../tip-swift-migrate-to-flexible-sync.rst | 7 - ...code-set-up-background-task-in-project.rst | 31 -- source/sdk/files/configure-and-open.txt | 10 +- temp/swift/swiftui/filter-data.txt | 73 ++-- 19 files changed, 1725 insertions(+), 81 deletions(-) create mode 100644 source/frameworks/swiftui/background-sync.txt create mode 100644 source/frameworks/swiftui/configure-and-open-database.txt create mode 100644 source/frameworks/swiftui/filter-data.txt create mode 100644 source/frameworks/swiftui/handle-sync-errors.txt create mode 100644 source/frameworks/swiftui/model-data.txt create mode 100644 source/frameworks/swiftui/model-data/change-an-object-model.txt create mode 100644 source/frameworks/swiftui/model-data/define-an-object-model.txt create mode 100644 source/frameworks/swiftui/pass-data-between-views.txt create mode 100644 source/frameworks/swiftui/react-to-changes.txt create mode 100644 source/frameworks/swiftui/swiftui-previews.txt create mode 100644 source/frameworks/swiftui/write.txt delete mode 100644 source/includes/tip-swift-migrate-to-flexible-sync.rst delete mode 100644 source/includes/xcode-set-up-background-task-in-project.rst diff --git a/source/frameworks/swiftui.txt b/source/frameworks/swiftui.txt index 4fe996a62f..8a6c77d0ee 100644 --- a/source/frameworks/swiftui.txt +++ b/source/frameworks/swiftui.txt @@ -8,3 +8,12 @@ Build with SwiftUI :titlesonly: Quick Start + Model Data + Configure and Open a Database + React to Changes + Pass Data Between Views + Write Data + Filter Data + Handle Sync Errors + Sync Data in the Background + Use the SDK with SwiftUI Previews diff --git a/source/frameworks/swiftui/background-sync.txt b/source/frameworks/swiftui/background-sync.txt new file mode 100644 index 0000000000..09e1f13647 --- /dev/null +++ b/source/frameworks/swiftui/background-sync.txt @@ -0,0 +1,311 @@ +.. _swiftui-background-sync: + +===================================== +Sync Data in the Background - SwiftUI +===================================== + +.. meta:: + :description: Learn how to use a SwiftUI BackgroundTask to sync data in the background. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Overview +-------- + +You can use a SwiftUI :apple:`BackgroundTask ` +to update a synced database when your app is in the background. This example +demonstrates how to configure and perform background syncing in an iOS app. + +You can follow along with the example on this page using the SwiftUI Device +Sync Template App. To get your own copy of the SwiftUI Device Sync +Template App, check out the :ref:`Device Sync SwiftUI tutorial +` and go through the :guilabel:`Prerequisites` +and :guilabel:`Start with the Template` sections. + +Enable Background Modes for Your App +------------------------------------ + +To enable background tasks for your app: + +.. procedure:: + + .. step:: Add Background Modes Capability + + Select your app Target, go to the :guilabel:`Signing & Capabilities` + tab, and click :guilabel:`+ Capability` to add the capability. + + .. figure:: /images/xcode-select-target-add-capability.png + :alt: Screenshot of Xcode with app Target selected, Signing & Capabilities tab open, and arrow pointing to add Capabilities. + :lightbox: + + Search for "background", and select :guilabel:`Background Modes`. + + .. step:: Select Background Modes + + Now you should see a :guilabel:`Background Modes` section in your + :guilabel:`Signing & Capabilities` tab. Expand this section, and + click the checkboxes to enable :guilabel:`Background fetch` and + :guilabel:`Background processing`. + + .. step:: Update the Info.plist + + Go to your project's :file:`Info.plist`, and add a new row for + ``Permitted background task scheduler identifiers``. If you are + viewing raw keys and values, the key is + ``BGTaskSchedulerPermittedIdentifiers``. This field is an array. + Add a new item to it for your background task identifier. Set the + new item's value to the string you intend to use as the identifier + for your background task. For example: ``refreshTodoRealm``. + +Schedule a Background Task +-------------------------- + +After enabling background processes for your app, you can start adding the +code to the app to schedule and execute a background task. First, import +``BackgroundTasks`` in the files where you will write this code: + +.. code-block:: swift + :emphasize-lines: 3 + + import SwiftUI + import RealmSwift + import BackgroundTasks + +Now you can add a scheduled background task. If you're following along +via the Template App, you can update your ``@main`` view: + +.. code-block:: swift + :emphasize-lines: 3, 9-14 + + @main + struct realmSwiftUIApp: SwiftUI.App { + @Environment(\.scenePhase) private var phase + + var body: some Scene { + WindowGroup { + ContentView(app: realmApp) + } + .onChange(of: phase) { newPhase in + switch newPhase { + case .background: scheduleAppRefresh() + default: break + } + } + } + +You can add an environment variable to store a change to the ``scenePhase``: +``@Environment(\.scenePhase) private var phase``. + +Then, you can add the ``.onChange(of: phase)`` block that calls the +``scheduleAppRefresh()`` function when the app goes into the background. + +Create the ``scheduleAppRefresh()`` function: + +.. code-block:: swift + + func scheduleAppRefresh() { + let backgroundTask = BGAppRefreshTaskRequest(identifier: "refreshTodoRealm") + backgroundTask.earliestBeginDate = .now.addingTimeInterval(10) + try? BGTaskScheduler.shared.submit(backgroundTask) + } + +This schedules the work to execute the background task whose identifier you +added to the Info.plist above when you enabled Background Modes. In this +example, the identifier ``refreshTodoRealm`` refers to this task. + +Create the Background Task +-------------------------- + +Now that you've scheduled the background task, you need to create the background +task that will run to update the synced realm. + +If you're following along with the Template App, you can add this +``backgroundTask`` to your ``@main`` view, after the ``.onChange(of: phase)``: + +.. code-block:: swift + :emphasize-lines: 7-23 + + .onChange(of: phase) { newPhase in + switch newPhase { + case .background: scheduleAppRefresh() + default: break + } + } + .backgroundTask(.appRefresh("refreshTodoRealm")) { + guard let user = realmApp.currentUser else { + return + } + let config = user.flexibleSyncConfiguration(initialSubscriptions: { subs in + if let foundSubscription = subs.first(named: "user_tasks") { + foundSubscription.updateQuery(toType: Item.self, where: { + $0.owner_id == user.id + }) + } else { + subs.append(QuerySubscription(name: "user_tasks") { + $0.owner_id == user.id + }) + } + }, rerunOnOpen: true) + await refreshSyncedRealm(config: config) + } + +This background task first checks that your app has a logged-in user. If so, +it sets a :swift-sdk:`.flexibleSyncConfiguration +` +with a :ref:`subscription ` the +app can use to sync the realm. + +This is the same configuration used in the Template App's ``ContentView``. +However, to use it here you need access to it farther up the view hierarchy. +You could refactor this to a function you can call from either view that +takes a :swift-sdk:`User ` as a +parameter and returns a :swift-sdk:`Realm.configuration +`. + +Finally, this task awaits the result of a function that actually syncs the +database. Add this function: + +.. code-block:: swift + + func refreshSyncedRealm(config: Realm.Configuration) async { + do { + try await Realm(configuration: config, downloadBeforeOpen: .always) + } catch { + print("Error opening the Synced realm: \(error.localizedDescription)") + } + } + +By opening this synced database and using the ``downloadBeforeOpen`` parameter +to specify that you want to download updates, you load the fresh data into +the database in the background. Then, when your app opens again, it already +has the updated data on the device. + +.. important:: + + Do not try to write to the database directly in this background task. You + may encounter threading-related issues due to the SDK's thread-confined + architecture. + +Test Your Background Task +------------------------- + +When you schedule a background task, you are setting the earliest time that +the system could execute the task. However, the operating system factors in +many other considerations that may delay the execution of the background task +long after your scheduled ``earliestBeginDate``. Instead of waiting for a +device to run the background task to verify it does what you intend, you can +set a breakpoint and use LLDB to invoke the task. + +.. procedure:: + + .. step:: Configure a Device to Run Your App + + To test that your background task is updating the synced database in the + background, you'll need a physical device running at minimum iOS 16. + Your device must be configured to run in :apple:`Developer Mode + `. If you get an + ``Untrusted Developer`` notification, go to :guilabel:`Settings`, + :guilabel:`General`, and :guilabel:`VPN & Device Management`. Here, you + can verify that you want to run the app you're developing. + + Once you can successfully run your app on your device, you can test the + background task. + + .. step:: Set a Breakpoint + + Start by setting a breakpoint in your ``scheduleAppRefresh()`` function. + Set the breakpoint *after* the line where you submit the task to + ``BGTaskScheduler``. For this example, you might add a ``print`` line and + set the breakpoint at the print line: + + .. code-block:: swift + :emphasize-lines: 5 + + func scheduleAppRefresh() { + let backgroundTask = BGAppRefreshTaskRequest(identifier: "refreshTodoRealm") + backgroundTask.earliestBeginDate = .now.addingTimeInterval(10) + try? BGTaskScheduler.shared.submit(backgroundTask) + print("Successfully scheduled a background task") // Set a breakpoint here + } + + .. step:: Run the App + + Now, run the app on the connected device. Create or sign into an account + in the app. If you're using the SwiftUI Template App, create some Items. + You should see the Items sync to the ``Item`` collection linked to your + Atlas App Services app. + + Then, while leaving the app running in Xcode, send the app to the background + on your device. You should see the console print "Successfully scheduled a + background task" and then get an LLDB prompt. + + .. step:: Add or Change Data in Atlas + + While the app is in the background but still running in Xcode, Insert a new + document in the relevant Atlas collection that should sync to the device. + Alternately, change a value of an existing document that you created from + the device. After successfully running the background task, you should + see this data synced to the device from the background process. + + If you're using the SwiftUI Template App, you can find relevant documents + in your Atlas cluster's ``Item`` collection. For more information on how + to add or change documents in Atlas, see: :atlas:`MongoDB Atlas: Create, + View, Update, and Delete Documents `. + + .. step:: Invoke the Background Task in LLDB + + Use this command to manually execute the background task in LLDB: + + .. code-block:: shell + + e -l objc -- (void)[[BGTaskScheduler sharedScheduler] _simulateLaunchForTaskWithIdentifier:@"refreshTodoRealm"] + + If you have used a different identifier for your background task, replace + ``refreshTodoRealm`` with your task's identifier. This causes the task to + immediately begin executing. + + If successful, you should see something like: + + .. code-block:: shell + + 2022-11-11 15:09:10.403242-0500 App[1268:196548] Simulating launch for task with identifier refreshTodoRealm + 2022-11-11 15:09:16.530201-0500 App[1268:196811] Starting simulated task + + After you have kicked off the task, use the :guilabel:`Continue program execution` + button in the Xcode debug panel to resume running the app. + + .. step:: Turn on Airplane Mode on the Device + + After waiting for the background task to complete, but before you open the + app again, turn on Airplane Mode on the device. Make sure you have turned + off WiFi. This ensures that when you open the app again, it doesn't + start a fresh Sync and you see only the values that are now in the database + on the device. + + .. step:: Open the App + + Open the app on the device. You should see the updated data that you changed + in Atlas. + + To verify the updates came through the background task, confirm you have + successfully disabled the network. + + Create a new task using the app. You should see the task in the app, but + it should not sync to Atlas. Alternately, you could create or change data + in Atlas, but should not see it reflected on the device. + + This tells you that the network has successfully been disabled, + and the updated data that you see came through the background task. diff --git a/source/frameworks/swiftui/configure-and-open-database.txt b/source/frameworks/swiftui/configure-and-open-database.txt new file mode 100644 index 0000000000..8d0d61f0d7 --- /dev/null +++ b/source/frameworks/swiftui/configure-and-open-database.txt @@ -0,0 +1,165 @@ +.. _swiftui-open-database: + +======================================= +Configure and Open a Database - SwiftUI +======================================= + +.. meta:: + :description: Use the SDK's built in SwiftUI property wrappers to configure and open a database. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +The Swift SDK provides property wrappers to open a database in a +SwiftUI-friendly way. + +You can: + +- :ref:`Implicitly open a database ` + with a ``defaultConfiguration`` or specify a different configuration. + This works for both non-synced and synced databases. +- :ref:`Always download changes before opening a synced database + `, which times out when the user is offline. +- :ref:`Open a synced database even when a user is offline + `. The database may lack the most recent data. + +.. _swiftui-open-database-with-configuration: + +Open a Database with a Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you use :swift-sdk:`@ObservedRealmObject ` +or :swift-sdk:`@ObservedResults `, these +property wrappers implicitly open a database and retrieve the specified +objects or results. + +.. literalinclude:: /examples/generated/swiftui/PassObjectsToView.snippet.implicitly-open-realm.swift + :language: swift + +.. include:: /includes/note-observedresults-swiftui-view.rst + +When you do not specify a configuration, these property wrappers use the +:swift-sdk:`defaultConfiguration `. +You can :ref:`set the defaultConfiguration ` +globally, and property wrappers across the app can use that configuration +when they implicitly open a database. + +You can provide alternative configurations that the property wrappers use +to implicitly open the database. You might want to do this when using +multiple configurations in your app, as in cases where you have both +a :swift-sdk:`SyncConfiguration ` and +a local :swift-sdk:`Configuration `. +To do this, :ref:`create explicit configurations `. +Then, :ref:`use environment injection to pass the respective configurations +to the views that need them `. +Passing a configuration to a view where property wrappers open a database +uses the passed configuration instead of the ``defaultConfiguration``. + +.. _swiftui-open-synced-database: + +Open a Synced Database +~~~~~~~~~~~~~~~~~~~~~~ + +.. versionadded:: 10.12.0 + +These SwiftUI property wrappers open synced databases and populate views. +The main difference between these property wrappers is whether the user +must be online: + +- To download updates from your Atlas App Services app before opening a database, + use the :ref:`@AsyncOpen ` property wrapper. + This requires the user to have a network connection. +- To open a synced database regardless of whether the user has a network + connection, use the :ref:`@AutoOpen ` + property wrapper. This property wrapper enables developers to design + offline-first capabilities into their apps. + +.. _swiftui-async-open-synced-database: + +Download Changes Before Opening a Synced Database +````````````````````````````````````````````````` + +Use the :swift-sdk:`@AsyncOpen ` property wrapper +for apps that require up-to-date information from the server, such as game +apps with live leaderboards that the user can play on multiple devices. This +ensures the user is never using the app with stale data. + +You can add subscription queries in ``.onAppear`` after opening the database. + +.. literalinclude:: /examples/generated/swiftui/OpenRealm.snippet.fs-property-wrapper-sans-config-comment.swift + :language: swift + +You can create a :swift-sdk:`flexibleSyncConfiguration() +` +with the ``initialSubscriptions`` parameter. You can use this parameter +to :ref:`subscribe to Sync queries ` in the +configuration. If this runs more than once - for example, if it's in a view +that reloads regularly - check whether the subscription exists already +before adding it. Adding the same subscription again throws an error. + +.. literalinclude:: /examples/generated/swiftui/Authenticate.snippet.flexible-sync-config.swift + :language: swift + +Then, pass the configuration to the view that contains the property +wrappers as an environment object. + +.. literalinclude:: /examples/generated/swiftui/Authenticate.snippet.inject-flex-sync-config-as-environment-object.swift + :language: swift + +For a complete example, see the :ref:`SwiftUI Quick Start `. + +This SwiftUI property wrapper initiates ``Realm.asyncOpen()`` for the current +user. The property wrapper publishes states, represented by the :swift-sdk:`AsyncOpenState +enum `, +which you can use to update the view. + +.. example:: + + This example illustrates one way you might use ``@AsyncOpen`` to + open a database in a view. First, check for a user, or log them in. + Then, attempt to open the database, switching on the ``AsyncOpenState`` + to display an appropriate view. When the database opens successfully, + inject it as an environment value to populate the view. + + .. literalinclude:: /examples/generated/swiftui/OpenRealm.snippet.open-realm-view-flex-sync.swift + :language: swift + +.. _swiftui-auto-open-synced-database: + +Open a Synced Database Offline +`````````````````````````````` + +Like ``@AsyncOpen``, :swift-sdk:`@AutoOpen ` attempts +to download updates before opening the database. However, if a network +connection is not available, this method instead opens a database with +data on the device. + +Use this property wrapper for apps where it's not a problem for the user +to work with potentially stale data, such as note-taking apps where users +should be able to work with data on the device + +.. code-block:: swift + + @AutoOpen(appId: "app_id") var autoOpen + +This SwiftUI property wrapper attempts to download updates before opening a +database for the current user. If there is no internet connection, this property +wrapper instead returns the most up-to-date version of the local database file +for the given ``appId`` and Sync configuration. + +The property wrapper publishes states, represented by the :swift-sdk:`AsyncOpenState +enum `, +which you can use to update the view. For a full example, see the ``@AsyncOpen`` +code examples above. diff --git a/source/frameworks/swiftui/filter-data.txt b/source/frameworks/swiftui/filter-data.txt new file mode 100644 index 0000000000..a94d3894cc --- /dev/null +++ b/source/frameworks/swiftui/filter-data.txt @@ -0,0 +1,95 @@ +===================== +Filter Data - SwiftUI +===================== + +.. meta:: + :description: Extend Apple's .searchable implementation to SDK objects, filter or query ObservedResults, or section results. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Observe in SwiftUI Views +------------------------ + +The ``@ObservedResults`` property wrapper used in the examples on this page +is intended for use in a SwiftUI View. If you want to observe results +in a view model instead, :ref:`register a change listener +`. + +Search an SDK Collection +------------------------ + +The Swift SDK allows you to extend :apple:`.searchable +`. +When you use :swift-sdk:`ObservedResults ` +to query a realm, you can specify collection and keypath in the result set +to mark it as searchable. + +The collection is the bound collection represented by your ``ObservedResults`` +query. In this example, it is the ``dogs`` variable that represents the +collection of all Dog objects in the database. + +The keypath is the object property that you want to search. In this +example, we search the dogs collection by dog name. The SDK's +``.searchable`` implementation only supports keypaths with ``String`` types. + +.. literalinclude:: /examples/generated/swiftui/FilterData.snippet.searchable.swift + :language: swift + +Filter or Query a Database with ObservedResults +----------------------------------------------- + +The :swift-sdk:`@ObservedResults ` property wrapper +opens a database and returns all objects of the specified type. However, you +can filter or query ``@ObservedResults`` to use only a subset of the objects +in your view. + +.. seealso:: + + For more information about the query syntax and types of queries that the + SDK supports, refer to: :ref:`Read ` and + :ref:`sdks-filter-data-swift`. + +Query with the Swift Query API +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To use ``@ObservedResults`` with the :ref:`Swift Query API +`, pass a query in a closure as an argument to +``where``: + +.. literalinclude:: /examples/generated/swiftui/FilterData.snippet.type-safe-query-filter.swift + :language: swift + +Filter with an NSPredicate +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To filter ``@ObservedResults`` using the :ref:`NSPredicate Query API +`, pass an :apple:`NSPredicate +` as an argument to ``filter``: + +.. literalinclude:: /examples/generated/swiftui/FilterData.snippet.nspredicate-filter.swift + :language: swift + +Section Results +--------------- + +The :swift-sdk:`@ObservedSectionedResults ` +property wrapper opens a database and returns all objects of the specified type, +divided into sections by the specified key path. Similar to +``@ObservedResults`` above, you can filter or query ``@ObservedSectionedResults`` +to use only a subset of the objects in your view: + +.. literalinclude:: /examples/generated/swiftui/FilterData.snippet.observed-filtered-sectioned-results.swift + :language: swift diff --git a/source/frameworks/swiftui/handle-sync-errors.txt b/source/frameworks/swiftui/handle-sync-errors.txt new file mode 100644 index 0000000000..e33a06b832 --- /dev/null +++ b/source/frameworks/swiftui/handle-sync-errors.txt @@ -0,0 +1,72 @@ +.. _swiftui-handle-sync-errors: + +============================ +Handle Sync Errors - SwiftUI +============================ + +.. meta:: + :description: Learn how to handle Sync errors in your SwiftUI-based app. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. _swiftui-register-sync-error-handler: + +Handle Sync Errors +------------------ + +While developing an application that uses Device Sync, set an error handler. +This error handler detects and responds to any failed sync-related API calls. + +.. seealso:: + + For a complete example app with a working Sync error handler implementation, + :ref:`create a template app ` and check out + :ref:`the SwiftUI client `. The error handler + implementation is in the :file:`App.swift` file. + +For a SwiftUI-friendly implementation of a Sync error handler, create +an ``ObservableObject`` with an optional ``@Published`` variable to contain +a potential error. This handler uses the :swift-sdk:`SyncManager +` to listen for errors. +The ``SyncManager`` reports errors of the type ``SyncError``, and it also +reports other connection issues. + +For more information, refer to the underlying Objective-C :objc-sdk:`RLMSyncError +`. + +.. literalinclude:: /examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-error-handler.swift + :language: swift + +.. include:: /includes/sync-errors-in-app-services.rst + +Initialize the error handler as a ``@StateObject``. Inject it into the +view hierarchy as an environment object. In this example, we display an +``.alert`` to the user when a Sync error occurs. + +.. literalinclude:: /examples/generated/swiftui/HandleSyncErrors.snippet.swiftui-app-with-error-handler.swift + :language: swift + +Then, in the view where you are observing the SDK ``App``, you can use the +error handler as an ``@EnvironmentObject`` to react to Sync errors. An +error that occurs here pops up an alert for the user, using the ``.alert`` +set in the view above. + +.. literalinclude:: /examples/generated/swiftui/HandleSyncErrors.snippet.use-app-and-error-handler-in-next-view.swift + :language: swift + +.. TODO: Re-test and add the section in the following file: +.. `includes/swiftui-handle-client-reset-error.rst` after realm-swift merges +.. this PR: https://github.com/realm/realm-swift/pull/8109 diff --git a/source/frameworks/swiftui/model-data.txt b/source/frameworks/swiftui/model-data.txt new file mode 100644 index 0000000000..a3c1e69a10 --- /dev/null +++ b/source/frameworks/swiftui/model-data.txt @@ -0,0 +1,12 @@ +==================== +Model Data - SwiftUI +==================== + +.. toctree:: + :titlesonly: + + Object Models + Change an Object Model + +- :doc:`Object Models ` +- :doc:`Change an Object Model ` diff --git a/source/frameworks/swiftui/model-data/change-an-object-model.txt b/source/frameworks/swiftui/model-data/change-an-object-model.txt new file mode 100644 index 0000000000..980c539e7c --- /dev/null +++ b/source/frameworks/swiftui/model-data/change-an-object-model.txt @@ -0,0 +1,145 @@ +.. _swiftui-realm-migrations: + +================================ +Change an Object Model - SwiftUI +================================ + +.. meta:: + :description: Learn how to update your data model and perform migrations in an app that uses Atlas Device SDK SwiftUI property wrappers. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +When you update your object schema, you must increment the schema version +and perform a migration. You might update your object schema between major +version releases of your app. + +For information on how to actually perform the migration, see: +:ref:`Change an Object Model `. + +This page focuses on how to use migrated data in SwiftUI Views. + +.. include:: /includes/note-modify-schema-properties-of-synced-realms.rst + +Use Migrated Data with SwiftUI +------------------------------ + +To perform a migration: + +- Update your schema and write a migration block, if required +- Specify a :swift-sdk:`Realm.Configuration ` + that uses this migration logic and/or updated schema version when you + initialize your database. + +From here, you have a few options to pass the configuration object. You can: + +- Set the configuration as the :ref:`default configuration + `. If you do not explicitly pass the + configuration via environment injection or as a parameter, property + wrappers use the default configuration. +- Use environment injection to provide this configuration to the first view + in your hierarchy that uses the database +- Explicitly provide the configuration to an SDK property wrapper that takes + a configuration object, such as ``@ObservedResults`` or ``@AsyncOpen``. + +.. example:: + + For example, you might want to add a property to an existing object. We + could add a ``favoriteTreat`` property to the ``Dog`` object in DoggoDB: + + .. code-block:: swift + :copyable: false + + @Persisted var favoriteTreat = "" + + After you add your new property to the schema, you must increment the + schema version. Your ``Realm.Configuration`` might look like this: + + .. literalinclude:: /examples/generated/swiftui/SyncOrLocalRealm.snippet.update-schema-version.swift + :language: swift + :copyable: false + + Declare this configuration somewhere that is accessible to the first view + in the hierarchy that needs it. Declaring this above your ``@main`` app + entrypoint makes it available everywhere, but you could also put it in + the file where you first open a realm. + +Set a Default Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can set a default configuration in a SwiftUI app the same as any other +SDK app. Set the default database configuration by assigning a new +``Realm.Configuration`` instance to the +:swift-sdk:`Realm.Configuration.defaultConfiguration +` +class property. + +.. literalinclude:: /examples/generated/code/start/OpenCloseRealm.snippet.open-local-realm.swift + :language: swift + +Pass the Configuration Object as an Environment Object +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Once you have declared the configuration, you can inject it as an environment +object to the first view in your hierarchy that opens a database. If you are +using the ``@ObservedResults`` or ``@ObservedRealmObject`` property wrappers, +these views implicitly open a database, so they also need access to this +configuration. + +.. code-block:: swift + :copyable: false + + .environment(\.realmConfiguration, config) + +If your app uses either a non-synced or a synced database, the first view in +the hiearchy that opens a database varies depending on whether you're using +the app with or without Sync. + +Without sync, you can pass the database configuration environment object +directly to the ``LocalOnlyContentView``: + +.. literalinclude:: /examples/generated/swiftui/SyncOrLocalRealm.snippet.pass-config-environment-object.swift + :language: swift + +Which opens a database implicitly with: + +.. literalinclude:: /examples/generated/swiftui/PassObjectsToView.snippet.local-only-view.swift + :language: swift + +However, when your app uses Sync, you open the database explicitly using the +``@AsyncOpen`` or ``@AutoOpen`` property wrapper: + +.. literalinclude:: /examples/generated/swiftui/OpenRealm.snippet.open-realm-view-flex-sync.swift + :language: swift + +So you must pass the environment object to the view that explicitly +opens the database. In this case, the ``OpenFlexibleSyncRealmView``. + +The important thing to remember is to make sure to pass the +``Realm.Configuration`` that encompasses your migration logic to any view +hierarchy that implicitly or explicitly opens a database. + +Explicitly Pass the Updated Configuration to an SDK SwiftUI Property Wrapper +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can explicitly pass the configuration object to an SDK SwiftUI +property wrapper that takes a configuration object, such as ``@ObservedResults`` +or ``@AutoOpen``. In this case, you might pass it directly to ``@ObservedResults`` +in our ``DogsView``. + +.. code-block:: swift + + // Use a `config` that you've passed in from above. + @ObservedResults(Dog.self, configuration: config) var dogs diff --git a/source/frameworks/swiftui/model-data/define-an-object-model.txt b/source/frameworks/swiftui/model-data/define-an-object-model.txt new file mode 100644 index 0000000000..5fa9d32ce5 --- /dev/null +++ b/source/frameworks/swiftui/model-data/define-an-object-model.txt @@ -0,0 +1,133 @@ +.. _swiftui-object-models: + +======================= +Object Models - SwiftUI +======================= + +.. meta:: + :description: Model SDK objects for SwiftUI, and bind them to your views. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Concepts: Object Models and Relationships +----------------------------------------- + +Modeling data for SwiftUI builds on the same object model and relationship +concepts in Atlas Device SDK. If you are unfamiliar with the SDK's data +modeling concepts, refer to: :ref:`sdks-object-models`. + +Binding the Object Model to the UI +---------------------------------- + +The Model-View-ViewModel (MVVM) design pattern advocates creating a view +model that abstracts the model from the View code. While you can certainly +do that with the SDK, the Swift SDK provides tools that make it easy to +work directly with your data in SwiftUI Views. These tools include things +like: + +- Property wrappers that create bindings to underlying observable objects +- A class to project and transform underlying model objects for use in + specific views + +Transforming Data for SwiftUI Views +----------------------------------- + +The Swift SDK provides a special type of object, called a +:swift-sdk:`Projection `, to transform +and work with subsets of your data. Consider a projection similar to +a view model. It lets you pass through or transform the original +object's properties in different ways: + +- Passthrough: The projection's property has the same name and type as + the original object. +- Rename: The projection's property has the same type as the original object, + but a different name. +- Keypath resolution: Use this to access specific properties of the + projected Object. +- Collection mapping: You can map some :ref:`collection types + ` to a collection of primitive values. +- Exclusion: All properties of the original SDK object not defined in + the projection model. Any changes to those properties do not trigger a + change notification when observing the projection. + +When you use a Projection, you get all the benefits of the SDK's +live objects: + +- The class-projected object live updates +- You can observe it for changes +- You can apply changes directly to the properties in write transactions + +.. _swiftui-model: + +Define a New Object +------------------- + +You can define an SDK object by deriving from the +:swift-sdk:`Object ` or +:swift-sdk:`EmbeddedObject ` +class. The name of the class becomes the table name in the database, +and properties of the class persist in the database. This makes it +as easy to work with persisted objects as it is to work with +regular Swift objects. + +The SwiftUI documentation uses a model for a fictional app, +DoggoDB. This app is a company directory of employees who have dogs. It +lets people share a few details about their dogs with other employees. + +The data model includes a Person object, with a :ref:`to-many +relationship ` to that person's Dog objects. +It also uses a special Realm Swift SDK data type, :swift-sdk:`PersistableEnum +`, to store information +about the person's business unit. + +.. literalinclude:: /examples/generated/swiftui/Model.snippet.objects.swift + :language: swift + +.. seealso:: + + For complete details about defining an SDK object model, see: + + - :ref:`Object Models ` + - :ref:`Relationships ` + - :ref:`Property Types ` + +.. _swiftui-projection: + +Define a Projection +------------------- + +Our fictional DoggoDB app has a user Profile view. This view displays +some details about the person, but we don't need all of the properties +of the ``Person`` model. We can create a :swift-sdk:`Projection +` with only the details we want. We can also modify +the ``lastName`` property to use just the first initial of the last name. + +.. literalinclude:: /examples/generated/swiftui/Model.snippet.projection.swift + :language: swift + +We can use this projection in the Profile view instead of the original +``Person`` object. + +Class projection works with SwiftUI property wrappers: + +- :swift-sdk:`ObservedRealmObject ` +- :swift-sdk:`ObservedResults ` + +.. seealso:: + + For a complete example of using a class projection in a SwiftUI + application, see :github:`the Projections example app + `. diff --git a/source/frameworks/swiftui/pass-data-between-views.txt b/source/frameworks/swiftui/pass-data-between-views.txt new file mode 100644 index 0000000000..2610beb8d5 --- /dev/null +++ b/source/frameworks/swiftui/pass-data-between-views.txt @@ -0,0 +1,79 @@ +.. _swiftui-pass-data-between-views: + +================================= +Pass Data Between Views - SwiftUI +================================= + +.. meta:: + :description: Pass SDK objects explicitly to child views, access data in child views with property wrappers, or pass environment values to access the database. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Atlas Device SDK provides several ways to pass SDK data between views: + +- Pass SDK objects to a view +- Use environment injection to: + + - Inject an opened database into a view + - Inject a database configuration into a view + +Pass SDK Objects to a View +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you use the ``@ObservedRealmObject`` or ``@ObservedResults`` property +wrapper, you implicitly open a database and retrieve the specified objects +or results. You can then pass those objects to a view further down the +hierarchy. + +.. literalinclude:: /examples/generated/swiftui/PassObjectsToView.snippet.implicitly-open-realm-and-pass-objects.swift + :language: swift + +.. _swiftui-pass-environment-values: + +Pass Environment Values +~~~~~~~~~~~~~~~~~~~~~~~ + +:apple:`Environment ` injection is a +useful tool in SwiftUI development with the SDK. +Atlas Device SDK property wrappers provide different ways for you to +work with environment values when developing your SwiftUI application. + +.. _swiftui-inject-database-as-environment-value: + +Inject an Opened Database +````````````````````````` + +You can inject a database that you opened in another SwiftUI view into +a view as an environment value. The property wrapper uses this passed-in +database to populate the view: + +.. code-block:: swift + + ListView() + .environment(\.realm, realm) + +.. _swiftui-inject-database-configuration: + +Inject a Database Configuration +``````````````````````````````` + +You can use a database other than the default database by passing a different +configuration in an environment object. + +.. code-block:: swift + + LocalOnlyContentView() + .environment(\.realmConfiguration, Realm.Configuration( /* ... */ )) diff --git a/source/frameworks/swiftui/quick-start.txt b/source/frameworks/swiftui/quick-start.txt index f4161d5187..d131f755db 100644 --- a/source/frameworks/swiftui/quick-start.txt +++ b/source/frameworks/swiftui/quick-start.txt @@ -1,8 +1,8 @@ .. _ios-swiftui-quick-start: -======================== -Quick Start with SwiftUI -======================== +===================== +Quick Start - SwiftUI +===================== .. meta:: :description: Use Atlas Device SDK for Swift with SwiftUI property wrappers. diff --git a/source/frameworks/swiftui/react-to-changes.txt b/source/frameworks/swiftui/react-to-changes.txt new file mode 100644 index 0000000000..d158f46c2e --- /dev/null +++ b/source/frameworks/swiftui/react-to-changes.txt @@ -0,0 +1,116 @@ +========================== +React to Changes - SwiftUI +========================== + +.. meta:: + :description: Use the SDK's built in SwiftUI property wrappers to invalidate and update views when the database data changes. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. _swiftui-update-ui-when-objects-change: + +Observe an Object +----------------- + +The SDK provides the :swift-sdk:`@ObservedRealmObject +` property wrapper that invalidates a view +when an observed object changes. You can use this property wrapper to +create a view that automatically updates itself when the observed object +changes. + +.. literalinclude:: /examples/generated/swiftui/PassObjectsToView.snippet.dog-detail-view.swift + :language: swift + +.. _swiftui-update-ui-when-query-results-change: + +Observe Query Results +--------------------- + +The SDK provides the :swift-sdk:`@ObservedResults ` +property wrapper that lets you observe a collection of query results. You +can perform a quick write to an ``ObservedResults`` collection, and the view +automatically updates itself when the observed query changes. For example, +you can remove a dog from an observed list of dogs using ``onDelete``. + +.. include:: /includes/note-observedresults-swiftui-view.rst + +.. literalinclude:: /examples/generated/swiftui/PassObjectsToView.snippet.implicitly-open-realm-and-pass-objects.swift + :language: swift + +.. seealso:: + + For more information about the query syntax and types of queries that the + SDK supports, refer to: :ref:`Read ` and + :ref:`sdks-filter-data-swift`. + +Sort Observed Results +~~~~~~~~~~~~~~~~~~~~~ + +The :swift-sdk:`@ObservedResults ` +property wrapper can take a :swift-sdk:`SortDescriptor +` parameter to sort the query results. + +.. literalinclude:: /examples/generated/swiftui/FilterData.snippet.sort-descriptor.swift + :language: swift + +.. tip:: + + You cannot use a computed property as a ``SortDescriptor`` for ``@ObservedResults``. + +.. _swiftui-observe-sectioned-results: + +Observe Sectioned Results +~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. versionadded:: 10.29.0 + +You can observe a results set that is divided into sections by a key +generated from a property on the object. We've added a computed variable +to the model that we don't persist; we just use this to section the results +set. + +.. literalinclude:: /examples/generated/swiftui/Model.snippet.computed-var-sectioned-results.swift + :language: swift + +Then, we can use the :swift-sdk:`@ObservedSectionedResults +` property wrapper to +observe the results set divided into sections based on the computed variable +key. + +.. literalinclude:: /examples/generated/swiftui/SectionedResults.snippet.observed-sectioned-results.swift + :language: swift + +You might use these observed sectioned results to populate a List view +divided by sections: + +.. literalinclude:: /examples/generated/swiftui/SectionedResults.snippet.sectioned-dogs-list-view.swift + :language: swift + +.. _swiftui-react-to-login-state-changes: + +Observe App State +----------------- + +If your app uses Atlas Device Sync, you can observe the :swift-sdk:`App +` object to react to login state changes. This enables +your app to perform operations while it has an ``app.currentUser``, or direct +the user to log in if there is no ``app.currentUser``. + +Because the SDK caches user credentials on the device, your app can work +offline while it has an ``app.currentUser``. + +.. literalinclude:: /examples/generated/swiftui/Authenticate.snippet.flexible-sync-content-view.swift + :language: swift diff --git a/source/frameworks/swiftui/swiftui-previews.txt b/source/frameworks/swiftui/swiftui-previews.txt new file mode 100644 index 0000000000..6d83418746 --- /dev/null +++ b/source/frameworks/swiftui/swiftui-previews.txt @@ -0,0 +1,323 @@ +.. _swiftui-previews: + +================================= +Use the SDK with SwiftUI Previews +================================= + +.. meta:: + :description: Use and debug SwiftUI Previews while developing with the Atlas Device SDK for Swift. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 3 + :class: singlecol + +Overview +-------- + +SwiftUI Previews are a useful tool during development. You can work with the SDK +data in SwiftUI Previews in a few ways: + +- Initialize individual objects to use in detail views +- Conditionally use an array of objects in place of ``@ObservedResults`` +- Create a database that contains data for the previews + +SwiftUI Preview debugging can be opaque, so we also have a few tips to debug +issue with persisting Realms within SwiftUI Previews. + +.. _swift-use-objects-in-a-detail-view: + +Initialize an Object for a Detail View +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In the simplest case, you can use SwiftUI Previews with one or more objects +that use SDK properties you can set directly at initialization. +You might want to do this when previewing a Detail view. Consider DoggoDB's +``DogDetailView``: + +.. literalinclude:: /examples/generated/swiftui/PassObjectsToView.snippet.dog-detail-view.swift + :language: swift + +Create an extension for your model object. Where you put this extension depends +on convention in your codebase. You may put it directly in the model file, +have a dedicated directory for sample data, or use some other convention in +your codebase. + +In this extension, initialize one or more SDK objects with ``static let``: + +.. literalinclude:: /examples/generated/swiftui/Model.snippet.preview-extend-model-class-with-objects.swift + :language: swift + +In this example, we :ref:`initialize objects with a value +`. You can only initialize objects with +a value when your model contains properties that you can directly initialize. +If your model object contains properties that are only mutable within a +write transaction, such as a :ref:`List property `, +you must instead :ref:`create a database to use with your SwiftUI Previews +`. + +After you have initialized an object as an extension of your model class, +you can use it in your SwiftUI Preview. You can pass the object directly +to the View in the Preview: + +.. literalinclude:: /examples/generated/swiftui/Previews.snippet.preview-detail-view.swift + :language: swift + +.. _conditionally-use-observedresults-in-a-list-view: + +Conditionally Use ObservedResults in a List View +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you use :swift-sdk:`@ObservedResults ` +in a List view, this implicitly opens a database and queries it. For this to +work in a Preview, you need :ref:`a database populated with data +`. As an alternative, you can conditionally +use a static array in Previews and only use the ``@ObservedResults`` variable +when running the app. + +You could do this in multiple ways, but for the sake of making our +code easier to read and understand, we'll create an ``EnvironmentValue`` +that can detect whether the app is running in a Preview: + +.. code-block:: swift + + import Foundation + import SwiftUI + + public extension EnvironmentValues { + var isPreview: Bool { + #if DEBUG + return ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1" + #else + return false + #endif + } + } + +Then, we can use this as an environment value in our view, and conditionally +change which variable we use based on whether or not we are in a Preview. + +This example builds on the :ref:`Dog extension we defined above +`. We'll create an ``dogArray`` as +a ``static let`` in our Dog extension, and include the item objects we +already created: + +.. code-block:: swift + + static let dogArray = [dog1, dog2, dog3] + +Then, when we iterate through our List, use the static ``dogArray`` if +running in a Preview, or use the ``@ObservedResults`` query if not in a Preview. + +.. code-block:: swift + + struct DogsView: View { + @Environment(\.isPreview) var isPreview + @ObservedResults(Dog.self) var dogs + var previewDogs = Dog.dogArray + + var body: some View { + NavigationView { + VStack { + List { + if isPreview { + ForEach(previewDogs) { dog in + DogRow(dog: dog) + } + } else { + ForEach(dogs) { dog in + DogRow(dog: dog) + }.onDelete(perform: $dogs.remove) + } + } + ... More View code + +This has the benefit of being lightweight and not persisting any data, but +the downside of making the View code more verbose. If you prefer cleaner +View code, you can create a database with data that you use in the Previews. + +.. _swift-create-a-db-with-data: + +Create a Database with Data for Previews +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In some cases, your only option to see database data in a SwiftUI Preview +is to create a database that contains the data. You might do this when populating +a property that can only be populated during a write transaction, rather +than initialized directly with a value, such as a :ref:`List +` or :ref:`MutableSet `. +You might also want to do this if your view relies on more complex object +hierarchies being passed in from other views. + +However, using a database directly does inject state into your SwiftUI Previews, +which can come with drawbacks. Whether you're using the SDK or Core Data, +stateful SwiftUI Previews can cause issues like: + +- Seeing unexpected or duplicated data due to re-running the database file + creation steps repeatedly +- Needing to perform a migration within the SwiftUI Preview when you make model changes +- Potential issues related to changing state within views +- Unexplained crashes or performance issues related to issues that are not + surfaced in a visible way in SwiftUI Previews + +You can avoid or fix some of these issues with these tips: + +- :ref:`Use an in-memory database, when possible (demonstrated in the example above) ` +- :ref:`Manually delete all preview data from the command line to reset state ` +- :ref:`Check out diagnostic logs to try to troubleshoot SwiftUI Preview issues ` + +You can create a static variable for your database in your model extension. +This is where you do the work to populate your database. In our case, we +create a ``Person`` and append some ``Dog`` objects to the ``dogs`` +List property. This example builds on the example above where we :ref:`initialized +a few Dog objects in an Dog extension `. + +We'll create a ``Person`` extension, and create a single ``Person`` object +in that extension. Then, we'll create a ``previewRealm`` by adding the +``Person`` we just created, and appending the example ``Dog`` objects from +the ``Dog`` extension. + +To avoid adding these objects more than once, we add a check to see if the +Person already exists by querying for Person objects and checking that +the count is 1. If the realm contains a Person, we can use it in our +SwiftUI Preview. If not, we add the data. + +.. literalinclude:: /examples/generated/swiftui/Model.snippet.extend-model-class-with-realm.swift + :language: swift + +To use it in the SwiftUI Preview, our ProfileView code expects a Profile. +This is a :ref:`projection of the Person object `. In our +Preview, we can get the database, query it for the Profile, and pass it to the +view: + +.. literalinclude:: /examples/generated/swiftui/Previews.snippet.preview-with-realm.swift + :language: swift + +If you don't have a View that is expecting a database object to be passed in, +but instead uses ``@ObservedResults`` to query a database or otherwise work +with an existing database, you can :ref:`inject the database into the view as +an environment value `: + +.. code-block:: swift + + struct SomeListView_Previews: PreviewProvider { + static var previews: some View { + SomeListView() + .environment(\.realm, Person.previewRealm) + } + } + +.. _swiftui-preview-use-in-memory-database: + +Use an In-Memory Database +````````````````````````` + +When possible, use an :ref:`in-memory database ` +to get around some of the state-related issues that can come from using +a database within a SwiftUI Preview. + +Use the :swift-sdk:`inMemoryIdentifier +` +configuration property when you initialize the database. + +.. code-block:: swift + + static var previewRealm: Realm { + var realm: Realm + let identifier = "previewRealm" + let config = Realm.Configuration(inMemoryIdentifier: identifier) + do { + realm = try Realm(configuration: config) + // ... Add data to realm + +.. note:: + + Do not use the :swift-sdk:`deleteRealmIfMigrationNeeded + ` + configuration property when you initialize a database for SwiftUI Previews. + Due to the way Apple has implemented SwiftUI Previews, using this property + to bypass migration issues causes SwiftUI Previews to crash. + +.. _swiftui-preview-delete-db-from-preview: + +Delete SwiftUI Previews +``````````````````````` + +If you run into other SwiftUI Preview issues related to state, +such as a failure to load a database in a Preview due to migration being +required, there are a few things you can do to remove cached Preview data. + +The Apple-recommended fix is to close Xcode and use the command line to +delete all your existing SwiftUI Preview data. + +1. Close Xcode. +2. From your command line, run: + + .. code-block:: shell + + xcrun simctl --set previews delete all + +It's possible that data may persist after running this command. This is +likely due to Xcode retaining a reference due to something in the Preview +and being unable to delete it. You can also try these steps to resolve issues: + +- Build for a different simulator +- Restart the computer and re-run ``xcrun simctl --set previews delete all`` +- Delete stored Preview data directly. This data is stored in + ``~/Library/Developer/Xcode/UserData/Previews``. + +.. _swiftui-preview-diagnose-crashes: + +Get Detailed Information about SwiftUI Preview Crashes +`````````````````````````````````````````````````````` + +If you have an unexplained SwiftUI Preview crash when using the SDK, first try +running the application on the simulator. The error messaging and logs available +for the simulator make it easier to find and diagnose issues. If you can +debug the issue in the simulator, this is the easiest route. + +If you cannot replicate a SwiftUI Preview crash in the simulator, you can +view crash logs for the SwiftUI Preview app. These logs are available in +``~/Library/Logs/DiagnosticReports/``. These logs sometimes appear after +a delay, so wait a few minutes after a crash if you don't see the relevant +log immediately. + +.. _swift-use-a-synced-database-in-previews: + +Use a Synced Database in Previews +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If your app uses Atlas Device Sync, you may wonder how to use a synced database +in your SwiftUI Previews. A better practice is to use static objects or a +local database that you populate with data for your SwiftUI Previews. + +In our example app, we can preview a view *associated* with Device Sync - +the LoginView - without needing to use a database at all: + +.. literalinclude:: /examples/generated/swiftui/Previews.snippet.preview-view-associated-with-sync.swift + :language: swift + +Since we're only viewing the static UI, we don't need to worry about the +``SyncContentView`` that contains the logic of whether to show the ``LoginView`` +or go to the ``OpenSyncedRealmView``. We can also skip previewing the +``OpenSyncedRealmView``, because that just handles logic associated with opening +a synced database and populating it for the ``DogsView``. So the next view we +want to see in a Preview is the ``DogsView``. + +Fortunately, the code to work with the SDK doesn't care whether +the database uses Device Sync or not - you work with the database in the same way. +So we can use the same non-synced database that we :ref:`created in the example +above ` in the SwiftUI Preview. + +.. literalinclude:: /examples/generated/swiftui/Previews.snippet.preview-dogs-view.swift + :language: swift diff --git a/source/frameworks/swiftui/write.txt b/source/frameworks/swiftui/write.txt new file mode 100644 index 0000000000..d73a08e067 --- /dev/null +++ b/source/frameworks/swiftui/write.txt @@ -0,0 +1,209 @@ +==================== +Write Data - SwiftUI +==================== + +.. meta:: + :description: Perform a quick write directly from a SwiftUI view, or use Swift code to update objects in the database. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +Perform a Quick Write +--------------------- + +In addition to performing writes inside a transaction block, the Swift +SDK offers a convenience feature to enable quick writes without explicitly +performing a write transaction. + +When you use the ``@ObservedRealmObject`` or ``@ObservedResults`` property +wrappers, you can implicitly open a write transaction. Use the ``$`` operator +to create a two-way binding to the state object. Then, when you make changes +to the bound object or collection, you initiate an implicit write. + +The SwiftUI property wrappers work with :ref:`frozen data +` to provide thread safety. When you use ``$`` +to create a two-way binding, the Swift SDK manages thawing the frozen objects +so you can write to them. + +Update an Object's Properties +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +In this example, we create a two-way binding with one of the state object's +properties. ``$dog.favoriteToy`` creates a binding to the model Dog +object's ``favoriteToy`` property + +When the app user updates that field in this example, the SDK +opens an implicit write transaction and saves the new value to the database. + +.. literalinclude:: /examples/generated/swiftui/QuickWrite.snippet.quick-write-property.swift + :language: swift + +Add or Remove Objects in an ObservedResults Collection +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +While a regular :ref:`Results collection ` +is immutable, :swift-sdk:`ObservedResults ` +is a mutable collection that allows you to perform writes using a two-way +binding. When you update the bound collection, the SDK opens an implicit write +transaction and saves the changes to the collection. + +In this example, we remove an element from the results set using +``$dogs.remove`` in the ``onDelete``. Using the ``$dogs`` here creates a +two-way binding to a ``BoundCollection`` that lets us mutate the +``@ObservedResults`` ``dogs`` collection. + +We add an item to the results using ``$dogs.append`` in the +``addDogButton``. + +These actions write directly to the ``@ObservedResults`` collection. + +.. literalinclude:: /examples/generated/swiftui/QuickWrite.snippet.update-observed-results.swift + :language: swift + :emphasize-lines: 15, 27 + +.. include:: /includes/note-observedresults-swiftui-view.rst + +Append an Object to a List +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you have a two-way binding with an ``@ObservedRealmObject`` that has +a list property, you can add new objects to the list. + +In this example, the ``Person`` object has a list property that forms a +:ref:`to-many relationship ` with one or more dogs. + +.. code-block:: swift + + class Person: Object, ObjectKeyIdentifiable { + @Persisted(primaryKey: true) var _id: ObjectId + @Persisted var firstName = "" + @Persisted var lastName = "" + ... + @Persisted var dogs: List + } + +When the user presses the ``Save`` button, this: + +- Creates a ``Dog`` object with the details that the user has entered +- Appends the ``Dog`` object to the ``Person`` object's ``dogs`` list + +.. include:: /examples/generated/swiftui/CreateObjects.snippet.add-dog-to-person-view.swift.rst + +Use Create to Copy an Object Into the Database +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +There may be times when you create a new object, and set one of its properties +to an object that already exists in the database. Then, when you go to add the +new object to the database, you see an error similar to: + +.. code-block:: shell + + Object is already managed by another Realm. Use create instead to copy it into this Realm. + +When this occurs, you can use the :swift-sdk:`.create +` +method to initialize the object, and use ``modified: .update`` to set its +property to the existing object. + +.. example:: + + Consider a version of the DoggoDB ``Dog`` model where the ``favoriteToy`` + property isn't just a ``String``, but is an optional ``DogToy`` object: + + .. code-block:: swift + + class Dog: Object, ObjectKeyIdentifiable { + @Persisted(primaryKey: true) var _id: UUID + @Persisted var name = "" + ... + @Persisted var favoriteToy: DogToy? + ... + } + + When your app goes to create a new ``Dog`` object, perhaps it checks to see + if the ``DogToy`` already exists in the database, and then set the + ``favoriteToy`` property to the existing dog toy. + + When you go to append the new ``Dog`` to the ``Person`` object, you may + see an error similar to: + + .. code-block:: shell + + Object is already managed by another Realm. Use create instead to copy it into this Realm. + + The ``Dog`` object remains unmanaged until you append it to the ``Person`` + object's ``dogs`` property. When the Swift SDK checks the ``Dog`` object to + find the database that is currently managing it, it finds nothing. + + When you use the ``$`` notation to perform a quick write that appends the + ``Dog`` object to the ``Person`` object, this write uses the database it has + access to in the view. This is a database instance implicitly opened by + the ``@ObservedRealmObject`` or ``@ObservedResults`` property wrapper. + The existing ``DogToy`` object, however, may be managed by a different + realm instance. + + To solve this error, use the :swift-sdk:`.create + ` + method when you initialize the ``Dog`` object, and use + ``modified: .update`` to set its ``favoriteToy`` value to the existing + object: + + .. literalinclude:: /examples/generated/code/start/SwiftUI.snippet.copy-to-realm-with-create.swift + :language: swift + +Perform an Explicit Write +------------------------- + +In some cases, you may want or need to explicitly perform a write transaction +instead of using the implicit ``$`` to perform a quick write. You may want +to do this when: + +- You need to look up additional objects to perform a write +- You need to perform a write to objects you don't have access to in the view + +If you pass an object you are observing with ``@ObservedRealmObject`` or +``@ObservedResults`` into a function where you perform an explicit write +transaction that modifies the object, you must thaw it first. + +.. literalinclude:: /examples/generated/code/start/SwiftUI.snippet.thaw-the-passed-in-object.swift + :language: swift + +You can access the database that is managing the object or objects by calling +``.realm`` on the object or collection: + +.. literalinclude:: /examples/generated/code/start/SwiftUI.snippet.get-an-object-realm.swift + :language: swift + +Because the SwiftUI property wrappers use frozen objects, you must thaw +the database before you can write to it. + +.. example:: + + Consider a version of the DoggoDB app where a ``Company`` object + has a list of ``Employee`` objects. Each ``Employee`` has a list of + ``Dog`` objects. But for business reasons, you also wanted to have a + list of ``Dog`` objects available directly on the ``Company`` object, + without being associated with an ``Employee``. The model might look + something like: + + .. literalinclude:: /examples/generated/code/start/SwiftUI.snippet.swiftui-company-model.swift + :language: swift + + Consider a view where you have access to the ``Company`` object, but + want to perform an explicit write to add an existing dog to an existing + employee. Your function might look something like: + + .. literalinclude:: /examples/generated/code/start/SwiftUI.snippet.write-with-swiftui-observed-realm-object.swift + :language: swift diff --git a/source/includes/note-modify-schema-properties-of-synced-realms.rst b/source/includes/note-modify-schema-properties-of-synced-realms.rst index a02bd6549d..f7a56f5347 100644 --- a/source/includes/note-modify-schema-properties-of-synced-realms.rst +++ b/source/includes/note-modify-schema-properties-of-synced-realms.rst @@ -1,5 +1,5 @@ -.. note:: Modify Schema Properties of a Synced Realm +.. note:: Modify Schema Properties of a Synced Database - The following page demonstrates how to modify schema properties of a local - realm. Learn how to :ref:`modify schema properties of a synced realm - `. \ No newline at end of file + The following page demonstrates how to modify schema properties of a + non-synced database. Learn how to :ref:`modify schema properties of a + synced database `. diff --git a/source/includes/note-observedresults-swiftui-view.rst b/source/includes/note-observedresults-swiftui-view.rst index 3353039cc0..a361d7bc00 100644 --- a/source/includes/note-observedresults-swiftui-view.rst +++ b/source/includes/note-observedresults-swiftui-view.rst @@ -2,5 +2,5 @@ The ``@ObservedResults`` property wrapper is intended for use in a SwiftUI View. If you want to observe results in a view model, :ref:`register - a change listener `. + a change listener `. \ No newline at end of file diff --git a/source/includes/tip-swift-migrate-to-flexible-sync.rst b/source/includes/tip-swift-migrate-to-flexible-sync.rst deleted file mode 100644 index 8068ebc142..0000000000 --- a/source/includes/tip-swift-migrate-to-flexible-sync.rst +++ /dev/null @@ -1,7 +0,0 @@ -.. tip:: Migrate to Flexible Sync - - You can automatically migrate your App Services Device Sync Mode from - Partition-Based Sync to Flexible Sync. This enables you to take advantage - of the more expressive and granular Flexible Sync subscriptions and - permissions to manage what synced data your users can read and write. - For more information, refer to :ref:`ios-migrate-pbs-to-fs`. \ No newline at end of file diff --git a/source/includes/xcode-set-up-background-task-in-project.rst b/source/includes/xcode-set-up-background-task-in-project.rst deleted file mode 100644 index b34c923b5a..0000000000 --- a/source/includes/xcode-set-up-background-task-in-project.rst +++ /dev/null @@ -1,31 +0,0 @@ -To enable background tasks for your app: - -.. procedure:: - - .. step:: Add Background Modes Capability - - Select your app Target, go to the :guilabel:`Signing & Capabilities` - tab, and click :guilabel:`+ Capability` to add the capability. - - .. figure:: /images/xcode-select-target-add-capability.png - :alt: Screenshot of Xcode with app Target selected, Signing & Capabilities tab open, and arrow pointing to add Capabilities. - :lightbox: - - Search for "background", and select :guilabel:`Background Modes`. - - .. step:: Select Background Modes - - Now you should see a :guilabel:`Background Modes` section in your - :guilabel:`Signing & Capabilities` tab. Expand this section, and - click the checkboxes to enable :guilabel:`Background fetch` and - :guilabel:`Background processing`. - - .. step:: Update the Info.plist - - Go to your project's :file:`Info.plist`, and add a new row for - ``Permitted background task scheduler identifiers``. If you are - viewing raw keys and values, the key is - ``BGTaskSchedulerPermittedIdentifiers``. This field is an array. - Add a new item to it for your background task identifier. Set the - new item's value to the string you intend to use as the identifier - for your background task. For example: ``refreshTodoRealm``. diff --git a/source/sdk/files/configure-and-open.txt b/source/sdk/files/configure-and-open.txt index 34625c94c7..7492f53a55 100644 --- a/source/sdk/files/configure-and-open.txt +++ b/source/sdk/files/configure-and-open.txt @@ -31,6 +31,15 @@ file can manage. Some SDKs require explicit realm file schemas, while others automatically manage schemas for any object in your project, and you can specify a subset of schemas (objects) when opening a realm. +.. _sdks-default-and-file-url-database: + +Open a Default Database or Database at a File URL +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-in-memory-database: + +Open a Database in Memory +~~~~~~~~~~~~~~~~~~~~~~~~~ .. _sdks-open-database-asynchronously: @@ -46,4 +55,3 @@ Provide a Subset of Models to a Database Expose More Than One Database ----------------------------- - diff --git a/temp/swift/swiftui/filter-data.txt b/temp/swift/swiftui/filter-data.txt index 1443b96dcc..a94d3894cc 100644 --- a/temp/swift/swiftui/filter-data.txt +++ b/temp/swift/swiftui/filter-data.txt @@ -2,6 +2,18 @@ Filter Data - SwiftUI ===================== +.. meta:: + :description: Extend Apple's .searchable implementation to SDK objects, filter or query ObservedResults, or section results. + :keywords: Realm, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: swift + .. contents:: On this page :local: :backlinks: none @@ -14,74 +26,67 @@ Observe in SwiftUI Views The ``@ObservedResults`` property wrapper used in the examples on this page is intended for use in a SwiftUI View. If you want to observe results in a view model instead, :ref:`register a change listener -`. +`. -Search a Realm Collection -------------------------- - -.. versionadded:: 10.19.0 +Search an SDK Collection +------------------------ -The Realm Swift SDK allows you to extend :apple:`.searchable +The Swift SDK allows you to extend :apple:`.searchable `. When you use :swift-sdk:`ObservedResults ` to query a realm, you can specify collection and keypath in the result set to mark it as searchable. -The collection is the bound collection represented by your ObservedResults +The collection is the bound collection represented by your ``ObservedResults`` query. In this example, it is the ``dogs`` variable that represents the -collection of all Dog objects in the realm. +collection of all Dog objects in the database. The keypath is the object property that you want to search. In this -example, we search the dogs collection by dog name. The Realm Swift +example, we search the dogs collection by dog name. The SDK's ``.searchable`` implementation only supports keypaths with ``String`` types. .. literalinclude:: /examples/generated/swiftui/FilterData.snippet.searchable.swift :language: swift -Filter or Query a Realm with ObservedResults --------------------------------------------- +Filter or Query a Database with ObservedResults +----------------------------------------------- The :swift-sdk:`@ObservedResults ` property wrapper -opens a realm and returns all objects of the specified type. However, you +opens a database and returns all objects of the specified type. However, you can filter or query ``@ObservedResults`` to use only a subset of the objects in your view. .. seealso:: - For more information about the query syntax and types of queries that Realm - supports, see: :ref:`Read - Swift SDK ` and :ref:`Filter - Data - Swift SDK `. + For more information about the query syntax and types of queries that the + SDK supports, refer to: :ref:`Read ` and + :ref:`sdks-filter-data-swift`. + +Query with the Swift Query API +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +To use ``@ObservedResults`` with the :ref:`Swift Query API +`, pass a query in a closure as an argument to +``where``: + +.. literalinclude:: /examples/generated/swiftui/FilterData.snippet.type-safe-query-filter.swift + :language: swift Filter with an NSPredicate ~~~~~~~~~~~~~~~~~~~~~~~~~~ To filter ``@ObservedResults`` using the :ref:`NSPredicate Query API -`, pass an :apple:`NSPredicate +`, pass an :apple:`NSPredicate ` as an argument to ``filter``: .. literalinclude:: /examples/generated/swiftui/FilterData.snippet.nspredicate-filter.swift :language: swift -Query with the Realm Type-Safe Query API -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. versionadded:: 10.24.0 - Use *where* to perform type-safe queries on ObservedResults. - -To use ``@ObservedResults`` with the :ref:`Realm Type-Safe Query API -`, pass a query in a closure as an argument to -``where``: - -.. literalinclude:: /examples/generated/swiftui/FilterData.snippet.type-safe-query-filter.swift - :language: swift - -Section Filtered Results ------------------------- - -.. versionadded:: 10.29.0 +Section Results +--------------- The :swift-sdk:`@ObservedSectionedResults ` -property wrapper opens a realm and returns all objects of the specified type, +property wrapper opens a database and returns all objects of the specified type, divided into sections by the specified key path. Similar to ``@ObservedResults`` above, you can filter or query ``@ObservedSectionedResults`` to use only a subset of the objects in your view: From ad32aa9bb92c2ad4b84215c5e158add86af3a9e2 Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 16 Aug 2024 15:12:51 -0400 Subject: [PATCH 61/63] (DOCSP-39514): Consolidate Read page (#3357) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39514 *Staged Page* - [Read](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39514/sdk/crud/read/) - [Read Properties](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39514/sdk/crud/read/read-properties/) - [Fluent Interface (Java SDK)](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39514/sdk/crud/query-engines/filter-data-java-sdk/): Port content, update Realm naming, and change to use the Drivers tab languages so it preserves a language selection when clicking into the page - [LINQ (.NET SDK)](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39514/sdk/crud/query-engines/filter-data-linq/): Port LINQ content, update Realm naming, omit stuff about querying with RQL as that is generally surfaced in the C# API descriptions on the Read page *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [C++: Read](https://www.mongodb.com/docs/atlas/device-sdks/sdk/cpp/crud/read/) - [Flutter: Read](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/crud/read/) - [Flutter: Model Data/Results](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/data-types/#realmresults) - [Flutter: Model Data/Geospatial Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/realm-database/model-data/geospatial/) - [Java: Read](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/crud/read/) - [Java: Filter Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/crud/filter-data/) - [Java: Model Data/Results](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/data-types/collections/#results-collections) - [Java: Data Types/Mixed (Queries)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/java/model-data/data-types/realmany/#queries) - [Kotlin: Read](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/crud/read/) - [Kotlin: Model Data/Geospatial Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/realm-database/schemas/geospatials/) - [.NET: Read](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/crud/read/) - [.NET: Filter Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/crud/filter/) - [.NET: Results Collections](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/collections/) - [.NET: Geospatial Data](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/model-data/data-types/geospatials/) - [Node.js: Read](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/crud/read/) - [Node.js: Collections (info about Results)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/collections/) - [Node.js: Relationships (Inverse relationship info](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/relationships-and-embedded-objects/) - [Node.js: Data Types/Dictionaries (Query)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/dictionaries/#query-for-objects-with-a-dictionary-property) - [Node.js: Data Types/Sets (info relevant to reading set properties)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/sets/) - [Node.js: Data Types/Mixed (Query)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/mixed/#query-for-objects-with-a-mixed-value) - [Node.js: Data Types/Geospatial (Query)](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/model-data/data-types/geospatial/#query-geospatial-data) - [Swift: Read](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/crud/read/) - [Swift: Supported Types: Results & Sectioned Results](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/model-data/supported-types/#results-and-sectioned-results) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --- snooty.toml | 1 + .../crud/read-access-results-description.rst | 7 + .../cpp/crud/read-aggregate-not-supported.rst | 1 + .../read-all-objects-of-type-description.rst | 6 + .../crud/read-database-objects-procedure.rst | 25 + ...ad-filter-or-query-objects-description.rst | 11 + ...nd-object-by-primary-key-not-supported.rst | 3 + .../cpp/crud/read-intro-description.rst | 7 + .../cpp/crud/read-limit-not-supported.rst | 3 + ...uery-dictionary-properties-description.rst | 3 + ...read-query-list-properties-description.rst | 6 + ...ead-query-mixed-properties-description.rst | 6 + .../read-query-set-properties-description.rst | 3 + ...ad-sdk-results-collections-description.rst | 20 + .../cpp/crud/read-sort-description.rst | 22 + .../crud/read-access-results-description.rst | 5 + .../crud/read-aggregate-description.rst | 9 + .../read-all-objects-of-type-description.rst | 3 + .../crud/read-database-objects-procedure.rst | 25 + ...fine-geospatial-shapes-box-description.rst | 12 + ...e-geospatial-shapes-circle-description.rst | 13 + ...-geospatial-shapes-polygon-description.rst | 12 + ...-full-text-search-property-description.rst | 11 + ...ad-filter-or-query-objects-description.rst | 35 + ...find-object-by-primary-key-description.rst | 3 + .../csharp/crud/read-intro-description.rst | 7 + .../csharp/crud/read-limit-description.rst | 7 + ...uery-dictionary-properties-description.rst | 9 + ...read-query-geospatial-data-description.rst | 10 + ...query-inverse-relationship-description.rst | 3 + ...read-query-list-properties-description.rst | 11 + ...ead-query-mixed-properties-description.rst | 7 + .../read-query-set-properties-description.rst | 11 + ...query-to-many-relationship-description.rst | 9 + ...-query-to-one-relationship-description.rst | 2 + ...ery-with-geospatial-shapes-description.rst | 11 + ...ad-sdk-results-collections-description.rst | 13 + .../csharp/crud/read-sort-description.rst | 2 + .../crud/read-access-results-description.rst | 23 + .../dart/crud/read-aggregate-description.rst | 4 + .../read-all-objects-of-type-description.rst | 2 + .../crud/read-database-objects-procedure.rst | 24 + ...fine-geospatial-shapes-box-description.rst | 5 + ...e-geospatial-shapes-circle-description.rst | 18 + ...-geospatial-shapes-polygon-description.rst | 14 + ...-full-text-search-property-description.rst | 5 + ...ad-filter-or-query-objects-description.rst | 8 + ...find-object-by-primary-key-description.rst | 2 + .../dart/crud/read-intro-description.rst | 8 + ...uery-dictionary-properties-description.rst | 6 + ...read-query-geospatial-data-description.rst | 12 + ...query-inverse-relationship-description.rst | 16 + ...read-query-list-properties-description.rst | 11 + ...ead-query-mixed-properties-description.rst | 7 + .../read-query-set-properties-description.rst | 6 + ...ery-with-geospatial-shapes-description.rst | 5 + ...ad-sdk-results-collections-description.rst | 17 + .../dart/crud/read-sort-description.rst | 5 + ...ull-text-search-property-not-supported.rst | 2 + .../read-geospatial-data-not-supported.rst | 3 + ...tom-persistable-property-not-supported.rst | 1 + .../read-query-projections-not-supported.rst | 1 + ...ad-section-query-results-not-supported.rst | 3 + .../crud/read-access-results-description.rst | 21 + .../java/crud/read-aggregate-description.rst | 12 + .../read-all-objects-of-type-description.rst | 3 + .../crud/read-database-objects-procedure.rst | 25 + ...lter-or-query-objects-java-description.rst | 32 + ...er-or-query-objects-kotlin-description.rst | 33 + ...nd-object-by-primary-key-not-supported.rst | 5 + .../java/crud/read-intro-description.rst | 4 + .../java/crud/read-limit-description.rst | 3 + ...uery-dictionary-properties-description.rst | 4 + ...-inverse-relationship-java-description.rst | 13 + ...nverse-relationship-kotlin-description.rst | 13 + ...read-query-list-properties-description.rst | 3 + ...ead-query-mixed-properties-description.rst | 7 + .../read-query-set-properties-description.rst | 17 + ...y-to-one-relationship-java-description.rst | 14 + ...to-one-relationship-kotlin-description.rst | 14 + ...ad-sdk-results-collections-description.rst | 40 + .../java/crud/read-sort-description.rst | 2 + .../read-access-results-js-ts-description.rst | 21 + .../crud/read-aggregate-description.rst | 4 + ...-all-objects-of-type-js-ts-description.rst | 5 + .../read-database-objects-js-ts-procedure.rst | 24 + ...eospatial-shapes-box-js-ts-description.rst | 3 + ...patial-shapes-circle-js-ts-description.rst | 8 + ...atial-shapes-polygon-js-ts-description.rst | 13 + ...-full-text-search-property-description.rst | 2 + ...ter-or-query-objects-js-ts-description.rst | 10 + ...bject-by-primary-key-js-ts-description.rst | 2 + .../crud/read-intro-js-ts-description.rst | 6 + ...ictionary-properties-js-ts-description.rst | 11 + ...uery-geospatial-data-js-ts-description.rst | 15 + ...inverse-relationship-js-ts-description.rst | 10 + ...uery-list-properties-js-ts-description.rst | 3 + ...ery-mixed-properties-js-ts-description.rst | 5 + .../read-query-set-properties-description.rst | 29 + ...th-geospatial-shapes-js-ts-description.rst | 5 + ...-results-collections-js-ts-description.rst | 14 + .../crud/read-sort-js-ts-description.rst | 2 + .../crud/read-access-results-description.rst | 42 + .../crud/read-aggregate-description.rst | 11 + .../read-all-objects-of-type-description.rst | 4 + .../crud/read-database-objects-procedure.rst | 48 + ...fine-geospatial-shapes-box-description.rst | 4 + ...e-geospatial-shapes-circle-description.rst | 18 + ...-geospatial-shapes-polygon-description.rst | 13 + ...-by-remapped-property-name-description.rst | 8 + ...-full-text-search-property-description.rst | 3 + ...ad-filter-or-query-objects-description.rst | 8 + ...nd-object-by-primary-key-not-supported.rst | 6 + .../kotlin/crud/read-intro-description.rst | 7 + .../kotlin/crud/read-limit-description.rst | 3 + ...uery-dictionary-properties-description.rst | 7 + ...read-query-geospatial-data-description.rst | 13 + ...query-inverse-relationship-description.rst | 13 + ...read-query-list-properties-description.rst | 6 + ...ead-query-mixed-properties-description.rst | 37 + .../read-query-set-properties-description.rst | 6 + ...query-to-many-relationship-description.rst | 2 + ...-query-to-one-relationship-description.rst | 2 + ...ery-with-geospatial-shapes-description.rst | 5 + ...ad-sdk-results-collections-description.rst | 17 + .../kotlin/crud/read-sort-description.rst | 3 + ...property-to-different-name-description.rst | 2 +- .../crud/read-access-results-description.rst | 21 + .../crud/read-aggregate-description.rst | 7 + .../read-all-objects-of-type-description.rst | 7 + .../crud/read-chain-queries-description.rst | 2 + .../crud/read-database-objects-procedure.rst | 29 + ...fine-geospatial-shapes-box-description.rst | 3 + ...e-geospatial-shapes-circle-description.rst | 16 + ...-geospatial-shapes-polygon-description.rst | 11 + ...ad-filter-or-query-objects-description.rst | 6 + ...find-object-by-primary-key-description.rst | 3 + .../crud/read-intro-description.rst | 8 + .../crud/read-limit-not-supported.rst | 3 + ...ustom-persistable-property-description.rst | 36 + ...uery-dictionary-properties-description.rst | 22 + ...read-query-geospatial-data-description.rst | 11 + ...query-inverse-relationship-description.rst | 7 + ...read-query-list-properties-description.rst | 3 + ...ead-query-mixed-properties-description.rst | 21 + ...-query-projections-missing-description.rst | 2 + .../read-query-set-properties-description.rst | 4 + ...ery-with-geospatial-shapes-description.rst | 4 + ...ad-sdk-results-collections-description.rst | 26 + ...read-section-query-results-description.rst | 14 + .../objectivec/crud/read-sort-description.rst | 4 + .../crud/read-access-results-description.rst | 23 + .../swift/crud/read-aggregate-description.rst | 12 + .../read-all-objects-of-type-description.rst | 22 + .../crud/read-chain-queries-description.rst | 2 + .../crud/read-database-objects-procedure.rst | 26 + ...fine-geospatial-shapes-box-description.rst | 3 + ...e-geospatial-shapes-circle-description.rst | 17 + ...-geospatial-shapes-polygon-description.rst | 11 + ...ad-filter-or-query-objects-description.rst | 29 + ...find-object-by-primary-key-description.rst | 3 + .../swift/crud/read-intro-description.rst | 6 + .../swift/crud/read-limit-not-supported.rst | 3 + ...ustom-persistable-property-description.rst | 39 + ...uery-dictionary-properties-description.rst | 10 + ...read-query-geospatial-data-description.rst | 10 + ...query-inverse-relationship-description.rst | 6 + ...read-query-list-properties-description.rst | 12 + ...ead-query-mixed-properties-description.rst | 21 + .../read-query-projections-description.rst | 8 + .../read-query-set-properties-description.rst | 4 + ...ery-with-geospatial-shapes-description.rst | 12 + ...ad-sdk-results-collections-description.rst | 26 + ...read-section-query-results-description.rst | 29 + .../swift/crud/read-sort-description.rst | 3 + .../crud/read-aggregate-description.rst | 4 + ...-full-text-search-property-description.rst | 8 + .../read-query-set-properties-description.rst | 20 + .../sdk-examples/crud/read-access-results.rst | 70 + .../sdk-examples/crud/read-aggregate.rst | 66 + .../crud/read-all-objects-of-type.rst | 63 + .../sdk-examples/crud/read-chain-queries.rst | 70 + .../read-define-geospatial-shapes-box.rst | 66 + .../read-define-geospatial-shapes-circle.rst | 66 + .../read-define-geospatial-shapes-polygon.rst | 67 + .../read-filter-by-remapped-property-name.rst | 71 + .../read-filter-full-text-search-property.rst | 69 + .../crud/read-filter-or-query-objects.rst | 63 + .../crud/read-find-object-by-primary-key.rst | 64 + .../includes/sdk-examples/crud/read-limit.rst | 69 + .../crud/read-query-dictionary-properties.rst | 67 + .../crud/read-query-inverse-relationship.rst | 66 + .../crud/read-query-list-properties.rst | 70 + .../crud/read-query-mixed-properties.rst | 69 + .../crud/read-query-set-properties.rst | 67 + .../crud/read-query-to-many-relationship.rst | 69 + .../crud/read-query-to-one-relationship.rst | 70 + .../read-query-with-geospatial-shapes-box.rst | 73 ++ ...ad-query-with-geospatial-shapes-circle.rst | 73 ++ ...d-query-with-geospatial-shapes-polygon.rst | 74 ++ .../read-query-with-geospatial-shapes.rst | 66 + .../includes/sdk-examples/crud/read-sort.rst | 65 + .../query/rql-example-data-model.rst | 2 +- source/index.txt | 2 +- .../platforms/apple/use-sdk-with-actors.txt | 4 +- source/sdk/crud.txt | 2 +- source/sdk/crud/query-engines.txt | 4 +- .../query-engines/filter-data-java-sdk.txt | 600 ++++++++- .../crud/query-engines/filter-data-linq.txt | 264 +++- .../query-engines/filter-data-swift-sdk.txt | 10 +- .../query-engines/realm-query-language.txt | 28 +- source/sdk/crud/read.txt | 891 ++++++++++++- source/sdk/crud/read/read-properties.txt | 1166 +++++++++++++++++ source/sdk/model-data/property-types.txt | 5 + source/sdk/quick-start.txt | 2 +- source/sdk/sync/manage-sync-subscriptions.txt | 4 +- 216 files changed, 6508 insertions(+), 55 deletions(-) create mode 100644 source/includes/api-details/cpp/crud/read-access-results-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-aggregate-not-supported.rst create mode 100644 source/includes/api-details/cpp/crud/read-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-database-objects-procedure.rst create mode 100644 source/includes/api-details/cpp/crud/read-filter-or-query-objects-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-find-object-by-primary-key-not-supported.rst create mode 100644 source/includes/api-details/cpp/crud/read-intro-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-limit-not-supported.rst create mode 100644 source/includes/api-details/cpp/crud/read-query-dictionary-properties-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-query-list-properties-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-query-mixed-properties-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-query-set-properties-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-sdk-results-collections-description.rst create mode 100644 source/includes/api-details/cpp/crud/read-sort-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-access-results-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-aggregate-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-database-objects-procedure.rst create mode 100644 source/includes/api-details/csharp/crud/read-define-geospatial-shapes-box-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-define-geospatial-shapes-circle-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-define-geospatial-shapes-polygon-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-filter-full-text-search-property-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-filter-or-query-objects-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-find-object-by-primary-key-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-intro-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-limit-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-dictionary-properties-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-geospatial-data-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-inverse-relationship-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-list-properties-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-mixed-properties-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-set-properties-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-to-many-relationship-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-to-one-relationship-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-query-with-geospatial-shapes-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-sdk-results-collections-description.rst create mode 100644 source/includes/api-details/csharp/crud/read-sort-description.rst create mode 100644 source/includes/api-details/dart/crud/read-access-results-description.rst create mode 100644 source/includes/api-details/dart/crud/read-aggregate-description.rst create mode 100644 source/includes/api-details/dart/crud/read-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/dart/crud/read-database-objects-procedure.rst create mode 100644 source/includes/api-details/dart/crud/read-define-geospatial-shapes-box-description.rst create mode 100644 source/includes/api-details/dart/crud/read-define-geospatial-shapes-circle-description.rst create mode 100644 source/includes/api-details/dart/crud/read-define-geospatial-shapes-polygon-description.rst create mode 100644 source/includes/api-details/dart/crud/read-filter-full-text-search-property-description.rst create mode 100644 source/includes/api-details/dart/crud/read-filter-or-query-objects-description.rst create mode 100644 source/includes/api-details/dart/crud/read-find-object-by-primary-key-description.rst create mode 100644 source/includes/api-details/dart/crud/read-intro-description.rst create mode 100644 source/includes/api-details/dart/crud/read-query-dictionary-properties-description.rst create mode 100644 source/includes/api-details/dart/crud/read-query-geospatial-data-description.rst create mode 100644 source/includes/api-details/dart/crud/read-query-inverse-relationship-description.rst create mode 100644 source/includes/api-details/dart/crud/read-query-list-properties-description.rst create mode 100644 source/includes/api-details/dart/crud/read-query-mixed-properties-description.rst create mode 100644 source/includes/api-details/dart/crud/read-query-set-properties-description.rst create mode 100644 source/includes/api-details/dart/crud/read-query-with-geospatial-shapes-description.rst create mode 100644 source/includes/api-details/dart/crud/read-sdk-results-collections-description.rst create mode 100644 source/includes/api-details/dart/crud/read-sort-description.rst create mode 100644 source/includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst create mode 100644 source/includes/api-details/generic/crud/read-geospatial-data-not-supported.rst create mode 100644 source/includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst create mode 100644 source/includes/api-details/generic/crud/read-query-projections-not-supported.rst create mode 100644 source/includes/api-details/generic/crud/read-section-query-results-not-supported.rst create mode 100644 source/includes/api-details/java/crud/read-access-results-description.rst create mode 100644 source/includes/api-details/java/crud/read-aggregate-description.rst create mode 100644 source/includes/api-details/java/crud/read-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/java/crud/read-database-objects-procedure.rst create mode 100644 source/includes/api-details/java/crud/read-filter-or-query-objects-java-description.rst create mode 100644 source/includes/api-details/java/crud/read-filter-or-query-objects-kotlin-description.rst create mode 100644 source/includes/api-details/java/crud/read-find-object-by-primary-key-not-supported.rst create mode 100644 source/includes/api-details/java/crud/read-intro-description.rst create mode 100644 source/includes/api-details/java/crud/read-limit-description.rst create mode 100644 source/includes/api-details/java/crud/read-query-dictionary-properties-description.rst create mode 100644 source/includes/api-details/java/crud/read-query-inverse-relationship-java-description.rst create mode 100644 source/includes/api-details/java/crud/read-query-inverse-relationship-kotlin-description.rst create mode 100644 source/includes/api-details/java/crud/read-query-list-properties-description.rst create mode 100644 source/includes/api-details/java/crud/read-query-mixed-properties-description.rst create mode 100644 source/includes/api-details/java/crud/read-query-set-properties-description.rst create mode 100644 source/includes/api-details/java/crud/read-query-to-one-relationship-java-description.rst create mode 100644 source/includes/api-details/java/crud/read-query-to-one-relationship-kotlin-description.rst create mode 100644 source/includes/api-details/java/crud/read-sdk-results-collections-description.rst create mode 100644 source/includes/api-details/java/crud/read-sort-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-access-results-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-aggregate-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-all-objects-of-type-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-database-objects-js-ts-procedure.rst create mode 100644 source/includes/api-details/javascript/crud/read-define-geospatial-shapes-box-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-define-geospatial-shapes-circle-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-define-geospatial-shapes-polygon-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-filter-full-text-search-property-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-filter-or-query-objects-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-find-object-by-primary-key-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-intro-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-query-dictionary-properties-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-query-geospatial-data-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-query-inverse-relationship-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-query-list-properties-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-query-mixed-properties-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-query-set-properties-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-query-with-geospatial-shapes-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-sdk-results-collections-js-ts-description.rst create mode 100644 source/includes/api-details/javascript/crud/read-sort-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-access-results-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-aggregate-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-database-objects-procedure.rst create mode 100644 source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-box-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-circle-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-polygon-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-filter-by-remapped-property-name-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-filter-full-text-search-property-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-filter-or-query-objects-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-find-object-by-primary-key-not-supported.rst create mode 100644 source/includes/api-details/kotlin/crud/read-intro-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-limit-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-dictionary-properties-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-geospatial-data-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-inverse-relationship-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-list-properties-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-mixed-properties-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-set-properties-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-to-many-relationship-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-to-one-relationship-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-query-with-geospatial-shapes-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-sdk-results-collections-description.rst create mode 100644 source/includes/api-details/kotlin/crud/read-sort-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-access-results-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-aggregate-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-chain-queries-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-database-objects-procedure.rst create mode 100644 source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-box-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-circle-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-polygon-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-filter-or-query-objects-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-find-object-by-primary-key-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-intro-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-limit-not-supported.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-custom-persistable-property-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-dictionary-properties-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-geospatial-data-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-inverse-relationship-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-list-properties-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-mixed-properties-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-projections-missing-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-set-properties-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-query-with-geospatial-shapes-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-sdk-results-collections-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-section-query-results-description.rst create mode 100644 source/includes/api-details/objectivec/crud/read-sort-description.rst create mode 100644 source/includes/api-details/swift/crud/read-access-results-description.rst create mode 100644 source/includes/api-details/swift/crud/read-aggregate-description.rst create mode 100644 source/includes/api-details/swift/crud/read-all-objects-of-type-description.rst create mode 100644 source/includes/api-details/swift/crud/read-chain-queries-description.rst create mode 100644 source/includes/api-details/swift/crud/read-database-objects-procedure.rst create mode 100644 source/includes/api-details/swift/crud/read-define-geospatial-shapes-box-description.rst create mode 100644 source/includes/api-details/swift/crud/read-define-geospatial-shapes-circle-description.rst create mode 100644 source/includes/api-details/swift/crud/read-define-geospatial-shapes-polygon-description.rst create mode 100644 source/includes/api-details/swift/crud/read-filter-or-query-objects-description.rst create mode 100644 source/includes/api-details/swift/crud/read-find-object-by-primary-key-description.rst create mode 100644 source/includes/api-details/swift/crud/read-intro-description.rst create mode 100644 source/includes/api-details/swift/crud/read-limit-not-supported.rst create mode 100644 source/includes/api-details/swift/crud/read-query-custom-persistable-property-description.rst create mode 100644 source/includes/api-details/swift/crud/read-query-dictionary-properties-description.rst create mode 100644 source/includes/api-details/swift/crud/read-query-geospatial-data-description.rst create mode 100644 source/includes/api-details/swift/crud/read-query-inverse-relationship-description.rst create mode 100644 source/includes/api-details/swift/crud/read-query-list-properties-description.rst create mode 100644 source/includes/api-details/swift/crud/read-query-mixed-properties-description.rst create mode 100644 source/includes/api-details/swift/crud/read-query-projections-description.rst create mode 100644 source/includes/api-details/swift/crud/read-query-set-properties-description.rst create mode 100644 source/includes/api-details/swift/crud/read-query-with-geospatial-shapes-description.rst create mode 100644 source/includes/api-details/swift/crud/read-sdk-results-collections-description.rst create mode 100644 source/includes/api-details/swift/crud/read-section-query-results-description.rst create mode 100644 source/includes/api-details/swift/crud/read-sort-description.rst create mode 100644 source/includes/api-details/typescript/crud/read-aggregate-description.rst create mode 100644 source/includes/api-details/typescript/crud/read-filter-full-text-search-property-description.rst create mode 100644 source/includes/api-details/typescript/crud/read-query-set-properties-description.rst create mode 100644 source/includes/sdk-examples/crud/read-access-results.rst create mode 100644 source/includes/sdk-examples/crud/read-aggregate.rst create mode 100644 source/includes/sdk-examples/crud/read-all-objects-of-type.rst create mode 100644 source/includes/sdk-examples/crud/read-chain-queries.rst create mode 100644 source/includes/sdk-examples/crud/read-define-geospatial-shapes-box.rst create mode 100644 source/includes/sdk-examples/crud/read-define-geospatial-shapes-circle.rst create mode 100644 source/includes/sdk-examples/crud/read-define-geospatial-shapes-polygon.rst create mode 100644 source/includes/sdk-examples/crud/read-filter-by-remapped-property-name.rst create mode 100644 source/includes/sdk-examples/crud/read-filter-full-text-search-property.rst create mode 100644 source/includes/sdk-examples/crud/read-filter-or-query-objects.rst create mode 100644 source/includes/sdk-examples/crud/read-find-object-by-primary-key.rst create mode 100644 source/includes/sdk-examples/crud/read-limit.rst create mode 100644 source/includes/sdk-examples/crud/read-query-dictionary-properties.rst create mode 100644 source/includes/sdk-examples/crud/read-query-inverse-relationship.rst create mode 100644 source/includes/sdk-examples/crud/read-query-list-properties.rst create mode 100644 source/includes/sdk-examples/crud/read-query-mixed-properties.rst create mode 100644 source/includes/sdk-examples/crud/read-query-set-properties.rst create mode 100644 source/includes/sdk-examples/crud/read-query-to-many-relationship.rst create mode 100644 source/includes/sdk-examples/crud/read-query-to-one-relationship.rst create mode 100644 source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-box.rst create mode 100644 source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-circle.rst create mode 100644 source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-polygon.rst create mode 100644 source/includes/sdk-examples/crud/read-query-with-geospatial-shapes.rst create mode 100644 source/includes/sdk-examples/crud/read-sort.rst create mode 100644 source/sdk/crud/read/read-properties.txt diff --git a/snooty.toml b/snooty.toml index f03ff33085..426594606a 100644 --- a/snooty.toml +++ b/snooty.toml @@ -11,6 +11,7 @@ intersphinx = [ toc_landing_pages = [ # New IA "/sdk/crud/create", + "/sdk/crud/read", "/sdk/platforms/android", "/sdk/platforms/apple", "/sdk/platforms/unity", diff --git a/source/includes/api-details/cpp/crud/read-access-results-description.rst b/source/includes/api-details/cpp/crud/read-access-results-description.rst new file mode 100644 index 0000000000..f1837b9357 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-access-results-description.rst @@ -0,0 +1,7 @@ +In C++, the :cpp-sdk:`Results ` type exposes member +functions to work with results. You may want to check the ``.size()`` of a +results set, or access the object at a specific index. + +Additionally, you can iterate through the results, or observe a results +set for changes. For more details about observing the results for changes, +refer to :ref:`sdks-react-to-changes`. diff --git a/source/includes/api-details/cpp/crud/read-aggregate-not-supported.rst b/source/includes/api-details/cpp/crud/read-aggregate-not-supported.rst new file mode 100644 index 0000000000..970a6bb4e9 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-aggregate-not-supported.rst @@ -0,0 +1 @@ +C++ does not currently support aggregate operators. diff --git a/source/includes/api-details/cpp/crud/read-all-objects-of-type-description.rst b/source/includes/api-details/cpp/crud/read-all-objects-of-type-description.rst new file mode 100644 index 0000000000..fbaafd7447 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-all-objects-of-type-description.rst @@ -0,0 +1,6 @@ +To query for objects of a given type in the database, pass the object type +``YourClassName`` to the :cpp-sdk:`db::objects\ ` +member function. + +This returns a :cpp-sdk:`Results ` object +representing all objects of the given type in the database. diff --git a/source/includes/api-details/cpp/crud/read-database-objects-procedure.rst b/source/includes/api-details/cpp/crud/read-database-objects-procedure.rst new file mode 100644 index 0000000000..52bb42f0ac --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-database-objects-procedure.rst @@ -0,0 +1,25 @@ +To find objects stored within a database: + +1. Query for objects of a given type in the database, pass the object type + ``YourClassName`` to the :cpp-sdk:`db::objects ` + member function. + +#. Optionally, pass any query conditions to further refine the results: + + - Specify a filter to only return objects that meet the condition. If + you don't specify a filter, the SDK returns all objects of the specified + type. + + - Specify the sort order for the results. + Because the database is unordered, if you don't include a sort order, + the SDK cannot guarantee the query returns objects in any specific order. + +#. Work with the results. Objects may be frozen or live, depending on whether + you queried a frozen or live database, collection, or object. + +Note that any retrieved results don't actually hold matching database objects +in memory. Instead, the database uses **direct references**, or pointers. +Database objects in a results collection reference the matched objects, which +map directly to data in the database file. This also means that you can +traverse your graph of an object's :ref:`relationships ` +directly through the results of a query. diff --git a/source/includes/api-details/cpp/crud/read-filter-or-query-objects-description.rst b/source/includes/api-details/cpp/crud/read-filter-or-query-objects-description.rst new file mode 100644 index 0000000000..2d98d1bcd9 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-filter-or-query-objects-description.rst @@ -0,0 +1,11 @@ +To filter data, call the ``.where()`` function on a collection with a valid +query. Currently, C++ supports only a subset of RQL operators. + +Supported Query Operators +````````````````````````` + +C++ supports the following query operators: + +- Equality (``==``, ``!=``) +- Greater than/less than (``>``, ``>=``, ``<``, ``<=``) +- Compound queries (``||``, ``&&``) diff --git a/source/includes/api-details/cpp/crud/read-find-object-by-primary-key-not-supported.rst b/source/includes/api-details/cpp/crud/read-find-object-by-primary-key-not-supported.rst new file mode 100644 index 0000000000..902f9c057a --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-find-object-by-primary-key-not-supported.rst @@ -0,0 +1,3 @@ +C++ does not provide a dedicated API to find an object by its primary +key. Instead, you can perform a regular query for objects where the primary +key property matches the desired primary key value. diff --git a/source/includes/api-details/cpp/crud/read-intro-description.rst b/source/includes/api-details/cpp/crud/read-intro-description.rst new file mode 100644 index 0000000000..7312732687 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-intro-description.rst @@ -0,0 +1,7 @@ +Query operationsn return a :cpp-sdk:`results collection +`. Results collections may be either live or +frozen. + +- **Live results** always contain the latest results of the associated query. +- **Frozen results** represent a snapshot that cannot be modified and doesn't + reflect the latest changes to the database. diff --git a/source/includes/api-details/cpp/crud/read-limit-not-supported.rst b/source/includes/api-details/cpp/crud/read-limit-not-supported.rst new file mode 100644 index 0000000000..429456ad0c --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-limit-not-supported.rst @@ -0,0 +1,3 @@ +C++ does not provide an API to limit query results. Instead, rely on the +SDK's lazy loading characteristics to implicitly limit the objects in +memory by only accessing the objects you need for an operation. diff --git a/source/includes/api-details/cpp/crud/read-query-dictionary-properties-description.rst b/source/includes/api-details/cpp/crud/read-query-dictionary-properties-description.rst new file mode 100644 index 0000000000..9880fda43d --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-query-dictionary-properties-description.rst @@ -0,0 +1,3 @@ +You can iterate and check the values of a realm :cpp-sdk:`map property +` +as you would a standard C++ `map `__. diff --git a/source/includes/api-details/cpp/crud/read-query-list-properties-description.rst b/source/includes/api-details/cpp/crud/read-query-list-properties-description.rst new file mode 100644 index 0000000000..a48078c616 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-query-list-properties-description.rst @@ -0,0 +1,6 @@ +You can read, query, and sort a :cpp-sdk:`list +` similar +to working with a :cpp-sdk:`results +` collection. You can also +work with a list as a results set by calling the ``as_results()`` public member +function of the managed list class. diff --git a/source/includes/api-details/cpp/crud/read-query-mixed-properties-description.rst b/source/includes/api-details/cpp/crud/read-query-mixed-properties-description.rst new file mode 100644 index 0000000000..f2de21a9e2 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-query-mixed-properties-description.rst @@ -0,0 +1,6 @@ +The C++ ``mixed`` data type is a union-like object that can represent a value +any of the supported types. It is implemented using the class template +`std::variant `__. +This implementation means that a ``mixed`` property holds a value of +one of its alternative types, or in the case of error - no value. +Your app must handle the type when reading mixed properties. diff --git a/source/includes/api-details/cpp/crud/read-query-set-properties-description.rst b/source/includes/api-details/cpp/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..ffff168ba6 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-query-set-properties-description.rst @@ -0,0 +1,3 @@ +You can iterate, check the size of a set, and find values in a +:cpp-sdk:`set property +`. diff --git a/source/includes/api-details/cpp/crud/read-sdk-results-collections-description.rst b/source/includes/api-details/cpp/crud/read-sdk-results-collections-description.rst new file mode 100644 index 0000000000..6354a0c251 --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-sdk-results-collections-description.rst @@ -0,0 +1,20 @@ +The SDK's :cpp-sdk:`realm::results\ ` +collection is a struct representing objects retrieved from queries. A results +collection represents the lazily-evaluated results of a query operation, and +has these characteristics: + +- Results are immutable: you cannot manually add or remove elements to or from + the results collection. +- Results have an associated query that determines their contents. +- Results are **live** or **frozen** based on the query source. If they derive + from live objects, the results automatically update when the database + contents change. If they derive from frozen objects, they represent only a + snapshot and do not automatically update. +- You cannot manually initialize an empty results set. Results can only + be initialized: + + - As the result of a query. + - From a managed :ref:`list `, using the + :cpp-sdk:`as_results() + ` + member funcion. diff --git a/source/includes/api-details/cpp/crud/read-sort-description.rst b/source/includes/api-details/cpp/crud/read-sort-description.rst new file mode 100644 index 0000000000..d21d66747a --- /dev/null +++ b/source/includes/api-details/cpp/crud/read-sort-description.rst @@ -0,0 +1,22 @@ +Unlike using `std::sort `__, +the SDK's sort implementation preserves the lazy loading of objects. It does +not pull the entire set of results or list objects into memory, but only +loads them into memory when you access them. + +To sort, call the ``.sort()`` function on a list or results set with one or more +:cpp-sdk:`sort_descriptors `. + +A ``sort_descriptor`` includes: + +- The desired key path to sort by, as a string. +- A bool to specify sort order, where``true`` is ascending and ``false`` + is descending. + +In this example, we sort a results set on ``priority`` in descending order. + +.. literalinclude:: /examples/generated/cpp/filter-data.snippet.sort-results-by-single-property.cpp + :language: cpp + +You can also sort a list or results set by multiple sort descriptors. In +this example, we sort a list property on ``assignee`` in ascending order, +and then on ``priority`` in descending order. diff --git a/source/includes/api-details/csharp/crud/read-access-results-description.rst b/source/includes/api-details/csharp/crud/read-access-results-description.rst new file mode 100644 index 0000000000..0e80a5cab7 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-access-results-description.rst @@ -0,0 +1,5 @@ +In C#, the ``Realm.All()`` method returns an ``IQueryable`` instance. +You can apply additional operators to work with the results. + +For a complete list of the available operators, refer to +:dotnet-sdk:`LINQ support ` in the API reference. diff --git a/source/includes/api-details/csharp/crud/read-aggregate-description.rst b/source/includes/api-details/csharp/crud/read-aggregate-description.rst new file mode 100644 index 0000000000..f96ecd8398 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-aggregate-description.rst @@ -0,0 +1,9 @@ +In C#, aggregations use the +:dotnet-sdk:`Filter() ` +method, which can be used to create more complex queries that are currently +unsupported by the LINQ provider. + +For more information on the available aggregate operators, refer to the +:ref:`Realm Query Language aggregate operator reference `. + +The following examples show different ways to aggregate data. diff --git a/source/includes/api-details/csharp/crud/read-all-objects-of-type-description.rst b/source/includes/api-details/csharp/crud/read-all-objects-of-type-description.rst new file mode 100644 index 0000000000..f8151f3595 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-all-objects-of-type-description.rst @@ -0,0 +1,3 @@ +To read all objects of a certain type, call +:dotnet-sdk:`Realm.All\ `, +where ``T`` is the SDK object type. diff --git a/source/includes/api-details/csharp/crud/read-database-objects-procedure.rst b/source/includes/api-details/csharp/crud/read-database-objects-procedure.rst new file mode 100644 index 0000000000..fcc3851514 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-database-objects-procedure.rst @@ -0,0 +1,25 @@ +To find objects stored within a database: + +1. Query for objects of a given type in the database. Pass the object type + to the :dotnet-sdk:`Realm.All\ ` + method. + +#. Optionally, pass any query conditions to further refine the results: + + - Specify a filter to only return objects that meet the condition. If + you don't specify a filter, the SDK returns all objects of the specified + type. + + - Specify the sort order for the results. + Because the database is unordered, if you don't include a sort order, + the SDK cannot guarantee the query returns objects in any specific order. + +#. Work with the results. Objects may be frozen or live, depending on whether + you queried a frozen or live database, collection, or object. + +Note that any retrieved results don't actually hold matching database objects +in memory. Instead, the database uses **direct references**, or pointers. +Database objects in a results collection reference the matched objects, which +map directly to data in the database file. This also means that you can +traverse your graph of an object's :ref:`relationships ` +directly through the results of a query. diff --git a/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-box-description.rst b/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-box-description.rst new file mode 100644 index 0000000000..6e52ecf9f3 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-box-description.rst @@ -0,0 +1,12 @@ +A :dotnet-sdk:`GeoBox ` is a +rectangular shape whose bounds are determined by :dotnet-sdk:`GeoPoint +` coordinates for a bottom-left +and a top-right corner. + +In C#, you can optionally construct a ``GeoBox`` from a set of four doubles, +which represent: + +- ``left``: The longitude of the left edge of the rectangle. +- ``top``: The latitude of the top edge of the rectangle. +- ``right``: The longitude of the right edge of the rectangle. +- ``bottom``: The latitude of the bottom edge of the rectangle. diff --git a/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-circle-description.rst b/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-circle-description.rst new file mode 100644 index 0000000000..7808ed3717 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-circle-description.rst @@ -0,0 +1,13 @@ +A :dotnet-sdk:`GeoCircle ` is a +circular shape whose bounds originate from a central :dotnet-sdk:`GeoPoint +`, and has a size corresponding to +a radius measured in radians. You can use the SDK's convenience +:dotnet-sdk:`Distance ` structure to +easily work with radii in different units. + +You can construct a ``Distance`` with a radius measurement in one of four units: + +- ``FromDegrees(double)`` +- ``FromKilometers(double)`` +- ``FromMiles(double)`` +- ``FromRadians(double)`` diff --git a/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-polygon-description.rst b/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-polygon-description.rst new file mode 100644 index 0000000000..e62dc871d5 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-define-geospatial-shapes-polygon-description.rst @@ -0,0 +1,12 @@ +A :dotnet-sdk:`GeoPolygon ` is a polygon +shape whose bounds consist of an outer ring, and 0 or more inner holes +to exclude from the geospatial query. + +A polygon's outer ring must contain at least three segments. The last +and the first :dotnet-sdk:`GeoPoint ` +must be the same, which indicates a closed polygon. This means that it takes +at least four ``GeoPoint`` values to construct a polygon. + +Inner holes in a ``GeoPolygon`` are optional, and must be entirely contained +within the outer ring. Each ``GeoPoint`` collection in the ``Holes`` collection +must contain at least three segments, with the same rules as the outer ring. diff --git a/source/includes/api-details/csharp/crud/read-filter-full-text-search-property-description.rst b/source/includes/api-details/csharp/crud/read-filter-full-text-search-property-description.rst new file mode 100644 index 0000000000..71ad24fd87 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-filter-full-text-search-property-description.rst @@ -0,0 +1,11 @@ +In C#, you can query a FTS property using either LINQ or RQL. + +To query with LINQ, use :dotnet-sdk:`QueryMethods.FullTextSearch +`. +The following examples query the ``Person.Biography`` field. + +.. literalinclude:: /examples/generated/dotnet/Indexing.snippet.linq-query-fts.cs + :language: csharp + +To query with RQL, use the ``TEXT`` operator. The following example +queries the ``Person.Biography`` field. diff --git a/source/includes/api-details/csharp/crud/read-filter-or-query-objects-description.rst b/source/includes/api-details/csharp/crud/read-filter-or-query-objects-description.rst new file mode 100644 index 0000000000..369d1bdda6 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-filter-or-query-objects-description.rst @@ -0,0 +1,35 @@ +To query, filter, and sort data in the database, use the SDK query engine. +There are two ways to use the query engine with C#: + +- :ref:`LINQ Syntax ` +- :ref:`Realm Query Language (RQL) ` + +Use LINQ syntax for querying when possible, as it provides compile-time checks +for queries and aligns with .NET conventions. + +Filter Data with LINQ +````````````````````` + +To filter data with LINQ syntax, call the :dotnet-sdk:`Where() +` operator with a +:dotnet-sdk:`Predicate ` that describes +the subset of data you want to access. + +.. literalinclude:: /examples/generated/dotnet/QueryEngineExamples.snippet.logical.cs + :language: csharp + +Filter Data with RQL +```````````````````` + +You can also use the :ref:`Realm Query Language ` (RQL) +to query realms. RQL is a string-based query language used to access the query +engine. When using RQL, you use the +:dotnet-sdk:`Filter() ` +method. + +.. important:: + + Because :ref:`LINQ ` provides compile-time error checking + of queries, you should use it instead of RQL in most cases. If you require + features beyond LINQ's current capabilities, such as using + :ref:`aggregation `, use RQL. diff --git a/source/includes/api-details/csharp/crud/read-find-object-by-primary-key-description.rst b/source/includes/api-details/csharp/crud/read-find-object-by-primary-key-description.rst new file mode 100644 index 0000000000..13dcecc319 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-find-object-by-primary-key-description.rst @@ -0,0 +1,3 @@ +You can find a specific item by its primary key using the +:dotnet-sdk:`Find ` +method. The following example finds a single Project. diff --git a/source/includes/api-details/csharp/crud/read-intro-description.rst b/source/includes/api-details/csharp/crud/read-intro-description.rst new file mode 100644 index 0000000000..14b2ae6044 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-intro-description.rst @@ -0,0 +1,7 @@ +:dotnet-sdk:`Query operations ` +return an ``IQueryable``, which represents a collection of all objects +of the given type in the database. This collection may be either live or frozen. + +- **Live results** always contain the latest results of the associated query. +- **Frozen results** represent a snapshot that cannot be modified and doesn't + reflect the latest changes to the database. diff --git a/source/includes/api-details/csharp/crud/read-limit-description.rst b/source/includes/api-details/csharp/crud/read-limit-description.rst new file mode 100644 index 0000000000..a3415d03d7 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-limit-description.rst @@ -0,0 +1,7 @@ +The C# LINQ query engine does not provide an API to limit query results. +Instead, rely on the SDK's lazy loading characteristics to implicitly limit +the objects in memory by only accessing the objects you need for an operation. + +If you're using the Realm Query Language query engine with C#, you can use +the :ref:`RQL LIMIT() operator ` to limit query +results. diff --git a/source/includes/api-details/csharp/crud/read-query-dictionary-properties-description.rst b/source/includes/api-details/csharp/crud/read-query-dictionary-properties-description.rst new file mode 100644 index 0000000000..ef6bc3aa7e --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-dictionary-properties-description.rst @@ -0,0 +1,9 @@ +You can query and iterate through a :ref:`RealmDictionary ` +property as you would an +`IDictionary `__. + +The SDK also provides a convenience method to cast an ``IDictionary`` to an +``IRealmCollection``. To convert a dictionary to an SDK collection, call the +:dotnet-sdk:`AsRealmCollection\ +` +method with the ``IDictionary`` as its argument. diff --git a/source/includes/api-details/csharp/crud/read-query-geospatial-data-description.rst b/source/includes/api-details/csharp/crud/read-query-geospatial-data-description.rst new file mode 100644 index 0000000000..ec64994b23 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-geospatial-data-description.rst @@ -0,0 +1,10 @@ +The SDK provides two specialized non-persistable data types to define shapes: + +- :dotnet-sdk:`GeoPoint `: A + struct that represents the coordinates of a point formed by a pair of + doubles consisting of these values: + + - Latitude: ranges between -90 and 90 degrees, inclusive. + - Longitude: ranges between -180 and 180 degrees, inclusive. +- :dotnet-sdk:`Distance `: A helper + struct to represent and convert a distance. diff --git a/source/includes/api-details/csharp/crud/read-query-inverse-relationship-description.rst b/source/includes/api-details/csharp/crud/read-query-inverse-relationship-description.rst new file mode 100644 index 0000000000..6578914172 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-inverse-relationship-description.rst @@ -0,0 +1,3 @@ +To query an inverse relationship in C#, you cannot use LINQ. Instead, pass a +string predicate using RQL. The following example shows how you could find +all Users who have Items that contain the word "oscillator". diff --git a/source/includes/api-details/csharp/crud/read-query-list-properties-description.rst b/source/includes/api-details/csharp/crud/read-query-list-properties-description.rst new file mode 100644 index 0000000000..7e62d6a58f --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-list-properties-description.rst @@ -0,0 +1,11 @@ +SDK lists implement the :dotnet-sdk:`IRealmCollection\ +` interface, which provides a range +of properties and methods to simplify reading and querying from the list. +You can query an SDK list using the same :ref:`query engines and operators +` as a results set. + +The SDK also provides a convenience method to cast an ``IList`` to an +``IRealmCollection``. To convert a list to an SDK collection, call the +:dotnet-sdk:`AsRealmCollection\ +` +method with the ``IList`` as its argument. diff --git a/source/includes/api-details/csharp/crud/read-query-mixed-properties-description.rst b/source/includes/api-details/csharp/crud/read-query-mixed-properties-description.rst new file mode 100644 index 0000000000..efbb1ee105 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-mixed-properties-description.rst @@ -0,0 +1,7 @@ +You can query a :dotnet-sdk:`RealmValue ` +field just like any other data type. Operators that only work with certain +types, such as string operators and arithmetic operators, ignore +values that do not contain that type. Negating such operators matches +values that do not contain the type. Type queries match the underlying +type, rather than ``RealmValue``. Arithmetic operators convert numeric +values implicitly to compare across types. diff --git a/source/includes/api-details/csharp/crud/read-query-set-properties-description.rst b/source/includes/api-details/csharp/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..fd74fb0312 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-set-properties-description.rst @@ -0,0 +1,11 @@ +SDK sets implement the :dotnet-sdk:`IRealmCollection\ +` interface, which provides a range +of properties and methods to simplify reading and querying from the set. +You can query an SDK set using the same :ref:`query engines and operators +` as a results set. + +The SDK also provides a convenience method to cast an ``ISet`` to an +``IRealmCollection``. To convert a set to an SDK collection, call the +:dotnet-sdk:`AsRealmCollection\ +` +method with the ``ISet`` as its argument. diff --git a/source/includes/api-details/csharp/crud/read-query-to-many-relationship-description.rst b/source/includes/api-details/csharp/crud/read-query-to-many-relationship-description.rst new file mode 100644 index 0000000000..82facd1137 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-to-many-relationship-description.rst @@ -0,0 +1,9 @@ +An application could use the following object schemas to indicate +that a Person may own multiple Dogs by including them in its ``dog`` +property: + +.. literalinclude:: /examples/generated/dotnet/Relationships.snippet.one-to-many.cs + :language: csharp + +To see the to-many relationship of Person to Dog, you query for the +Person and get that person's Dogs. diff --git a/source/includes/api-details/csharp/crud/read-query-to-one-relationship-description.rst b/source/includes/api-details/csharp/crud/read-query-to-one-relationship-description.rst new file mode 100644 index 0000000000..47b9c81c12 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-to-one-relationship-description.rst @@ -0,0 +1,2 @@ +To query a direct relationship, you can use LINQ syntax. +See the following example for how to query a one-to-one relationship. diff --git a/source/includes/api-details/csharp/crud/read-query-with-geospatial-shapes-description.rst b/source/includes/api-details/csharp/crud/read-query-with-geospatial-shapes-description.rst new file mode 100644 index 0000000000..772454a25b --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-query-with-geospatial-shapes-description.rst @@ -0,0 +1,11 @@ +You can query geospatial data in two ways: + +- Using the :dotnet-sdk:`GeoWithin() + ` + operator with the :ref:`LINQ ` query engine. +- Using the :dotnet-sdk:`Filter() + ` method with the + :ref:`Realm Query Language ` ``geoWithin`` operator. + +The examples below show the results of queries using these two ``Company`` +objects. diff --git a/source/includes/api-details/csharp/crud/read-sdk-results-collections-description.rst b/source/includes/api-details/csharp/crud/read-sdk-results-collections-description.rst new file mode 100644 index 0000000000..95fc1d5c21 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-sdk-results-collections-description.rst @@ -0,0 +1,13 @@ +The SDK's results collection is a class representing objects retrieved from +queries. A results collection represents the lazily-evaluated results of a +query operation, and has these characteristics: + +- Results are immutable: you cannot manually add or remove elements to or from + the results collection. +- Results have an associated query that determines their contents. +- Results are **live** or **frozen** based on the query source. If they derive + from live objects, the results automatically update when the database + contents change in the isolate context. If they derive from frozen objects, + they represent only a snapshot and do not automatically update. +- You cannot manually initialize an empty results set. Results can + only be initialized as the result of a query. diff --git a/source/includes/api-details/csharp/crud/read-sort-description.rst b/source/includes/api-details/csharp/crud/read-sort-description.rst new file mode 100644 index 0000000000..392eb02406 --- /dev/null +++ b/source/includes/api-details/csharp/crud/read-sort-description.rst @@ -0,0 +1,2 @@ +The following code sorts the projects by name in reverse +alphabetical order (i.e. "descending" order). diff --git a/source/includes/api-details/dart/crud/read-access-results-description.rst b/source/includes/api-details/dart/crud/read-access-results-description.rst new file mode 100644 index 0000000000..c59b992b9f --- /dev/null +++ b/source/includes/api-details/dart/crud/read-access-results-description.rst @@ -0,0 +1,23 @@ +In Dart, the ``RealmResults`` type provides convenience properties and +functions to simplify working with query results. You may want to: + +- Check whether the results set :flutter-sdk:`.isEmpty + `. +- Check the :flutter-sdk:`.length ` of the + results. +- Get the :flutter-sdk:`.first ` or + :flutter-sdk:`.last ` element in the results. +- Check whether the results set :flutter-sdk:`.contains() + ` an individual element. +- Find the :flutter-sdk:`indexOf() ` an + element. +- Get the :flutter-sdk:`elementAt() ` + an index. + +For the full range of available properties and functions to work with the +results set, refer to the the :flutter-sdk:`RealmResults +` API reference. + +Additionally, you can iterate through the results, or observe a results +set for changes. For more details about observing the results for changes, +refer to :ref:`sdks-react-to-changes`. diff --git a/source/includes/api-details/dart/crud/read-aggregate-description.rst b/source/includes/api-details/dart/crud/read-aggregate-description.rst new file mode 100644 index 0000000000..56aa0f676a --- /dev/null +++ b/source/includes/api-details/dart/crud/read-aggregate-description.rst @@ -0,0 +1,4 @@ +In Dart, you perform aggregations through the :flutter-sdk:`Realm.query() +` method. In the ``query()`` method's argument, use +:ref:`Realm Query Language aggregate operators ` to +aggregate data. diff --git a/source/includes/api-details/dart/crud/read-all-objects-of-type-description.rst b/source/includes/api-details/dart/crud/read-all-objects-of-type-description.rst new file mode 100644 index 0000000000..760dc8e1b9 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-all-objects-of-type-description.rst @@ -0,0 +1,2 @@ +Retrieve a collection of all objects of a given type in the database with the +:flutter-sdk:`Realm.all\() ` method. diff --git a/source/includes/api-details/dart/crud/read-database-objects-procedure.rst b/source/includes/api-details/dart/crud/read-database-objects-procedure.rst new file mode 100644 index 0000000000..b3cbe4395e --- /dev/null +++ b/source/includes/api-details/dart/crud/read-database-objects-procedure.rst @@ -0,0 +1,24 @@ +To find objects stored within a database: + +1. Query for objects of a given type in the database. Pass the object type + to the :flutter-sdk:`Realm.all\ ` method. + +#. Optionally, pass any query conditions to further refine the results: + + - Specify a filter to only return objects that meet the condition. If + you don't specify a filter, the SDK returns all objects of the specified + type. + + - Specify the sort order for the results. + Because the database is unordered, if you don't include a sort order, + the SDK cannot guarantee the query returns objects in any specific order. + +#. Work with the results. Objects may be frozen or live, depending on whether + you queried a frozen or live database, collection, or object. + +Note that any retrieved results don't actually hold matching database objects +in memory. Instead, the database uses **direct references**, or pointers. +Database objects in a results collection reference the matched objects, which +map directly to data in the database file. This also means that you can +traverse your graph of an object's :ref:`relationships ` +directly through the results of a query. diff --git a/source/includes/api-details/dart/crud/read-define-geospatial-shapes-box-description.rst b/source/includes/api-details/dart/crud/read-define-geospatial-shapes-box-description.rst new file mode 100644 index 0000000000..4000204d23 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-define-geospatial-shapes-box-description.rst @@ -0,0 +1,5 @@ +A :flutter-sdk:`GeoBox ` is a +rectangular shape whose bounds are determined by :flutter-sdk:`GeoPoint +` coordinates for a bottom-left +and a top-right corner. The SDK refers to these as ``southWest`` and +``northEast``, respectively. diff --git a/source/includes/api-details/dart/crud/read-define-geospatial-shapes-circle-description.rst b/source/includes/api-details/dart/crud/read-define-geospatial-shapes-circle-description.rst new file mode 100644 index 0000000000..e9fe29f2b6 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-define-geospatial-shapes-circle-description.rst @@ -0,0 +1,18 @@ +A :flutter-sdk:`GeoCircle ` is a +circular shape whose bounds originate from a central :flutter-sdk:`GeoPoint +`, and has a size corresponding to +a radius measured in radians. You can use the SDK's convenience +:flutter-sdk:`GeoDistance ` class to +easily work with radii in different units. + +The default constructor for ``GeoDistance()`` takes a double that represents +a distance in radians. You can use the following convenience methods to create +a ``GeoDistance`` from a different measure: + +- ``GeoDistance.fromDegrees(double degrees)`` +- ``GeoDistance.fromKilometers(double kilometers)`` +- ``GeoDistance.fromMeters(double meters)`` +- ``GeoDistance.fromMiles(double miles)`` + +You can optionally access the distance value in any of these units, represented +as a double. diff --git a/source/includes/api-details/dart/crud/read-define-geospatial-shapes-polygon-description.rst b/source/includes/api-details/dart/crud/read-define-geospatial-shapes-polygon-description.rst new file mode 100644 index 0000000000..4d1582c2da --- /dev/null +++ b/source/includes/api-details/dart/crud/read-define-geospatial-shapes-polygon-description.rst @@ -0,0 +1,14 @@ +A :flutter-sdk:`GeoPolygon ` is a polygon +shape whose bounds consist of an outer ring of type :flutter-sdk:`GeoRing +`, and 0 or more inner holes to exclude from the +geospatial query. + +The ``GeoRing`` is a list of three or more :flutter-sdk:`GeoPoint +` coordinates. The last +and the first ``GeoPoint`` must be the same, which indicates a closed ring. +This means that it takes at least four ``GeoPoint`` values to construct a +polygon. + +Inner holes in a ``GeoPolygon`` are optional, and must be entirely contained +within the outer ring. Each ``GeoRing`` collection in the ``holes`` collection +must contain at least three segments, with the same rules as the outer ring. diff --git a/source/includes/api-details/dart/crud/read-filter-full-text-search-property-description.rst b/source/includes/api-details/dart/crud/read-filter-full-text-search-property-description.rst new file mode 100644 index 0000000000..35e9c0cc37 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-filter-full-text-search-property-description.rst @@ -0,0 +1,5 @@ +For more information on features of the FTS index, see the API reference for +`RealmIndexType `__. + +In the following example, we query on the ``Rug.pattern`` and ``Rug.material`` +fields. diff --git a/source/includes/api-details/dart/crud/read-filter-or-query-objects-description.rst b/source/includes/api-details/dart/crud/read-filter-or-query-objects-description.rst new file mode 100644 index 0000000000..49206471ae --- /dev/null +++ b/source/includes/api-details/dart/crud/read-filter-or-query-objects-description.rst @@ -0,0 +1,8 @@ +Filter a collection to retrieve a specific segment of objects with the +:flutter-sdk:`Realm.query() ` method. In the +``query()`` method's argument, use RQL to perform filtering. + +.. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.filter.dart + :language: dart + +You can use iterable arguments in your filter. diff --git a/source/includes/api-details/dart/crud/read-find-object-by-primary-key-description.rst b/source/includes/api-details/dart/crud/read-find-object-by-primary-key-description.rst new file mode 100644 index 0000000000..92f3a21916 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-find-object-by-primary-key-description.rst @@ -0,0 +1,2 @@ +Find an object by its primary key with :flutter-sdk:`Realm.find() +`. diff --git a/source/includes/api-details/dart/crud/read-intro-description.rst b/source/includes/api-details/dart/crud/read-intro-description.rst new file mode 100644 index 0000000000..bfaee79212 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-intro-description.rst @@ -0,0 +1,8 @@ +Query operations return a :flutter-sdk:`results collection +`. + +Results collections may be either live or frozen. + +- **Live results** always contain the latest results of the associated query. +- **Frozen results** represent a snapshot that cannot be modified and doesn't + reflect the latest changes to the database. diff --git a/source/includes/api-details/dart/crud/read-query-dictionary-properties-description.rst b/source/includes/api-details/dart/crud/read-query-dictionary-properties-description.rst new file mode 100644 index 0000000000..2e9d767d90 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-query-dictionary-properties-description.rst @@ -0,0 +1,6 @@ +Get a ``RealmMap`` by property name with +:flutter-sdk:`dynamic.getMap() ` + +The following example demonstrates some basic usage of ``RealmMap``. +For more information about all available methods, refer to the +:flutter-sdk:`RealmMap reference ` documentation. diff --git a/source/includes/api-details/dart/crud/read-query-geospatial-data-description.rst b/source/includes/api-details/dart/crud/read-query-geospatial-data-description.rst new file mode 100644 index 0000000000..0b73129555 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-query-geospatial-data-description.rst @@ -0,0 +1,12 @@ +The SDK provides two specialized non-persistable data types to define shapes: + +- :flutter-sdk:`GeoPoint `: A class that represents + the coordinates of a point formed by a pair of doubles consisting of these + values: + + - ``lat``: a double value representing the latitude of a point. + - ``lon````: a doubble value representing the longitude of a point. +- :flutter-sdk:`GeoDistance `: A double + that represents a distance in radians used to calculate the size of the + circle shape. ``GeoDistance`` provides convenience methods to simplify + converting degrees, kilometers, meters, and miles to radians. diff --git a/source/includes/api-details/dart/crud/read-query-inverse-relationship-description.rst b/source/includes/api-details/dart/crud/read-query-inverse-relationship-description.rst new file mode 100644 index 0000000000..a42eb273b2 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-query-inverse-relationship-description.rst @@ -0,0 +1,16 @@ +In Dart, there are two ways to query inverse relationships. + +You can use the :flutter-sdk:`getBacklinks() +` method to retrieve an object at +the origin of the relationship from the related object. + +Here, we use the ``getBacklinks()`` method to find any ``User`` objects that +link to the specified tasks through the ``tasks`` backlinks property: + +.. literalinclude:: /examples/generated/flutter/backlinks_test.snippet.query-backlink-inverse-relationship.dart + :language: dart + +You can also filter by inverse relationships using the +``@links..`` syntax. For example, a filter can match +a ``Task`` object based on properties of the ``User`` +object that references it. diff --git a/source/includes/api-details/dart/crud/read-query-list-properties-description.rst b/source/includes/api-details/dart/crud/read-query-list-properties-description.rst new file mode 100644 index 0000000000..caf89521a3 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-query-list-properties-description.rst @@ -0,0 +1,11 @@ +Get a ``RealmList`` by property name with +:flutter-sdk:`dynamic.getList() `. + +You can also work with a list as a results set. Call the +:flutter-sdk:`RealmList\.asResults() ` +method to convert the list to a :flutter-sdk:`RealmResults\ +`. + +The following example demonstrates some basic usage of ``RealmList``. +For more information about all available methods, refer to the +:flutter-sdk:`RealmList reference ` documentation. diff --git a/source/includes/api-details/dart/crud/read-query-mixed-properties-description.rst b/source/includes/api-details/dart/crud/read-query-mixed-properties-description.rst new file mode 100644 index 0000000000..6ff1c97fe3 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-query-mixed-properties-description.rst @@ -0,0 +1,7 @@ +You can query a :flutter-sdk:`RealmValue ` +field just like any other data type. Operators that only work with certain +types, such as string operators and arithmetic operators, ignore +values that do not contain that type. Negating such operators matches +values that do not contain the type. Type queries match the underlying +type, rather than ``RealmValue``. Arithmetic operators convert numeric +values implicitly to compare across types. diff --git a/source/includes/api-details/dart/crud/read-query-set-properties-description.rst b/source/includes/api-details/dart/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..6a63b1f2dd --- /dev/null +++ b/source/includes/api-details/dart/crud/read-query-set-properties-description.rst @@ -0,0 +1,6 @@ +Get a ``RealmSet`` by property name with +:flutter-sdk:`dynamic.getSet() `. + +The following example demonstrates some basic usage of ``RealmSet``. +For more information about all available methods, refer to the +:flutter-sdk:`RealmSet reference ` documentation. diff --git a/source/includes/api-details/dart/crud/read-query-with-geospatial-shapes-description.rst b/source/includes/api-details/dart/crud/read-query-with-geospatial-shapes-description.rst new file mode 100644 index 0000000000..6517c73d15 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-query-with-geospatial-shapes-description.rst @@ -0,0 +1,5 @@ +You can query geospatial data using the :ref:`Realm Query Language +` ``geoWithin`` operator. + +The examples below show the results of queries using these two ``Company`` +objects. diff --git a/source/includes/api-details/dart/crud/read-sdk-results-collections-description.rst b/source/includes/api-details/dart/crud/read-sdk-results-collections-description.rst new file mode 100644 index 0000000000..34fb294466 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-sdk-results-collections-description.rst @@ -0,0 +1,17 @@ +The SDK's :flutter-sdk:`RealmResults ` +collection is a class representing objects retrieved from queries. A +``RealmResults`` collection represents the lazily-evaluated results of a query +operation, and has these characteristics: + +- Results are immutable: you cannot manually add or remove elements to or from + the results collection. +- Results have an associated query that determines their contents. +- Results are **live** or **frozen** based on the query source. If they derive + from live objects, the results automatically update when the database + contents change in the isolate context. If they derive from frozen objects, + they represent only a snapshot and do not automatically update. +- You cannot manually initialize an empty ``RealmResults`` set. Results can + only be initialized: + + - As the result of a query. + - From a ``RealmList`` or ``RealmSet``, by calling the ``asResults()`` method. diff --git a/source/includes/api-details/dart/crud/read-sort-description.rst b/source/includes/api-details/dart/crud/read-sort-description.rst new file mode 100644 index 0000000000..e7e1115120 --- /dev/null +++ b/source/includes/api-details/dart/crud/read-sort-description.rst @@ -0,0 +1,5 @@ +Sort query results using the :ref:`Realm Query Language SORT() operator +` in the ``query()`` method's argument. + +Note that you can't use :ref:`parameterized queries ` +in RQL SORT() clauses. Instead, use strings or string interpolation. diff --git a/source/includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst b/source/includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst new file mode 100644 index 0000000000..94fb0846e7 --- /dev/null +++ b/source/includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst @@ -0,0 +1,2 @@ +The selected language does not support Full-Text Search. You cannot currently +model or query a FTS property in this language. diff --git a/source/includes/api-details/generic/crud/read-geospatial-data-not-supported.rst b/source/includes/api-details/generic/crud/read-geospatial-data-not-supported.rst new file mode 100644 index 0000000000..d99533915d --- /dev/null +++ b/source/includes/api-details/generic/crud/read-geospatial-data-not-supported.rst @@ -0,0 +1,3 @@ +The selected language does not currently support persisting and querying +geospatial data. Instead, you can manually define your own logic and types +for working with geospatial data. diff --git a/source/includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst b/source/includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst new file mode 100644 index 0000000000..8ac2a8669e --- /dev/null +++ b/source/includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst @@ -0,0 +1 @@ +The selected language does not currently support type projection. diff --git a/source/includes/api-details/generic/crud/read-query-projections-not-supported.rst b/source/includes/api-details/generic/crud/read-query-projections-not-supported.rst new file mode 100644 index 0000000000..1811385711 --- /dev/null +++ b/source/includes/api-details/generic/crud/read-query-projections-not-supported.rst @@ -0,0 +1 @@ +The selected language does not currently support the class projection APIs. diff --git a/source/includes/api-details/generic/crud/read-section-query-results-not-supported.rst b/source/includes/api-details/generic/crud/read-section-query-results-not-supported.rst new file mode 100644 index 0000000000..b3e1f6b017 --- /dev/null +++ b/source/includes/api-details/generic/crud/read-section-query-results-not-supported.rst @@ -0,0 +1,3 @@ +The selected language does not currently support the sectioned results APIs. +Instead, you can manually define logic to display only a subset of query +results based on the needs of your app. diff --git a/source/includes/api-details/java/crud/read-access-results-description.rst b/source/includes/api-details/java/crud/read-access-results-description.rst new file mode 100644 index 0000000000..568080a3f2 --- /dev/null +++ b/source/includes/api-details/java/crud/read-access-results-description.rst @@ -0,0 +1,21 @@ +In Java and Kotlin (Java SDK), the ``RealmResults`` type provides convenience +functions to work with query results. You may want to: + +- Check the :java-sdk:`.size() ` of a + results set. +- Check whether the results set :java-sdk:`.contains() + ` + an individual element. +- :java-sdk:`get() ` the element at + an index. +- Get the :java-sdk:`.first() ` or + :java-sdk:`.last() ` element in the + results set. + +For the full range of available functions to work with the results set, +refer to the the :java-sdk:`RealmResults ` API +reference. + +Additionally, you can iterate through the results, or observe a results +set for changes. For more details about observing the results for changes, +refer to :ref:`sdks-react-to-changes`. diff --git a/source/includes/api-details/java/crud/read-aggregate-description.rst b/source/includes/api-details/java/crud/read-aggregate-description.rst new file mode 100644 index 0000000000..3a0ba8f582 --- /dev/null +++ b/source/includes/api-details/java/crud/read-aggregate-description.rst @@ -0,0 +1,12 @@ +You can perform aggregation using +:ref:`RQL aggregate operators `, one of the +``RealmQuery`` aggregation methods, or a combination of both. Some of the +common aggregation methods include: + +- :java-sdk:`max() ` +- :java-sdk:`min() ` +- :java-sdk:`sum() ` +- :java-sdk:`count() ` + +For a full list of supported aggregation methods, refer to the +:java-sdk:`RealmQuery ` API reference. diff --git a/source/includes/api-details/java/crud/read-all-objects-of-type-description.rst b/source/includes/api-details/java/crud/read-all-objects-of-type-description.rst new file mode 100644 index 0000000000..47b68eda2a --- /dev/null +++ b/source/includes/api-details/java/crud/read-all-objects-of-type-description.rst @@ -0,0 +1,3 @@ +In order to access all instances of a given type in the database, use +the :java-sdk:`Realm.where() ` +method to specify a class. diff --git a/source/includes/api-details/java/crud/read-database-objects-procedure.rst b/source/includes/api-details/java/crud/read-database-objects-procedure.rst new file mode 100644 index 0000000000..5240a6dcc5 --- /dev/null +++ b/source/includes/api-details/java/crud/read-database-objects-procedure.rst @@ -0,0 +1,25 @@ +To find objects stored within a database: + +1. Query for objects of a given type in the database. Pass the object type + to the :java-sdk:`Realm.where() ` + method. + +#. Optionally, pass any query conditions to further refine the results: + + - Specify a filter to only return objects that meet the condition. If + you don't specify a filter, the SDK returns all objects of the specified + type. + + - Specify the sort order for the results. + Because the database is unordered, if you don't include a sort order, + the SDK cannot guarantee the query returns objects in any specific order. + +#. Work with the results. Objects may be frozen or live, depending on whether + you queried a frozen or live database, collection, or object. + +Note that any retrieved results don't actually hold matching database objects +in memory. Instead, the database uses **direct references**, or pointers. +Database objects in a results collection reference the matched objects, which +map directly to data in the database file. This also means that you can +traverse your graph of an object's :ref:`relationships ` +directly through the results of a query. diff --git a/source/includes/api-details/java/crud/read-filter-or-query-objects-java-description.rst b/source/includes/api-details/java/crud/read-filter-or-query-objects-java-description.rst new file mode 100644 index 0000000000..31c53ef925 --- /dev/null +++ b/source/includes/api-details/java/crud/read-filter-or-query-objects-java-description.rst @@ -0,0 +1,32 @@ +In Java, you can filter objects with either the Fluent interface or RQL. + +Filter Data with Fluent Interface +````````````````````````````````` + +To filter data with the Fluent interface, filter data with a +:java-sdk:`RealmQuery `. For more details, refer +to :ref:`Fluent interface `. + +In the following example, we use the Fluent interface comparison operators to: + +- Find high priority tasks by comparing the value of the ``priority`` property value with a threshold number, above which priority can be considered high. +- Find just-started or short-running tasks by seeing if the ``progressMinutes`` property falls within a certain range. +- Find unassigned tasks by finding tasks where the ``assignee`` property is equal to null. +- Find tasks assigned to specific teammates Ali or Jamie by seeing if the ``assignee`` property is in a list of names. + +.. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.filter-results.java + :language: java + :copyable: false + +Filter Data with RQL +```````````````````` + +To filter data with RQL, use :java-sdk:`RealmQuery.rawPredicate() +`. +For more information about syntax, usage and limitations, +refer to the :ref:`Realm Query Language reference `. + +RQL can use either the class and property names defined in your SDK model +classes or the internal names defined with ``@RealmField``. You can combine +raw predicates with other raw predicates or type-safe predicates created with +``RealmQuery``. diff --git a/source/includes/api-details/java/crud/read-filter-or-query-objects-kotlin-description.rst b/source/includes/api-details/java/crud/read-filter-or-query-objects-kotlin-description.rst new file mode 100644 index 0000000000..f20e572e94 --- /dev/null +++ b/source/includes/api-details/java/crud/read-filter-or-query-objects-kotlin-description.rst @@ -0,0 +1,33 @@ +In Java or Kotlin (Java SDK), you can filter objects with either the +Fluent interface or RQL. + +Filter Data with Fluent Interface +````````````````````````````````` + +To filter data with the Fluent interface, filter data with a +:java-sdk:`RealmQuery `. For more details, refer +to :ref:`Fluent interface `. + +In the following example, we use the Fluent interface comparison operators to: + +- Find high priority tasks by comparing the value of the ``priority`` property value with a threshold number, above which priority can be considered high. +- Find just-started or short-running tasks by seeing if the ``progressMinutes`` property falls within a certain range. +- Find unassigned tasks by finding tasks where the ``assignee`` property is equal to null. +- Find tasks assigned to specific teammates Ali or Jamie by seeing if the ``assignee`` property is in a list of names. + +.. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.filter-results.kt + :language: kotlin + :copyable: false + +Filter Data with RQL +```````````````````` + +To filter data with RQL, use :java-sdk:`RealmQuery.rawPredicate() +`. +For more information about syntax, usage and limitations, +refer to the :ref:`Realm Query Language reference `. + +RQL can use either the class and property names defined in your SDK model +classes or the internal names defined with ``@RealmField``. You can combine +raw predicates with other raw predicates or type-safe predicates created with +``RealmQuery``. diff --git a/source/includes/api-details/java/crud/read-find-object-by-primary-key-not-supported.rst b/source/includes/api-details/java/crud/read-find-object-by-primary-key-not-supported.rst new file mode 100644 index 0000000000..05523e5708 --- /dev/null +++ b/source/includes/api-details/java/crud/read-find-object-by-primary-key-not-supported.rst @@ -0,0 +1,5 @@ +Java and Kotlin (Java SDK) do not provide a dedicated API to find an object by +primary key. Instead, you can perform a regular query for objects where the +primary key property matches the desired primary key value using the +:java-sdk:`RealmQuery.equalTo() +` method. diff --git a/source/includes/api-details/java/crud/read-intro-description.rst b/source/includes/api-details/java/crud/read-intro-description.rst new file mode 100644 index 0000000000..89139d092b --- /dev/null +++ b/source/includes/api-details/java/crud/read-intro-description.rst @@ -0,0 +1,4 @@ +:java-sdk:`Query operations ` return a +:java-sdk:`results collection `. These +collections are live, meaning they always contain the latest +results of the associated query. diff --git a/source/includes/api-details/java/crud/read-limit-description.rst b/source/includes/api-details/java/crud/read-limit-description.rst new file mode 100644 index 0000000000..a82a686588 --- /dev/null +++ b/source/includes/api-details/java/crud/read-limit-description.rst @@ -0,0 +1,3 @@ +In Java or Kotlin (Java SDK), call the :java-sdk:`limit() +` method with a ``long`` argument to +limit the number of query results. diff --git a/source/includes/api-details/java/crud/read-query-dictionary-properties-description.rst b/source/includes/api-details/java/crud/read-query-dictionary-properties-description.rst new file mode 100644 index 0000000000..565bb4e3be --- /dev/null +++ b/source/includes/api-details/java/crud/read-query-dictionary-properties-description.rst @@ -0,0 +1,4 @@ +- Check if the dictionary contains an specific key: + :java-sdk:`containsKey() ` +- Check if the dictionary contains a specific value: + :java-sdk:`containsValue() ` \ No newline at end of file diff --git a/source/includes/api-details/java/crud/read-query-inverse-relationship-java-description.rst b/source/includes/api-details/java/crud/read-query-inverse-relationship-java-description.rst new file mode 100644 index 0000000000..6d7f3edb6f --- /dev/null +++ b/source/includes/api-details/java/crud/read-query-inverse-relationship-java-description.rst @@ -0,0 +1,13 @@ +Consider the following relationship between classes ``Cat`` and +``Human``. In this example, all cats link to their human (or +multiple humans, if multiple human objects refer to the same cat). +Realm calculates the owners of each cat for you based on the field +name you provide to the ``@LinkingObjects`` annotation: + +.. include:: /examples/generated/java/sync/Cat.snippet.complete.java.rst + +.. include:: /examples/generated/java/sync/Human.snippet.complete.java.rst + +To query this relationship, use dot notation in a +:ref:`query ` to access any property +of the linked object. diff --git a/source/includes/api-details/java/crud/read-query-inverse-relationship-kotlin-description.rst b/source/includes/api-details/java/crud/read-query-inverse-relationship-kotlin-description.rst new file mode 100644 index 0000000000..0a458a470e --- /dev/null +++ b/source/includes/api-details/java/crud/read-query-inverse-relationship-kotlin-description.rst @@ -0,0 +1,13 @@ +Consider the following relationship between classes ``Dog`` and +``Person``. In this example, all dogs link to their owner (or +multiple owners, if multiple person objects refer to the same dog). +Realm calculates the owners of each dog for you based on the field +name you provide to the ``@LinkingObjects`` annotation: + +.. include:: /examples/generated/java/sync/Dog.snippet.complete.kt.rst + +.. include:: /examples/generated/java/sync/Person.snippet.complete.kt.rst + +To query this relationship, use dot notation in a +:ref:`query ` to access any property +of the linked object. diff --git a/source/includes/api-details/java/crud/read-query-list-properties-description.rst b/source/includes/api-details/java/crud/read-query-list-properties-description.rst new file mode 100644 index 0000000000..c34f99165b --- /dev/null +++ b/source/includes/api-details/java/crud/read-query-list-properties-description.rst @@ -0,0 +1,3 @@ +You can read, query, iterate over, and sort a :java-sdk:`RealmList +` similar to working with a :cpp-sdk:`RealmResults +` collection. diff --git a/source/includes/api-details/java/crud/read-query-mixed-properties-description.rst b/source/includes/api-details/java/crud/read-query-mixed-properties-description.rst new file mode 100644 index 0000000000..9b689bae1a --- /dev/null +++ b/source/includes/api-details/java/crud/read-query-mixed-properties-description.rst @@ -0,0 +1,7 @@ +You can query a ``RealmAny`` field just like any other data type. +Operators that only work with certain types, such as :ref:`string +operators ` and arithmetic operators, ignore +values that do not contain that type. Negating such operators matches +values that do not contain the type. Type queries match the underlying +type, rather than ``RealmAny``. Arithmetic operators convert numeric +values implicitly to compare across types. diff --git a/source/includes/api-details/java/crud/read-query-set-properties-description.rst b/source/includes/api-details/java/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..7d40ca3bde --- /dev/null +++ b/source/includes/api-details/java/crud/read-query-set-properties-description.rst @@ -0,0 +1,17 @@ +``RealmSet`` implements Java's ``Set`` interface, so it works just like the +built-in ``HashSet`` class, except managed ``RealmSet`` instances persist +their contents to a database instance. ``RealmSet`` instances that contain SDK +objects actually only store references to those objects, so deleting an +SDK object from a database instance also deletes that object from +any ``RealmSet`` instances that contain the object. + +Because ``RealmSet`` implements ``RealmCollection``, it has some useful +mathematical methods, such as ``sum``, ``min``, and ``max``. For a complete +list of available ``RealmSet`` methods, see: :java-sdk:`the RealmSet API +reference `. + +- Check if the set contains a specific object with + :java-sdk:`RealmSet.contains() ` +- Check if the set contains all of multiple objects with + :java-sdk:`RealmSet.containsAll() ` + diff --git a/source/includes/api-details/java/crud/read-query-to-one-relationship-java-description.rst b/source/includes/api-details/java/crud/read-query-to-one-relationship-java-description.rst new file mode 100644 index 0000000000..975fc4ee7e --- /dev/null +++ b/source/includes/api-details/java/crud/read-query-to-one-relationship-java-description.rst @@ -0,0 +1,14 @@ +Consider the following relationship between classes ``Human`` and +``Cat``. This arrangement allows each human to own a single cat: + +.. literalinclude:: /examples/generated/java/sync/Human.snippet.complete.java + :language: java + :emphasize-lines: 12 + :copyable: false + +.. literalinclude:: /examples/generated/java/sync/Cat.snippet.complete.java + :language: java + :copyable: false + +To query this relationship, use dot notation in a :ref:`query +` to access any property of the linked object. diff --git a/source/includes/api-details/java/crud/read-query-to-one-relationship-kotlin-description.rst b/source/includes/api-details/java/crud/read-query-to-one-relationship-kotlin-description.rst new file mode 100644 index 0000000000..ed276dc831 --- /dev/null +++ b/source/includes/api-details/java/crud/read-query-to-one-relationship-kotlin-description.rst @@ -0,0 +1,14 @@ +Consider the following relationship between classes ``Person`` and +``Dog``. This arrangement allows each person to own a single dog: + +.. literalinclude:: /examples/generated/java/sync/Person.snippet.complete.kt + :language: kotlin + :emphasize-lines: 10 + :copyable: false + +.. literalinclude:: /examples/generated/java/sync/Dog.snippet.complete.kt + :language: kotlin + :copyable: false + +To query this relationship, use dot notation in a :ref:`query +` to access any propertyof the linked object: diff --git a/source/includes/api-details/java/crud/read-sdk-results-collections-description.rst b/source/includes/api-details/java/crud/read-sdk-results-collections-description.rst new file mode 100644 index 0000000000..e2fa45ef3f --- /dev/null +++ b/source/includes/api-details/java/crud/read-sdk-results-collections-description.rst @@ -0,0 +1,40 @@ +The SDK's :java-sdk:`RealmResults ` collection is +a class representing objects retrieved from queries. A ``RealmResults`` +collection represents the lazily-evaluated results of a query operation, and +has these characteristics: + +- Results are immutable: you cannot manually add or remove elements to or from + the results collection. +- Results have an associated query that determines their contents. +- Results are **live** or **frozen** based on the query source. If they derive + from live objects, the results automatically update when the database + contents change. If they derive from frozen objects, they represent only a + snapshot and do not automatically update. +- You cannot manually initialize an empty ``Results`` set. Results can only + be initialized as the result of a query. + +The :java-sdk:`RealmResults ` class inherits from +:android:`AbstractList ` and behaves +in similar ways. For example, ``RealmResults`` are ordered, and you can +access the individual objects through an index. If a query has no +matches, the returned ``RealmResults`` object is a list of length +0, not a ``null`` object reference. + +**Iteration** + +Because SDK collections are live, objects may move as you iterate over a +collection. You can use snapshots to iterate over collections safely. + +**Adapters** + +The SDK offers adapters to help bind data to standard UI widgets. These +classes work with any class that implements the ``OrderedRealmCollection`` +interface, which includes the built-in ``RealmResults`` and ``RealmList`` +classes. + +.. important:: Adapters Require Managed Objects + + The SDK adapters only accept *managed* SDK object instances tied to a + database instance. To display non-managed objects, use the general-use + Android ``RecyclerView.Adapter`` for recycler views or ``ArrayAdapter`` + for list views. diff --git a/source/includes/api-details/java/crud/read-sort-description.rst b/source/includes/api-details/java/crud/read-sort-description.rst new file mode 100644 index 0000000000..392eb02406 --- /dev/null +++ b/source/includes/api-details/java/crud/read-sort-description.rst @@ -0,0 +1,2 @@ +The following code sorts the projects by name in reverse +alphabetical order (i.e. "descending" order). diff --git a/source/includes/api-details/javascript/crud/read-access-results-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-access-results-js-ts-description.rst new file mode 100644 index 0000000000..520a965188 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-access-results-js-ts-description.rst @@ -0,0 +1,21 @@ +The ``Realm.Results`` type provides convenience functions to work with query +results. You may want to: + +- Check the :js-sdk:`.length ` of a + results set. +- Check whether the results set :js-sdk:`.isEmpty() + `. +- Check whether the results set :js-sdk:`.includes() + ` an individual element. +- Find the :js-sdk:`indexOf() ` + an element. +- :js-sdk:`find() ` + an element matching a predicate. + +For the full range of available functions to work with the results set, +refer to the the :js-sdk:`Realm.Results ` API +reference. + +Additionally, you can iterate through the results, or observe a results +set for changes. For more details about observing the results for changes, +refer to :ref:`sdks-react-to-changes`. diff --git a/source/includes/api-details/javascript/crud/read-aggregate-description.rst b/source/includes/api-details/javascript/crud/read-aggregate-description.rst new file mode 100644 index 0000000000..7f2ebdbc40 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-aggregate-description.rst @@ -0,0 +1,4 @@ +In JavaScript, you perform aggregations through the :js-sdk:`filtered() +` method. In the ``filtered()`` method's +argument, use :ref:`Realm Query Language aggregate operators +` to aggregate data. diff --git a/source/includes/api-details/javascript/crud/read-all-objects-of-type-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-all-objects-of-type-js-ts-description.rst new file mode 100644 index 0000000000..8dcef82706 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-all-objects-of-type-js-ts-description.rst @@ -0,0 +1,5 @@ +To query for objects of a given type in a realm, pass the type name to +:js-sdk:`Realm.objects() `. + +Query operations return a collection of SDK objects that match the +query as a :js-sdk:`Realm.Results ` object. diff --git a/source/includes/api-details/javascript/crud/read-database-objects-js-ts-procedure.rst b/source/includes/api-details/javascript/crud/read-database-objects-js-ts-procedure.rst new file mode 100644 index 0000000000..ce63473c8e --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-database-objects-js-ts-procedure.rst @@ -0,0 +1,24 @@ +To find objects stored within a database: + +1. Query for objects of a given type in the database. Pass the object type + to the :js-sdk:`Realm.objects() ` method. + +#. Optionally, pass any query conditions to further refine the results: + + - Specify a filter to only return objects that meet the condition. If + you don't specify a filter, the SDK returns all objects of the specified + type. + + - Specify the sort order for the results. + Because the database is unordered, if you don't include a sort order, + the SDK cannot guarantee the query returns objects in any specific order. + +#. Work with the results. Objects may be frozen or live, depending on whether + you queried a frozen or live database, collection, or object. + +Note that any retrieved results don't actually hold matching database objects +in memory. Instead, the database uses **direct references**, or pointers. +Database objects in a results collection reference the matched objects, which +map directly to data in the database file. This also means that you can +traverse your graph of an object's :ref:`relationships ` +directly through the results of a query. diff --git a/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-box-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-box-js-ts-description.rst new file mode 100644 index 0000000000..f6fc39e678 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-box-js-ts-description.rst @@ -0,0 +1,3 @@ +A :js-sdk:`GeoBox ` is a rectangular shape whose +bounds are determined by :js-sdk:`GeoPoint ` +coordinates for a bottom-left and a top-right corner. diff --git a/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-circle-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-circle-js-ts-description.rst new file mode 100644 index 0000000000..6a8ca00f43 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-circle-js-ts-description.rst @@ -0,0 +1,8 @@ +A :js-sdk:`GeoCircle ` is a +circular shape whose bounds originate from a central :js-sdk:`GeoPoint +`, and has a size corresponding to +a ``distance`` radius measured in radians. You can use the SDK's convenience +methods to convert kilometers and miles to radians: + +- :js-sdk:`kmToRadians() ` +- :js-sdk:`miToRadians() ` diff --git a/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-polygon-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-polygon-js-ts-description.rst new file mode 100644 index 0000000000..fc6c36d3d7 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-define-geospatial-shapes-polygon-js-ts-description.rst @@ -0,0 +1,13 @@ +A :js-sdk:`GeoPolygon ` is a polygon +shape whose bounds consist of an outer ring, and 0 or more inner holes +to exclude from the geospatial query. + +A polygon's outer ring must contain at least three segments. The last +and the first :js-sdk:`GeoPoint ` +must be the same, which indicates a closed polygon. This means that it takes +at least four ``GeoPoint`` values to construct a polygon. + +Inner holes in a ``GeoPolygon`` are optional, and must be entirely contained +within the outer ring. Each ``GeoPoint`` collection in the ``holes?`` +collection must contain at least three segments, with the same rules as the +outer ring. diff --git a/source/includes/api-details/javascript/crud/read-filter-full-text-search-property-description.rst b/source/includes/api-details/javascript/crud/read-filter-full-text-search-property-description.rst new file mode 100644 index 0000000000..4ee2ab31bd --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-filter-full-text-search-property-description.rst @@ -0,0 +1,2 @@ +To query an FTS indexed property, use the ``TEXT`` predicate in your +:js-sdk:`filtered ` query. diff --git a/source/includes/api-details/javascript/crud/read-filter-or-query-objects-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-filter-or-query-objects-js-ts-description.rst new file mode 100644 index 0000000000..9fe9e3349c --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-filter-or-query-objects-js-ts-description.rst @@ -0,0 +1,10 @@ +To filter a query, call :js-sdk:`filtered() +` on a collection. Pass a Realm Query Language +query as argument to ``filtered()``. + +In the following example, we use RQL comparison operators to: + +- Find high priority tasks by comparing the value of the ``priority`` property + value with a threshold number, above which priority can be considered high. +- Find just-started or short-running tasks by seeing if the ``progressMinutes`` + property falls within a certain range. diff --git a/source/includes/api-details/javascript/crud/read-find-object-by-primary-key-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-find-object-by-primary-key-js-ts-description.rst new file mode 100644 index 0000000000..1e77bca21e --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-find-object-by-primary-key-js-ts-description.rst @@ -0,0 +1,2 @@ +To find an object by its primary key, call :js-sdk:`Realm.objectForPrimaryKey() +`. diff --git a/source/includes/api-details/javascript/crud/read-intro-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-intro-js-ts-description.rst new file mode 100644 index 0000000000..dfc59897d8 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-intro-js-ts-description.rst @@ -0,0 +1,6 @@ +Query operations return a :js-sdk:`results collection `. +Results collections may be either live or frozen. + +- **Live results** always contain the latest results of the associated query. +- **Frozen results** represent a snapshot that cannot be modified and doesn't + reflect the latest changes to the database. diff --git a/source/includes/api-details/javascript/crud/read-query-dictionary-properties-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-query-dictionary-properties-js-ts-description.rst new file mode 100644 index 0000000000..fcf7d72cfe --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-query-dictionary-properties-js-ts-description.rst @@ -0,0 +1,11 @@ +To filter a query, run :js-sdk:`collection.filtered() +` to specify a subset of results +based on the value(s) of one or more object properties. You can specify +results based on the value of a dictionary's properties by using +:mdn:`bracket-notation `. + +You can also determine whether a results collection has a certain key or value +by using ``.@keys`` or ``.@values``. For instance, if +you had a ``Person`` collection with a nested ``home`` dictionary, you could +return all ``Person`` objects with a ``home`` with a ``"price"`` property by +running the query: ``home.@keys = "price"``. diff --git a/source/includes/api-details/javascript/crud/read-query-geospatial-data-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-query-geospatial-data-js-ts-description.rst new file mode 100644 index 0000000000..ca710bb6cb --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-query-geospatial-data-js-ts-description.rst @@ -0,0 +1,15 @@ +The SDK provides specialized non-persistable data types to define shapes: + +- :js-sdk:`GeoPoint `: A type that represents the + coordinates of a point. A ``GeoPoint`` can be one of three types: + + - An object with: + + - Latitude: a number value. + - Longitude: a number value. + - Altitude: an optional number value. + - :js-sdk:`CanonicalGeoPoint + `: an interface that satisfies the + GeoJSON specifications for a point. + - :js-sdk:`GeoPosition `: an array with + longitude, latitude, and an optional altitude. diff --git a/source/includes/api-details/javascript/crud/read-query-inverse-relationship-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-query-inverse-relationship-js-ts-description.rst new file mode 100644 index 0000000000..58dfca970d --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-query-inverse-relationship-js-ts-description.rst @@ -0,0 +1,10 @@ +You can dynamically retrieve an object with an inverse relationship without +defining a ``linkingObjects`` type in its schema. When you need to retrieve +the linked object, call the :js-sdk:`Realm.Object.linkingObjects() +` query. + +The ``.linkingObjects()`` method returns a :ref:`Results collection +` of objects whose property inverts the relationship. + +In this example, only one manufacturer makes the Sentra car model, so we +can expect that manufacturer to be named Nissan. diff --git a/source/includes/api-details/javascript/crud/read-query-list-properties-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-query-list-properties-js-ts-description.rst new file mode 100644 index 0000000000..9dc327f741 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-query-list-properties-js-ts-description.rst @@ -0,0 +1,3 @@ +You can read, query, and sort a :js-sdk:`List +` similar to working with a :js-sdk:`results +` collection. diff --git a/source/includes/api-details/javascript/crud/read-query-mixed-properties-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-query-mixed-properties-js-ts-description.rst new file mode 100644 index 0000000000..8ac6c5d041 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-query-mixed-properties-js-ts-description.rst @@ -0,0 +1,5 @@ +Query for objects with a mixed value by running the +:js-sdk:`Collection.filtered() ` +method and passing in a :ref:`filter ` for a non-mixed +field. You can then print the value of the mixed property or the entire +object itself. diff --git a/source/includes/api-details/javascript/crud/read-query-set-properties-description.rst b/source/includes/api-details/javascript/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..709f9b63d3 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-query-set-properties-description.rst @@ -0,0 +1,29 @@ +Sets allow you to perform math operations such as finding the union, +intersection, or difference between two sets. To learn more about performing +these operations, see the MDN docs for :mdn:`Implementing basic set operations +`. + +To determine if a set contains a particular value, pass the value to the +``.has()`` method. The ``set.has()`` method will return true if the +set contains the value specified. + +.. literalinclude:: /examples/generated/node/data-types.snippet.check-if-set-has-items.js + :language: javascript + +To discover how many items are in a set, you can check the set's ``size`` +property. + +.. literalinclude:: /examples/generated/node/data-types.snippet.check-set-size.js + :language: javascript + +To traverse a set, use the ``.forEach()`` method or alternative +:mdn:`iteration method +`. + +.. literalinclude:: /examples/generated/node/data-types.snippet.traverse-a-set.js + :language: javascript + +The order of the **Realm.Set** may be different from the order that the items +were added. + +You can track the set order by updating an array when a new value is added. diff --git a/source/includes/api-details/javascript/crud/read-query-with-geospatial-shapes-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-query-with-geospatial-shapes-js-ts-description.rst new file mode 100644 index 0000000000..6517c73d15 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-query-with-geospatial-shapes-js-ts-description.rst @@ -0,0 +1,5 @@ +You can query geospatial data using the :ref:`Realm Query Language +` ``geoWithin`` operator. + +The examples below show the results of queries using these two ``Company`` +objects. diff --git a/source/includes/api-details/javascript/crud/read-sdk-results-collections-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-sdk-results-collections-js-ts-description.rst new file mode 100644 index 0000000000..191d943194 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-sdk-results-collections-js-ts-description.rst @@ -0,0 +1,14 @@ +The SDK's :js-sdk:`Results ` collection is +a class representing objects retrieved from queries. A ``Results`` collection +represents the lazily-evaluated results of a query operation, and has these +characteristics: + +- Results are immutable: you cannot manually add or remove elements to or from + the results collection. +- Results have an associated query that determines their contents. +- Results are **live** or **frozen** based on the query source. If they derive + from live objects, the results automatically update when the database + contents change. If they derive from frozen objects, they represent only a + snapshot and do not automatically update. +- You cannot manually initialize an empty ``Results`` set. Results can only + be initialized as the result of a query. diff --git a/source/includes/api-details/javascript/crud/read-sort-js-ts-description.rst b/source/includes/api-details/javascript/crud/read-sort-js-ts-description.rst new file mode 100644 index 0000000000..2fbe1a6c98 --- /dev/null +++ b/source/includes/api-details/javascript/crud/read-sort-js-ts-description.rst @@ -0,0 +1,2 @@ +To sort a query, call the :js-sdk:`sorted() ` +method on the query results collection. diff --git a/source/includes/api-details/kotlin/crud/read-access-results-description.rst b/source/includes/api-details/kotlin/crud/read-access-results-description.rst new file mode 100644 index 0000000000..e826b4b301 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-access-results-description.rst @@ -0,0 +1,42 @@ +In Kotlin, the ``RealmResults`` type provides convenience functions to work +with query results. You may want to: + +- Check the :kotlin-sdk:`.size + ` + of a results set. +- Check whether the results set :kotlin-sdk:`.isEmpty() + `. +- Check whether the results set :kotlin-sdk:`.contains() + ` + an individual element or :kotlin-sdk:`.containsAll() + ` + the elements in a collection. +- Find the :kotlin-sdk:`indexOf() + ` + an element. +- :kotlin-sdk:`get() + ` + the element at an index. +- Get the ``.first()`` element in the results set. + +For the full range of available functions to work with the results set, +refer to the the :kotlin-sdk:`RealmResults +` API reference. + +Additionally, you can iterate through the results, or observe a results +set for changes. For more details about observing the results for changes, +refer to :ref:`sdks-react-to-changes`. + +Iterate Results using Flow +++++++++++++++++++++++++++ + +You can iterate through results using a +`Kotlin Coroutine Flow `__. + +To convert query results into an asynchronous ``Flow``, call +:kotlin-sdk:`asFlow() ` +on the query. The SDK returns a :kotlin-sdk:`ResultsChange ` +``Flow`` that you can iterate through with +`flow.collect() `__. + +In the following example, we iterate through a ``Flow`` of ``Frog`` objects. diff --git a/source/includes/api-details/kotlin/crud/read-aggregate-description.rst b/source/includes/api-details/kotlin/crud/read-aggregate-description.rst new file mode 100644 index 0000000000..a52243c6cf --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-aggregate-description.rst @@ -0,0 +1,11 @@ +You can perform aggregation using +:ref:`RQL aggregate operators `, one of the +following convenience methods, or a combination of both: + +- :kotlin-sdk:`max() ` +- :kotlin-sdk:`min() ` +- :kotlin-sdk:`sum() ` +- :kotlin-sdk:`count() ` + +In the following example, we aggregate the ``age`` property of a ``Frog`` +object type. diff --git a/source/includes/api-details/kotlin/crud/read-all-objects-of-type-description.rst b/source/includes/api-details/kotlin/crud/read-all-objects-of-type-description.rst new file mode 100644 index 0000000000..25ea6f3549 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-all-objects-of-type-description.rst @@ -0,0 +1,4 @@ +To query all objects of a specific type, pass the ``RealmObject`` or +``EmbeddedRealmObject`` object type as a type parameter to +:kotlin-sdk:`query() ` without any query +arguments. The SDK returns all objects of the specified type. diff --git a/source/includes/api-details/kotlin/crud/read-database-objects-procedure.rst b/source/includes/api-details/kotlin/crud/read-database-objects-procedure.rst new file mode 100644 index 0000000000..49d429e477 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-database-objects-procedure.rst @@ -0,0 +1,48 @@ +To find objects stored within a database: + +1. Construct queries using the SDK's query builder + :kotlin-sdk:`RealmQuery `. + Call the :kotlin-sdk:`query() ` method, + passing the object type as the type parameter. The object type must be + included in your database schema. + +#. Optionally, pass any query conditions to further refine the results: + + - Specify a filter to only return objects that meet the condition. If + you don't specify a filter, the SDK returns all objects of the specified + type. + + Chain filters by appending additional ``query()`` methods to the + ``RealmQuery``. Each appended ``query()`` acts as an ``AND`` query + condition. Because of the SDK's lazy evaluation, chaining queries does + not require separate trips to the database. + + - Specify the sort order for the results. + Because the database is unordered, if you don't include a sort order, + the SDK cannot guarantee the query returns objects in any specific order. + +#. Execute the query using either: + + - :kotlin-sdk:`find() ` for synchronous + queries. Returns a collection of results. + - :kotlin-sdk:`asFlow() ` + for asynchronous queries. Subscribes to a ``Flow`` of results changes. + + .. tip:: Prefer ``asFlow()`` for Large Data Sets + + ``find()`` runs a synchronous query on the thread it is called from. + As a result, avoid using ``find()`` for large data sets on the UI thread + or in logic that could delay the UI thread. + + Prefer ``asFlow()`` to prevent negative performance or UI impact. + +#. Work with the results. Objects may be frozen or live, depending on the + type of query you ran. + +Note that any retrieved results don't actually hold matching database objects +in memory. Instead, the database uses **direct references**, or pointers. +Database objects in a results collection or flow reference the matched +objects, which map directly to data in the database file. This also means +that you can traverse your graph of an object's +:ref:`relationships ` directly through the results +of a query. diff --git a/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-box-description.rst b/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-box-description.rst new file mode 100644 index 0000000000..dc1677a492 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-box-description.rst @@ -0,0 +1,4 @@ +A :kotlin-sdk:`GeoBox ` is a +rectangular shape whose bounds are determined by :kotlin-sdk:`GeoPoint +` coordinates for a bottom-left +and a top-right corner. diff --git a/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-circle-description.rst b/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-circle-description.rst new file mode 100644 index 0000000000..1664c6e97f --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-circle-description.rst @@ -0,0 +1,18 @@ +A :kotlin-sdk:`GeoCircle ` is +a circular shape whose bounds originate from a central :kotlin-sdk:`GeoPoint +`, and has a size +corresponding to a radius measured in radians. You can use the SDK's +convenience :kotlin-sdk:`Distance +` class to easily work with +radii in different units. + +You can use the following convenience methods to create a ``GeoDistance`` from +different measures: + +- ``GeoDistance.fromDegrees(double degrees)`` +- ``GeoDistance.fromKilometers(double kilometers)`` +- ``GeoDistance.fromMiles(double miles)`` +- ``GeoDistance.fromRadians(double radians)`` + +You can optionally access the distance value in any of these units, represented +as a double. diff --git a/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-polygon-description.rst b/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-polygon-description.rst new file mode 100644 index 0000000000..37d849731e --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-define-geospatial-shapes-polygon-description.rst @@ -0,0 +1,13 @@ +A :kotlin-sdk:`GeoPolygon ` +is a polygon shape whose bounds consist of an outer ring, and 0 or more inner +holes to exclude from the geospatial query. + +A polygon's outer ring must contain at least three segments. The last +and the first :kotlin-sdk:`GeoPoint +` must be the same, which +indicates a closed polygon. This means that it takes at least four ``GeoPoint`` +values to construct a polygon. + +Inner holes in a ``GeoPolygon`` are optional, and must be entirely contained +within the outer ring. Each ``GeoPoint`` collection in the ``Holes`` collection +must contain at least three segments, with the same rules as the outer ring. diff --git a/source/includes/api-details/kotlin/crud/read-filter-by-remapped-property-name-description.rst b/source/includes/api-details/kotlin/crud/read-filter-by-remapped-property-name-description.rst new file mode 100644 index 0000000000..455583ad20 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-filter-by-remapped-property-name-description.rst @@ -0,0 +1,8 @@ +In the following example, the ``Frog`` object has a property named ``species`` +in the code that is remapped to ``latin_name`` in the database: + +.. literalinclude:: /examples/generated/kotlin/Schema.snippet.define-persisted-name.kt + :language: kotlin + +In the database, we can filter by either property name and return the same +results. diff --git a/source/includes/api-details/kotlin/crud/read-filter-full-text-search-property-description.rst b/source/includes/api-details/kotlin/crud/read-filter-full-text-search-property-description.rst new file mode 100644 index 0000000000..7b804fe12d --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-filter-full-text-search-property-description.rst @@ -0,0 +1,3 @@ +In the following example, the ``Frog`` object type has an FTS index property +called ``physicalDescription`` that we can filter by to find different types +of frogs. diff --git a/source/includes/api-details/kotlin/crud/read-filter-or-query-objects-description.rst b/source/includes/api-details/kotlin/crud/read-filter-or-query-objects-description.rst new file mode 100644 index 0000000000..4ac65ac579 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-filter-or-query-objects-description.rst @@ -0,0 +1,8 @@ +To filter by property, you can pass Realm Query Language (RQL) filters and +operators, use Kotlin's built-in extension methods or the SDK's convenience +methods, or use a combination. + +In the following example, we :kotlin-sdk:`query() +` a ``Frog`` object type and +filter by the ``name`` property. We call the ``find()`` method to execute +the query. diff --git a/source/includes/api-details/kotlin/crud/read-find-object-by-primary-key-not-supported.rst b/source/includes/api-details/kotlin/crud/read-find-object-by-primary-key-not-supported.rst new file mode 100644 index 0000000000..ca313e980a --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-find-object-by-primary-key-not-supported.rst @@ -0,0 +1,6 @@ +Kotlin does not provide a dedicated API to find an object by its primary key. +Instead, you can perform a regular query for objects where the primary +key property matches the desired primary key value. + +In the following example, we query a ``Frog`` object and filter by the primary +key property ``_id``. diff --git a/source/includes/api-details/kotlin/crud/read-intro-description.rst b/source/includes/api-details/kotlin/crud/read-intro-description.rst new file mode 100644 index 0000000000..88bbae9c9b --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-intro-description.rst @@ -0,0 +1,7 @@ +Query operations return a :kotlin-sdk:`results collection +`. Results collections may be +either live or frozen. + +- **Live results** always contain the latest results of the associated query. +- **Frozen results** represent a snapshot that cannot be modified and doesn't + reflect the latest changes to the database. diff --git a/source/includes/api-details/kotlin/crud/read-limit-description.rst b/source/includes/api-details/kotlin/crud/read-limit-description.rst new file mode 100644 index 0000000000..88b1384a30 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-limit-description.rst @@ -0,0 +1,3 @@ +You can specify a limit using :ref:`RQL ` or +the SDK convenience method :kotlin-sdk:`limit() +`. diff --git a/source/includes/api-details/kotlin/crud/read-query-dictionary-properties-description.rst b/source/includes/api-details/kotlin/crud/read-query-dictionary-properties-description.rst new file mode 100644 index 0000000000..a09443c3de --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-dictionary-properties-description.rst @@ -0,0 +1,7 @@ +You can query and iterate through a :ref:`RealmDictionary ` +property as you would a +`Kotlin Map `__. + +In the following example, we query a ``RealmDictionary`` property called +``favoritePondsByForest``, which maps a ``String`` key (forest) to a +``String`` value (pond). diff --git a/source/includes/api-details/kotlin/crud/read-query-geospatial-data-description.rst b/source/includes/api-details/kotlin/crud/read-query-geospatial-data-description.rst new file mode 100644 index 0000000000..1aa6ddcc0c --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-geospatial-data-description.rst @@ -0,0 +1,13 @@ +The SDK provides two specialized non-persistable data types to define shapes: + +- :kotlin-sdk:`GeoPoint `: An + interface that represents the coordinates of a point formed by a pair of + doubles consisting of these values: + + - Latitude: ranges between -90 and 90 degrees, inclusive. + - Longitude: ranges between -180 and 180 degrees, inclusive. +- :kotlin-sdk:`Distance `: A + class that represents a distance used to calculate the size of the + circle shape. ``Distance`` provides convenience methods to simplify + converting degrees, kilometers, miles, and radians to and from the + ``Distance`` measure. diff --git a/source/includes/api-details/kotlin/crud/read-query-inverse-relationship-description.rst b/source/includes/api-details/kotlin/crud/read-query-inverse-relationship-description.rst new file mode 100644 index 0000000000..e9e07180fc --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-inverse-relationship-description.rst @@ -0,0 +1,13 @@ +In the following example, a parent object of type ``User`` has an inverse +relationship to a child object of type ``Post``. We can query the parent +object's ``User.posts`` relationship ("User has many Posts") as well +as the inverse ``Post.user`` relationship ("Post belongs to User"): + +.. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-inverse-relationship.kt + :language: kotlin + +.. important:: Querying Inverse Relationship by Remapped Class Names + + If the inverse relationship property is an object type with a + remapped (persisted) class name, you *must* use the remapped class + name in the raw RQL query. diff --git a/source/includes/api-details/kotlin/crud/read-query-list-properties-description.rst b/source/includes/api-details/kotlin/crud/read-query-list-properties-description.rst new file mode 100644 index 0000000000..3a92364577 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-list-properties-description.rst @@ -0,0 +1,6 @@ +You can query and iterate through a :ref:`RealmList ` +property as you would a +`Kotlin List `__. + +In the following example, we query a ``RealmList`` property called +``favoritePonds``. diff --git a/source/includes/api-details/kotlin/crud/read-query-mixed-properties-description.rst b/source/includes/api-details/kotlin/crud/read-query-mixed-properties-description.rst new file mode 100644 index 0000000000..237faa0173 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-mixed-properties-description.rst @@ -0,0 +1,37 @@ +In the following example, we query a ``RealmAny`` property called +``favoriteThing`` for a frog with a favorite thing of type ``Int``: + +.. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-realmany-property.kt + :language: kotlin + +Unlike other properties, you must extract a ``RealmAny`` property's stored +value before you can work with it. To extract the value, use +the SDK's getter method for the stored type. If you use the wrong getter for +the type, the SDK throws an exception. + +A best practice is to use a conditional expression to get the currently stored +type with :kotlin-sdk:`RealmAny.type() `, +then extract the value based on the type. For a full list of getter +methods, refer to the :kotlin-sdk:`RealmAny +` API reference. + +.. tip:: Handle Polymorphism with Conditional Expressions + + Use a conditional ``when`` expression to handle the possible inner value + class of a given ``RealmAny`` property: + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.polymorphism.kt + :language: kotlin + +Once you have the currently stored value, you can work with it the same way you +would another value of that type. + +.. note:: + + ``Byte``, ``Char``, ``Int``, ``Long``, and ``Short`` values are converted + internally to ``int64_t`` values. Keep this in mind when comparing, + sorting, or aggregating ``RealmAny`` values of these types. + +In the following example, we extract the value using +:kotlin-sdk:`RealmAny.asInt() ` +since we know the returned frog's favorite thing is an ``Int`` type value. diff --git a/source/includes/api-details/kotlin/crud/read-query-set-properties-description.rst b/source/includes/api-details/kotlin/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..877e86e46e --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-set-properties-description.rst @@ -0,0 +1,6 @@ +You can query and iterate through a :ref:`RealmSet ` +property as you would a +`Kotlin Set `__. + +In the following example, we query a ``RealmSet`` property called +``favoriteSnacks``. diff --git a/source/includes/api-details/kotlin/crud/read-query-to-many-relationship-description.rst b/source/includes/api-details/kotlin/crud/read-query-to-many-relationship-description.rst new file mode 100644 index 0000000000..525cca271a --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-to-many-relationship-description.rst @@ -0,0 +1,2 @@ +In the following example, the ``Forest`` object type has a property called +``nearbyPonds`` that is a ``RealmList`` of type ``Pond``. diff --git a/source/includes/api-details/kotlin/crud/read-query-to-one-relationship-description.rst b/source/includes/api-details/kotlin/crud/read-query-to-one-relationship-description.rst new file mode 100644 index 0000000000..5ef8210c61 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-to-one-relationship-description.rst @@ -0,0 +1,2 @@ +In the following example, the ``Frog`` object type has a property called +``favoritePond`` of type ``Pond``. diff --git a/source/includes/api-details/kotlin/crud/read-query-with-geospatial-shapes-description.rst b/source/includes/api-details/kotlin/crud/read-query-with-geospatial-shapes-description.rst new file mode 100644 index 0000000000..6517c73d15 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-query-with-geospatial-shapes-description.rst @@ -0,0 +1,5 @@ +You can query geospatial data using the :ref:`Realm Query Language +` ``geoWithin`` operator. + +The examples below show the results of queries using these two ``Company`` +objects. diff --git a/source/includes/api-details/kotlin/crud/read-sdk-results-collections-description.rst b/source/includes/api-details/kotlin/crud/read-sdk-results-collections-description.rst new file mode 100644 index 0000000000..0c1b7b65d7 --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-sdk-results-collections-description.rst @@ -0,0 +1,17 @@ +The SDK's :kotlin-sdk:`RealmResults +` collection is a class +representing objects retrieved from queries. A ``RealmResults`` collection +represents the lazily-evaluated results of a query operation, and has these +characteristics: + +- Results are immutable: you cannot manually add or remove elements to or from + the results collection. +- Results have an associated query that determines their contents. +- Results are **live** or **frozen** based on the query source. If they derive + from a query on a :kotlin-sdk:`MutableRealm + `, the results automatically + update when the database contents on the thread change. If they derive from + a query on a :kotlin-sdk:`Realm `, they + represent only a snapshot and do not automatically update. +- You cannot manually initialize an empty ``RealmResults`` set. Results can only + be initialized as the result of a query. diff --git a/source/includes/api-details/kotlin/crud/read-sort-description.rst b/source/includes/api-details/kotlin/crud/read-sort-description.rst new file mode 100644 index 0000000000..8a4740914d --- /dev/null +++ b/source/includes/api-details/kotlin/crud/read-sort-description.rst @@ -0,0 +1,3 @@ +You can specify a sort order using :ref:`RQL ` or +the SDK convenience method :kotlin-sdk:`sort() +`. diff --git a/source/includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst b/source/includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst index f00104b3b8..4a43849772 100644 --- a/source/includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst +++ b/source/includes/api-details/kotlin/model-data/object-models-map-model-or-property-to-different-name-description.rst @@ -23,7 +23,7 @@ persisted name to used to store objects in the database: In the example above, you must query ``Frog_Entity`` instead of ``Frog``. For more information, refer to :ref:`Query Inverse Relationships - `. + `. **Map a Property Name** diff --git a/source/includes/api-details/objectivec/crud/read-access-results-description.rst b/source/includes/api-details/objectivec/crud/read-access-results-description.rst new file mode 100644 index 0000000000..07207cc700 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-access-results-description.rst @@ -0,0 +1,21 @@ +The ``RLMResults`` type provides convenience functions to work with query +results. You may want to: + +- Check the :objc-sdk:`.count + ` of a results set. +- Find the :objc-sdk:`-indexOfObject: + ` + for an object. +- Get the :objc-sdk:`-objectAtIndex: + `. +- Get the :objc-sdk:`-firstObject + ` or + :objc-sdk:`-lastObject + ` in the + results set. + +For the full range of available functions to work with the results set, +refer to the the :objc-sdk:`RLMResults ` API reference. + +Additionally, you can observe a results set for changes. For more details +about observing the results for changes, refer to :ref:`sdks-react-to-changes`. diff --git a/source/includes/api-details/objectivec/crud/read-aggregate-description.rst b/source/includes/api-details/objectivec/crud/read-aggregate-description.rst new file mode 100644 index 0000000000..7b64f7b268 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-aggregate-description.rst @@ -0,0 +1,7 @@ +In Objective-C, you can perform aggregations with these methods: + +- :objc-sdk:`count ` +- :objc-sdk:`-minOfProperty ` +- :objc-sdk:`-maxOfProperty ` +- :objc-sdk:`-sumOfProperty ` +- :objc-sdk:`-averageOfProperty ` diff --git a/source/includes/api-details/objectivec/crud/read-all-objects-of-type-description.rst b/source/includes/api-details/objectivec/crud/read-all-objects-of-type-description.rst new file mode 100644 index 0000000000..d6cc35e4a8 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-all-objects-of-type-description.rst @@ -0,0 +1,7 @@ +To query for objects of a given type in the database, pass the database +instance to :objc-sdk:`+[YourSDKObjectClass allObjectsInRealm:] +`. +Replace ``YourSDKObjectClass`` with your SDK object class +name. This returns an :objc-sdk:`RLMResults +` object representing all objects of the +given type in the database. diff --git a/source/includes/api-details/objectivec/crud/read-chain-queries-description.rst b/source/includes/api-details/objectivec/crud/read-chain-queries-description.rst new file mode 100644 index 0000000000..a506cd6b14 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-chain-queries-description.rst @@ -0,0 +1,2 @@ +To get a result set for tan dogs, and tan dogs whose names start with +'B', you can chain two queries. diff --git a/source/includes/api-details/objectivec/crud/read-database-objects-procedure.rst b/source/includes/api-details/objectivec/crud/read-database-objects-procedure.rst new file mode 100644 index 0000000000..cc984a641c --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-database-objects-procedure.rst @@ -0,0 +1,29 @@ +To find objects stored within a database: + +1. Query for objects of a given type in the database. Pass the object type + to the :objc-sdk:`RLMObject allObjects + ` method. + +#. Optionally, pass any query conditions to further refine the results: + + - Specify a filter to only return objects that meet the condition. If + you don't specify a filter, the SDK returns all objects of the specified + type. You can use :objc-sdk:`RLMObject objectsWhere + ` or + :objc-sdk:`RLMObject objectsWithPredicate + ` + to get objects matching a query. + + - Specify the sort order for the results. + Because the database is unordered, if you don't include a sort order, + the SDK cannot guarantee the query returns objects in any specific order. + +#. Work with the results. Objects may be frozen or live, depending on whether + you queried a frozen or live database, collection, or object. + +Note that any retrieved results don't actually hold matching database objects +in memory. Instead, the database uses **direct references**, or pointers. +Database objects in a results collection reference the matched objects, which +map directly to data in the database file. This also means that you can +traverse your graph of an object's :ref:`relationships ` +directly through the results of a query. diff --git a/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-box-description.rst b/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-box-description.rst new file mode 100644 index 0000000000..f643997ae6 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-box-description.rst @@ -0,0 +1,3 @@ +A :objc-sdk:`RLMGeospatialBox ` is a +rectangular shape whose bounds are determined by coordinates for a bottom-left +and a top-right corner. diff --git a/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-circle-description.rst b/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-circle-description.rst new file mode 100644 index 0000000000..b7b4cf517d --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-circle-description.rst @@ -0,0 +1,16 @@ +A ``GeoCircle`` is a circular shape whose bounds originate from a central +:objc-sdk:`RLMGeospatialPoint `, and has a +size corresponding to a radius measured in radians. You can use the SDK's +convenience :objc-sdk:`RLMDistance ` object to +easily work with radii in different units. + +``RLMDistance`` enables you to specify the radius distance for your geo shapes +in one of four units: + +- Radians +- Degrees +- Miles +- Kilometers + +You can use the supplied convenience methods to convert a measurement to +different distance units. diff --git a/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-polygon-description.rst b/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-polygon-description.rst new file mode 100644 index 0000000000..39668151c8 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-define-geospatial-shapes-polygon-description.rst @@ -0,0 +1,11 @@ +A :objc-sdk:`RLMGeospatialPolygon ` is a +polygon shape whose bounds consist of an outer ring, and 0 or more inner holes +to exclude from the geospatial query. + +A polygon's outer ring must contain at least three segments. The last +and the first :objc-sdk:`RLMGeospatialPoint ` +must be the same, which indicates a closed polygon. This means that it takes +at least four ``RLMGeospatialPoint`` values to construct a polygon. + +Inner holes in a ``RLMGeospatialPolygon`` must be entirely contained within the +outer ring. diff --git a/source/includes/api-details/objectivec/crud/read-filter-or-query-objects-description.rst b/source/includes/api-details/objectivec/crud/read-filter-or-query-objects-description.rst new file mode 100644 index 0000000000..c2d80e9938 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-filter-or-query-objects-description.rst @@ -0,0 +1,6 @@ +To filter results in Objective-C, call :objc-sdk:`-[RLMResults objectsWhere:] +` +with a query predicate. + +For more details about the supported operators available for Objective-C +queries, refer to :ref:`sdks-filter-data-swift`. diff --git a/source/includes/api-details/objectivec/crud/read-find-object-by-primary-key-description.rst b/source/includes/api-details/objectivec/crud/read-find-object-by-primary-key-description.rst new file mode 100644 index 0000000000..eed7360e25 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-find-object-by-primary-key-description.rst @@ -0,0 +1,3 @@ +To find a specific object by primary key, call +:objc-sdk:`+[RLMObject objectForPrimaryKey:] +`. diff --git a/source/includes/api-details/objectivec/crud/read-intro-description.rst b/source/includes/api-details/objectivec/crud/read-intro-description.rst new file mode 100644 index 0000000000..a327ae83c3 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-intro-description.rst @@ -0,0 +1,8 @@ +Query operations return a :objc-sdk:`results collection +`. + +Results collections may be either live or frozen. + +- **Live results** always contain the latest results of the associated query. +- **Frozen results** represent a snapshot that cannot be modified and doesn't + reflect the latest changes to the database. diff --git a/source/includes/api-details/objectivec/crud/read-limit-not-supported.rst b/source/includes/api-details/objectivec/crud/read-limit-not-supported.rst new file mode 100644 index 0000000000..69564d06c8 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-limit-not-supported.rst @@ -0,0 +1,3 @@ +Objective-C does not provide an API to limit query results. Instead, rely on +the SDK's lazy loading characteristics to implicitly limit the objects in +memory by only accessing the objects you need for an operation. diff --git a/source/includes/api-details/objectivec/crud/read-query-custom-persistable-property-description.rst b/source/includes/api-details/objectivec/crud/read-query-custom-persistable-property-description.rst new file mode 100644 index 0000000000..f8053836b9 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-custom-persistable-property-description.rst @@ -0,0 +1,36 @@ +Queries on SDK Objects +`````````````````````` + +When working with projected types, queries operate on the persisted type. +However, you can use the mapped types interchangeably with the persisted +types in arguments in most cases. The exception is queries on embedded +objects. + +.. tip:: + + Projected types support :ref:`sorting and aggregates ` + where the persisted type supports them. + +Queries on Embedded Objects +``````````````````````````` + +You can query embedded types on the supported property types within the +object using memberwise equality. + +Object link properties support equality comparisons, but do not support +memberwise comparisons. You can query embedded objects for memberwise +equality on all primitive types. You cannot perform memberwise comparison +on objects and collections. + +Dynamic APIs +```````````` + +Because the schema has no concept of custom type mappings, reading data via +any of the dynamic APIs gives the underlying persisted type. The SDK does +support writing mapped types via a dynamic API, and converts the projected +type to the persisted type. + +The most common use of the dynamic APIs is migration. You can write projected +types during migration, and the SDK converts the projected type to the persisted +type. However, reading data during a migration gives the underlying persisted +type. diff --git a/source/includes/api-details/objectivec/crud/read-query-dictionary-properties-description.rst b/source/includes/api-details/objectivec/crud/read-query-dictionary-properties-description.rst new file mode 100644 index 0000000000..5b6292336e --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-dictionary-properties-description.rst @@ -0,0 +1,22 @@ +You can query a :objc-sdk:`RLMDictionary +` with the same predicates as :objc-sdk:`RLMObject +` and :objc-sdk:`RLMResults `. + +- Access :objc-sdk:`allKeys + ` or + :objc-sdk:`allValues + `. +- Get the :objc-sdk:`-objectForKey: + ` or + :objc-sdk:`-valueForKey: + `. +- Work with keys and objects using :objc-sdk:`-enumerateKeysAndObjectsUsingBlock: + `. + +.. tip:: RLMDictionary may contain keys whose values are nil + + An SDK map may contain keys with ``nil`` values. If you delete an object + that is used as a map value, the value is set to ``nil`` but the key + remains unless you explicitly delete it. If your app deletes map values + without also explicitly cleaning up the keys, you may need to perform + optional unwrapping when you read map values. diff --git a/source/includes/api-details/objectivec/crud/read-query-geospatial-data-description.rst b/source/includes/api-details/objectivec/crud/read-query-geospatial-data-description.rst new file mode 100644 index 0000000000..223b386910 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-geospatial-data-description.rst @@ -0,0 +1,11 @@ +The SDK provides two specialized non-persistable data types to define shapes: + +- :objc-sdk:`RLMGeospatialPoint `: A + class that represents the coordinates of a point formed by a pair of + doubles consisting of these values: + + - Latitude: ranges between -90 and 90 degrees, inclusive. + - Longitude: ranges between -180 and 180 degrees, inclusive. + - Altitude (optional): cannot be a negative value. +- :objc-sdk:`RLMDistance `: A helper to represent + and convert a distance. diff --git a/source/includes/api-details/objectivec/crud/read-query-inverse-relationship-description.rst b/source/includes/api-details/objectivec/crud/read-query-inverse-relationship-description.rst new file mode 100644 index 0000000000..7a09ac77d5 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-inverse-relationship-description.rst @@ -0,0 +1,7 @@ +You can query :swift-sdk:`RLMLinkingObjects +`, an auto-updating container type, +to access zero or more objects that are linked to its owning model object +through a property relationship. You can query ``RLMLinkingObjects`` with the +same APIs and predicates as +:swift-sdk:`RLMArray\ ` and +:swift-sdk:`RLMResults\ `. diff --git a/source/includes/api-details/objectivec/crud/read-query-list-properties-description.rst b/source/includes/api-details/objectivec/crud/read-query-list-properties-description.rst new file mode 100644 index 0000000000..3cfe844aac --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-list-properties-description.rst @@ -0,0 +1,3 @@ +You can query a :objc-sdk:`RLMArray ` with the same +predicates as :objc-sdk:`RLMResults ` and +:objc-sdk:`RLMObject `. diff --git a/source/includes/api-details/objectivec/crud/read-query-mixed-properties-description.rst b/source/includes/api-details/objectivec/crud/read-query-mixed-properties-description.rst new file mode 100644 index 0000000000..0335355dc2 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-mixed-properties-description.rst @@ -0,0 +1,21 @@ +When you read an :objc-sdk:`RLMValue ` +property, check the value's type before doing anything with it. The SDK +provides an :objc-sdk:`RLMAnyValueType enum ` that +iterates through all of the types the ``RLMValue`` can store. + +You can :ref:`compare ` these mixed +value types: + +- Numeric: int, bool, float, double, ``RLMDecimal128`` +- Byte-based: ``NSString``, ``NSData`` +- Time-based: ``NSDate``, ``RLMObjectId`` + +When using the ``RLMValue`` mixed data type, keep these things in mind: + +- ``equals`` queries match on value and type +- ``not equals`` queries match objects with either different values or + different types +- The SDK converts comparable numeric properties where possible. For example, + in a mixed type field, 1 matches all of 1.0, 1, and true. +- String properties do not match numeric queries. For example, in a mixed + type field, 1 does not match "1". "1" does not match 1, 1.0, or true. diff --git a/source/includes/api-details/objectivec/crud/read-query-projections-missing-description.rst b/source/includes/api-details/objectivec/crud/read-query-projections-missing-description.rst new file mode 100644 index 0000000000..b97e8cf74e --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-projections-missing-description.rst @@ -0,0 +1,2 @@ +The documentation does not currently have information for how to query +class projections in Objective-C. diff --git a/source/includes/api-details/objectivec/crud/read-query-set-properties-description.rst b/source/includes/api-details/objectivec/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..c05df4cfc9 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-set-properties-description.rst @@ -0,0 +1,4 @@ +You can query a :objc-sdk:`RLMSet ` to check if +it contains an element. If you are working with multiple sets, you can +check for the intersection of two sets, or check whether one set is a subset +of the other set. diff --git a/source/includes/api-details/objectivec/crud/read-query-with-geospatial-shapes-description.rst b/source/includes/api-details/objectivec/crud/read-query-with-geospatial-shapes-description.rst new file mode 100644 index 0000000000..0d38ffeb67 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-query-with-geospatial-shapes-description.rst @@ -0,0 +1,4 @@ +You can query geospatial data using :objc-sdk:`-objectsWithPredicate +` +with an :ref:`NSPredicate query ` that uses +``geoWithin``. diff --git a/source/includes/api-details/objectivec/crud/read-sdk-results-collections-description.rst b/source/includes/api-details/objectivec/crud/read-sdk-results-collections-description.rst new file mode 100644 index 0000000000..792ffe5972 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-sdk-results-collections-description.rst @@ -0,0 +1,26 @@ +The SDK's :objc-sdk:`RLMResults ` collection is +a class representing objects retrieved from queries. A ``RLMResults`` +collection represents the lazily-evaluated results of a query operation, and +has these characteristics: + +- Results are immutable: you cannot manually add or remove elements to or from + the results collection. +- Results have an associated query that determines their contents. +- Results are **live** or **frozen** based on the query source. If they derive + from live objects, the results automatically update when the database + contents on the thread change. If they derive from frozen objects, they + represent only a snapshot and do not automatically update. +- You cannot manually initialize an empty ``RLMResults`` set. Results can only + be initialized as the result of a query. + +In Objective-C, the SDK also provides :objc-sdk:`RLMSectionedResults +`, a type-safe collection which holds +``RLMSection`` as its elements. Each :objc-sdk:`RLMSection +` is a collection that contains only +objects that belong to a given section key. + +For example, an app that includes a contact list might use RLMSectionedResults +to display a list of contacts divided into sections, where each section +contains all the contacts whose first name starts with the given letter. +The ``RLMSection`` whose key is "L" would contain "Larry", "Liam", +and "Lisa". diff --git a/source/includes/api-details/objectivec/crud/read-section-query-results-description.rst b/source/includes/api-details/objectivec/crud/read-section-query-results-description.rst new file mode 100644 index 0000000000..b353b80c80 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-section-query-results-description.rst @@ -0,0 +1,14 @@ +In Objective-C, you can create a :objc-sdk:`RLMSectionedResults +` type-safe collection in two ways: + +- Using a keyPath: :objc-sdk:`-sectionedResultsSortedUsingKeyPath:ascending:keyBlock: + ` +- Using a sort descriptor: :objc-sdk:`-sectionedResultsUsingSortDescriptors:keyBlock: + ` + +You can get a count of the sections, get a list of keys, or access an individual +:objc-sdk:`RLMSectionedResult segment ` by +key or index. + +You can :ref:`observe ` ``RLMSectionedResults`` and +``RLMSectionedResult`` instances. diff --git a/source/includes/api-details/objectivec/crud/read-sort-description.rst b/source/includes/api-details/objectivec/crud/read-sort-description.rst new file mode 100644 index 0000000000..d16dc9ae73 --- /dev/null +++ b/source/includes/api-details/objectivec/crud/read-sort-description.rst @@ -0,0 +1,4 @@ +To sort, call :objc-sdk:`-[RLMResults +sortedResultsUsingKeyPath:ascending:] +` +with the desired key path to sort by. diff --git a/source/includes/api-details/swift/crud/read-access-results-description.rst b/source/includes/api-details/swift/crud/read-access-results-description.rst new file mode 100644 index 0000000000..53660fc0b7 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-access-results-description.rst @@ -0,0 +1,23 @@ +The :swift-sdk:`Results ` type implements the +:swift-sdk:`RealmCollection ` protocol, which +provides convenience properties and functions to work with query results. You +may want to: + +- Check the :swift-sdk:`.count + ` + of the number of objects in a results set. +- Check whether the results set ``.isEmpty()``. +- Check whether the results set :swift-sdk:`.contains(where: Predicate) + ` + an object satisfying a predicate. +- Find the ``.firstIndex(of: )`` or ``.lastIndex(of: )`` a given object. +- Get the ``.firstWhere(Predicate)`` to get the first object in the collection + matching the given predicate. +- Get the :swift-sdk:`.first + ` + or :swift-sdk:`.last + ` + element in the results set. + +Additionally, you can observe a results set for changes. For more details +about observing the results for changes, refer to :ref:`sdks-react-to-changes`. diff --git a/source/includes/api-details/swift/crud/read-aggregate-description.rst b/source/includes/api-details/swift/crud/read-aggregate-description.rst new file mode 100644 index 0000000000..4c16144ce4 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-aggregate-description.rst @@ -0,0 +1,12 @@ +In Swift, you can perform aggregations with these methods: + +- :swift-sdk:`.avg + ` +- :swift-sdk:`.min + ` +- :swift-sdk:`.max + ` +- :swift-sdk:`.count + ` +- :swift-sdk:`.sum + ` diff --git a/source/includes/api-details/swift/crud/read-all-objects-of-type-description.rst b/source/includes/api-details/swift/crud/read-all-objects-of-type-description.rst new file mode 100644 index 0000000000..e0e5d2e60b --- /dev/null +++ b/source/includes/api-details/swift/crud/read-all-objects-of-type-description.rst @@ -0,0 +1,22 @@ +To query for objects of a given type in the database, pass the metatype +instance ``YourClassName.self`` to :swift-sdk:`Realm.objects(_:) +`. +This returns a :swift-sdk:`Results ` object +representing all objects of the given type in the database. + +Read an Object Asynchronously +````````````````````````````` + +When you use an actor-isolated database instance, you can use Swift +concurrency features to asynchronously query objects. + +.. literalinclude:: /examples/generated/code/start/RealmActor.snippet.read-objects.swift + :language: swift + +If you need to manually advance the state of an observed database on the main +thread or an actor-isolated realm, call ``await realm.asyncRefresh()``. +This updates the database and outstanding objects managed by the database to +point to the most recent data and deliver any applicable notifications. + +For more information about working with the SDK using Swift concurrency +features, refer to :ref:`swift-actor-isolated-realm`. diff --git a/source/includes/api-details/swift/crud/read-chain-queries-description.rst b/source/includes/api-details/swift/crud/read-chain-queries-description.rst new file mode 100644 index 0000000000..a506cd6b14 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-chain-queries-description.rst @@ -0,0 +1,2 @@ +To get a result set for tan dogs, and tan dogs whose names start with +'B', you can chain two queries. diff --git a/source/includes/api-details/swift/crud/read-database-objects-procedure.rst b/source/includes/api-details/swift/crud/read-database-objects-procedure.rst new file mode 100644 index 0000000000..23b4ad367d --- /dev/null +++ b/source/includes/api-details/swift/crud/read-database-objects-procedure.rst @@ -0,0 +1,26 @@ +To find objects stored within a database: + +1. Query for objects of a given type in the database. Pass the object type + to the :swift-sdk:`Realm.objects() + ` + method. + +#. Optionally, pass any query conditions to further refine the results: + + - Specify a filter to only return objects that meet the condition. If + you don't specify a filter, the SDK returns all objects of the specified + type. + + - Specify the sort order for the results. + Because the database is unordered, if you don't include a sort order, + the SDK cannot guarantee the query returns objects in any specific order. + +#. Work with the results. Objects may be frozen or live, depending on whether + you queried a frozen or live database, collection, or object. + +Note that any retrieved results don't actually hold matching database objects +in memory. Instead, the database uses **direct references**, or pointers. +Database objects in a results collection reference the matched objects, which +map directly to data in the database file. This also means that you can +traverse your graph of an object's :ref:`relationships ` +directly through the results of a query. diff --git a/source/includes/api-details/swift/crud/read-define-geospatial-shapes-box-description.rst b/source/includes/api-details/swift/crud/read-define-geospatial-shapes-box-description.rst new file mode 100644 index 0000000000..0b69f0455e --- /dev/null +++ b/source/includes/api-details/swift/crud/read-define-geospatial-shapes-box-description.rst @@ -0,0 +1,3 @@ +A :swift-sdk:`GeoBox ` is a +rectangular shape whose bounds are determined by coordinates for a bottom-left +and a top-right corner. diff --git a/source/includes/api-details/swift/crud/read-define-geospatial-shapes-circle-description.rst b/source/includes/api-details/swift/crud/read-define-geospatial-shapes-circle-description.rst new file mode 100644 index 0000000000..afd60eb301 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-define-geospatial-shapes-circle-description.rst @@ -0,0 +1,17 @@ +A :swift-sdk:`GeoCircle ` is a +circular shape whose bounds originate from a central :swift-sdk:`GeoPoint +`, and has a size corresponding to +a radius measured in radians. You can use the SDK's convenience +:swift-sdk:`Distance ` structure to +easily work with radii in different units. + +``Distance`` enables you to specify the radius distance for your geo shapes +in one of four units: + +- ``.degrees`` +- ``.kilometers`` +- ``.miles`` +- ``.radians`` + +You can optionally use the supplied convenience methods to convert a +measurement to a different distance units. diff --git a/source/includes/api-details/swift/crud/read-define-geospatial-shapes-polygon-description.rst b/source/includes/api-details/swift/crud/read-define-geospatial-shapes-polygon-description.rst new file mode 100644 index 0000000000..63ee6d7509 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-define-geospatial-shapes-polygon-description.rst @@ -0,0 +1,11 @@ +A :swift-sdk:`GeoPolygon ` is a +polygon shape whose bounds consist of an outer ring, and 0 or more inner holes +to exclude from the geospatial query. + +A polygon's outer ring must contain at least three segments. The last +and the first :swift-sdk:`GeoPoint ` +must be the same, which indicates a closed polygon. This means that it takes +at least four ``GeoPoint`` values to construct a polygon. + +Inner holes in a ``GeoPolygon`` must be entirely contained within the +outer ring. diff --git a/source/includes/api-details/swift/crud/read-filter-or-query-objects-description.rst b/source/includes/api-details/swift/crud/read-filter-or-query-objects-description.rst new file mode 100644 index 0000000000..b465f3ced6 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-filter-or-query-objects-description.rst @@ -0,0 +1,29 @@ +Swift has its own query APIs that use either the type-safe ``where`` syntax, +or a string ``NSPredicate`` query. For more details about the supported +operators available for Swift queries, refer to :ref:`sdks-filter-data-swift`. + +Type-Safe Queries +````````````````` + +To use the type-safe Swift Query API, call :swift-sdk:`.where +` with a closure that contains a query expression as an +argument. + +This query API provides compile-time type-safe query checking. Prefer using +this API over the older string-based ``NSPredicate`` API. + +.. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.where.swift + :language: swift + +NSPredicate Queries +``````````````````` + +To filter with the older string-based ``NSPredicate`` API, call +:swift-sdk:`Results.filter(_:) +` +with a query predicate. + +Prefer using the type-safe query API unless you are using an SDK version +older than 10.19.0. The string-based ``NSPredicate`` query API does not provide +compile-time checking for valid query syntax, and may crash at runtime with +an invalid ``NSPredicate``. diff --git a/source/includes/api-details/swift/crud/read-find-object-by-primary-key-description.rst b/source/includes/api-details/swift/crud/read-find-object-by-primary-key-description.rst new file mode 100644 index 0000000000..02497efe88 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-find-object-by-primary-key-description.rst @@ -0,0 +1,3 @@ +To find a specific object by primary key, call +:swift-sdk:`Realm.object(ofType:forPrimaryKey:) +`. diff --git a/source/includes/api-details/swift/crud/read-intro-description.rst b/source/includes/api-details/swift/crud/read-intro-description.rst new file mode 100644 index 0000000000..a9b13570a8 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-intro-description.rst @@ -0,0 +1,6 @@ +Query operations return a :swift-sdk:`results collection +`. Results collections may be either live or frozen. + +- **Live results** always contain the latest results of the associated query. +- **Frozen results** represent a snapshot that cannot be modified and doesn't + reflect the latest changes to the database. diff --git a/source/includes/api-details/swift/crud/read-limit-not-supported.rst b/source/includes/api-details/swift/crud/read-limit-not-supported.rst new file mode 100644 index 0000000000..9a7eaa6d7c --- /dev/null +++ b/source/includes/api-details/swift/crud/read-limit-not-supported.rst @@ -0,0 +1,3 @@ +Swift does not provide an API to limit query results. Instead, rely on the +SDK's lazy loading characteristics to implicitly limit the objects in +memory by only accessing the objects you need for an operation. diff --git a/source/includes/api-details/swift/crud/read-query-custom-persistable-property-description.rst b/source/includes/api-details/swift/crud/read-query-custom-persistable-property-description.rst new file mode 100644 index 0000000000..bd7f6a5e61 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-custom-persistable-property-description.rst @@ -0,0 +1,39 @@ +Queries on SDK Objects +`````````````````````` + +When working with projected types, queries operate on the persisted type. +However, you can use the mapped types interchangeably with the persisted +types in arguments in most cases. The exception is queries on embedded +objects. + +.. tip:: + + Projected types support :ref:`sorting and aggregates ` + where the persisted type supports them. + +.. literalinclude:: /examples/generated/code/start/TypeProjection.snippet.query-objects-with-type-projection.swift + :language: swift + +Queries on Embedded Objects +``````````````````````````` + +You can query embedded types on the supported property types within the +object using memberwise equality. + +Object link properties support equality comparisons, but do not support +memberwise comparisons. You can query embedded objects for memberwise +equality on all primitive types. You cannot perform memberwise comparison +on objects and collections. + +Dynamic APIs +```````````` + +Because the schema has no concept of custom type mappings, reading data via +any of the dynamic APIs gives the underlying persisted type. The SDK does +support writing mapped types via a dynamic API, and converts the projected +type to the persisted type. + +The most common use of the dynamic APIs is migration. You can write projected +types during migration, and the SDK converts the projected type to the persisted +type. However, reading data during a migration gives the underlying persisted +type. diff --git a/source/includes/api-details/swift/crud/read-query-dictionary-properties-description.rst b/source/includes/api-details/swift/crud/read-query-dictionary-properties-description.rst new file mode 100644 index 0000000000..f647c5b259 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-dictionary-properties-description.rst @@ -0,0 +1,10 @@ +You can iterate and check the values of a realm :swift-sdk:`map ` +as you would a standard :apple:`Dictionary `. + +.. tip:: Map may contain keys whose values are nil + + An SDK map may contain keys with ``nil`` values. If you delete an object + that is used as a map value, the value is set to ``nil`` but the key + remains unless you explicitly delete it. If your app deletes map values + without also explicitly cleaning up the keys, you may need to perform + optional unwrapping when you read map values. diff --git a/source/includes/api-details/swift/crud/read-query-geospatial-data-description.rst b/source/includes/api-details/swift/crud/read-query-geospatial-data-description.rst new file mode 100644 index 0000000000..282d030036 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-geospatial-data-description.rst @@ -0,0 +1,10 @@ +The SDK provides two specialized non-persistable data types to define shapes: + +- :swift-sdk:`GeoPoint `: A + struct that represents the coordinates of a point formed by a pair of + doubles consisting of these values: + + - Latitude: ranges between -90 and 90 degrees, inclusive. + - Longitude: ranges between -180 and 180 degrees, inclusive. +- :swift-sdk:`Distance `: A helper + struct to represent and convert a distance. diff --git a/source/includes/api-details/swift/crud/read-query-inverse-relationship-description.rst b/source/includes/api-details/swift/crud/read-query-inverse-relationship-description.rst new file mode 100644 index 0000000000..280f80ebc0 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-inverse-relationship-description.rst @@ -0,0 +1,6 @@ +You can query :swift-sdk:`LinkingObjects `, +an auto-updating container type, to access zero or more objects that are +linked to its owning model object through a property relationship. You can +query ``LinkingObjects`` with the same APIs and predicates as +:swift-sdk:`List\ ` and +:swift-sdk:`Results\ `. diff --git a/source/includes/api-details/swift/crud/read-query-list-properties-description.rst b/source/includes/api-details/swift/crud/read-query-list-properties-description.rst new file mode 100644 index 0000000000..c0c605383b --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-list-properties-description.rst @@ -0,0 +1,12 @@ +You can query a :swift-sdk:`List ` with the same predicates +as a :swift-sdk:`Results ` collection. Lists implement +the :swift-sdk:`RealmCollection ` protocol, +which provides access to common properties and operators such as: + +- ``.count`` +- ``.first`` and ``.last`` +- ``.where`` query syntax +- ``.sorted(by:)`` and ``.distinct(by:)`` + +Unlike Swift native collections, ``List`` is a reference type. A ``List`` is +only immutable if the database it originates from is opened as read-only. diff --git a/source/includes/api-details/swift/crud/read-query-mixed-properties-description.rst b/source/includes/api-details/swift/crud/read-query-mixed-properties-description.rst new file mode 100644 index 0000000000..f92d27fe49 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-mixed-properties-description.rst @@ -0,0 +1,21 @@ +When you read an :swift-sdk:`AnyRealmValue ` +property, check the value's type before doing anything with it. The SDK +provides an :swift-sdk:`AnyRealmValue enum ` that +iterates through all of the types the ``AnyRealmValue`` can store. + +You can :ref:`compare ` these mixed +value types: + +- Numeric: int, bool, float, double, decimal +- Byte-based: string, binary +- Time-based: timestamp, objectId + +When using the ``AnyRealmValue`` mixed data type, keep these things in mind: + +- ``equals`` queries match on value and type +- ``not equals`` queries match objects with either different values or + different types +- The SDK converts comparable numeric properties where possible. For example, + in a mixed type field, 1 matches all of 1.0, 1, and true. +- String properties do not match numeric queries. For example, in a mixed + type field, 1 does not match "1". "1" does not match 1, 1.0, or true. diff --git a/source/includes/api-details/swift/crud/read-query-projections-description.rst b/source/includes/api-details/swift/crud/read-query-projections-description.rst new file mode 100644 index 0000000000..e966217a67 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-projections-description.rst @@ -0,0 +1,8 @@ +To query for class projections, pass the metatype instance +``YourProjectionName.self`` to :swift-sdk:`Realm.objects(_:) +`. +This returns a :swift-sdk:`Results ` object +representing all of the class projection objects in the database. + +.. literalinclude:: /examples/generated/code/start/ClassProjection.snippet.retrieve-data-through-class-projection.swift + :language: swift diff --git a/source/includes/api-details/swift/crud/read-query-set-properties-description.rst b/source/includes/api-details/swift/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..c0b61199b7 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-set-properties-description.rst @@ -0,0 +1,4 @@ +You can query a :swift-sdk:`MutableSet ` to check if +it contains an element. If you are working with multiple sets, you can +check for the intersection of two sets, or check whether one set is a subset +of the other set. diff --git a/source/includes/api-details/swift/crud/read-query-with-geospatial-shapes-description.rst b/source/includes/api-details/swift/crud/read-query-with-geospatial-shapes-description.rst new file mode 100644 index 0000000000..96ed1d3310 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-query-with-geospatial-shapes-description.rst @@ -0,0 +1,12 @@ +You can query geospatial data in two ways: + +- Using the :swift-sdk:`.geoWithin() + ` + operator with the type-safe :ref:`Swift Query API ` +- Using a :swift-sdk:`.filter() + ` + with an :ref:`NSPredicate query ` that uses + ``geoWithin``. + +The examples below show the results of queries using these two ``Company`` +objects. diff --git a/source/includes/api-details/swift/crud/read-sdk-results-collections-description.rst b/source/includes/api-details/swift/crud/read-sdk-results-collections-description.rst new file mode 100644 index 0000000000..4a64ba24d9 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-sdk-results-collections-description.rst @@ -0,0 +1,26 @@ +The SDK's :swift-sdk:`Results ` collection is +a class representing objects retrieved from queries. A ``Results`` collection +represents the lazily-evaluated results of a query operation, and has these +characteristics: + +- Results are immutable: you cannot manually add or remove elements to or from + the results collection. +- Results have an associated query that determines their contents. +- Results are **live** or **frozen** based on the query source. If they derive + from live objects, the results automatically update when the database + contents on the thread change. If they derive from frozen objects, they + represent only a snapshot and do not automatically update. +- You cannot manually initialize an empty ``Results`` set. Results can only + be initialized as the result of a query. + +In Swift, the SDK also provides :swift-sdk:`SectionedResults +`, a type-safe collection which holds +``ResultsSection`` as its elements. Each :swift-sdk:`ResultSection +` is a collection that contains only +objects that belong to a given section key. + +For example, an app that includes a contact list might use SectionedResults +to display a list of contacts divided into sections, where each section +contains all the contacts whose first name starts with the given letter. +The ``ResultsSection`` whose key is "L" would contain "Larry", "Liam", +and "Lisa". diff --git a/source/includes/api-details/swift/crud/read-section-query-results-description.rst b/source/includes/api-details/swift/crud/read-section-query-results-description.rst new file mode 100644 index 0000000000..a2a7a8b95f --- /dev/null +++ b/source/includes/api-details/swift/crud/read-section-query-results-description.rst @@ -0,0 +1,29 @@ +For example, you might add a computed variable to your object to get the +first letter of the ``name`` property: + +.. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.sectioned-result-variable.swift + :language: swift + +Then, you can create a :swift-sdk:`SectionedResults ` +type-safe collection for that object, and use it to retrieve objects sectioned +by that computed variable: + +.. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.get-sectioned-results.swift + :language: swift + +You can get a count of the sections, get a list of keys, or access an individual +:swift-sdk:`ResultSection ` by index: + +.. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.section-query-results.swift + :language: swift + +You can also section using a callback. This enables you to section a +collection of primitives, or have more control over how the section key is +generated. + +.. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.section-query-results-callback.swift + :language: swift + +You can :ref:`observe ` ``SectionedResults`` and +``ResultsSection`` instances, and both conform to +:swift-sdk:`ThreadConfined `. diff --git a/source/includes/api-details/swift/crud/read-sort-description.rst b/source/includes/api-details/swift/crud/read-sort-description.rst new file mode 100644 index 0000000000..d9192c0304 --- /dev/null +++ b/source/includes/api-details/swift/crud/read-sort-description.rst @@ -0,0 +1,3 @@ +You can sort using the type-safe keyPath by calling +:swift-sdk:`Results.sorted(by: ) ` with the +keyPath name and optional sort order. diff --git a/source/includes/api-details/typescript/crud/read-aggregate-description.rst b/source/includes/api-details/typescript/crud/read-aggregate-description.rst new file mode 100644 index 0000000000..4d51396248 --- /dev/null +++ b/source/includes/api-details/typescript/crud/read-aggregate-description.rst @@ -0,0 +1,4 @@ +In TypeScript, you perform aggregations through the :js-sdk:`filtered() +` method. In the ``filtered()`` method's +argument, use :ref:`Realm Query Language aggregate operators +` to aggregate data. diff --git a/source/includes/api-details/typescript/crud/read-filter-full-text-search-property-description.rst b/source/includes/api-details/typescript/crud/read-filter-full-text-search-property-description.rst new file mode 100644 index 0000000000..4bcd446879 --- /dev/null +++ b/source/includes/api-details/typescript/crud/read-filter-full-text-search-property-description.rst @@ -0,0 +1,8 @@ +To query an FTS indexed property, use the ``TEXT`` predicate in your +:js-sdk:`filtered ` query. + +In the following example, we query on the ``Book.name`` field using the +following ``Book`` object model. + +.. literalinclude:: /examples/generated/node/v12/full-text-search.test.snippet.node-fts-annotation.ts + :language: typescript diff --git a/source/includes/api-details/typescript/crud/read-query-set-properties-description.rst b/source/includes/api-details/typescript/crud/read-query-set-properties-description.rst new file mode 100644 index 0000000000..091f06fbfd --- /dev/null +++ b/source/includes/api-details/typescript/crud/read-query-set-properties-description.rst @@ -0,0 +1,20 @@ +Sets allow you to perform math operations such as finding the union, +intersection, or difference between two sets. To learn more about performing +these operations, see the MDN docs for :mdn:`Implementing basic set operations +`. + +To determine if a set contains a particular value, pass the value to the +``.has()`` method. The ``set.has()`` method will return true if the +set contains the value specified. + +To discover how many items are in a set, you can check the set's ``size`` +property. + +To traverse a set, use the ``.forEach()`` method or alternative +:mdn:`iteration method +`. + +The order of the **Realm.Set** may be different from the order that the items +were added. + +You can track the set order by updating an array when a new value is added. diff --git a/source/includes/sdk-examples/crud/read-access-results.rst b/source/includes/sdk-examples/crud/read-access-results.rst new file mode 100644 index 0000000000..a334229fcd --- /dev/null +++ b/source/includes/sdk-examples/crud/read-access-results.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.check-size-and-access-results.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.iteration.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-aggregate.rst b/source/includes/sdk-examples/crud/read-aggregate.rst new file mode 100644 index 0000000000..736329d5f2 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-aggregate.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QueryEngineExamples.snippet.aggregate.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.aggregate-operators.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.aggregate-operators.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.aggregate-results.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.aggregate.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.tsq-aggregate.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-all-objects-of-type.rst b/source/includes/sdk-examples/crud/read-all-objects-of-type.rst new file mode 100644 index 0000000000..ad805a598b --- /dev/null +++ b/source/includes/sdk-examples/crud/read-all-objects-of-type.rst @@ -0,0 +1,63 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.read-objects-from-realm.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QueryEngineExamples.snippet.read_all.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.query-all-objects.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.get-all-objects.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.get-all-objects.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-data-query-an-object-type.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-by-object-type.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.objects.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.objects.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-chain-queries.rst b/source/includes/sdk-examples/crud/read-chain-queries.rst new file mode 100644 index 0000000000..e264ec07ab --- /dev/null +++ b/source/includes/sdk-examples/crud/read-chain-queries.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.chain-query.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.tsq-chain-query.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-define-geospatial-shapes-box.rst b/source/includes/sdk-examples/crud/read-define-geospatial-shapes-box.rst new file mode 100644 index 0000000000..a03cb56407 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-define-geospatial-shapes-box.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.geobox.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.geobox.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geobox.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Geospatial.snippet.geobox.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.geobox.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geobox.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-define-geospatial-shapes-circle.rst b/source/includes/sdk-examples/crud/read-define-geospatial-shapes-circle.rst new file mode 100644 index 0000000000..226a0eb966 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-define-geospatial-shapes-circle.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.geocircle.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.geocircle.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geocircle.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Geospatial.snippet.geocircle.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.geocircle.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geocircle.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-define-geospatial-shapes-polygon.rst b/source/includes/sdk-examples/crud/read-define-geospatial-shapes-polygon.rst new file mode 100644 index 0000000000..a0c305a549 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-define-geospatial-shapes-polygon.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.geopolygon.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geopolygon.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Geospatial.snippet.geopolygon.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.geopolygon.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geopolygon.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-filter-by-remapped-property-name.rst b/source/includes/sdk-examples/crud/read-filter-by-remapped-property-name.rst new file mode 100644 index 0000000000..bb9071d15c --- /dev/null +++ b/source/includes/sdk-examples/crud/read-filter-by-remapped-property-name.rst @@ -0,0 +1,71 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-remapped-property.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-filter-full-text-search-property.rst b/source/includes/sdk-examples/crud/read-filter-full-text-search-property.rst new file mode 100644 index 0000000000..9b9bf86786 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-filter-full-text-search-property.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Indexing.snippet.rql-query-fts.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/full_text_search_test.snippet.flutter-fts-query.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-fts-property.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/full-text-search.test.snippet.node-fts-query.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-filter-or-query-objects.rst b/source/includes/sdk-examples/crud/read-filter-or-query-objects.rst new file mode 100644 index 0000000000..7b3e62bb55 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-filter-or-query-objects.rst @@ -0,0 +1,63 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.filter-using-type-safe-query.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QueryEngineExamples.snippet.rql.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.filter-iterable.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.realm-query-language.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.realm-query-language.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-filter-queries.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-by-property.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.filter.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.filter.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-find-object-by-primary-key.rst b/source/includes/sdk-examples/crud/read-find-object-by-primary-key.rst new file mode 100644 index 0000000000..56b501f4cc --- /dev/null +++ b/source/includes/sdk-examples/crud/read-find-object-by-primary-key.rst @@ -0,0 +1,64 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QueryEngineExamples.snippet.get_by_id.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.query-object-by-pk.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.find-an-object-by-primary-key.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.find-an-object-by-primary-key.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-data-object-for-primary-key.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.find-by-primary-key.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.find-a-specific-object-by-primary-key.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.find-a-specific-object-by-primary-key.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-limit.rst b/source/includes/sdk-examples/crud/read-limit.rst new file mode 100644 index 0000000000..3780b9f360 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-limit.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.limit.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.sort-results.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.sort-results.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-query-dictionary-properties.rst b/source/includes/sdk-examples/crud/read-query-dictionary-properties.rst new file mode 100644 index 0000000000..281043b92c --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-dictionary-properties.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.read-map-value.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.map-work-with.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.query-a-dictionary.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.read-realm-dictionary.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.map.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-query-inverse-relationship.rst b/source/includes/sdk-examples/crud/read-query-inverse-relationship.rst new file mode 100644 index 0000000000..ea61a2afe1 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-inverse-relationship.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Relationships.snippet.inverse-query.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/backlinks_test.snippet.filter-backlinks-rql.dart + :language: dart + + - id: java + content: | + + .. include:: /examples/generated/java/sync/RealmQueryTest.snippet.query-an-inverse-relationship.java.rst + + - id: java-kotlin + content: | + + .. include:: /examples/generated/java/sync/RealmQueryTest.snippet.query-an-inverse-relationship.kt.rst + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.obtain-inverse-relationship-dynamically.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.persisted-name-inverse.kt + :language: kotlin + :emphasize-lines: 1 + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-inverse-persisted-name.kt + :language: kotlin + :emphasize-lines: 4 + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.query-an-inverse-relationship.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.query-an-inverse-relationship.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/relationships.test.snippet.obtain-inverse-relationship-dynamically.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-query-list-properties.rst b/source/includes/sdk-examples/crud/read-query-list-properties.rst new file mode 100644 index 0000000000..d8f056609d --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-list-properties.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.realmlist-use.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.read-realm-list.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-query-mixed-properties.rst b/source/includes/sdk-examples/crud/read-query-mixed-properties.rst new file mode 100644 index 0000000000..6f7317e2f8 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-mixed-properties.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.query-objects-with-mixed-values.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.get-realmany-property.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.mixed-data-type.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-query-set-properties.rst b/source/includes/sdk-examples/crud/read-query-set-properties.rst new file mode 100644 index 0000000000..abc9768915 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-set-properties.rst @@ -0,0 +1,67 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/crud.snippet.read-set.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.realm-set-examples.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/data-types.snippet.make-array-with-insertion-order-from-set.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.read-realm-set.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.set-collections.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-query-to-many-relationship.rst b/source/includes/sdk-examples/crud/read-query-to-many-relationship.rst new file mode 100644 index 0000000000..fc55b71d36 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-to-many-relationship.rst @@ -0,0 +1,69 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Relationships.snippet.one-to-many-query.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/data_types_test.snippet.realmlist-use.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/RealmQueryTest.snippet.query-a-relationship.java + :language: java + :emphasize-lines: 16 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/RealmQueryTest.snippet.query-a-relationship.kt + :language: kotlin + :emphasize-lines: 15 + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-to-many-relationship.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-query-to-one-relationship.rst b/source/includes/sdk-examples/crud/read-query-to-one-relationship.rst new file mode 100644 index 0000000000..d9314ed4e8 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-to-one-relationship.rst @@ -0,0 +1,70 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Relationships.snippet.one-to-one-query.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/RealmQueryTest.snippet.query-a-relationship.java + :language: java + :emphasize-lines: 16 + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/RealmQueryTest.snippet.query-a-relationship.kt + :language: kotlin + :emphasize-lines: 15 + + - id: javascript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.js + :language: javascript + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/ReadTest.snippet.query-to-one-relationship.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-box.rst b/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-box.rst new file mode 100644 index 0000000000..46ce940f38 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-box.rst @@ -0,0 +1,73 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.geobox-query.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.geobox-query.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geobox-query.js + :language: javascript + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/Geospatial.snippet.geobox-query.kt + :language: kotlin + + .. output:: + + Companies in large box: 1 + Companies in small box: 2 + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.geobox-query.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geobox-query.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-circle.rst b/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-circle.rst new file mode 100644 index 0000000000..4d2bd7703b --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-circle.rst @@ -0,0 +1,73 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.geocircle-query.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.geocircle-query.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geocircle-query.js + :language: javascript + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/Geospatial.snippet.geocircle-query.kt + :language: kotlin + + .. output:: + + Companies in large circle: 1 + Companies in small circle: 0 + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.geocircle-query.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geocircle-query.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-polygon.rst b/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-polygon.rst new file mode 100644 index 0000000000..0f75a8c4a1 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes-polygon.rst @@ -0,0 +1,74 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.geopolygon-query.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geopolygon-query.js + :language: javascript + + - id: kotlin + content: | + + .. io-code-block:: + + .. input:: /examples/generated/kotlin/Geospatial.snippet.geopolygon-query.kt + :language: kotlin + + .. output:: + + Companies in basic polygon: 2 + Companies in polygon with holes: 1 + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.geopolygon-query.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.geopolygon-query.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes.rst b/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes.rst new file mode 100644 index 0000000000..f6259d17d3 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-query-with-geospatial-shapes.rst @@ -0,0 +1,66 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.cpp + :language: cpp + :copyable: false + + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/Geospatial.snippet.geopoint.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/geospatial_data_test.snippet.write-geospatial-object.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api.java + :language: java + :copyable: false + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/api-java-kotlin.kt + :language: kotlin + :copyable: false + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.write-geospatial-object.js + :language: javascript + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/Geospatial.snippet.create-geopoint.kt + :language: kotlin + + - id: objectivec + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.m + :language: objectivec + :copyable: false + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Geospatial.snippet.companies.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/v12/geospatial.test.snippet.write-geospatial-object.ts + :language: typescript diff --git a/source/includes/sdk-examples/crud/read-sort.rst b/source/includes/sdk-examples/crud/read-sort.rst new file mode 100644 index 0000000000..130876f6e8 --- /dev/null +++ b/source/includes/sdk-examples/crud/read-sort.rst @@ -0,0 +1,65 @@ +.. tabs-drivers:: + + tabs: + - id: cpp-sdk + content: | + + .. literalinclude:: /examples/generated/cpp/filter-data.snippet.sort-list-by-multiple-properties.cpp + :language: cpp + + - id: csharp + content: | + + .. literalinclude:: /examples/CRUD/Sort.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/read_write_data_test.snippet.sort.dart + :language: dart + + - id: java + content: | + + .. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.sort-results.java + :language: java + + - id: java-kotlin + content: | + + .. literalinclude:: /examples/generated/java/sync/ReadsTest.snippet.sort-results.kt + :language: kotlin + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/read-and-write-data.snippet.read-and-write-sorted-queries.js + :language: javascript + :emphasize-lines: 4, 6, 8, 13 + + - id: kotlin + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.kt + :language: kotlin + :copyable: false + + - id: objectivec + content: | + + .. literalinclude:: /examples/generated/code/start/ReadWriteData.snippet.sort.m + :language: objectivec + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/ReadRealmObjects.snippet.sort-type-safe.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.ts + :language: typescript + :copyable: false diff --git a/source/includes/sdk-examples/query/rql-example-data-model.rst b/source/includes/sdk-examples/query/rql-example-data-model.rst index 8cec6893b2..12227fc183 100644 --- a/source/includes/sdk-examples/query/rql-example-data-model.rst +++ b/source/includes/sdk-examples/query/rql-example-data-model.rst @@ -1,7 +1,7 @@ .. tabs-drivers:: tabs: - - id: cpp + - id: cpp-sdk content: | .. literalinclude:: /examples/generated/cpp/filter-data.snippet.models.cpp diff --git a/source/index.txt b/source/index.txt index fb684ed1cf..30ff575a30 100644 --- a/source/index.txt +++ b/source/index.txt @@ -147,7 +147,7 @@ other clients. :ref:`Create `, :ref:`read `, :ref:`update `, and :ref:`delete ` objects from the device database. Filter data using the - :ref:`query engines ` provided by the SDK. + :ref:`query engines ` provided by the SDK. .. step:: React to Changes diff --git a/source/platforms/apple/use-sdk-with-actors.txt b/source/platforms/apple/use-sdk-with-actors.txt index f5ebc3db98..b9bb55f90b 100644 --- a/source/platforms/apple/use-sdk-with-actors.txt +++ b/source/platforms/apple/use-sdk-with-actors.txt @@ -208,7 +208,7 @@ object local to that actor. If you may need to share the same database object across actors more than once, you may prefer to share the :ref:`primary key ` - and :ref:`query for it ` on + and :ref:`query for it ` on the actor where you want to use it. Refer to the "Pass a Primary Key and Query for the Object on Another Actor" section on this page for an example. @@ -240,7 +240,7 @@ Pass a Primary Key and Query for the Object on Another Actor If you want to use a database object on another actor, you can share the :ref:`primary key ` and -:ref:`query for it ` on the actor +:ref:`query for it ` on the actor where you want to use it. .. literalinclude:: /examples/generated/code/start/RealmActor.snippet.query-for-data-on-another-actor.swift diff --git a/source/sdk/crud.txt b/source/sdk/crud.txt index 1dd90517b4..18ef505e6c 100644 --- a/source/sdk/crud.txt +++ b/source/sdk/crud.txt @@ -19,5 +19,5 @@ manage objects across threads, and use the Atlas Device SDK query engines: - :ref:`sdks-crud-read` - :ref:`sdks-crud-update` - :ref:`sdks-crud-delete` -- :ref:`sdks-query-engines` +- :ref:`realm-query-language` - :ref:`sdks-threading` diff --git a/source/sdk/crud/query-engines.txt b/source/sdk/crud/query-engines.txt index 4339163c25..e74855ff7f 100644 --- a/source/sdk/crud/query-engines.txt +++ b/source/sdk/crud/query-engines.txt @@ -14,6 +14,6 @@ The following pages contain information about how to use the Atlas Device SDK query engines: - :ref:`realm-query-language` -- :ref:`java-filter-data` -- :ref:`dotnet-linq` +- :ref:`sdks-java-filter-data` +- :ref:`sdks-dotnet-linq` - :ref:`sdks-filter-data-swift` diff --git a/source/sdk/crud/query-engines/filter-data-java-sdk.txt b/source/sdk/crud/query-engines/filter-data-java-sdk.txt index 12a2f46f34..6f58517cd3 100644 --- a/source/sdk/crud/query-engines/filter-data-java-sdk.txt +++ b/source/sdk/crud/query-engines/filter-data-java-sdk.txt @@ -1,8 +1,20 @@ -.. _java-filter-data: +.. _sdks-java-filter-data: -====================== -Filter Data - Java SDK -====================== +============================================ +Filter Data with Fluent Interface - Java SDK +============================================ + +.. meta:: + :description: Atlas Device SDK for Java provides a Fluent Interface query engine for an idiomatic query experience in Java and Kotlin. + :keywords: Realm, Java SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: java, kotlin .. contents:: On this page :local: @@ -10,4 +22,582 @@ Filter Data - Java SDK :depth: 2 :class: singlecol -Placeholder for filtering data in the Java SDK using the Fluent interface. \ No newline at end of file +.. tabs-selector:: drivers + +Atlas Device SDK for Java uses a :wikipedia:`Fluent interface ` +to construct multi-clause queries that are passed to the query engine. + +See :java-sdk:`RealmQuery API ` for a complete list +of available methods. + +There are several types of operators available to filter an SDK collection. +Filters work by **evaluating** an operator expression for every object in the +collection being filtered. If the expression resolves to ``true``, the SDK +includes the object in the results collection. + +An **expression** consists of one of the following: + +- The name of a property of the object currently being evaluated. +- An operator and up to two argument expression(s). +- A literal string, number, or date. + +Fluent Interface Expressions +---------------------------- + +About the Examples In This Section +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The examples in this section use a simple data set for a +task list app. The two SDK object types are ``Project`` +and ``Task``. A ``Task`` has a name, assignee's name, and +completed flag. There is also an arbitrary number for +priority (higher is more important) and a count of +minutes spent working on it. A ``Project`` has zero or more +``Tasks``. + +See the schema for these two classes, ``Project`` and +``Task``, below: + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/sync/ProjectTask.snippet.projecttask.java + :language: java + :caption: ProjectTask.java + :copyable: false + + .. literalinclude:: /examples/generated/java/sync/Project.snippet.project.java + :language: java + :caption: Project.java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/sync/ProjectTask.snippet.projecttask.kt + :language: kotlin + :caption: ProjectTask.kt + :copyable: false + + .. literalinclude:: /examples/generated/java/sync/Project.snippet.project.kt + :language: kotlin + :caption: Project.kt + :copyable: false + +Comparison Operators +~~~~~~~~~~~~~~~~~~~~ + +The most straightforward operation in a search is to compare +values. + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - ``between`` + - Evaluates to ``true`` if the left-hand numerical or date expression is between or equal to the right-hand range. For dates, this evaluates to ``true`` if the left-hand date is within the right-hand date range. + + * - | ``equalTo`` + - Evaluates to ``true`` if the left-hand expression is equal to the right-hand expression. + + * - | ``greaterThan`` + - Evaluates to ``true`` if the left-hand numerical or date expression is greater than the right-hand numerical or date expression. For dates, this evaluates to ``true`` if the left-hand date is later than the right-hand date. + + * - | ``greaterThanOrEqualTo`` + - Evaluates to ``true`` if the left-hand numerical or date expression is greater than or equal to the right-hand numerical or date expression. For dates, this evaluates to ``true`` if the left-hand date is later than or the same as the right-hand date. + + * - ``in`` + - Evaluates to ``true`` if the left-hand expression is in the right-hand list. + + * - | ``lessThan`` + - Evaluates to ``true`` if the left-hand numerical or date expression is less than the right-hand numerical or date expression. For dates, this evaluates to ``true`` if the left-hand date is earlier than the right-hand date. + + * - | ``lessThanOrEqualTo`` + - Evaluates to ``true`` if the left-hand numeric expression is less than or equal to the right-hand numeric expression. For dates, this evaluates to ``true`` if the left-hand date is earlier than or the same as the right-hand date. + + * - | ``notEqualTo`` + - Evaluates to ``true`` if the left-hand expression is not equal to the right-hand expression. + +.. example:: + + The following example uses the query engine's + comparison operators to: + + - Find high priority tasks by comparing the value of the ``priority`` property value with a threshold number, above which priority can be considered high. + - Find just-started or short-running tasks by seeing if the ``progressMinutes`` property falls within a certain range. + - Find unassigned tasks by finding tasks where the ``assignee`` property is equal to ``null``. + - Find tasks assigned to specific teammates Ali or Jamie by seeing if the ``assignee`` property is in a list of names. + + .. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.comparison-operators.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.comparison-operators.kt + :language: kotlin + :copyable: false + +Logical Operators +~~~~~~~~~~~~~~~~~ + +You can make compound predicates using logical operators. + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - | ``and`` + - Evaluates to ``true`` if both left-hand and right-hand expressions are ``true``. + + * - | ``not`` + - Negates the result of the given expression. + + * - | ``or`` + - Evaluates to ``true`` if either expression returns ``true``. + +.. example:: + + We can use the query language's logical operators to find + all of Ali's completed tasks. That is, we find all tasks + where the ``assignee`` property value is equal to 'Ali' AND + the ``isComplete`` property value is ``true``: + + .. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.logical-operators.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.logical-operators.kt + :language: kotlin + :copyable: false + +.. _java-string-operators: + +String Operators +~~~~~~~~~~~~~~~~ + +You can compare string values using these string operators. +Regex-like wildcards allow more flexibility in search. + +.. list-table:: + :header-rows: 1 + :widths: 40 60 + + * - Operator + - Description + + * - | ``beginsWith`` + - Evaluates to ``true`` if the left-hand string expression begins with the right-hand string expression. This is similar to ``contains``, but only matches if the left-hand string expression is found at the beginning of the right-hand string expression. + + * - ``contains`` + - Evaluates to ``true`` if the left-hand string expression is found anywhere in the right-hand string expression. + + * - | ``endsWith`` + - Evaluates to ``true`` if the left-hand string expression ends with the right-hand string expression. This is similar to ``contains``, but only matches if the left-hand string expression is found at the very end of the right-hand string expression. + + * - | ``like`` + - Evaluates to ``true`` if the left-hand string expression + matches the right-hand string wildcard string + expression. A wildcard string expression is a string + that uses normal characters with two special wildcard + characters: + + - The ``*`` wildcard matches zero or more of any character + - The ``?`` wildcard matches any character. + + For example, the wildcard string "d?g" matches "dog", + "dig", and "dug", but not "ding", "dg", or "a dog". + + * - | ``equalTo`` + - Evaluates to ``true`` if the left-hand string is lexicographically equal to the right-hand string. + +.. example:: + + We use the query engine's string operators to find + projects with a name starting with the letter 'e' and + projects with names that contain 'ie': + + .. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.string-operators.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.string-operators.kt + :language: kotlin + :copyable: false + +.. note:: Case-insensitive Character Limitations + + Case-insensitive string operators only support the + ``Latin Basic``, ``Latin Supplement``, ``Latin Extended A``, and + ``Latin Extended B (UTF-8 range 0–591)`` character sets. Setting + the case insensitive flag in queries when using ``equalTo``, + ``notEqualTo``, ``contains``, ``endsWith``, ``beginsWith``, or + ``like`` only works on English locale characters. + +Aggregate Operators +~~~~~~~~~~~~~~~~~~~ + +You can apply an aggregate operator to a collection property of an SDK object. +Aggregate operators traverse a collection and reduce it to a single value. + +.. list-table:: + :header-rows: 1 + :widths: 40 60 + + * - Operator + - Description + + * - | ``average`` + - Evaluates to the average value of a given numerical property across a collection. + + * - | ``count`` + - Evaluates to the number of objects in the given collection. + + * - | ``max`` + - Evaluates to the highest value of a given numerical property across a collection. + + * - | ``min`` + - Evaluates to the lowest value of a given numerical property across a collection. + + * - | ``sum`` + - Evaluates to the sum of a given numerical property across a collection. + +.. example:: + + We create a couple of filters to show different facets of + the data: + + - Projects with average tasks priority above 5. + - Long running projects. + + .. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.aggregate-operators.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/sync/QueryEngineTest.snippet.aggregate-operators.kt + :language: kotlin + :copyable: false + +Filter, Sort, Limit, Unique, and Chain Queries +---------------------------------------------- + +About the Examples in This Section +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The examples in this section use two Realm object types: ``Teacher`` +and ``Student``. + +See the schema for these two classes below: + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/local/Teacher.snippet.complete.java + :language: java + :caption: Teacher.java + :copyable: false + + .. literalinclude:: /examples/generated/java/local/Student.snippet.complete.java + :language: java + :caption: Student.java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/local/TeacherKt.snippet.complete.kt + :language: kotlin + :caption: Teacher.kt + :copyable: false + + .. literalinclude:: /examples/generated/java/local/StudentKt.snippet.complete.kt + :language: kotlin + :caption: Student.kt + :copyable: false + +.. _java-client-filters: + +Filters +~~~~~~~ + +You can build filters using the operator methods of the +:wikipedia:`fluent interface ` exposed by the +:java-sdk:`RealmQuery ` class: + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.filters.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.filters.kt + :language: kotlin + :copyable: false + +This gives you a new instance of the class :java-sdk:`RealmResults `, +containing teachers with the name "Ms. Langtree" or "Mrs. Jacobs". + +``RealmQuery`` includes several methods that can execute queries: + +- :java-sdk:`findAll() ` blocks until + it finds all objects that meet the query conditions + +- :java-sdk:`findAllAsync() ` + returns immediately and finds all objects that meet the query + conditions asynchronously on a background thread + +- :java-sdk:`findFirst() ` blocks + until it finds the first object that meets the query conditions + +- :java-sdk:`findFirstAsync() ` + returns immediately and finds the first object that meets the query + conditions asynchronously on a background thread + +Queries return a list of references to the matching SDK objects using the +:java-sdk:`RealmResults ` type. + +.. _java-link-queries: + +Link Queries +````````````` + +When referring to an object property, you can use **dot notation** to refer +to child properties of that object. You can refer to the properties of +:ref:`embedded objects ` and :ref:`relationships +` with dot notation. + +For example, consider a query for all teachers with a student named +"Wirt" or "Greg": + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.link-queries.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.link-queries.kt + :language: kotlin + :copyable: false + +You can even use dot notation to query inverse relationships: + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.link-queries-inverse.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.link-queries-inverse.kt + :language: kotlin + :copyable: false + +.. _java-sort-results: + +Sort Results +~~~~~~~~~~~~ + +.. important:: + + Realm applies the ``distinct()``, ``sort()`` and + ``limit()`` methods in the order you specify. Depending on the + data set this can alter the query result. Generally, you should + apply ``limit()`` last to avoid unintended result sets. + +You can define the order of query results using the +:java-sdk:`sort() ` +method: + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.sort.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.sort.kt + :language: kotlin + :copyable: false + +Sorts organize results in ascending order by default. To organize results +in descending order, pass ``Sort.DESCENDING`` as a second argument. +You can resolve sort order ties between identical property values +by passing an array of properties instead of a single property: in the +event of a tie, the SDK sorts the tied objects by subsequent +properties in order. + +.. note:: String Sorting Limitations + + The SDK uses non-standard sorting for upper and lowercase + letters, sorting them together rather than sorting uppercase first. + As a result, ``'- !"#0&()*,./:;?_+<=>123aAbBcC...xXyYzZ`` is the + actual sorting order in Realm. Additionally, sorting + strings only supports the ``Latin Basic``, ``Latin Supplement``, + ``Latin Extended A``, and ``Latin Extended B (UTF-8 range 0–591)`` + character sets. + +.. _java-limit-results: + +Limit Results +~~~~~~~~~~~~~ + +You can cap the number of query results to a specific maximum number +using the :java-sdk:`limit() ` +method: + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.limit.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.limit.kt + :language: kotlin + :copyable: false + +Limited result collections automatically update like any other query +result. Consequently, objects might drop out of the collection as +underlying data changes. + +.. tip:: Pagination is Not Necessary for SDK Optimization + + Some databases encourage paginating results with limits to avoid + reading unnecessary data from disk or using too much memory. + + Since Atlas Device SDK queries are lazy, there is no need to + take such measures. The SDK only loads objects from query + results when they are explicitly accessed. + +.. tip:: Deleted Notifications in Limited Results + + :ref:`Collection notifications ` + report objects as deleted when they drop out of the result set. + This does not necessarily mean that they have been deleted from the + underlying database, just that they are no longer part of the + query result. + +.. _java-unique-results: + +Unique Results +~~~~~~~~~~~~~~ + +You can reduce query results to unique values for a given field or fields +using the :java-sdk:`distinct() +` method: + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.unique.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.unique.kt + :language: kotlin + :copyable: false + +You can only call ``distinct()`` on integer, long, short, and ``String`` +fields; other field types will throw an exception. As with sorting, +you can specify multiple fields to resolve ties. + +.. _java-chain-queries: + +Chain Queries +~~~~~~~~~~~~~ + +You can apply additional filters to a results collection by calling the +:java-sdk:`where() ` method: + +.. tabs-drivers:: + + .. tab:: + :tabid: java + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.chain-queries.java + :language: java + :copyable: false + + .. tab:: + :tabid: java-kotlin + + .. literalinclude:: /examples/generated/java/local/FilterDataTest.snippet.chain-queries.kt + :language: kotlin + :copyable: false + +The ``where()`` method returns a ``RealmQuery`` that you can resolve into +a ``RealmResults`` using a ``find`` method. Filtered results can only +return objects of the same type as the original results set, but are +otherwise able to use any :ref:`filters `. diff --git a/source/sdk/crud/query-engines/filter-data-linq.txt b/source/sdk/crud/query-engines/filter-data-linq.txt index 508b0ed878..7aeecb5aba 100644 --- a/source/sdk/crud/query-engines/filter-data-linq.txt +++ b/source/sdk/crud/query-engines/filter-data-linq.txt @@ -1,12 +1,20 @@ -.. _dotnet-filter-data: -.. _dotnet-filter-queries-based-on-object-properties: -.. _dotnet-filter-results: -.. _dotnet-client-query-engine: -.. _dotnet-linq: +.. _sdks-dotnet-linq: -=========================== -Filter and Sort Data - LINQ -=========================== +================================ +Filter Data with LINQ - .NET SDK +================================ + +.. meta:: + :description: Atlas Device SDK for .NET provides a LINQ query engine for an idiomatic query experience in C#. + :keywords: Realm, .NET SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: csharp .. contents:: On this page :local: @@ -14,4 +22,242 @@ Filter and Sort Data - LINQ :depth: 2 :class: singlecol -Placeholder page for querying data in .NET SDK using LINQ. +The Atlas Device SDK query engine implements standard `LINQ +`__ +syntax. + +There are several operators available to filter an SDK collection with LINQ. +Filters work by evaluating an operator expression for every object in the +collection being filtered. If the expression resolves to ``true``, the SDK +includes the object in the results collection. + +An expression consists of one of the following: + +- The name of a property of the object currently being evaluated +- An operator +- A value of any type used by the SDK (string, date, number, boolean, etc.) + +.. note:: + + The SDK does not currently support all of the LINQ operators. Refer to the + :ref:`sdks-dotnet-unsupported-linq` section on this page for a list of + those unsupported operators. + +Comparison Operators +~~~~~~~~~~~~~~~~~~~~ + +Value comparisons + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - | ``==`` + - Evaluates to ``true`` if the left-hand expression is equal to the + right-hand expression. + + * - | ``>`` + - Evaluates to ``true`` if the left-hand numerical or date expression is + greater than the right-hand numerical or date expression. For dates, this + evaluates to ``true`` if the left-hand date is later than the right-hand + date. + + * - | ``>=`` + - Evaluates to ``true`` if the left-hand numerical or date expression is + greater than or equal to the right-hand numerical or date expression. For + dates, this evaluates to ``true`` if the left-hand date is later than or + the same as the right-hand date. + + * - | ``<`` + - Evaluates to ``true`` if the left-hand numerical or date expression is + less than the right-hand numerical or date expression. For dates, this + evaluates to ``true`` if the left-hand date is earlier than the + right-hand date. + + * - | ``<=`` + - Evaluates to ``true`` if the left-hand numeric expression is less than + or equal to the right-hand numeric expression. For dates, this evaluates + to ``true`` if the left-hand date is earlier than or the same as the + right-hand date. + + * - | ``!=`` + - Evaluates to ``true`` if the left-hand expression is not equal to the + right-hand expression. + +.. example:: + + The following example uses the query engine's + comparison operators to: + + - Find high priority tasks by comparing the value of the ``priority`` property + value with a threshold number, above which priority can be considered high. + - Find just-started or short-running tasks by seeing if the ``progressMinutes`` + property falls within a certain range. + - Find unassigned tasks by finding tasks where the ``assignee`` property is + equal to ``null``. + - Find tasks assigned to specific teammates Ali or Jamie by seeing if the + ``assignee`` property is in a list of names. + + .. literalinclude:: /examples/generated/dotnet/QueryEngineExamples.snippet.comparisons.cs + :language: csharp + +Logical Operators +~~~~~~~~~~~~~~~~~ + +You can use the logical operators listed in the following table to make compound +predicates: + +.. list-table:: + :header-rows: 1 + :widths: 30 70 + + * - Operator + - Description + + * - | ``&&`` + - Evaluates to ``true`` if both left-hand and right-hand expressions are + ``true``. + + * - | ``!`` + - Negates the result of the given expression. + + * - | ``||`` + - Evaluates to ``true`` if either expression returns ``true``. + +.. example:: + + We can use the query language's logical operators to find + all of Ali's completed tasks. That is, we find all tasks + where the ``assignee`` property value is equal to 'Ali' AND + the ``isComplete`` property value is ``true``: + + .. literalinclude:: /examples/generated/dotnet/QueryEngineExamples.snippet.logical.cs + :language: csharp + +String Operators +~~~~~~~~~~~~~~~~ + +You can compare string values using the string operators listed in the following +table. Regex-like wildcards allow more flexibility in search. + +.. list-table:: + :header-rows: 1 + :widths: 40 60 + + * - Operator + - Description + + * - ``StartsWith`` + - Evaluates to ``true`` if the left-hand string expression begins with the + right-hand string expression. This is similar to ``contains``, but only + matches if the left-hand string expression is found at the beginning of + the right-hand string expression. + + * - | ``EndsWith`` + - Evaluates to ``true`` if the left-hand string expression ends with the + right-hand string expression. This is similar to ``contains``, but only + matches if the left-hand string expression is found at the very end of + the right-hand string expression. + + * - | ``Like`` + - Evaluates to ``true`` if the left-hand string expression + matches the right-hand string wildcard string + expression. A wildcard string expression is a string + that uses normal characters with two special wildcard + characters: + + - The ``*`` wildcard matches zero or more of any character + - The ``?`` wildcard matches any character. + + For example, the wildcard string "d?g" matches "dog", + "dig", and "dug", but not "ding", "dg", or "a dog". + + * - | ``Equals`` + - Evaluates to ``true`` if the left-hand string is + `lexicographically `_ + equal to the right-hand string. + + * - | ``Contains`` + - Evaluates to ``true`` if the left-hand string expression is found anywhere + in the right-hand string expression. + + * - | ``string.IsNullOrEmpty`` + - Evaluates to ``true`` if the left-hand string expression is null or empty. + Note that ``IsNullOrEmpty()`` is a static method on ``string``. + +.. example:: + + The following examples use the query engine's string operators to find + tasks: + + .. literalinclude:: /examples/generated/dotnet/QueryEngineExamples.snippet.strings.cs + :language: csharp + +.. important:: Case Comparisons + + When evaluating strings, the second parameter in all functions *except* ``Like`` + must be either ``StringComparison.OrdinalIgnoreCase`` or + ``StringComparison.Ordinal``. For the ``Like()`` method, the second + parameter is a boolean value (where "true" means "case sensitive"). + +.. _dotnet-linq-fts: + +Full Text Search +~~~~~~~~~~~~~~~~ + +You can use LINQ to query on properties that have :ref:`enabled Full-Text Search +` (FTS). To query these properties, use +:dotnet-sdk:`QueryMethods.FullTextSearch +`. +The following examples query the ``Person.Biography`` field: + +.. literalinclude:: /examples/generated/dotnet/Indexing.snippet.linq-query-fts.cs + :language: csharp + +.. _sdks-dotnet-unsupported-linq: + +Unsupported LINQ Operators +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +The following LINQ operators are not currently supported by the SDK: + +.. list-table:: + :header-rows: 1 + :widths: 40 60 + + * - Category + - Unsupported Operators + + * - | Concatenation + - - ``Concat`` + - ``Join``. While ``Join`` is not supported, it is not needed with + the SDK. Instead of using keys in a Join statement, as you would in + a traditional relational database, you can reference another type + as a property. For more information, refer to :ref:`sdks-relationships`. + - ``GroupJoin`` + + * - | Grouping + - - ``GroupBy`` + + * - | Partitioning + - - ``Take`` + - ``Skip`` + - ``TakeWhile`` + - ``SkipWhile`` + + * - | Projection + - - ``SelectMany`` + - ``Select``, with one exception: when used with the query syntax, ``Select`` + is supported as long as you select the Realm object itself and not a + derivative: + + ``var tasks = from t in realm.All() where t.Assignee == "Caleb" select t;`` + + * - | Sets + - - ``Distinct`` + - ``Union`` + - ``Intersect`` + - ``Except`` diff --git a/source/sdk/crud/query-engines/filter-data-swift-sdk.txt b/source/sdk/crud/query-engines/filter-data-swift-sdk.txt index bd79198a2b..3a315fe16e 100644 --- a/source/sdk/crud/query-engines/filter-data-swift-sdk.txt +++ b/source/sdk/crud/query-engines/filter-data-swift-sdk.txt @@ -122,6 +122,8 @@ object in the collection being queried. If the expression resolves to ``true``, the SDK includes the object in the results collection. +.. _sdks-swift-where-comparison-operators: + Comparison Operators ```````````````````` @@ -299,7 +301,7 @@ This operator evaluates to ``true`` if: :language: swift For more information about querying geospatial data, refer to -:ref:`sdks-query-geospatial`. +:ref:`sdks-read-filter-geospatial-data`. Aggregate Operators ``````````````````` @@ -475,6 +477,8 @@ object in the collection being filtered. If the expression resolves to ``true``, the SDK includes the object in the results collection. +.. _sdks-swift-nspredicate-comparison-operators: + Comparison Operators ```````````````````` @@ -485,7 +489,7 @@ values. The type on both sides of the operator must be equivalent. For example, comparing an :ref:`ObjectId with string - ` will result in a precondition failure + ` will result in a precondition failure with a message like: .. code-block:: @@ -727,7 +731,7 @@ This operator evaluates to ``true`` if: :language: swift For more information about querying geospatial data, refer to -:ref:`sdks-query-geospatial`. +:ref:`sdks-read-filter-geospatial-data`. Aggregate Operators ``````````````````` diff --git a/source/sdk/crud/query-engines/realm-query-language.txt b/source/sdk/crud/query-engines/realm-query-language.txt index cc18750539..3729ce07e6 100644 --- a/source/sdk/crud/query-engines/realm-query-language.txt +++ b/source/sdk/crud/query-engines/realm-query-language.txt @@ -40,8 +40,8 @@ engine. For more information about SDK-specific query methods, refer to The following SDKs also support language-specific idiomatic APIs for querying databases: -- :ref:`Fluent Interface (Java SDK) ` -- :ref:`LINQ (.NET SDK) ` +- :ref:`Fluent Interface (Java SDK) ` +- :ref:`LINQ (.NET SDK) ` In addition to using RQL in your client code, you can also use RQL in :ref:`Realm Studio ` to browse for data. @@ -935,6 +935,30 @@ The following example uses subquery filters to find projects based on the subquery results collection. You can compare the count with the number ``0`` to return all matching objects. +.. _rql-collections-in-mixed-queries: + +Mixed Properties with Nested Data +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +You can query nested collections of mixed properties using the same syntax as +you would for a normal :ref:`list ` or +:ref:`dictionary ` collection. + +For nested collections, you can also use: + +- Bracket notation, which provides the following collection query operators: + + - ``[FIRST]`` and [``LAST``]: match the first or last elements within the collection. + - ``[]``: match the element at the specific index. + - ``[*]``: match any element within the collection (this operator assumes a + collection type at that path). + - ``[SIZE]``: match the collection length. + +- The ``@type`` operator, which supports the following values: + + - ``array`` and ``list``: match a list collection. + - ``dictionary`` and ``object``: match a map collection. + - ``collection``: match a list or a map collection. .. _rql-objectid-uuid-operators: diff --git a/source/sdk/crud/read.txt b/source/sdk/crud/read.txt index 56ea7c6e1a..be56acf743 100644 --- a/source/sdk/crud/read.txt +++ b/source/sdk/crud/read.txt @@ -4,58 +4,899 @@ Read Objects ============ +.. toctree:: + :titlesonly: + + Read Properties + .. meta:: :description: Read objects from the database by object type. Query by property to filter results. - :keywords: code example + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example .. facet:: :name: genre :values: reference +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for content related to reading realm objects. +.. tabs-selector:: drivers + +This page describes how to query and read objects from the a database +with Atlas Device SDK. You can read the data that you have +:ref:`written ` to the database by finding, +filtering, and sorting objects. + +A read from the database generally consists of the following steps: + +- Get all objects of a certain type from the database instance. +- Optionally, filter the results. +- Optionally, sort the results. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-intro-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-intro-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-intro-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-intro-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-intro-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-intro-js-ts-description.rst + + .. tab:: + :tabid: kotlin -.. _sdks-find-object-by-primary-key: + .. include:: /includes/api-details/kotlin/crud/read-intro-description.rst -Find an Object by Primary Key -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-intro-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-intro-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-intro-js-ts-description.rst + +The syntax for read operations is the same for synced and non-synced databases. + +For information related to reading specific property types, including finding +an object by primary key, refer to :ref:`sdks-crud-read-properties`. + +.. _sdks-read-characteristics: + +Read Characteristics +-------------------- + +Design your app's data access patterns around these read characteristics to +read data as efficiently as possible. .. _sdks-read-results: SDK Results Collections ------------------------ +~~~~~~~~~~~~~~~~~~~~~~~ + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-sdk-results-collections-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-sdk-results-collections-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-sdk-results-collections-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-sdk-results-collections-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-sdk-results-collections-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-sdk-results-collections-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-sdk-results-collections-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-sdk-results-collections-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-sdk-results-collections-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-sdk-results-collections-js-ts-description.rst + +.. _sdks-results-are-not-copies: + +Results Are Not Copies +`````````````````````` + +Unless you are working with frozen objects, results to a query are not copies +of your data. Modifying the results of a query modifies the data on disk +directly. This memory mapping also means that results are **live**: that is, +they always reflect the current state on disk. + +For more details about live versus frozen objects, refer to +:ref:`sdks-live-and-frozen-objects`. + +.. _sdks-results-are-lazy: + +Results Are Lazy +```````````````` + +The SDK only runs a query when you actually request the results of that query. +This lazy evaluation enables you to write highly performant code for handling +large data sets and complex queries. You can chain several filter operations +without requiring extra work to process the intermediate state. + +.. _sdks-references-retained: + +References Are Retained +``````````````````````` + +Atlas Device SDK automatically retains all of an object's :ref:`relationships +` as direct references. This enables you to traverse your +graph of relationships directly through the results of a query. + +A **direct reference**, or pointer, allows you to access a related object's +properties directly through the reference. + +Other databases typically copy objects from database storage into application +memory when you need to work with them directly. Because application objects +contain direct references, you are left with a choice: copy the object +referred to by each direct reference out of the database in case it's needed, +or copy the foreign key for each object and query for the object with that key +if it's accessed. If you choose to copy referenced objects into application +memory, you can use up a lot of resources for objects that are never accessed. +If you copy only the foreign key, referenced object lookups can cause your +application to slow down. + +The SDK bypasses all of this using zero-copy live objects. Database object +accessors point directly into database storage using memory mapping, so there +is no distinction between the objects in the database and the results of your +query in application memory. Because of this, you can traverse direct +references across an entire database from any query result. + +.. _sdks-limiting-results: + +Limiting Query Results +`````````````````````` + +As a result of lazy evaluation, you do not need any special mechanism to +limit query results with the SDK. For example, if your query matches thousands +of objects, but you only want to load the first ten, access only the first ten +elements of the results collection. None of the remaining objects are loaded +into memory. + +.. _sdks-pagination: + +Pagination +`````````` + +With lazy evaluation, pagination is very direct. Consider a query that matches +thousands of objects in your realm. Your app displays one hundred objects per +page. To advance to any page, access the elements of the results collection +starting at the index that corresponds to the target page. + +.. _sdks-read-database-objects: + +Read Database Objects +--------------------- + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-database-objects-procedure.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-database-objects-procedure.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-database-objects-procedure.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-database-objects-procedure.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-database-objects-procedure.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-database-objects-js-ts-procedure.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-database-objects-procedure.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-database-objects-procedure.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-database-objects-procedure.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-database-objects-js-ts-procedure.rst + +.. _sdks-read-methods: + +Read Object Methods +------------------- + +.. _sdks-read-all-objects-of-type: + +Read All Objects of a Type +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Because results sets are homogenous by type, most read operations begin with +querying for all objects of a type. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-all-objects-of-type-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-all-objects-of-type-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-all-objects-of-type-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-all-objects-of-type-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-all-objects-of-type-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-all-objects-of-type-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-all-objects-of-type-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-all-objects-of-type-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-all-objects-of-type-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-all-objects-of-type-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-all-objects-of-type.rst + +.. _sdks-read-query-objects: + +Filter or Query Objects +~~~~~~~~~~~~~~~~~~~~~~~ + +A **filter** selects a subset of results based on the value(s) of one or more +object properties. The most common use case is to find objects where a certain +property matches a certain value. Additionally, you can compare strings, +aggregate over collections of numbers, and use logical operators to build up +complex queries. + +The SDK provides several full-featured query engines you +can use to define filters. The core query engine uses :ref:`Realm Query +Language (RQL) ` to construct queries. RQL is a +string-based query language that you can use to retrieve objects from the +database. Some of the SDK languages provide special query APIs that provide +idiomatic query syntax and features. The available query APIs include: + +- :ref:`RQL `: C++, C#, Dart, Java, JavaScript, Kotlin, + TypeScript +- :ref:`LINQ `: C# +- :ref:`Type-Safe and NSPredicate Queries `: Swift, + Objective-C +- :ref:`Fluent Interface `: Java, Kotlin (Java SDK) + +For more details about the supported operators when using each of these query +APIs, refer to the query engine for your preferred language. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-filter-or-query-objects-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-filter-or-query-objects-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-filter-or-query-objects-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-filter-or-query-objects-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-filter-or-query-objects-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-filter-or-query-objects-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-filter-or-query-objects-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-filter-or-query-objects-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-filter-or-query-objects-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-filter-or-query-objects-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-filter-or-query-objects.rst + +.. tip:: Filter on Related and Embedded Object Properties + + To filter a query based on a property of an :ref:`embedded object + ` or a :ref:`related object + `, use dot-notation as if it were in a regular, + nested object. + +.. _sdks-read-access-results: + +Access Results +~~~~~~~~~~~~~~ + +When you perform a read operation, such as getting all objects of a type or +performing a query, the SDK returns a results collection that contains 0 +or more objects. + +The SDK provides convenience methods to make it easier to work with the results. +The available methods vary depending on the SDK language. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-access-results-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-access-results-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-access-results-description.rst -Placeholder. Add some concept information about results being a special SDK -auto-updating collection type for read operations (except in Kotlin, where it's -frozen). + .. tab:: + :tabid: java -.. _sdks-query-engines: + .. include:: /includes/api-details/java/crud/read-access-results-description.rst -Filter Data ------------ + .. tab:: + :tabid: java-kotlin -Placeholder. Add some concept information about the SDK having query engines, -and the one you use varying depending on the SDK you're using. i.e.: + .. include:: /includes/api-details/java/crud/read-access-results-description.rst -- RQL (C++ (subset only), C#, Dart, JS, Kotlin, TS, maybe also Java/Java Kotlin?) -- LINQ (C#) -- Swift SDK (Swift & Objective-C Type-Safe queries and NS Predicate queries) -- Java (Java & Kotlin, Fluent Interface) + .. tab:: + :tabid: javascript -Read Relationship Properties ----------------------------- + .. include:: /includes/api-details/javascript/crud/read-access-results-js-ts-description.rst -.. _sdks-query-inverse-relationships: + .. tab:: + :tabid: kotlin -Query Inverse Relationships -~~~~~~~~~~~~~~~~~~~~~~~~~~~ + .. include:: /includes/api-details/kotlin/crud/read-access-results-description.rst -.. _sdks-query-geospatial: + .. tab:: + :tabid: objectivec -Query Geospatial Data + .. include:: /includes/api-details/objectivec/crud/read-access-results-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-access-results-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-access-results-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-access-results.rst + +.. _sdks-read-chain-queries: + +Chain Queries +~~~~~~~~~~~~~ + +Because results are lazily evaluated, you can chain several queries together. +Unlike traditional databases, this does not require a separate trip to the +database for each successive query. + +.. The tab set below doesn't contain API details - just description of examples +.. Most are empty because they lack examples + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + .. tab:: + :tabid: csharp + + + .. tab:: + :tabid: dart + + + .. tab:: + :tabid: java + + + .. tab:: + :tabid: java-kotlin + + + .. tab:: + :tabid: javascript + + + .. tab:: + :tabid: kotlin + + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-chain-queries-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-chain-queries-description.rst + + .. tab:: + :tabid: typescript + + + +.. include:: /includes/sdk-examples/crud/read-chain-queries.rst + +.. _sdks-read-sort: + +Sort +~~~~ + +A sort operation allows you to configure the order in which the SDK +returns queried objects. You can sort based on one or more properties of the +objects in the results collection. The SDK only guarantees a consistent order +of results if you explicitly sort them. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-sort-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-sort-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-sort-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-sort-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-sort-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-sort-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-sort-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-sort-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-sort-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-sort-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-sort.rst + +.. tip:: Sort on Related and Embedded Object Properties + + To sort a query based on a property of an :ref:`embedded object + ` or a :ref:`related object + `, use dot-notation as if it were in a regular, + nested object. + +.. _sdks-read-limit: + +Limit +~~~~~ + +SDK languages that use the Realm Query Language query engine can limit query +results using the :ref:`RQL LIMIT() operator `. + +Note that you can't use :ref:`parameterized queries ` +in RQL LIMIT() clauses. Instead, use strings or string interpolation. + +.. Languages that use RQL and don't have a separate limit method don't need details here + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-limit-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-limit-description.rst + + .. tab:: + :tabid: dart + + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-limit-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-limit-description.rst + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-limit-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-limit-not-supported.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-limit-not-supported.rst + + .. tab:: + :tabid: typescript + + +.. include:: /includes/sdk-examples/crud/read-limit.rst + +.. _sdks-read-aggregate: + +Aggregate +~~~~~~~~~ + +You can aggregate results, which reduces results to a single value based on a +specified numerical property or collection. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-aggregate-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-aggregate-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-aggregate-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-aggregate-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-aggregate-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-aggregate-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-aggregate-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-aggregate-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-aggregate-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-aggregate-description.rst + +.. include:: /includes/sdk-examples/crud/read-aggregate.rst + +.. _sdks-read-section-query-results: + +Section Query Results ~~~~~~~~~~~~~~~~~~~~~ + +Some of the SDK languages provide an API to split results collections into +individual sections. Each section corresponds to a key generated from a +property on the object it represents. This simplifies working with logical +subsets of query results. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-section-query-results-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/read-section-query-results-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/crud/read-section-query-results-not-supported.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-section-query-results-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-section-query-results-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/read-section-query-results-not-supported.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/generic/crud/read-section-query-results-not-supported.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-section-query-results-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-section-query-results-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/read-section-query-results-not-supported.rst + +.. _sdks-read-query-projections: + +Query Projections +~~~~~~~~~~~~~~~~~ + +If your app defines a :ref:`class projection ` +to work with persisted data in a different way in a view model or based on +certain business logic, you can query on that projection. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-query-projections-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/read-query-projections-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/crud/read-query-projections-not-supported.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-query-projections-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-query-projections-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/read-query-projections-not-supported.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/generic/crud/read-query-projections-not-supported.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-projections-missing-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-projections-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/read-query-projections-not-supported.rst + +.. tip:: + + Don't do derived queries on top of class projection results. Instead, run a + query against the SDK object directly and then project the result. If you + try to do a derived query on top of class projection results, querying a + field with the same name and type as the original object works, but querying + a field with a name or type that isn't in the original object fails. diff --git a/source/sdk/crud/read/read-properties.txt b/source/sdk/crud/read/read-properties.txt new file mode 100644 index 0000000000..3a5e620ad0 --- /dev/null +++ b/source/sdk/crud/read/read-properties.txt @@ -0,0 +1,1166 @@ +.. _sdks-crud-read-properties: + +=============== +Read Properties +=============== + +.. meta:: + :description: Read and query specific property types, or properties with special behaviors. + :keywords: Realm, C++ SDK, Flutter SDK, Kotlin SDK, Java SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: cpp, csharp, dart, java, javascript/typescript, kotlin, objective-c, swift + +.. contents:: On this page + :local: + :backlinks: none + :depth: 2 + :class: singlecol + +.. tabs-selector:: drivers + +This page describes how to read and query specific property types, and +properties that have special behaviors, with Atlas Device SDK. + +For other information related to reading data from the database, refer to: + +- :ref:`sdks-crud-read`: General information about read operations, including + information on how to access, sort, and limit results. +- Information about specific query APIs and supported operators: + + - :ref:`RQL `: C++, C#, Dart, Java, JavaScript, Kotlin, + TypeScript + - :ref:`LINQ `: C# + - :ref:`Type-Safe and NSPredicate Queries `: Swift, + Objective-C + - :ref:`Fluent Interface `: Java, Kotlin (Java SDK) + +.. _sdks-read-filter-by-property-type: + +Filter by Property Type +----------------------- + +.. _sdks-read-filter-by-collection: + +Query Collections (List, Set, Dictionary) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-read-list: + +Query List Properties +````````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-query-list-properties-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-list-properties-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-query-list-properties-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-query-list-properties-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-query-list-properties-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-query-list-properties-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-list-properties-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-list-properties-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-list-properties-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-query-list-properties-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-query-list-properties.rst + +.. _sdks-read-set: + +Query Set Properties +```````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-set-properties-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/read-query-set-properties-description.rst + +.. include:: /includes/sdk-examples/crud/read-query-set-properties.rst + +.. _sdks-read-dictionary: + +Query Dictionary Properties +``````````````````````````` + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-query-dictionary-properties-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-dictionary-properties-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-query-dictionary-properties-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-query-dictionary-properties-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-query-dictionary-properties-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-query-dictionary-properties-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-dictionary-properties-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-dictionary-properties-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-dictionary-properties-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-query-dictionary-properties-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-query-dictionary-properties.rst + +.. _sdks-read-filter-geospatial-data: + +Query Geospatial Data +~~~~~~~~~~~~~~~~~~~~~ + +The SDK provides several shapes to simplify querying +:ref:`geospatial data `. You can use the +circle, polygon, and box shapes to set the boundaries for your geospatial +data queries. + +To query geospatial data: + +1. Define a geospatial shape representing the bounds within which you want to + query data. +2. Use the geospatial shape in a query with the relevant geospatial query + operators. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-geospatial-data-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-query-geospatial-data-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-query-geospatial-data-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-geospatial-data-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-geospatial-data-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-geospatial-data-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-query-geospatial-data-js-ts-description.rst + +Define Geospatial Shapes +```````````````````````` + +.. tabs:: + + .. tab:: Circle + :tabid: circle + + .. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-define-geospatial-shapes-circle-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-define-geospatial-shapes-circle-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-define-geospatial-shapes-circle-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-define-geospatial-shapes-circle-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-define-geospatial-shapes-circle-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-define-geospatial-shapes-circle-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-define-geospatial-shapes-circle-js-ts-description.rst + + .. include:: /includes/sdk-examples/crud/read-define-geospatial-shapes-circle.rst + + .. figure:: /images/geocircles.png + :alt: Two GeoCircles + :width: 150 + :lightbox: + + .. tab:: Box + :tabid: box + + .. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-define-geospatial-shapes-box-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-define-geospatial-shapes-box-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-define-geospatial-shapes-box-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-define-geospatial-shapes-box-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-define-geospatial-shapes-box-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-define-geospatial-shapes-box-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-define-geospatial-shapes-box-js-ts-description.rst + + .. include:: /includes/sdk-examples/crud/read-define-geospatial-shapes-box.rst + + .. figure:: /images/geoboxes.png + :alt: 2 GeoBoxes + :width: 150 + :lightbox: + + .. tab:: Polygon + :tabid: polygon + + .. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-define-geospatial-shapes-polygon-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-define-geospatial-shapes-polygon-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-define-geospatial-shapes-polygon-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-define-geospatial-shapes-polygon-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-define-geospatial-shapes-polygon-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-define-geospatial-shapes-polygon-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-define-geospatial-shapes-polygon-js-ts-description.rst + + Holes have the following restrictions: + + - Holes may not cross. The boundary of a hole may not intersect both the + interior and the exterior of any other hole. + - Holes may not share edges. If a hole contains an edge AB, then no other + hole may contain it. + - Holes may share vertices. However, no vertex may appear twice in a + single hole. + - No hole may be empty. + - Only one nesting is allowed. + + .. include:: /includes/sdk-examples/crud/read-define-geospatial-shapes-polygon.rst + + .. figure:: /images/geopolygons.png + :alt: 3 GeoPolygons + :width: 250 + :lightbox: + +Query with Geospatial Shapes +```````````````````````````` + +After you define a geospatial shape, you can use these shapes in a geospatial +query. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-with-geospatial-shapes-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-query-with-geospatial-shapes-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-geospatial-data-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-query-with-geospatial-shapes-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-with-geospatial-shapes-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-with-geospatial-shapes-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-with-geospatial-shapes-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-query-with-geospatial-shapes-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-query-with-geospatial-shapes.rst + +.. figure:: /images/geopoints.png + :alt: 2 GeoPoints + :width: 150 + :lightbox: + +.. tabs:: + + .. tab:: Circle + :tabid: circle + + .. include:: /includes/sdk-examples/crud/read-query-with-geospatial-shapes-circle.rst + + .. figure:: /images/geocircles-query.png + :alt: Querying a GeoCircle example. + :width: 150 + :lightbox: + + .. tab:: Box + :tabid: box + + .. include:: /includes/sdk-examples/crud/read-query-with-geospatial-shapes-box.rst + + .. figure:: /images/geoboxes-query.png + :alt: Querying a GeoBox example. + :width: 150 + + .. tab:: Polygon + :tabid: polygon + + .. include:: /includes/sdk-examples/crud/read-query-with-geospatial-shapes-polygon.rst + + .. figure:: /images/geopolygons-query.png + :alt: Querying a GeoPolygon example. + :width: 150 + :lightbox: + +.. _sdks-read-filter-mixed-property: + +Query a Mixed Property +~~~~~~~~~~~~~~~~~~~~~~ + +A :ref:`sdks-mixed-data-type` property represents a polymorphic value that can +hold any one of its supported data types at a particular moment. You can query +a mixed property the same way you would any property. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-query-mixed-properties-description.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-mixed-properties-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-query-mixed-properties-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-query-mixed-properties-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-query-mixed-properties-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-query-mixed-properties-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-mixed-properties-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-mixed-properties-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-mixed-properties-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-query-mixed-properties-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-query-mixed-properties.rst + +Query Nested Collections of Mixed Data +`````````````````````````````````````` + +A mixed data type can hold collections (a list or dictionary, but *not* a set) +of mixed elements. You can use mixed collections to model unstructured or +variable data. For more information, refer to :ref:``. + +- You can nest mixed collections up to 100 levels. +- You can query mixed collection properties and + :ref:`register a listener for changes `, as you + would a normal collection. + +- You can find and update individual mixed collection elements +- You *cannot* store sets or embedded objects in mixed collections. + +For details about supported operators and list comparisons, refer to the +:ref:`rql-collections-in-mixed-queries` documentation. + +.. _sdks-read-query-custom-persistable-property: + +Query a Custom Persistable Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +When you use :ref:`type projection ` to map unsupported +types to supported types, accessing those properties is often based on the +persisted type. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-custom-persistable-property-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-custom-persistable-property-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/crud/read-query-custom-persistable-property-not-supported.rst + +.. _sdks-read-filter-property-behaviors: + +Filter by Property Behaviors +---------------------------- + +.. _sdks-read-find-object-by-primary-key: + +Find an Object by Primary Key +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Finding a specific object by its :ref:`primary key ` is a +common operation, which some of the SDK languages support through a dedicated +method. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/cpp/crud/read-find-object-by-primary-key-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-find-object-by-primary-key-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-filter-or-query-objects-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-find-object-by-primary-key-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-find-object-by-primary-key-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-find-object-by-primary-key-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-find-object-by-primary-key-not-supported.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-find-object-by-primary-key-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-find-object-by-primary-key-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-find-object-by-primary-key-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-find-object-by-primary-key.rst + +.. tip:: Device Sync Always Uses _id as Primary Key + + If you use Atlas Device Sync, you can always query by the primary key + field ``_id``. This is because the Device Sync data model requires + objects have a primary key named ``_id``. For more information, refer to + :ref:``. + +.. _sdks-read-filter-by-remapped-property-name: + +Filter by Remapped Property Name +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If your data model includes stored property names that you have +:ref:`mapped to different names `, you can filter by +both the mapped property name used in your code and the stored property +name that's persisted in the database. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + + .. tab:: + :tabid: csharp + + + + .. tab:: + :tabid: dart + + + + .. tab:: + :tabid: java + + + + .. tab:: + :tabid: java-kotlin + + + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-filter-by-remapped-property-name-description.rst + + .. tab:: + :tabid: objectivec + + + + .. tab:: + :tabid: swift + + + + .. tab:: + :tabid: typescript + + + +.. include:: /includes/sdk-examples/crud/read-filter-by-remapped-property-name.rst + +.. _sdks-read-filter-by-fts: + +Filter a Full-Text Search Property +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +If your data model includes a :ref:`Full-Text Search (FTS) ` +index property, you can filter by the property using the ``TEXT`` predicate. +Words in the query are converted to tokens by a tokenizer using the following +rules: + +- Tokens can only consist of characters from ASCII and the Latin-1 + supplement (western languages). All other characters are considered whitespace. +- Words split by a hyphen (``-``) are split into two tokens. For example, + ``full-text`` splits into ``full`` and ``text``. +- Tokens are diacritics- and case-insensitive. + +You can search for an entire word or phrase, or limit your results with the +following characters: + +- Exclude results for a word by placing the ``-`` character in front of the + word. For example, ``fiction -science`` would include all search results + for ``fiction`` and exclude those that include the word ``science``. +- Specify prefixes by placing the ``*`` character at the end of a word. For + example, ``fict*`` would include all search results for ``fiction`` and + ``fictitious``. The SDK does *not* currently support suffix searches. + +The SDK returns a Boolean match for the specified query, instead of a +relevance-based match. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + .. include:: /includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-filter-full-text-search-property-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-filter-full-text-search-property-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-filter-full-text-search-property-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-filter-full-text-search-property-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/generic/crud/read-filter-full-text-search-property-not-supported.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/typescript/crud/read-filter-full-text-search-property-description.rst + +.. include:: /includes/sdk-examples/crud/read-filter-full-text-search-property.rst + +.. _sdks-read-query-relationship-properties: + +Filter Relationships +~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-read-query-to-one-relationship: + +Query a To-One Relationship +``````````````````````````` + +A :ref:`to-one relationship ` property maps to +a single instance of another object type. You can filter by the relationship +property using dot notation, the same way you would a nested object. + +The SDK requires to-one relationships to be optional. Your code should handle +the possible nil or null value. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-to-one-relationship-description.rst + + .. tab:: + :tabid: dart + + + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-query-to-one-relationship-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-query-to-one-relationship-kotlin-description.rst + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-to-one-relationship-description.rst + + .. tab:: + :tabid: objectivec + + + + .. tab:: + :tabid: swift + + + + .. tab:: + :tabid: typescript + + + +.. include:: /includes/sdk-examples/crud/read-query-to-one-relationship.rst + +.. _sdks-read-query-to-many-relationship: + +Query a To-Many Relationship +```````````````````````````` + +:ref:`To-many relationships ` properties are +collections to another object type: + +- :ref:`List ` +- :ref:`Set ` +- :ref:`Dictionary ` + +You can filter by and iterate through the relationship property the same way +you would any other collection property. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-to-many-relationship-description.rst + + .. tab:: + :tabid: dart + + + + .. tab:: + :tabid: java + + + + .. tab:: + :tabid: java-kotlin + + + + .. tab:: + :tabid: javascript + + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-to-many-relationship-description.rst + + .. tab:: + :tabid: objectivec + + + + .. tab:: + :tabid: swift + + + + .. tab:: + :tabid: typescript + + + +.. include:: /includes/sdk-examples/crud/read-query-to-many-relationship.rst + +.. _sdks-read-query-inverse-relationships: + +Query an Inverse Relationship +````````````````````````````` + +An **inverse relationship** links an object back to any other objects that refer +to it in a defined to-one or to-many relationship. Relationship definitions are +unidirectional, so you must explicitly define a property in the object's model +as an inverse relationship. + +When you follow an inverse relationship, the result may include zero or more +objects. You must access the collection to work with an originating object. + +.. tabs-drivers:: + + .. tab:: + :tabid: cpp-sdk + + + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/crud/read-query-inverse-relationship-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/crud/read-query-inverse-relationship-description.rst + + .. tab:: + :tabid: java + + .. include:: /includes/api-details/java/crud/read-query-inverse-relationship-java-description.rst + + .. tab:: + :tabid: java-kotlin + + .. include:: /includes/api-details/java/crud/read-query-inverse-relationship-kotlin-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/crud/read-query-inverse-relationship-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/crud/read-query-inverse-relationship-description.rst + + .. tab:: + :tabid: objectivec + + .. include:: /includes/api-details/objectivec/crud/read-query-inverse-relationship-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/crud/read-query-inverse-relationship-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/crud/read-query-inverse-relationship-js-ts-description.rst + +.. include:: /includes/sdk-examples/crud/read-query-inverse-relationship.rst diff --git a/source/sdk/model-data/property-types.txt b/source/sdk/model-data/property-types.txt index 50b82a1107..63612c1af8 100644 --- a/source/sdk/model-data/property-types.txt +++ b/source/sdk/model-data/property-types.txt @@ -95,3 +95,8 @@ Other Property Types Define an Enum Property ~~~~~~~~~~~~~~~~~~~~~~~ + +.. _sdks-type-projection: + +Map Unsupported Types to Supported Types +---------------------------------------- diff --git a/source/sdk/quick-start.txt b/source/sdk/quick-start.txt index eb855cd9aa..240b6dcd23 100644 --- a/source/sdk/quick-start.txt +++ b/source/sdk/quick-start.txt @@ -201,7 +201,7 @@ To filter that same results collection: .. include:: /includes/sdk-examples/quick-start/quick-start-filter-objects.rst For more information about the SDK query engines, refer to -:ref:`sdks-query-engines`. +:ref:`sdks-read-query-objects`. Update ~~~~~~ diff --git a/source/sdk/sync/manage-sync-subscriptions.txt b/source/sdk/sync/manage-sync-subscriptions.txt index cca7dc8fc9..9b47996e79 100644 --- a/source/sdk/sync/manage-sync-subscriptions.txt +++ b/source/sdk/sync/manage-sync-subscriptions.txt @@ -61,8 +61,8 @@ You can construct subscription queries with Realm Query Language (RQL), or one of the SDK-idiomatic query engines. - :ref:`realm-query-language` -- :ref:`java-filter-data` -- :ref:`dotnet-linq` +- :ref:`sdks-java-filter-data` +- :ref:`sdks-dotnet-linq` - :ref:`sdks-filter-data-swift` .. important:: RQL Support in Sync Subscription Queries From c92d7f9ee362a9221445cb30fbbcb95386f9973a Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 16 Aug 2024 15:13:10 -0400 Subject: [PATCH 62/63] (DOCSP-39533): Consolidate Add Sync to an App page (#3351) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39533 *Staged Page* - [Add Sync to an App](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39533/sdk/sync/add-sync-to-app/) Note for reviewer: some of the API descriptions are intentionally missing because there isn't necessarily anything else relevant to add. *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [Flutter: Add Sync to an App](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/sync/add-sync-to-app/) - [Kotlin: Add Sync to an App](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/sync/add-sync-to-app/) - [.NET: Add Sync to an App](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/sync/add-sync-to-app/) - [Swift: Add Sync to an App](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/sync/add-sync-to-app/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [ ] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --- ...-define-sync-configuration-description.rst | 24 ++ ...-to-app-example-data-model-description.rst | 7 + ...to-app-use-synced-database-description.rst | 2 + ...-define-sync-configuration-description.rst | 14 + ...-to-app-example-data-model-description.rst | 3 + ...o-app-open-synced-database-description.rst | 4 + ...to-app-use-synced-database-description.rst | 1 + ...-define-sync-configuration-description.rst | 24 ++ ...-to-app-example-data-model-description.rst | 3 + ...o-app-open-synced-database-description.rst | 11 + ...-sync-to-app-prerequisites-description.rst | 4 + ...to-app-use-synced-database-description.rst | 9 + ...-define-sync-configuration-description.rst | 25 ++ ...-to-app-example-data-model-description.rst | 2 + ...to-app-use-synced-database-description.rst | 1 + .../add-sync-to-app-authenticate-user.rst | 26 ++ .../sync/add-sync-to-app-connect-to-atlas.rst | 26 ++ ...-sync-to-app-define-sync-configuration.rst | 26 ++ .../add-sync-to-app-example-data-model.rst | 28 ++ .../add-sync-to-app-open-synced-database.rst | 29 ++ .../add-sync-to-app-use-synced-database.rst | 26 ++ source/sdk/crud/threading.txt | 1 + source/sdk/sync/add-sync-to-app.txt | 386 +++++++++++++++++- 23 files changed, 681 insertions(+), 1 deletion(-) create mode 100644 source/includes/api-details/csharp/sync/add-sync-to-app-define-sync-configuration-description.rst create mode 100644 source/includes/api-details/csharp/sync/add-sync-to-app-example-data-model-description.rst create mode 100644 source/includes/api-details/csharp/sync/add-sync-to-app-use-synced-database-description.rst create mode 100644 source/includes/api-details/dart/sync/add-sync-to-app-define-sync-configuration-description.rst create mode 100644 source/includes/api-details/dart/sync/add-sync-to-app-example-data-model-description.rst create mode 100644 source/includes/api-details/dart/sync/add-sync-to-app-open-synced-database-description.rst create mode 100644 source/includes/api-details/dart/sync/add-sync-to-app-use-synced-database-description.rst create mode 100644 source/includes/api-details/kotlin/sync/add-sync-to-app-define-sync-configuration-description.rst create mode 100644 source/includes/api-details/kotlin/sync/add-sync-to-app-example-data-model-description.rst create mode 100644 source/includes/api-details/kotlin/sync/add-sync-to-app-open-synced-database-description.rst create mode 100644 source/includes/api-details/kotlin/sync/add-sync-to-app-prerequisites-description.rst create mode 100644 source/includes/api-details/kotlin/sync/add-sync-to-app-use-synced-database-description.rst create mode 100644 source/includes/api-details/swift/sync/add-sync-to-app-define-sync-configuration-description.rst create mode 100644 source/includes/api-details/swift/sync/add-sync-to-app-example-data-model-description.rst create mode 100644 source/includes/api-details/swift/sync/add-sync-to-app-use-synced-database-description.rst create mode 100644 source/includes/sdk-examples/sync/add-sync-to-app-authenticate-user.rst create mode 100644 source/includes/sdk-examples/sync/add-sync-to-app-connect-to-atlas.rst create mode 100644 source/includes/sdk-examples/sync/add-sync-to-app-define-sync-configuration.rst create mode 100644 source/includes/sdk-examples/sync/add-sync-to-app-example-data-model.rst create mode 100644 source/includes/sdk-examples/sync/add-sync-to-app-open-synced-database.rst create mode 100644 source/includes/sdk-examples/sync/add-sync-to-app-use-synced-database.rst diff --git a/source/includes/api-details/csharp/sync/add-sync-to-app-define-sync-configuration-description.rst b/source/includes/api-details/csharp/sync/add-sync-to-app-define-sync-configuration-description.rst new file mode 100644 index 0000000000..e288b7d24e --- /dev/null +++ b/source/includes/api-details/csharp/sync/add-sync-to-app-define-sync-configuration-description.rst @@ -0,0 +1,24 @@ +Device Sync requires a :dotnet-sdk:`FlexibleSyncConfiguration +` +object to open a synced database. Note that +this is different than the :dotnet-sdk:`RealmConfiguration +` object that specifies some of the +base database options. + +The ``FlexibleSyncConfiguration`` object requires an authenticated **User**. + +You can optionally provide an **Initial Subscription**. This is the +subscription query that specifies the data to sync when the synced database is +opened. You can update your subscriptions after you open the database. + +If you do not provide an initial subscription as part of the Sync +configuration, you must manually add subscriptions before you can read from or +write to the database. + +Refer to :ref:`sdks-manage-sync-subscriptions` for more information. + +For additional database configuration parameters, refer to +:ref:`sdks-configure-and-open-synced-database`. + +For our example app, we define a configuration with an initial subscription +that queries all ``MyTask`` objects. diff --git a/source/includes/api-details/csharp/sync/add-sync-to-app-example-data-model-description.rst b/source/includes/api-details/csharp/sync/add-sync-to-app-example-data-model-description.rst new file mode 100644 index 0000000000..068246797d --- /dev/null +++ b/source/includes/api-details/csharp/sync/add-sync-to-app-example-data-model-description.rst @@ -0,0 +1,7 @@ +The examples on this page refer to an example Todo app with an already-defined +``Item`` model that has: + +- An ObjectId ``_id`` property +- A string ``Name`` property +- An ``ItemStatus`` enum property +- A string ``Assignee`` property diff --git a/source/includes/api-details/csharp/sync/add-sync-to-app-use-synced-database-description.rst b/source/includes/api-details/csharp/sync/add-sync-to-app-use-synced-database-description.rst new file mode 100644 index 0000000000..f444f01c99 --- /dev/null +++ b/source/includes/api-details/csharp/sync/add-sync-to-app-use-synced-database-description.rst @@ -0,0 +1,2 @@ +The following code demonstrates two ways to create a new ``Task`` object and +add it to the database. diff --git a/source/includes/api-details/dart/sync/add-sync-to-app-define-sync-configuration-description.rst b/source/includes/api-details/dart/sync/add-sync-to-app-define-sync-configuration-description.rst new file mode 100644 index 0000000000..3da7293f37 --- /dev/null +++ b/source/includes/api-details/dart/sync/add-sync-to-app-define-sync-configuration-description.rst @@ -0,0 +1,14 @@ +Device Sync requires a :flutter-sdk:`FlexibleSyncConfiguration +` +object to open a synced database. Note that +this is different than the :flutter-sdk:`Configuration +` object that specifies some of the +base database options. + +The ``FlexibleSyncConfiguration`` object requires an authenticated **User**. + +For additional database configuration parameters, refer to +:ref:`sdks-configure-and-open-synced-database`. + +For our example app, we define a configuration to manage objects conforming to +``Car.schema``. diff --git a/source/includes/api-details/dart/sync/add-sync-to-app-example-data-model-description.rst b/source/includes/api-details/dart/sync/add-sync-to-app-example-data-model-description.rst new file mode 100644 index 0000000000..78499b0167 --- /dev/null +++ b/source/includes/api-details/dart/sync/add-sync-to-app-example-data-model-description.rst @@ -0,0 +1,3 @@ +The examples on this page refer to an example app with an already-defined +data model that includes a ``Car`` object containing an ``ObjectId`` and a +string car ``model``. diff --git a/source/includes/api-details/dart/sync/add-sync-to-app-open-synced-database-description.rst b/source/includes/api-details/dart/sync/add-sync-to-app-open-synced-database-description.rst new file mode 100644 index 0000000000..d03b06edaa --- /dev/null +++ b/source/includes/api-details/dart/sync/add-sync-to-app-open-synced-database-description.rst @@ -0,0 +1,4 @@ +After you open the database, you must add subscriptions before you can read from or +write to the database. + +Refer to :ref:`sdks-manage-sync-subscriptions` for more information. diff --git a/source/includes/api-details/dart/sync/add-sync-to-app-use-synced-database-description.rst b/source/includes/api-details/dart/sync/add-sync-to-app-use-synced-database-description.rst new file mode 100644 index 0000000000..f39a1873a0 --- /dev/null +++ b/source/includes/api-details/dart/sync/add-sync-to-app-use-synced-database-description.rst @@ -0,0 +1 @@ +The following code creates a new ``Car`` object and writes it to the database: diff --git a/source/includes/api-details/kotlin/sync/add-sync-to-app-define-sync-configuration-description.rst b/source/includes/api-details/kotlin/sync/add-sync-to-app-define-sync-configuration-description.rst new file mode 100644 index 0000000000..9dce02cf4d --- /dev/null +++ b/source/includes/api-details/kotlin/sync/add-sync-to-app-define-sync-configuration-description.rst @@ -0,0 +1,24 @@ +Device Sync requires a :kotlin-sync-sdk:`SyncConfiguration +` +object to open a synced database. Note that +this is different than the ``RealmConfiguration`` object that specifies some +of the base database options. + +The ``SyncConfiguration`` object requires the following: + +- **User**: the authenticated user object. +- **Schema**: all object types that you want to include in this database. +- **Initial Subscription**: the subscription query + that specifies the data to sync when the synced database is + initially opened. You can update your subscriptions + after the database is opened. Refer to + :ref:`sdks-manage-sync-subscriptions` for more information. + +For additional configuration parameters, refer to +:ref:`sdks-configure-and-open-synced-database`. + +For our example app, we define a configuration with: + +- a schema that includes our ``List`` and ``Item`` objects +- an initial subscription that queries all ``List`` objects + that the user owns and all incomplete ``Item`` objects diff --git a/source/includes/api-details/kotlin/sync/add-sync-to-app-example-data-model-description.rst b/source/includes/api-details/kotlin/sync/add-sync-to-app-example-data-model-description.rst new file mode 100644 index 0000000000..a8dcf38a4a --- /dev/null +++ b/source/includes/api-details/kotlin/sync/add-sync-to-app-example-data-model-description.rst @@ -0,0 +1,3 @@ +The examples on this page refer to an example Todo app with an already-defined +data model that includes a ``List`` object containing a list of ``Item`` +objects. diff --git a/source/includes/api-details/kotlin/sync/add-sync-to-app-open-synced-database-description.rst b/source/includes/api-details/kotlin/sync/add-sync-to-app-open-synced-database-description.rst new file mode 100644 index 0000000000..a94cbb3909 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/add-sync-to-app-open-synced-database-description.rst @@ -0,0 +1,11 @@ +For our example app, we pass our ``config`` object to +``realm.open()`` to open a synced database, then wait for +our subscriptions to sync with the backend. + +Because we have Development Mode enabled, Device Sync +automatically adds the following as queryable fields based on +our initial subscription: + +- ``_id`` (always included) +- ``ownerId`` +- ``complete`` diff --git a/source/includes/api-details/kotlin/sync/add-sync-to-app-prerequisites-description.rst b/source/includes/api-details/kotlin/sync/add-sync-to-app-prerequisites-description.rst new file mode 100644 index 0000000000..f92b611801 --- /dev/null +++ b/source/includes/api-details/kotlin/sync/add-sync-to-app-prerequisites-description.rst @@ -0,0 +1,4 @@ +Atlas Device SDK for Kotlin has a separate distribution to add App Services +and Device Sync functionality to an app. If you haven't already added it, +update your dependencies to include the Sync distribution of the Kotlin library. +For more details, refer to :ref:`sdks-install`. diff --git a/source/includes/api-details/kotlin/sync/add-sync-to-app-use-synced-database-description.rst b/source/includes/api-details/kotlin/sync/add-sync-to-app-use-synced-database-description.rst new file mode 100644 index 0000000000..f3f46f4c9c --- /dev/null +++ b/source/includes/api-details/kotlin/sync/add-sync-to-app-use-synced-database-description.rst @@ -0,0 +1,9 @@ +For our example app, we write a new ``List`` and ``Item`` object, +then copy them to the synced database. + +The objects successfully write to the device, then sync to Atlas because: + +- Both objects are within the parameters of the subscription query + (the ``List`` is owned by the user and the ``Item`` is incomplete). +- The current user has permission to write data to the backend (the role allows + authorized users to read and write all data). diff --git a/source/includes/api-details/swift/sync/add-sync-to-app-define-sync-configuration-description.rst b/source/includes/api-details/swift/sync/add-sync-to-app-define-sync-configuration-description.rst new file mode 100644 index 0000000000..12bcc3fdf0 --- /dev/null +++ b/source/includes/api-details/swift/sync/add-sync-to-app-define-sync-configuration-description.rst @@ -0,0 +1,25 @@ +Device Sync requires a :swift-sdk:`FlexibleSyncConfiguration +` +object to open a synced database. Note that +this is different than the :swift-sdk:`Configuration +` object that specifies some of the base +database options. + +The ``FlexibleSyncConfiguration`` can take an ``initialSubscriptions`` block +paired with a ``rerunOnOpen`` bool. The initial subscriptions are the +subscription queries that specify what data to sync when the synced database +is first opened. If your app needs it, you can pair this with ``reRunOnOpen`` +to recalculate dynamic queries every time the app opens, such as syncing +documents within a date range. + +You can update your subscriptions after the database is opened. Refer to +:ref:`sdks-manage-sync-subscriptions` for more information. + +For additional configuration parameters, refer to +:ref:`sdks-configure-and-open-synced-database`. + +For our example app, we define a configuration with: + +- an initial subscription that queries ``Todo`` objects + for documents where the ``ownerId`` matches the ``user.id`` of the logged-in user +- a schema that includes our ``Todo`` object type diff --git a/source/includes/api-details/swift/sync/add-sync-to-app-example-data-model-description.rst b/source/includes/api-details/swift/sync/add-sync-to-app-example-data-model-description.rst new file mode 100644 index 0000000000..7b9af3c3a6 --- /dev/null +++ b/source/includes/api-details/swift/sync/add-sync-to-app-example-data-model-description.rst @@ -0,0 +1,2 @@ +In this example, our model includes an ``ownerId`` field that maps to the +``user.id`` of the logged-in user. diff --git a/source/includes/api-details/swift/sync/add-sync-to-app-use-synced-database-description.rst b/source/includes/api-details/swift/sync/add-sync-to-app-use-synced-database-description.rst new file mode 100644 index 0000000000..42e0564f12 --- /dev/null +++ b/source/includes/api-details/swift/sync/add-sync-to-app-use-synced-database-description.rst @@ -0,0 +1 @@ +The following code creates a new ``Task`` object and writes it to the database. diff --git a/source/includes/sdk-examples/sync/add-sync-to-app-authenticate-user.rst b/source/includes/sdk-examples/sync/add-sync-to-app-authenticate-user.rst new file mode 100644 index 0000000000..cc653b65e4 --- /dev/null +++ b/source/includes/sdk-examples/sync/add-sync-to-app-authenticate-user.rst @@ -0,0 +1,26 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/AuthenticationExamples.snippet.logon_anon.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/add_sync_to_app.snippet.log-in.dart + :language: dart + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.authenticate-user.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AddSyncToApp.snippet.authenticate-user.swift + :language: swift diff --git a/source/includes/sdk-examples/sync/add-sync-to-app-connect-to-atlas.rst b/source/includes/sdk-examples/sync/add-sync-to-app-connect-to-atlas.rst new file mode 100644 index 0000000000..7b2f533cba --- /dev/null +++ b/source/includes/sdk-examples/sync/add-sync-to-app-connect-to-atlas.rst @@ -0,0 +1,26 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.initialize-realm.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/add_sync_to_app.snippet.connect-to-app.dart + :language: dart + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.connect-to-backend.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AddSyncToApp.snippet.connect-to-backend.swift + :language: swift diff --git a/source/includes/sdk-examples/sync/add-sync-to-app-define-sync-configuration.rst b/source/includes/sdk-examples/sync/add-sync-to-app-define-sync-configuration.rst new file mode 100644 index 0000000000..ff8c28b81c --- /dev/null +++ b/source/includes/sdk-examples/sync/add-sync-to-app-define-sync-configuration.rst @@ -0,0 +1,26 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/FlexibleSyncExamples.snippet.bootstrap-a-subscription.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/add_sync_to_app.snippet.opened-synced-realm.dart + :language: dart + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.define-synced-realm.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AddSyncToApp.snippet.open-synced-realm.swift + :language: swift diff --git a/source/includes/sdk-examples/sync/add-sync-to-app-example-data-model.rst b/source/includes/sdk-examples/sync/add-sync-to-app-example-data-model.rst new file mode 100644 index 0000000000..a0630c2691 --- /dev/null +++ b/source/includes/sdk-examples/sync/add-sync-to-app-example-data-model.rst @@ -0,0 +1,28 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SchemaSync.snippet.sync-to-do-model.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AddSyncToApp.snippet.model.swift + :language: swift diff --git a/source/includes/sdk-examples/sync/add-sync-to-app-open-synced-database.rst b/source/includes/sdk-examples/sync/add-sync-to-app-open-synced-database.rst new file mode 100644 index 0000000000..128af8ede2 --- /dev/null +++ b/source/includes/sdk-examples/sync/add-sync-to-app-open-synced-database.rst @@ -0,0 +1,29 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.cs + :language: csharp + :copyable: false + + - id: dart + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.dart + :language: dart + :copyable: false + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.open-synced-realm.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/MissingPlaceholders/example.swift + :language: swift + :copyable: false diff --git a/source/includes/sdk-examples/sync/add-sync-to-app-use-synced-database.rst b/source/includes/sdk-examples/sync/add-sync-to-app-use-synced-database.rst new file mode 100644 index 0000000000..8fe30e6f01 --- /dev/null +++ b/source/includes/sdk-examples/sync/add-sync-to-app-use-synced-database.rst @@ -0,0 +1,26 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/QuickStartExamples.snippet.create.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/add_sync_to_app.snippet.write.dart + :language: dart + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/SyncTest.snippet.write-to-synced-realm.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/AddSyncToApp.snippet.create-todo.swift + :language: swift diff --git a/source/sdk/crud/threading.txt b/source/sdk/crud/threading.txt index 731886890d..a8e74bb9da 100644 --- a/source/sdk/crud/threading.txt +++ b/source/sdk/crud/threading.txt @@ -38,3 +38,4 @@ Frozen Objects Update a Frozen Object ~~~~~~~~~~~~~~~~~~~~~~ +.. _sdks-threading-three-rules: diff --git a/source/sdk/sync/add-sync-to-app.txt b/source/sdk/sync/add-sync-to-app.txt index 6ec338b565..6e4255b7f5 100644 --- a/source/sdk/sync/add-sync-to-app.txt +++ b/source/sdk/sync/add-sync-to-app.txt @@ -4,10 +4,394 @@ Add Device Sync to an App ========================= +.. meta:: + :description: If you already have an app that uses Atlas Device SDK to persist data on device, you can add Device Sync to sync data between devices. + :keywords: Realm, Flutter SDK, Kotlin SDK, .NET SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: tutorial + +.. facet:: + :name: programming_language + :values: csharp, dart, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for adding Device Sync to a local-only app. \ No newline at end of file +.. tabs-selector:: drivers + +This page contains information about Device Sync, its basic concepts, +and how to add Sync to a client app using Atlas Device SDK. Once you have +added Sync to your app, you can access a synced database from the client. + +Already familiar with Device Sync? Skip ahead to the +:ref:`sdks-add-sync-to-app-enable-sync-in-atlas` section +to get started. + +Device Sync +----------- + +**Device Sync** synchronizes data between client devices and Atlas. +Data is persisted on a device, even when offline. When the device has a +network connection, Device Sync uploads and downloads +data in the background and manages conflict resolution. + +The data that syncs between your client app and Atlas is determined by +a user's permissions to access eligible data. Eligible data is the +intersection of: + +- Data model: your data type information +- Subscription queries: the conditions that define what data to store +- Permissions: the role-based permissions required to interact with data + that meets the specified conditions + +For a detailed explanation of Device Sync, refer to +:ref:`realm-sync-get-started` in the Atlas App Services +documentation. + +Data Model +~~~~~~~~~~ + +The Device Sync data model defines the object types that you can sync. +Every SDK object you sync requires a client-side and server-side schema: + +- **Object schema**: the object schema in your client app that defines your + data in your preferred programming language. +- **App Services schema**: the schema in Atlas App Services that defines + your data in BSON. + +Both schemas must be consistent with each other to sync data. + +You can define the Device Sync data model in a client app first or +in Atlas first: + +- To define your data model through your client app, you first + :ref:`define an object model ` + directly in your client app code. Then, you can use **Development Mode** to + generate a matching App Services schema automatically. Development Mode + is a configuration setting that allows Device Sync + to infer and update schemas based on client-side data models when you + sync data from the client. The + :ref:`sdks-add-sync-to-app-enable-sync-in-atlas` section describes + how to enable Device Sync with Development Mode in your client app. + +- If you already have data in Atlas and would + prefer to define your data model through Atlas first, refer to + :ref:`sync-data-in-atlas-with-client` in the App Services documentation. + +.. note:: Data Model Mapping with Device Sync + + To learn more about how data maps between the client and Atlas, refer to + :ref:`sdks-model-data-device-sync`. + +Subscriptions +~~~~~~~~~~~~~ + +A **subscription** is a client-side query to objects in your data model. +Device Sync only syncs objects that match the query. You can define multiple +queries in your client app. You must define at least one query for +each object type in your data model. + +Device Sync ensures that your client-side queries are consistent with +your App Services schema through **queryable fields**. These are the +fields from your data model that can be used in a subscription query. You +cannot define a subscription using a field that isn't in your queryable +fields. + +When Development Mode is enabled, Device Sync automatically +adds the fields that appear in your client queries as queryable fields. +You can also manually add and remove queryable fields through the +Atlas UI. For more information, refer to :ref:`queryable-fields` +in the App Services documentation. + +User Permissions +~~~~~~~~~~~~~~~~ + +App Services uses **role-based permissions** to control the data that users +can read and write: + +- When a user has read permissions, Device Sync downloads data matching the + subscription query to the client. +- When a user has write permissions, Device Sync permits writes to the synced + data and uploads locally-written data to the backend. + +You can define and manage roles in the Atlas UI. When you enable Sync, +you select a default role, which you can modify later. For more information, +refer to :ref:`flexible-sync-roles` in the App Services +documentation. + +.. _sdks-add-sync-to-app-prereqs: + +Prerequisites +------------- + +You can add Device Sync to an app in several ways, depending on the state +of your app and your data. This guide describes how to add Sync to an +existing client app using Development Mode. This guide assumes that your +app already uses Atlas Device SDK and that you have already defined a data +model in your client code. + +Because Device Sync connects your client app to the Atlas backend +through an Atlas App Services App, you need the following before you +can get started: + +#. An Atlas App Services App with authentication enabled. To learn how, + refer to :ref:`create-a-realm-app` in the App Services documentation. +#. Confirm that your app can connect to Atlas. To learn how, refer to + :ref:`sdks-connect-to-atlas`. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + + .. tab:: + :tabid: dart + + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/add-sync-to-app-prerequisites-description.rst + + .. tab:: + :tabid: swift + + +.. _sdks-add-sync-to-app-example-data-model: + +Example Data Model +------------------ + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/add-sync-to-app-example-data-model-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/add-sync-to-app-example-data-model-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/add-sync-to-app-example-data-model-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/add-sync-to-app-example-data-model-description.rst + +.. include:: /includes/sdk-examples/sync/add-sync-to-app-example-data-model.rst + +.. _sdks-add-sync-to-app-enable-sync-in-atlas: + +Enable Device Sync in Atlas +--------------------------- + +You must first enable Device Sync in Atlas before you can add Sync to your +client app. + +To enable Device Sync in your App, complete the steps outlined in +:ref:`Configure and Enable Atlas Device Sync ` +procedure in the App Services documentation. + +During this process, you can choose whether to enable Development +Mode and you can select a default role for your app users. +For more information on the available settings, refer to +:ref:`sync-settings` in the App Services documentation. + +.. tip:: + + We recommend enabling Development Mode when you first enable + Sync, and then disabling it before your app goes to production. + For more information, refer to :ref:`development-mode` in the + App Services documentation. + +For our example app, we enable Device Sync with Development Mode, and +then add the "User can read and write all data" default role. This means that, +for an authorized user with a network connection, Device Sync downloads +eligible data to the client *and* Atlas permits writes to the client and then +syncs them the backend. To learn more about what happens when an authorized +user does not have a network connection, refer to +:ref:`sdks-write-synced-database`. + +Add Sync to Your Client App +--------------------------- + +After you've configured and enabled Sync in Atlas, you can add Sync to your +client app. + +.. procedure:: + + .. step:: Connect to Atlas + + Pass your App ID to an ``App`` client to initialize the App. To get + your App ID from the App Services UI, refer to + :ref:`Find Your App ID ` in the + App Services documentation. + + For our example app, we pass our App ID to initialize an ``App`` with + default configuration values: + + .. include:: /includes/sdk-examples/sync/add-sync-to-app-connect-to-atlas.rst + + For more information on accessing and configuring the App client, refer + to :ref:`sdks-connect-to-atlas`. + + .. step:: Authenticate a User + + Authenticate a user in your client app using an + authentication provider that you have enabled. + + For our example app, we log in a user using anonymous authentication: + + .. include:: /includes/sdk-examples/sync/add-sync-to-app-authenticate-user.rst + + For more information on authenticating users in your app, refer to + :ref:`sdks-authenticate-users`. + + .. step:: Define the Sync Configuration + + .. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/add-sync-to-app-define-sync-configuration-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/add-sync-to-app-define-sync-configuration-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/add-sync-to-app-define-sync-configuration-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/add-sync-to-app-define-sync-configuration-description.rst + + .. include:: /includes/sdk-examples/sync/add-sync-to-app-define-sync-configuration.rst + + .. important:: Object Types in Your Schema + + The Sync configuration schema *must* include all object types that + you want to work with in your synced database. If you try to reference + or write an object of an object type that isn't in your schema, + the SDK returns a schema validation error. + + .. step:: Open the Synced Database + + Use the defined configuration to + :ref:`open the synced database `. + When the database is opened successfully, the initial subscription + query determines which data to sync to the client. + If Development Mode is enabled, Device Sync automatically + adds any queryable fields based on the query defined in + your schema. + + .. tabs-drivers:: + + .. tab:: + :tabid: csharp + + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/add-sync-to-app-open-synced-database-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/add-sync-to-app-open-synced-database-description.rst + + .. tab:: + :tabid: swift + + + .. include:: /includes/sdk-examples/sync/add-sync-to-app-open-synced-database.rst + +Use the Synced Database +----------------------- + +Now that you've opened the synced database, you can work with your +data in the database. While you work with data on the device, a +background thread efficiently integrates, uploads, and downloads changesets. + +The syntax to perform read and write operations and watch for changes is +identical to the syntax for non-synced databases. However, there are additional +considerations when writing data to a synced database. For more information, +refer to :ref:`sdks-write-synced-database`. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/sync/add-sync-to-app-use-synced-database-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/sync/add-sync-to-app-use-synced-database-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/sync/add-sync-to-app-use-synced-database-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/sync/add-sync-to-app-use-synced-database-description.rst + + +.. include:: /includes/sdk-examples/sync/add-sync-to-app-use-synced-database.rst + +If our write operation didn't match the query *or* the current user didn't +have the requisite permissions, then the SDK reverts the write with a +non-fatal error operation called a :ref:`compensating write `. + +.. important:: When Using Sync, Avoid Synchronous Writes on the Main Thread + + The fact that the SDK performs sync integrations on a background thread + means that if you write to your database synchronously on the main thread, + there's a small chance your UI could appear to hang as it waits for the + background sync thread to finish a write transaction. Therefore, it's a + best practice :ref:`not to write on the main thread when using Device Sync + `. Instead, use your language's implementation + of the asynchronous write API. + +.. include:: /includes/sync-memory-performance.rst + +Next Steps +---------- + +Once your app is successfully syncing the desired data to Atlas, you +can learn more about how to use Sync in the SDK: + +- :ref:`sdks-configure-and-open-synced-database`: Learn about the available + App client configuration options, such as providing custom request headers, + connecting to Edge Server, or platform-idiomatic configuration options. +- :ref:`sdks-manage-sync-subscriptions`: Learn how to define and manage + the subscription queries in your app. +- :ref:`sdks-write-synced-database`: Learn more about how to write to + a synced database, how to handle compensating write errors, and how to + group writes for improved performance. +- :ref:`sdks-manage-sync-sessions`: Learn how to manage + communication with Atlas through sync sessions. +- :ref:`sdks-handle-sync-errors`: Learn how to handle sync + errors that can occur, including client resets. From 3c38bc1f45b5d582a5beb168615917f546e270b9 Mon Sep 17 00:00:00 2001 From: Dachary Date: Fri, 16 Aug 2024 15:13:25 -0400 Subject: [PATCH 63/63] (DOCSP-39528): Consolidate User Metadata page (#3344) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-39528 *Staged Page* - [User Metadata](https://preview-mongodbdacharyc.gatsbyjs.io/realm/DOCSP-39528/sdk/users/user-metadata/) *Page Source* Add links to every SDK's pages where you got the SDK-specific information: - [Flutter: User Metadata](https://www.mongodb.com/docs/atlas/device-sdks/sdk/flutter/users/user-metadata/) - [Kotlin: Manage User Metadata](https://www.mongodb.com/docs/atlas/device-sdks/sdk/kotlin/users/user-metadata/) - [.NET: User Metadata](https://www.mongodb.com/docs/atlas/device-sdks/sdk/dotnet/manage-users/user-metadata/) - [Node.js: User Metadata](https://www.mongodb.com/docs/atlas/device-sdks/sdk/node/users/user-metadata/) - [Swift: User Metadata](https://www.mongodb.com/docs/atlas/device-sdks/sdk/swift/users/user-metadata/) ### PR Author Checklist Before requesting a review for your PR, please check these items: - [x] Open the PR against the `feature-consolidated-sdk-docs` branch instead of `master` - [x] Tag the consolidated page for: - genre - meta.keywords - meta.description #### Naming - [x] Update Realm naming and the language around persistence layer/local/device per [this document](https://docs.google.com/document/d/126OczVxBWAwZ4P5ZsSM29WI3REvONEr1ald-mAwPtyQ/edit?usp=sharing) - [x] Include `.rst` files comply with [the naming guidelines](https://docs.google.com/document/d/1h8cr66zoEVeXytVfvDxlCSsUS5IZwvUQvfSCEXNMpek/edit#heading=h.ulh8b5f2hu9) #### Links and Refs - [x] Create new consolidated SDK ref targets starting with "_sdks-" for relevant sections - [x] Remove or update any SDK-specific refs to use the new consolidated SDK ref targets - [x] [Update any Kotlin API links](https://jira.mongodb.org/browse/DOCSP-32519) to use the new Kotlin SDK roles #### Content - [x] Shared code boxes have snippets or placeholders for all 9 languages - [x] API description sections have API details or a generic placeholder for all 9 languages - [x] Check related pages for relevant content to include - [x] Create a ticket for missing examples in each relevant SDK: Consolidation Gaps epic ### Reviewer Checklist As a reviewer, please check these items: - [ ] Shared code example boxes contain language-specific snippets or placeholders for every language - [ ] API reference details contain working API reference links or generic content - [ ] Realm naming/language has been updated - [ ] All relevant content from individual SDK pages is present on the consolidated page --- ...etadata-read-user-metadata-description.rst | 8 ++ ...etadata-read-user-metadata-description.rst | 8 ++ ...rializable-user-metadata-not-supported.rst | 2 + ...a-read-user-metadata-js-ts-description.rst | 5 + ...etadata-read-user-metadata-description.rst | 8 ++ ...serializable-user-metadata-description.rst | 14 +++ ...etadata-read-user-metadata-description.rst | 5 + source/includes/configure-user-metadata.rst | 13 -- .../user-metadata-read-user-metadata.rst | 38 ++++++ source/includes/update-user-metadata.rst | 6 - source/sdk/users/user-metadata.txt | 117 +++++++++++++++++- 11 files changed, 204 insertions(+), 20 deletions(-) create mode 100644 source/includes/api-details/csharp/users/user-metadata-read-user-metadata-description.rst create mode 100644 source/includes/api-details/dart/users/user-metadata-read-user-metadata-description.rst create mode 100644 source/includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst create mode 100644 source/includes/api-details/javascript/users/user-metadata-read-user-metadata-js-ts-description.rst create mode 100644 source/includes/api-details/kotlin/users/user-metadata-read-user-metadata-description.rst create mode 100644 source/includes/api-details/kotlin/users/user-metadata-serializable-user-metadata-description.rst create mode 100644 source/includes/api-details/swift/users/user-metadata-read-user-metadata-description.rst delete mode 100644 source/includes/configure-user-metadata.rst create mode 100644 source/includes/sdk-examples/users/user-metadata-read-user-metadata.rst delete mode 100644 source/includes/update-user-metadata.rst diff --git a/source/includes/api-details/csharp/users/user-metadata-read-user-metadata-description.rst b/source/includes/api-details/csharp/users/user-metadata-read-user-metadata-description.rst new file mode 100644 index 0000000000..9d83686b25 --- /dev/null +++ b/source/includes/api-details/csharp/users/user-metadata-read-user-metadata-description.rst @@ -0,0 +1,8 @@ +You can read the user metadata of a currently logged-in user through the +:dotnet-sdk:`User ` object. + +The ``Profile`` property on the ``User`` object returns a +:dotnet-sdk:`UserProfile ` object +of a logged-in user. + +The following example shows how to get a user's email from the metadata. diff --git a/source/includes/api-details/dart/users/user-metadata-read-user-metadata-description.rst b/source/includes/api-details/dart/users/user-metadata-read-user-metadata-description.rst new file mode 100644 index 0000000000..d099000529 --- /dev/null +++ b/source/includes/api-details/dart/users/user-metadata-read-user-metadata-description.rst @@ -0,0 +1,8 @@ +You can read the user metadata of a currently logged-in user through the +:flutter-sdk:`User ` object. + +The ``profile`` property on the ``User`` object returns a +:flutter-sdk:`User.profile ` object +of a logged-in user. + +The following example shows how to get a user's email from the metatdata. diff --git a/source/includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst b/source/includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst new file mode 100644 index 0000000000..36ce6c7510 --- /dev/null +++ b/source/includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst @@ -0,0 +1,2 @@ +The selected language does not provide serializable user metadata. This +functionality is only available in Kotlin. diff --git a/source/includes/api-details/javascript/users/user-metadata-read-user-metadata-js-ts-description.rst b/source/includes/api-details/javascript/users/user-metadata-read-user-metadata-js-ts-description.rst new file mode 100644 index 0000000000..73998c771c --- /dev/null +++ b/source/includes/api-details/javascript/users/user-metadata-read-user-metadata-js-ts-description.rst @@ -0,0 +1,5 @@ +You can read the user metadata of a currently logged-in user through that +user's ``User`` object. + +To read the data, access the ``profile`` property on the ``User`` object +of a logged-in user. diff --git a/source/includes/api-details/kotlin/users/user-metadata-read-user-metadata-description.rst b/source/includes/api-details/kotlin/users/user-metadata-read-user-metadata-description.rst new file mode 100644 index 0000000000..bba823aa8d --- /dev/null +++ b/source/includes/api-details/kotlin/users/user-metadata-read-user-metadata-description.rst @@ -0,0 +1,8 @@ +You can read the user metadata of a currently logged-in user through +that user's +:kotlin-sync-sdk:`User ` +object. You cannot edit user metadata through a ``User`` object. + +To read the data, call the :kotlin-sync-sdk:`profileAsBsonDocument +` +method on the ``User`` object of a logged-in user. diff --git a/source/includes/api-details/kotlin/users/user-metadata-serializable-user-metadata-description.rst b/source/includes/api-details/kotlin/users/user-metadata-serializable-user-metadata-description.rst new file mode 100644 index 0000000000..c4c44ea8ae --- /dev/null +++ b/source/includes/api-details/kotlin/users/user-metadata-serializable-user-metadata-description.rst @@ -0,0 +1,14 @@ +.. versionadded:: 1.9.0 + +Kotlin SDK version 1.9.0 introduced an API that supports: + +- A limited but stable EJSON encoder for user metadata returned by ``User.profileAsBsonDocument()`` +- An experimental EJSON encoder that supports full document serialization for user + metadata returned by the :kotlin-sync-sdk:`User.profile() + ` extension method. This encoder + and method requires experimental opt-in. + +You must add the official +`Kotlin Serialization `__ +library to your project to use the Kotlin SDK's EJSON serialization. +For more information, refer to :ref:`Serialization `. diff --git a/source/includes/api-details/swift/users/user-metadata-read-user-metadata-description.rst b/source/includes/api-details/swift/users/user-metadata-read-user-metadata-description.rst new file mode 100644 index 0000000000..8effdfae3c --- /dev/null +++ b/source/includes/api-details/swift/users/user-metadata-read-user-metadata-description.rst @@ -0,0 +1,5 @@ +You can read the user metadata of a currently logged-in user through that +user's ``User`` object. + +To read the data, access the ``profile`` property on the ``User`` object +of a logged-in user. diff --git a/source/includes/configure-user-metadata.rst b/source/includes/configure-user-metadata.rst deleted file mode 100644 index 2d55693d65..0000000000 --- a/source/includes/configure-user-metadata.rst +++ /dev/null @@ -1,13 +0,0 @@ -You can only read user metadata from the client app that you have configured -on the App Services application. - -You can configure the :ref:`user metadata ` you request from -an authentication provider. You do this directly on the authentication -provider's configuration. For more details on which metadata fields you -can use, see the provider details: - -- OAuth 2.0 (:ref:`Facebook ` & :ref:`Google `) -- :ref:`Custom JWT ` - -You can change which metadata fields you have configured by :ref:`editing the -provider's configuration `. \ No newline at end of file diff --git a/source/includes/sdk-examples/users/user-metadata-read-user-metadata.rst b/source/includes/sdk-examples/users/user-metadata-read-user-metadata.rst new file mode 100644 index 0000000000..b682e10987 --- /dev/null +++ b/source/includes/sdk-examples/users/user-metadata-read-user-metadata.rst @@ -0,0 +1,38 @@ +.. tabs-drivers:: + + tabs: + - id: csharp + content: | + + .. literalinclude:: /examples/generated/dotnet/UserLinkExamples.snippet.user-metadata.cs + :language: csharp + + - id: dart + content: | + + .. literalinclude:: /examples/generated/flutter/authenticate_users_test.snippet.user-metadata.dart + :language: dart + + - id: javascript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.user-metadata.js + :language: js + + - id: kotlin + content: | + + .. literalinclude:: /examples/generated/kotlin/AuthenticationTest.snippet.get-user-metadata.kt + :language: kotlin + + - id: swift + content: | + + .. literalinclude:: /examples/generated/code/start/Authenticate.snippet.read-user-metadata.swift + :language: swift + + - id: typescript + content: | + + .. literalinclude:: /examples/generated/node/authenticate.snippet.user-metadata.js + :language: js diff --git a/source/includes/update-user-metadata.rst b/source/includes/update-user-metadata.rst deleted file mode 100644 index 5120d06a0e..0000000000 --- a/source/includes/update-user-metadata.rst +++ /dev/null @@ -1,6 +0,0 @@ -User metadata that you access through the authentication provider is read-only -data. You cannot update or edit user metadata that comes from this source. - -If you would like to give a user the option the update their metadata from -within your client app, use :ref:`custom user data `, -instead. \ No newline at end of file diff --git a/source/sdk/users/user-metadata.txt b/source/sdk/users/user-metadata.txt index 0d36c57fce..2f1f95d641 100644 --- a/source/sdk/users/user-metadata.txt +++ b/source/sdk/users/user-metadata.txt @@ -4,10 +4,125 @@ User Metadata ============= +.. meta:: + :description: Use Atlas Device SDK to read user metadata, such as email or birthday, from configured authentication providers. + :keywords: Realm, Flutter SDK, Kotlin SDK, .NET SDK, Node.js SDK, Swift SDK, code example + +.. facet:: + :name: genre + :values: reference + +.. facet:: + :name: programming_language + :values: csharp, dart, javascript/typescript, kotlin, swift + .. contents:: On this page :local: :backlinks: none :depth: 2 :class: singlecol -Placeholder page for user metadata content. +.. tabs-selector:: drivers + +This page describes how to manage user metadata for an authorized App +Services App user using Atlas Device SDK. For more information, +refer to :ref:`auth-provider-metadata` in the App Services documentation. + +Atlas App Services can read **user metadata** from authentication providers, +such as Google or Facebook. Then, App Services exposes each user's metadata in +a field of their ``User`` object. For example, you might want to access a +user's name, email, birthday, or gender. This is read-only data that comes +from the third-party authentication provider. + +This is distinct from maintaining your own, editable custom user data. If +you'd like to define your own user data fields, or have the ability to directly +update user data, use :ref:`sdks-custom-user-data`. + +.. important:: Configure Metadata in Atlas + + Before you can work with metadata provided by the authentication provider, + you must :ref:`configure metadata for the authentication provider + `. + +.. _sdks-read-user-metadata: + +Read User Metadata +------------------ + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/csharp/users/user-metadata-read-user-metadata-description.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/dart/users/user-metadata-read-user-metadata-description.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/javascript/users/user-metadata-read-user-metadata-js-ts-description.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/user-metadata-read-user-metadata-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/swift/users/user-metadata-read-user-metadata-description.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/javascript/users/user-metadata-read-user-metadata-js-ts-description.rst + +.. include:: /includes/sdk-examples/users/user-metadata-read-user-metadata.rst + +User metadata options vary depending on which provider you're using and +:ref:`which metadata fields you enable `. + +.. include:: /includes/stale-user-metadata.rst + +.. _sdks-serializable-user-metadata: + +Serializable User Metadata +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Some of the SDK languages provide serializers for user metadata. + +.. tabs-drivers:: + + .. tab:: + :tabid: csharp + + .. include:: /includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst + + .. tab:: + :tabid: dart + + .. include:: /includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst + + .. tab:: + :tabid: javascript + + .. include:: /includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst + + .. tab:: + :tabid: kotlin + + .. include:: /includes/api-details/kotlin/users/user-metadata-serializable-user-metadata-description.rst + + .. tab:: + :tabid: swift + + .. include:: /includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst + + .. tab:: + :tabid: typescript + + .. include:: /includes/api-details/generic/users/user-metadata-serializable-user-metadata-not-supported.rst