9 #import <Foundation/Foundation.h> 14 NS_ASSUME_NONNULL_BEGIN
51 @property (readonly, nonatomic) BOOL
exists;
58 @property (readonly, nonatomic) uint64_t
sequence;
69 - (BOOL) save: (NSError**)error;
77 - (BOOL) deleteDocument: (NSError**)error;
82 - (BOOL) purge: (NSError**)error;
93 - (nullable id) objectForKeyedSubscript: (NSString*)key;
96 - (void) setObject: (nullable
id)value forKeyedSubscript: (NSString*)key;
100 NS_ASSUME_NONNULL_END
A Couchbase Lite database.
Definition: CBLDatabase.h:77
uint64_t sequence
Sequence number of the document in the database.
Definition: CBLDocument.h:58
A Couchbase Lite document.
Definition: CBLDocument.h:36
BOOL isDeleted
Is the document deleted?
Definition: CBLDocument.h:47
void revert()
Reverts unsaved changes made to the document's properties.
Definition: CBLDocument.h:90
NSString *const kCBLDocumentIsExternalUserInfoKey
Key in the userInfo dictionary of a kCBLDocumentSavedNotification.
CBLDatabase * database
The document's owning database.
Definition: CBLDocument.h:44
NSString * documentID
The document's ID.
Definition: CBLDocument.h:41
instancetype NS_UNAVAILABLE()
BOOL exists
Checks whether the document exists in the database or not.
Definition: CBLDocument.h:51
NS_ASSUME_NONNULL_BEGIN NSString *const kCBLDocumentChangeNotification
Notification posted by a CBLDocument when a property is changed in memory.
Abstract interface for an application-defined object that can resolve a conflict between two revision...
Definition: CBLConflictResolver.h:18
Default implementation of CBLProperties protocol, which defines a JSON-compatible object...
Definition: CBLProperties.h:104
NSString *const kCBLDocumentSavedNotification
Notification posted by a CBLDocument when it is updated in the database.
id< CBLConflictResolver > conflictResolver
The conflict resolver, if any, specific to this document.
Definition: CBLDocument.h:62