Returns the list of identifiers of the documents in this database
Returns the list of identifiers of the documents in this database
Attaches the given file (given as an input stream) to the given document id.
Attaches the given file (given as an input stream) to the given document id.
If no mime type is given, sohva tries to guess the mime type of the file
itself. It it does not manage to identify the mime type, the file won't be
attached...
This method returns true
iff the file was attached to the document.
Attaches the given file to the given document id.
Attaches the given file to the given document id.
This method returns true
iff the file was attached to the document.
Returns a built-in view of this database, identified by its name.
Returns a built-in view of this database, identified by its name.
E.g. _all_docs
.
Exposes the interface to change stream for this database.
Exposes the interface to change stream for this database.
Requests a database compaction.
Requests a database compaction.
Copies the origin document to the target document.
Copies the origin document to the target document. If the target does not exist, it is created, otherwise it is updated and the target revision must be provided
Creates this database in the couchdb instance if it does not already exist.
Creates this database in the couchdb instance if it does not already exist.
Returns true
iff the database was actually created.
Creates a document in the database and returns its identifier and revision.
Creates a document in the database and returns its identifier and revision.
If the json version of the object has a _id
field, this identifier is used for the document,
otherwise a new one is generated.
Creates a set of documents in the database and returns theirs identifiers and revision.
Creates a set of documents in the database and returns theirs identifiers and revision.
If the json version of an object has a _id
field, this identifier is used for the document,
otherwise a new one is generated.
The credit assigned to the conflict resolver.
The credit assigned to the conflict resolver. It represents the number of times the client tries to save the document before giving up.
Deletes this database in the couchdb instance if it exists.
Deletes this database in the couchdb instance if it exists.
Returns true
iff the database was actually deleted.
Deletes the given attachment for the given docId
Deletes the given attachment for the given docId
Deletes the document identified by the given id from the database.
Deletes the document identified by the given id from the database.
If the document exists it is deleted and the method returns true
,
otherwise returns false
.
Deletes the document from the database.
Deletes the document from the database. The document will only be deleted if the caller provided the last revision
Deletes a bunch of documents at once returning the results for each identifier in the document list.
Deletes a bunch of documents at once returning the results
for each identifier in the document list. One can choose the update strategy
by setting the parameter all_or_nothing
to true
or false
.
Returns a design object that allows user to work with views
Returns a design object that allows user to work with views
Indicates whether this database exists
Indicates whether this database exists
Explains how the query is run by the CouchDB server.
Explains how the query is run by the CouchDB server.
Finds documents using the declarative mango query syntax.
Finds documents using the declarative mango query syntax. See sohva.mango for details.
Finds documents using the declarative mango query syntax.
Finds documents using the declarative mango query syntax. See sohva.mango for details.
Returns the given attachment for the given docId.
Returns the given attachment for the given docId. It returns the mime type if any given in the response and the input stream to read the response from the server.
Returns the document identified by the given id if it exists
Returns the document identified by the given id if it exists
Returns the current revision of the document if it exists
Returns the current revision of the document if it exists
Returns the current revision of the documents
Returns the current revision of the documents
Returns all the documents with given identifiers and of the given type.
Returns all the documents with given identifiers and of the given type. If the document with an identifier exists in the database but has not the required type, it is not added to the result
Gets the current database revision limit.
Gets the current database revision limit.
Exposes the interface for managing indices.
Exposes the interface for managing indices.
Returns the information about this database
Returns the information about this database
Exposes the interface for managing local (non-replicating) documents.
Exposes the interface for managing local (non-replicating) documents.
Returns the revision for each document in the map that are not present in this node.
Returns the revision for each document in the map that are not present in this node.
Patches the document identified by the given identifier in the given revision.
Patches the document identified by the given identifier in the given revision. This will work if the revision is the last one, or if it is not but the automatic conflict manager manages to solve the potential conflicts. The patched revision is returned. If something went wrong, an exception is raised
Given a list of documents and revisions, returns the revision that are missing in this node.
Given a list of documents and revisions, returns the revision that are missing in this node.
Creates or updates the given object as a document into this database
The given object must have an _id
and an optional _rev
fields
to conform to the couchdb document structure.
Creates or updates the given object as a document into this database
The given object must have an _id
and an optional _rev
fields
to conform to the couchdb document structure.
The saved revision is returned. If something went wrong, an exception is raised
Creates or updates a bunch of documents into the database.
Creates or updates a bunch of documents into the database.
Creates or updates the security document.
Creates or updates the security document.
Security documents are special documents with no _id
nor _rev
fields.
Returns the security document of this database if any defined
Returns the security document of this database if any defined
Sets the current database revision limit.
Sets the current database revision limit.
Starts a new replication from source
to target
.
Starts a new replication from source
to target
. if a replication
task already exists for the same source and target, the document is added
but the replication is not started again. The result only contains the identifier
of the actual replication task, not its state.
Stops the replication identified by the given replication document id.
Stops the replication identified by the given replication document id.
if the identifier does not describe the document that started the replication,
it is deleted from the replicator database, but the replication task is not stopped.
It returns true
only if the replication was actually stopped, false
otherwise.
The strategy being used to resolve conflicts
The strategy being used to resolve conflicts
Cleanups old views.
Cleanups old views.
(Since version 2.0.0) Use allDocs
instead
Ensures that all changes are written to disk.
Ensures that all changes are written to disk.
(Since version 2.0.0) You shouldn't need to call this if you have the recommended setting delayed_commits=false
Returns the raw representation of the document identified by the given id if it exists.
Returns the raw representation of the document identified by the given id if it exists.
(Since version 2.0.0) Use getDocById
with return type JsValue
instead
Returns a temporary view of this database, specified by the ViewDoc
.
Returns a temporary view of this database, specified by the ViewDoc
.
(Since version 2.0.0) Temporary view were removed in CouchDB 2.0 and should not be used
Operation only available in CouchDB 1
Operation only available in CouchDB 2
Low-level classes that may break compatibility even between patch and minor versions
A replicator database that allows people to manage replications: