11 @protocol CBLDocumentModel;
36 - (BOOL) deleteDocument: (NSError**)outError;
40 - (BOOL) purgeDocument: (NSError**)outError;
46 #pragma mark REVISIONS: 75 #pragma mark PROPERTIES: 88 - (
nullable id) propertyForKey: (NSString*)key;
91 - (
nullable id)objectForKeyedSubscript:(NSString*)key;
96 error: (NSError**)outError;
110 error: (NSError**)outError;
133 - (BOOL) putExistingRevisionWithProperties: (CBLJSONDict*)properties
134 attachments: (
nullable NSDictionary*)attachments
135 revisionHistory: (
CBLArrayOf(NSString*)*)revIDs
137 error: (NSError**)outError;
154 @protocol CBLDocumentModel <NSObject>
158 didChange: (CBLDatabaseChange*)change;
#define NS_ASSUME_NONNULL_BEGIN
Definition: CBLBase.h:20
A CouchbaseLite database.
Definition: CBLDatabase.h:38
NSString *const kCBLDocumentChangeNotification
This notification is posted by a CBLDocument in response to a change, i.e.
#define nullable
Definition: CBLBase.h:22
CBLSavedRevision * currentRevision
The current/latest revision.
Definition: CBLDocument.h:52
A CouchbaseLite document (as opposed to any specific revision of it.)
Definition: CBLDocument.h:16
BOOL isGone
Has this document either been deleted or removed from available Sync Gateway channels? (That is, does its current revision have a '_deleted' or '_removed' property?)
Definition: CBLDocument.h:32
BOOL isDeleted
Is this document deleted? (That is, does its current revision have the '_deleted' property...
Definition: CBLDocument.h:28
An unsaved new revision.
Definition: CBLRevision.h:103
#define NS_ASSUME_NONNULL_END
Definition: CBLBase.h:21
NSString * abbreviatedID
An abbreviated form of the the documentID that looks like "xxxx..xxxx".
Definition: CBLDocument.h:25
NSDate * expirationDate
A date/time after which this document will be automatically purged.
Definition: CBLDocument.h:43
CBLArrayOf(NSNumber *) *CBLGeoPointToCoordPair(CBLGeoPoint pt)
Converts a point to a JSON-compatible array of two coordinates.
An existing revision of a CBLDocument.
Definition: CBLRevision.h:80
NSString * currentRevisionID
The ID of the current revision (if known; else nil).
Definition: CBLDocument.h:49
CBLDatabase * database
The document's owning database.
Definition: CBLDocument.h:19
NSString * documentID
The document's ID.
Definition: CBLDocument.h:22
CBLJSONDict * userProperties
The user-defined properties, without the ones reserved by CouchDB.
Definition: CBLDocument.h:85
id< CBLDocumentModel > modelObject
Optional reference to an application-defined model object representing this document.
Definition: CBLDocument.h:144
instancetype NS_UNAVAILABLE()
CBLUnsavedRevision * newRevision()
Creates an unsaved new revision whose parent is the currentRevision, or which will be the first revis...
CBLJSONDict * properties
The contents of the current revision of the document.
Definition: CBLDocument.h:81