Document Class |
Namespace: Couchbase.Lite
public sealed class Document
The Document type exposes the following members.
Name | Description | |
---|---|---|
ConflictingRevisions | ||
CurrentRevision |
Gets the current/latest Revision.
| |
CurrentRevisionId |
If known, gets the Id of the current Revision, otherwise null.
| |
Database |
Gets the Database that owns this Document.
| |
Deleted |
Gets if the Document is deleted.
| |
Id |
Gets the Document's id.
| |
LeafRevisions | ||
Properties |
Gets the properties of the current Revision of
the Document.
| |
RevisionHistory | ||
UserProperties |
Gets the properties of the current Revision of the
Document without any properties
with keys prefixed with '_' (which contain Couchbase Lite data).
|
Name | Description | |
---|---|---|
CreateRevision |
Creates a new UnsavedRevision whose properties and attachments are initially
identical to the current Revision.
| |
Delete |
Deletes the Document.
| |
ExpireAfter |
Sets an interval to wait before expiring the document.
| |
ExpireAt |
Sets an absolute point in time for the document to expire. Must be
a DateTime in the future. Pass a null value to cancel an expiration.
| |
GetExpirationDate |
Gets the expiration data of this document, if it has one
| |
GetProperty(String) |
Returns the value of the property with the specified key.
| |
GetPropertyTValue(String) |
Returns the TValue of the property with the specified key.
| |
GetRevision |
Returns the Revision with the specified id if it exists, otherwise null.
| |
Purge | ||
PutExistingRevision |
Adds an existing revision copied from another database. Unlike a normal insertion, this does
not assign a new revision ID; instead the revision's ID must be given. Ths revision's history
(ancestry) must be given, which can put it anywhere in the revision tree. It's not an error if
the revision already exists locally; it will just be ignored.
This is not an operation that clients normall perform; it's used by the replicator. You might want
to use it if you're pre-loading a database with canned content, or if you're implementing some new
kind of replicator that transfers revisions from another database
| |
PutProperties | ||
Update |
Creates and saves a new Revision by allowing the caller to update
the existing properties. Conflicts are handled by calling the delegate again.
|
Name | Description | |
---|---|---|
Change |
Adds or Removed a change delegate that will be called whenever the Document changes
|