MongoCollectionOptions
public struct MongoCollectionOptions : CodingStrategyProvider
Options to set on a retrieved MongoCollection.
-
Specifies the
DataCodingStrategyto use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyDatas already stored in this collection can be decoded using this strategy.Declaration
Swift
public var dataCodingStrategy: DataCodingStrategy? -
Specifies the
DateCodingStrategyto use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyDates 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
UUIDCodingStrategyto use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyUUIDs 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 )
View on GitHub
Install in Dash
MongoCollectionOptions Structure Reference