CBLMutableDocument
@interface CBLMutableDocument : CBLDocument <CBLMutableDictionary>
The mutable version of the CBLDocument.
-
Creates a new CBLMutableDocument object with a new random UUID. The created document will be saved into a database when you call the CBLDatabase’s -save: method with the document object given.
Declaration
Objective-C
+ (nonnull instancetype)document; -
Creates a new CBLMutableDocument object with the given ID. If a nil ID value is given, the document will be created with a new random UUID. The created document will be saved into a database when you call the CBLDatabase’s -save: method with the document object given.
Declaration
Objective-C
+ (nonnull instancetype)documentWithID:(nullable NSString *)documentID;Parameters
documentIDThe document ID.
-
Initializes a new CBLMutableDocument object with a new random UUID. The created document will be saved into a database when you call the CBLDatabase’s -save: method with the document object given.
Declaration
Objective-C
- (nonnull instancetype)init; -
Initializes a new CBLMutableDocument object with the given ID. If a nil ID value is given, the document will be created with a new random UUID. The created document will be saved into a database when you call the CBLDatabase’s -save: method with the document object given.
Declaration
Objective-C
- (nonnull instancetype)initWithID:(nullable NSString *)documentID;Parameters
documentIDThe document ID.
-
Initializes a new CBLMutableDocument object with a new random UUID and the dictionary as the content. Allowed dictionary value types are NSArray, NSDate, NSDictionary, NSNumber, NSNull, NSString, CBLMutableArray, CBLBlob, CBLMutableDictionary. The NSArrays and NSDictionaries must contain only the above types. The created document will be saved into a database when you call the CBLDatabase’s -save: method with the document object given.
Declaration
Objective-C
- (nonnull instancetype)initWithDictionary: (nonnull NSDictionary<NSString *, id> *)dictionary;Parameters
dictionaryThe dictionary object.
-
Initializes a new CBLMutableDocument object with a given ID and the dictionary as the content. If a nil ID value is given, the document will be created with a new random UUID. Allowed dictionary value types are NSArray, NSDate, NSDictionary, NSNumber, NSNull, NSString, CBLMutableArray, CBLBlob, CBLMutableDictionary. The NSArrays and NSDictionaries must contain only the above types. The created document will be saved into a database when you call the CBLDatabase’s -save: method with the document object given.
Declaration
Objective-C
- (nonnull instancetype)initWithID:(nullable NSString *)documentID dictionary: (nonnull NSDictionary<NSString *, id> *)dictionary;Parameters
documentIDThe document ID.
dictionaryThe dictionary object.
CBLMutableDocument Class Reference