RLMFindOneAndModifyOptions
Objective-C
@interface RLMFindOneAndModifyOptions : NSObject
Swift
@_nonSendable(_assumed) class RLMFindOneAndModifyOptions : NSObject
Options to use when executing a findOneAndUpdate
, findOneAndReplace
,
or findOneAndDelete
command on a RLMMongoCollection
.
-
Limits the fields to return for all matching documents.
Declaration
Objective-C
@property (nonatomic, nullable) id<RLMBSON> projection;
-
The order in which to return matching documents.
Declaration
Objective-C
@property (nonatomic) NS_REFINED_FOR_SWIFT NSArray<id<RLMBSON>> *sorting;
-
Whether or not to perform an upsert, default is false (only available for find_one_and_replace and find_one_and_update)
Declaration
Objective-C
@property (nonatomic) BOOL upsert;
Swift
var upsert: Bool { get set }
-
When true then the new document is returned, Otherwise the old document is returned (default) (only available for findOneAndReplace and findOneAndUpdate)
Declaration
Objective-C
@property (nonatomic) BOOL shouldReturnNewDocument;
Swift
var shouldReturnNewDocument: Bool { get set }
-
Deprecated
Please use
initWithProjection:sorting:upsert:shouldReturnNewDocument:
Options to use when executing a
findOneAndUpdate
,findOneAndReplace
, orfindOneAndDelete
command on aRLMMongoCollection
.Declaration
Parameters
projection
Limits the fields to return for all matching documents.
sort
The order in which to return matching documents.
upsert
Whether or not to perform an upsert, default is false (only available for findOneAndReplace and findOneAndUpdate)
shouldReturnNewDocument
When 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
, orfindOneAndDelete
command on aRLMMongoCollection
.Declaration
Parameters
projection
Limits the fields to return for all matching documents.
sorting
The order in which to return matching documents.
upsert
Whether or not to perform an upsert, default is false (only available for findOneAndReplace and findOneAndUpdate)
shouldReturnNewDocument
When true then the new document is returned, Otherwise the old document is returned (default), (only available for findOneAndReplace and findOneAndUpdate)