Saved Revision

Saved Revision

extends Revision

A saved Couchbase Lite Document Revision.

Syntax


@interface CBLSavedRevision : CBLRevision
class CBLSavedRevision : CBLRevision
public class SavedRevision extends Revision
public class SavedRevision extends Revision
public class SavedRevision : Revision

Summary


Properties
boolean
Gets whether the Revision's properties are available. Older, ancestor, Revisions are not guaranteed to have their properties available.
Methods
UnsavedRevision
Creates a new UnsavedRevision whose properties and attachments are initially identical to this one.
SavedRevision
createRevision(Map<String, Object> properties)
Creates and saves a new Revision with the specified properties. To succeed the specified properties must include a '_rev' property whose value maches the current Revision's id.
SavedRevision
Creates and saves a new deletion Revision for the associated Document.

Properties


boolean propertiesAvailable { get; }
Gets whether the Revision's properties are available. Older, ancestor, Revisions are not guaranteed to have their properties available.

Syntax

@property (readonly) BOOL propertiesAvailable
var propertiesAvailable: Bool { get }
public boolean arePropertiesAvailable()
public boolean arePropertiesAvailable()
public Boolean PropertiesAvailable { get; }

Methods


UnsavedRevision createRevision()
Creates a new UnsavedRevision whose properties and attachments are initially identical to this one.

Returns

A new child UnsavedRevision whose properties and attachments are initially identical to this one.

Syntax

-(CBLUnsavedRevision *)createRevision
func createRevision() -> CBLUnsavedRevision!
public UnsavedRevision createRevision()
public UnsavedRevision createRevision()
public UnsavedRevision CreateRevision()
SavedRevision createRevision(Map<String, Object> properties)
Creates and saves a new Revision with the specified properties. To succeed the specified properties must include a '_rev' property whose value maches the current Revision's id.

Parameters

properties The properties to set on the new Revision.

Returns

The new saved Revision.

Errors

Returns an error if an error occurs while creating or saving the new Revision.

Syntax

-(CBLSavedRevision *)createRevisionWithProperties:(NSDictionary *)properties error:(NSError **)outError
func createRevisionWithProperties(properties: [NSObject : AnyObject]!, error: NSErrorPointer) -> CBLSavedRevision!
public SavedRevision createRevision(Map<String, Object> properties) throws CouchbaseLiteException
public SavedRevision createRevision(Map<String, Object> properties) throws CouchbaseLiteException
public SavedRevision CreateRevision(Dictionary<String, Object> properties)
SavedRevision deleteDocument()
Creates and saves a new deletion Revision for the associated Document.

Errors

Returns an error if an issue occurs while creating a new deletion Revision.

Syntax

-(CBLSavedRevision *)deleteDocument:(NSError **)outError
func deleteDocument(outError: NSErrorPointer) -> CBLSavedRevision!
public SavedRevision deleteDocument() throws CouchbaseLiteException
public SavedRevision deleteDocument() throws CouchbaseLiteException
public SavedRevision DeleteDocument()