Couchbase Lite
Objective-C API for iOS and Mac OS
CBLSavedRevision Class Reference

Detailed Description

An existing revision of a CBLDocument.

Most of its API is inherited from CBLRevisionBase.

Inheritance diagram for CBLSavedRevision:
CBLRevision

Instance Methods

(CBLUnsavedRevision *) - createRevision
 Creates a new mutable child revision whose properties and attachments are initially identical to this one's, which you can modify and then save. More...
 
(nullable CBLSavedRevision *) - createRevisionWithProperties:error:
 Creates and saves a new revision with the given properties. More...
 
(nullable CBLSavedRevision *) - deleteDocument:
 Deletes the document by creating a new deletion-marker revision. More...
 
- Instance Methods inherited from CBLRevision
(nullable CBLArrayOf(CBLRevision *) - getRevisionHistory:
 Returns the ancestry of this revision as an array of CBLRevisions, in chronological order. More...
 
(nullable id) - propertyForKey:
 Shorthand for [self.properties objectForKey: key]. More...
 
(nullable id) - objectForKeyedSubscript:
 Same as -propertyForKey:. More...
 
() - CBLArrayOf
 The names of all attachments (an array of strings). More...
 
(nullable CBLAttachment *) - attachmentNamed:
 Looks up the attachment with the given name (without fetching its contents yet). More...
 
() - CBLArrayOf
 All attachments, as CBLAttachment objects. More...
 
(instancetype) - NS_UNAVAILABLE
 

Properties

BOOL propertiesAvailable
 Are this revision's properties available? They may not be if the revision is an ancestor and either the database has been compacted, or the revision was replicated from another db. More...
 
- Properties inherited from CBLRevision
CBLDocumentdocument
 The document this is a revision of. More...
 
CBLDatabasedatabase
 The database this revision's document belongs to. More...
 
BOOL isDeletion
 Does this revision mark the deletion of its document? (In other words, does it have a "_deleted" property?) More...
 
BOOL isGone
 Does this revision mark the deletion or removal (from available channels) of its document ? (In other words, does it have a "_deleted_ or "_removed" property?) More...
 
NSString * revisionID
 The ID of this revision. More...
 
CBLSavedRevisionparentRevision
 The revision this one is a child of. More...
 
NSString * parentRevisionID
 The ID of the parentRevision. More...
 
CBLJSONDict * properties
 The revision's contents as parsed from JSON. More...
 
CBLJSONDict * userProperties
 The user-defined properties, without the ones reserved by CouchbaseLite. More...
 

Method Documentation

◆ createRevision()

- (CBLUnsavedRevision*) createRevision

Creates a new mutable child revision whose properties and attachments are initially identical to this one's, which you can modify and then save.

◆ createRevisionWithProperties:error:()

- (nullable CBLSavedRevision*) createRevisionWithProperties: (nullable CBLJSONDict *)  properties
error: (NSError **)  outError 

Creates and saves a new revision with the given properties.

This will fail with a 412 error if the receiver is not the current revision of the document.

◆ deleteDocument:()

- (nullable CBLSavedRevision*) deleteDocument: (NSError **)  outError

Deletes the document by creating a new deletion-marker revision.

Property Documentation

◆ propertiesAvailable

- (BOOL) propertiesAvailable
readatomicassign

Are this revision's properties available? They may not be if the revision is an ancestor and either the database has been compacted, or the revision was replicated from another db.


The documentation for this class was generated from the following file: