InsertOneOptions
public struct InsertOneOptions : Codable, BulkWriteOptionsConvertible
Options to use when executing an insertOne
command on a MongoCollection
.
-
If true, allows the write to opt-out of document level validation.
Declaration
Swift
public var bypassDocumentValidation: Bool?
-
An optional WriteConcern to use for the command.
Declaration
Swift
public var writeConcern: WriteConcern?
-
Convenience initializer allowing bypassDocumentValidation to be omitted or optional
Declaration
Swift
public init(bypassDocumentValidation: Bool? = nil, writeConcern: WriteConcern? = nil)