Revision

Revision

A Couchbase Lite Document Revision.

Syntax


@interface CBLRevision : NSObject
class CBLRevision : NSObject
public class Revision
public class Revision
public class Revision

Summary


Properties
String[]
attachmentNames { get; }
Gets the names of all the Attachments.
Attachment[]
attachments { get; }
Gets all the Attachments.
Database
database { get; }
Gets the Database that owns the Revision's Document.
Document
document { get; }
Gets the Document that this Revision belongs to.
String
id { get; }
Gets the Revision's id.
boolean
isDeletion { get; }
Gets if the Revision marks the deletion of its Document.
SavedRevision
parent { get; }
Gets the parent Revision.
String
parentId { get; }
Gets the parent Revision's id.
Map<String, Object>
properties { get; }
Gets the properties of the Revision.
SavedRevision[]
revisionHistory { get; }
Gets the associated Document's Revision history in forward order. Older, ancestor, Revisions are not guaranteed to have their properties available.
Map<String, Object>
userProperties { get; }
Gets the properties of the Revision without any properties with keys prefixed with '_' (which contain Couchbase Lite data).
Methods
Attachment
getAttachment(String name)
Returns the Attachment with the specified name if it exists, otherwise null.
Object
getProperty(String key)
Returns the value of the property with the specified key.

Properties


String[] attachmentNames { get; }
Gets the names of all the Attachments.

Syntax

@property (readonly) NSArray * attachmentNames
var attachmentNames: [AnyObject]! { get }
public List<String> getAttachmentNames()
public List<String> getAttachmentNames()
public IEnumerable<String> AttachmentNames { get; }
Attachment[] attachments { get; }
Gets all the Attachments.

Syntax

@property (readonly) NSArray * attachments
var attachments: [AnyObject]! { get }
public List<Attachment> getAttachments()
public List<Attachment> getAttachments()
public IEnumerable<Attachment> Attachments { get; }
Database database { get; }
Gets the Database that owns the Revision's Document.

Syntax

@property (readonly) CBLDatabase * database
var database:CBLDatabase! { get }
public Database getDatabase()
public Database getDatabase()
public Database Database { get; }
Document document { get; }
Gets the Document that this Revision belongs to.

Syntax

@property (readonly) CBLDocument * document
var document:CBLDocument! { get }
public Document getDocument()
public Document getDocument()
public Document Document { get; }
String id { get; }
Gets the Revision's id.

Syntax

@property (readonly) NSString * revisionID
var revisionID: String! { get }
public String getId()
public String getId()
public String Id { get; }
boolean isDeletion { get; }
Gets if the Revision marks the deletion of its Document.

Syntax

@property (readonly) BOOL isDeletion
var isDeletion: Bool { get }
public boolean isDeletion()
public boolean isDeletion()
public Boolean IsDeletion { get; }
SavedRevision parent { get; }
Gets the parent Revision.

Syntax

@property (readonly) CBLSavedRevision * parent
var parent: CBLSavedRevision! { get }
public SavedRevision getParent()
public SavedRevision getParent()
public SavedRevision Parent { get; }
String parentId { get; }
Gets the parent Revision's id.

Syntax

@property (readonly) NSString * parentID
var parentID: String! { get }
public String getParentId()
public String getParentId()
public String ParentId { get; }
Map<String, Object> properties { get; }
Gets the properties of the Revision.

Syntax

@property (readonly) NSDictionary * properties
var properties: [NSObject : AnyObject]! { get }
public Map<String, Object> getProperties()
public Map<String, Object> getProperties()
public Dictionary<String, Object> Properties { get; }
SavedRevision[] revisionHistory { get; }
Gets the associated Document's Revision history in forward order. Older, ancestor, Revisions are not guaranteed to have their properties available.

Errors

Returns an error if an issue occurs while getting the Revision history.

Syntax

-(NSArray *)getRevisionHistory:(NSError **)outError
func getRevisionHistory(outError NSErrorPointer) -> [AnyObject]!
public List<SavedRevision> getRevisionHistory() throws CouchbaseLiteException
public List<SavedRevision> getRevisionHistory() throws CouchbaseLiteException
public IEnumerable<SavedRevision> RevisionHistory { get; }
Map<String, Object> userProperties { get; }
Gets the properties of the Revision without any properties with keys prefixed with '_' (which contain Couchbase Lite data).

Syntax

@property (readonly) NSDictionary * userProperties
var userProperties: [NSObject : AnyObject]! { get }
public Map<String, Object> getUserProperties()
public Map<String, Object> getUserProperties()
public Dictionary<String, Object> UserProperties { get; }

Methods


Attachment getAttachment(String name)
Returns the Attachment with the specified name if it exists, otherwise null.

Parameters

key The key of the property value to return.

Returns

The Attachment with the specified name if it exists, otherwise null.

Syntax

-(CBLAttachment*)attachmentNamed:(NSString *)name
func attachmentNamed(name: String) -> CBLAttachment!
public Attachment getAttachment(String name)
public Attachment getAttachment(String name)
public Attachment GetAttachment(String name)
Object getProperty(String key)
Returns the value of the property with the specified key.

Parameters

key The key of the property value to return.

Returns

The value of the property with the specified key.

Syntax

-(id)propertyForKey:(NSString *)key
func propertyForKey(key: String!) -> AnyObject!
public Object getProperty(String key)
public Object getProperty(String key)
public Object GetProperty(String key)