MongoCollectionOptions
public struct MongoCollectionOptions : CodingStrategyProvider
Options to set on a retrieved MongoCollection
.
-
Specifies the
DataCodingStrategy
to use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyData
s already stored in this collection can be decoded using this strategy.Declaration
Swift
public var dataCodingStrategy: DataCodingStrategy?
-
Specifies the
DateCodingStrategy
to use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyDate
s already stored in this collection can be decoded using this strategy.Declaration
Swift
public var dateCodingStrategy: DateCodingStrategy?
-
A read concern to set on the returned collection.
Declaration
Swift
public var readConcern: ReadConcern?
-
A read preference to set on the returned collection.
Declaration
Swift
public var readPreference: ReadPreference?
-
Specifies the
UUIDCodingStrategy
to use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyUUID
s already stored in this collection can be decoded using this strategy.Declaration
Swift
public var uuidCodingStrategy: UUIDCodingStrategy?
-
A write concern to set on the returned collection.
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 )