| Database Class | 
 Inheritance Hierarchy
Inheritance HierarchyNamespace: Couchbase.Lite
 Syntax
Syntaxpublic sealed class Database : IDisposable
The Database type exposes the following members.
 Constructors
Constructors Properties
Properties| Name | Description | |
|---|---|---|
|  | Config | 
            Gets the configuration that were used to create the database
             | 
|  | Count | 
            Gets the total number of documents in the database
             | 
|  | Item | 
            Bracket operator for retrieving DocumentFragment objects
             | 
|  | Name | 
            Gets the name of the database
             | 
|  | Path | 
            Gets the path on disk where the database exists
             | 
 Methods
Methods| Name | Description | |
|---|---|---|
|  | AddChangeListener(EventHandlerDatabaseChangedEventArgs) | 
            Adds a change listener for the changes that occur in this database.  Signatures
            are the same as += style event handlers.
             | 
|  | AddChangeListener(TaskScheduler, EventHandlerDatabaseChangedEventArgs) | 
            Adds a change listener for the changes that occur in this database.  Signatures
            are the same as += style event handlers, but this signature allows the use of
            a custom task scheduler, if desired.
             | 
|  | AddDocumentChangeListener(String, EventHandlerDocumentChangedEventArgs) | 
            Adds a listener for changes on a certain document (by ID).
             | 
|  | AddDocumentChangeListener(String, TaskScheduler, EventHandlerDocumentChangedEventArgs) | 
            Adds a listener for changes on a certain document (by ID).
             | 
|  | Close | 
            Closes the database
             | 
|  | Compact | 
            Performs a manual compaction of this database, removing old irrelevant data
            and decreasing the size of the database file on disk
             | 
|   | Copy | 
            Copies a database from the given path to be used as the database with
            the given name and configuration
             | 
|  | CreateIndex | 
            Creates an index of the given type on the given path with the given configuration
             | 
|  | Delete | 
            Deletes the database
             | 
|  | Delete(Document) | 
            Deletes the given Document from the database
             | 
|   | Delete(String, String) | 
            Deletes the contents of a database with the given name in the
            given directory
             | 
|  | DeleteIndex | 
            Deletes the index with the given name
             | 
|  | Dispose | 
            Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
             | 
|  | Equals | Determines whether the specified object is equal to the current object.(Overrides ObjectEquals(Object).) | 
|   | Exists | 
            Returns whether or not a database with the given name
            exists in the given directory
             | 
|  | Finalize | 
            Finalizer
            (Overrides ObjectFinalize.) | 
|  | GetDocument | 
            Gets the Document with the specified ID
             | 
|  | GetHashCode | Serves as the default hash function. (Overrides ObjectGetHashCode.) | 
|  | GetIndexes | 
            Gets a list of index names that are present in the database
             | 
|  | GetType | Gets the Type of the current instance.(Inherited from Object.) | 
|  | InBatch | 
            Runs the given batch of operations as an atomic unit
             | 
|  | Purge | 
            Purges the given Document from the database.  This leaves
            no trace behind and will not be replicated
             | 
|  | RemoveChangeListener | 
            Removes a database changed listener by token
             | 
|  | Save | 
            Saves the given MutableDocument into this database
             | 
|  | SetEncryptionKey | 
            Sets the encryption key for the database.  If null, encryption is
            removed.
             | 
|   | SetLogLevel | 
            Sets the log level for the given domains(s)
             | 
|  | ToString | Returns a string that represents the current object.(Overrides ObjectToString.) | 
 See Also
See Also