TransactionOptions
public struct TransactionOptions
Options to use when starting a transaction.
-
The maximum amount of time to allow a single
commitTransaction
command to run.Declaration
Swift
public var maxCommitTimeMS: Int?
-
The
ReadConcern
to use for this transaction.Declaration
Swift
public var readConcern: ReadConcern?
-
The
ReadPreference
to use for this transaction.Declaration
Swift
public var readPreference: ReadPreference?
-
The
WriteConcern
to use for this transaction.Declaration
Swift
public var writeConcern: WriteConcern?
-
Convenience initializer allowing any/all parameters to be omitted.
Declaration
Swift
public init( maxCommitTimeMS: Int? = nil, readConcern: ReadConcern? = nil, readPreference: ReadPreference? = nil, writeConcern: WriteConcern? = nil )