ClientSessionOptions
public struct ClientSessionOptions
Options to use when creating a ClientSession
.
-
The default
TransactionOptions
to use for transactions started on this session.These may be overridden by options provided directly to
ClientSession.startTransaction
.If this option is not specified, the options will be inherited from the client that started this session where applicable (e.g. write concern).
Declaration
Swift
public var defaultTransactionOptions: TransactionOptions?
-
If true, then all reads performed using this session will read from the same snapshot. This option defaults to false.
Note that setting this option to true is incompatible with setting
causalConsistency
to true.Declaration
Swift
public var snapshot: Bool?
-
Convenience initializer allowing any/all parameters to be omitted.
Declaration
Swift
public init( causalConsistency: Bool? = nil, defaultTransactionOptions: TransactionOptions? = nil, snapshot: Bool? = nil )