Click or drag to resize

Database Class

A Couchbase Lite Database.
Inheritance Hierarchy
SystemObject
  Couchbase.LiteDatabase

Namespace:  Couchbase.Lite
Assembly:  Couchbase.Lite (in Couchbase.Lite.dll) Version: 1.4.1-b107
Syntax
C#
public sealed class Database : ICouchStoreDelegate, 
	IDisposable

The Database type exposes the following members.

Properties
  NameDescription
Public propertyAllReplications
Gets all the running Replications for this Database. This includes all continuous Replications and any non-continuous Replications that has been started and are still running.
Public propertyDocumentCount Obsolete.
Gets the number of Document in the Database.
Public propertyStatic memberFilterCompiler
Gets or sets an object that can compile source code into FilterDelegate.
Public propertyLastSequenceNumber Obsolete.
Gets the latest sequence number used by the Database. Every new Revision is assigned a new sequence number, so this property increases monotonically as changes are made to the Database. This can be used to check whether the Database has changed between two points in time.
Public propertyManager
Gets the Manager that owns this Database.
Public propertyMaxRevTreeDepth Obsolete.
Maximum depth of a document's revision tree (or, max length of its revision history.) Revisions older than this limit will be deleted during a -compact: operation.
Public propertyName
Gets the Database name.
Public propertyPersistentCookieStore Obsolete.
Gets the container the holds cookie information received from the remote replicator
Public propertyTotalDataSize Obsolete.
Gets the total size of the database on the filesystem.
Top
Methods
  NameDescription
Public methodAsQueryable
Returns a rudimentary LINQ queryable database
Public methodChangeEncryptionKey
Change the encryption key used to secure this database
Public methodClose
Closes the database asynchronously
Public methodCompact
Compacts the Database file by purging non-current Revisions and deleting unused Attachments.
Public methodCreateAllDocumentsQuery
Creates a Query that matches all Documents in the Database.
Public methodCreateDocument
Creates a Document with a unique id.
Public methodCreatePullReplication
Creates a new Replication that will pull from the source Database at the given url.
Public methodCreatePushReplication
Creates a new Replication that will push to the target Database at the given url.
Public methodDatabaseStorageChanged
Public methodDelete
Deletes the Database.
Public methodDeleteLocalDocument
Deletes the local Document with the given id.
Public methodDispose
Releases all resource used by the Database object.
Public methodGetDocument
Gets or creates the Document with the given id.
Public methodGetDocumentCount
Gets the number of Document in the Database.
Public methodGetExistingDocument
Gets the Document with the given id, or null if it does not exist.
Public methodGetExistingLocalDocument
Gets the local document with the given id, or null if it does not exist.
Public methodGetExistingView
Gets the View with the given name, or null if it does not exist.
Public methodGetFilter
Returns the ValidateDelegate for the given name, or null if it does not exist.
Public methodGetLastSequenceNumber
Gets the latest sequence number used by the Database. Every new Revision is assigned a new sequence number, so this property increases monotonically as changes are made to the Database. This can be used to check whether the Database has changed between two points in time.
Public methodGetMaxRevTreeDepth
Maximum depth of a document's revision tree (or, max length of its revision history.) Revisions older than this limit will be deleted during a -compact: operation.
Public methodGetTotalDataSize
Gets the total size of the database on the filesystem.
Public methodGetValidation
Gets the ValidateDelegate for the given name, or null if it does not exist.
Public methodGetView
Gets or creates the View with the given name. New Views won't be added to the Database until a map function is assigned.
Public methodPutLocalDocument
Sets the contents of the local Document with the given id. If properties is null, the Document is deleted.
Public methodRunAsync
Runs the RunAsyncDelegate asynchronously.
Public methodRunInTransaction
Runs the delegate within a transaction. If the delegate returns false, the transaction is rolled back.
Public methodSetFilter
Sets the ValidateDelegate for the given name. If delegate is null, the filter with the given name is deleted. Before a Revision is replicated via a push Replication, its filter delegate is called and given a chance to exclude it from the Replication.
Public methodSetMaxRevTreeDepth
Sets the maximum depth of a document's revision tree (or, max length of its revision history.) Revisions older than this limit will be deleted during a -compact: operation.
Public methodSetValidation
Sets the validation delegate for the given name. If delegate is null, the validation with the given name is deleted. Before any change to the Database is committed, including incoming changes from a pull Replication, all of its validation delegates are called and given a chance to reject it.
Public methodStorageExitedTransaction
Public methodToString
Returns a String that represents the current Database.
(Overrides ObjectToString.)
Top
Events
  NameDescription
Public eventChanged
Event handler delegate that will be called whenever a Document within the Database changes.
Top
See Also