Remote MongoDB Service
-
The
remoteMongoClientFactorycan be used to create aRemoteMongoClientwith aStitchAppClient.Use this with
StitchAppClient.serviceClient(fromFactory:withName)to get aRemoteMongoClient.Declaration
Swift
public let remoteMongoClientFactory: AnyNamedThrowingServiceClientFactory<RemoteMongoClient> -
The
RemoteMongoClientenables reading and writing on a MongoDB database via the Stitch MongoDB service.You can create one by using
remoteMongoClientFactorywithStitchAppClient‘sserviceClient(fromFactory:withName)method.It provides access to instances of
RemoteMongoDatabase, which in turn provide access to specificRemoteMongoCollections that hold your data.See moreNote
Before you can read or write data, a user must log in. See
StitchAuth.Declaration
Swift
public class RemoteMongoClient
-
The
RemoteMongoDatabaserepresents a MongoDB database, which holds a group of collections that contain your data.It can be retrieved from the
RemoteMongoClient.Use it to get
RemoteMongoCollections for reading and writing data.Note
Before you can read or write data, a user must log in. See
StitchAuth.See moreSee also
Declaration
Swift
public class RemoteMongoDatabase
-
The
RemoteMongoCollectionrepresents a MongoDB collection.You can get an instance from a
RemoteMongoDatabase.Create, read, update, and delete methods are available.
Operations against the Stitch server are performed asynchronously.
Note
Before you can read or write data, a user must log in. See
StitchAuth.See moreSee also
Declaration
Swift
public class RemoteMongoCollection<T> where T : Decodable, T : Encodable
-
RemoteMongoCursorallows asynchronous traversal of the result of afindoraggregateoperation on aRemoteMongoCollection.You can obtain an instance of the cursor by calling
See moreRemoteMongoReadOperation‘siterator(completionHandler:)method.RemoteMongoReadOperationis the result of a find or aggregate operation on aRemoteMongoCollection.Declaration
Swift
public class RemoteMongoCursor<T> where T : Decodable, T : Encodable
-
RemoteMongoReadOperationrepresents afindoraggregateoperation on aRemoteMongoCollection.The methods in this class execute the operation and retrieve the results.
See moreSee also
RemoteMongoCollectionDeclaration
Swift
public class RemoteMongoReadOperation<T> where T : Decodable, T : Encodable
-
Syncis a set of synchronization-related operations for aRemoteMongoCollection.Using Sync, you can synchronize local and remote data.
See moreSee also
Build a Mobile App with Sync, RemoteMongoCollectionDeclaration
Swift
public class Sync<DocumentT> where DocumentT : Decodable, DocumentT : Encodable
Remote MongoDB Service Reference