Click or drag to resize

Document Methods

The Document type exposes the following members.

Methods
  NameDescription
Public methodCreateRevision
Creates a new UnsavedRevision whose properties and attachments are initially identical to the current Revision.
Public methodDelete
Deletes the Document.
Public methodExpireAfter
Sets an interval to wait before expiring the document.
Public methodExpireAt
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.
Public methodGetExpirationDate
Gets the expiration data of this document, if it has one
Public methodGetProperty(String)
Returns the value of the property with the specified key.
Public methodGetPropertyTValue(String)
Returns the TValue of the property with the specified key.
Public methodGetRevision
Returns the Revision with the specified id if it exists, otherwise null.
Public methodPurge
Completely purges the Document from the local Database. This is different from delete in that it completely deletes everything related to the Document and does not replicate the deletes to other Databases.
Public methodPutExistingRevision
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
Public methodPutProperties
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.
Public methodUpdate
Creates and saves a new Revision by allowing the caller to update the existing properties. Conflicts are handled by calling the delegate again.
Top
See Also