Click or drag to resize

Database Class

A container for storing and maintaining Couchbase Lite Documents
Inheritance Hierarchy
SystemObject
  Couchbase.LiteDatabase

Namespace:  Couchbase.Lite
Assembly:  Couchbase.Lite (in Couchbase.Lite.dll) Version: 2.0.0-b0074
Syntax
C#
public sealed class Database : IDisposable

The Database type exposes the following members.

Constructors
  NameDescription
Public methodDatabase(String)
Creates a database instance with the given name. Internally it may be operating on the same underlying data as another instance.
Public methodDatabase(Database)
Copy constructor
Public methodDatabase(String, DatabaseOptions)
Creates a database given a name and some options
Top
Properties
  NameDescription
Public propertyConflictResolver
Gets or sets the conflict resolver to use when conflicts arise
Public propertyDocumentCount
Gets the total number of documents in the database
Public propertyItem
Bracket operator for retrieving DocumentFragment objects
Public propertyName
Gets the name of the database
Public propertyOptions
Gets the options that were used to create the database
Public propertyPath
Gets the path on disk where the database exists
Top
Methods
  NameDescription
Public methodClose
Closes the database
Public methodCreateIndex(IListIExpression)
Creates an ValueIndex index on the given path
Public methodCreateIndex(IList, IndexType, IndexOptions)
Creates an index of the given type on the given path with the given options
Public methodCreateReplication(Uri)
Creates a replication with the giveb remote URL
Public methodCreateReplication(Database)
Creates a replication with another local database
Public methodDelete
Deletes the database
Public methodDelete(Document)
Deletes the given Document from the database
Public methodStatic memberDelete(String, String)
Deletes the contents of a database with the given name in the given directory
Public methodDeleteIndex
Deletes an index of the given IndexType on the given propertyPath
Public methodDispose
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Public methodDocumentExists
Checks whether a document with the given ID exists in the database
Public methodEquals (Inherited from Object.)
Public methodStatic memberExists
Returns whether or not a database with the given name exists in the given directory
Protected methodFinalize
Finalizer
(Overrides ObjectFinalize.)
Public methodGetDocument
Gets the Document with the specified ID
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInBatch
Runs the given batch of operations as an atomic unit
Public methodPurge
Purges the given Document from the database. This leaves no trace behind and will not be replicated
Public methodSave
Saves the given Document into this database
Public methodToString (Inherited from Object.)
Top
Events
  NameDescription
Public eventChanged
An event fired whenever the database changes
Top
See Also