MongoDatabaseOptions
public struct MongoDatabaseOptions : CodingStrategyProvider
Options to use when retrieving a MongoDatabase
from a MongoClient
.
-
Specifies the
DateCodingStrategy
to use for BSON encoding/decoding operations performed by this database and any collections that derive from it.Declaration
Swift
public var dataCodingStrategy: DataCodingStrategy?
-
Specifies the
DateCodingStrategy
to use for BSON encoding/decoding operations performed by this database and any collections that derive from it.Declaration
Swift
public var dateCodingStrategy: DateCodingStrategy?
-
A read concern to set on the retrieved database.
Declaration
Swift
public var readConcern: ReadConcern?
-
A read preference to set on the retrieved database.
Declaration
Swift
public var readPreference: ReadPreference?
-
Specifies the
DateCodingStrategy
to use for BSON encoding/decoding operations performed by this database and any collections that derive from it.Declaration
Swift
public var uuidCodingStrategy: UUIDCodingStrategy?
-
A write concern to set on the retrieved database.
Declaration
Swift
public var writeConcern: WriteConcern?
-
init(dataCodingStrategy:
dateCodingStrategy: readConcern: readPreference: uuidCodingStrategy: writeConcern: ) Convenience initializer allowing any/all arguments to be omitted or optional.
Declaration
Swift
public init( dataCodingStrategy: DataCodingStrategy? = nil, dateCodingStrategy: DateCodingStrategy? = nil, readConcern: ReadConcern? = nil, readPreference: ReadPreference? = nil, uuidCodingStrategy: UUIDCodingStrategy? = nil, writeConcern: WriteConcern? = nil )