FindOneAndModifyOptions
extension FindOneAndModifyOptions
-
Limits the fields to return for all matching documents.
Declaration
Swift
public var projection: Document? { get set } -
The order in which to return matching documents.
Declaration
Swift
public var sort: Document? { get set } -
Options to use when executing a
findOneAndUpdate,findOneAndReplace, orfindOneAndDeletecommand on aMongoCollectionDeclaration
Parameters
projectionLimits the fields to return for all matching documents.
sortThe order in which to return matching documents.
upsertWhether or not to perform an upsert, default is false (only available for findOneAndReplace and findOneAndUpdate)
shouldReturnNewDocumentWhen true then the new document is returned, Otherwise the old document is returned (default) (only available for findOneAndReplace and findOneAndUpdate)
-
Options to use when executing a
findOneAndUpdate,findOneAndReplace, orfindOneAndDeletecommand on aMongoCollectionDeclaration
Parameters
projectionLimits the fields to return for all matching documents.
sortThe order in which to return matching documents.
upsertWhether or not to perform an upsert, default is false (only available for findOneAndReplace and findOneAndUpdate)
shouldReturnNewDocumentWhen true then the new document is returned, Otherwise the old document is returned (default) (only available for findOneAndReplace and findOneAndUpdate)
View on GitHub
Install in Dash