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
.
Registers to the change stream of this database with potential filter and since some revision.
Registers to the change stream of this database with potential filter and since some revision. If no revision is given changes that occurred before the connection was established are not sent
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
The couchdb instance this database belongs to
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 retry credit
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 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
Indicates whether this database exists
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 current revision of the document if it exists
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
Returns the raw repsentation of the document identified by the given id if it exists
Returns the information about this database
The database name
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
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 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
The serializer used by this database
The merge strategy
Returns a temporary view of this database, specified by the ViewDoc
.
Gives the user access to the different operations available on a database. Among other operations this is the key class to get access to the documents of this database.
It also exposes the change handler interface, that allows people to react to change notifications. This is a low-level API, that handles raw Json objects