UpdateModelOptions
public struct UpdateModelOptions : Codable
Options to use with a WriteModel.updateOne or WriteModel.updateMany.
-
A set of filters specifying to which array elements an update should apply.
Declaration
Swift
public var arrayFilters: [BSONDocument]? -
The collation to use.
Declaration
Swift
public var collation: BSONDocument? -
A document or string that specifies the index to use to support the query. Only supported in server 4.2+.
Declaration
Swift
public var hint: IndexHint? -
When
true, creates a new document if no document matches the query.Declaration
Swift
public var upsert: Bool? -
Initializer allowing any/all options to be omitted or optional.
Declaration
Swift
public init( arrayFilters: [BSONDocument]? = nil, collation: BSONDocument? = nil, hint: IndexHint? = nil, upsert: Bool? = nil )
View on GitHub
Install in Dash
UpdateModelOptions Structure Reference