RemoteMongoDatabase
public class RemoteMongoDatabase
The RemoteMongoDatabase represents 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 also
-
The name of this database.
Declaration
Swift
public var name: String { get } -
Gets a
RemoteMongoCollection.Declaration
Swift
public func collection(_ collectionName: String) -> RemoteMongoCollection<Document>Parameters
namethe name of the collection to return
Return Value
the collection
-
Gets a
RemoteMongoCollectionwith a specific default document type.Declaration
Swift
public func collection<T: Codable>( _ collectionName: String, withCollectionType type: T.Type ) -> RemoteMongoCollection<T>Parameters
namethe name of the collection to return
withCollectionTypethe default class to cast any documents returned from the database into.
Return Value
the collection
RemoteMongoDatabase Class Reference