Interface CouchDBDocumentManager
- All Superinterfaces:
AutoCloseable,org.eclipse.jnosql.communication.semistructured.DatabaseManager
public interface CouchDBDocumentManager
extends org.eclipse.jnosql.communication.semistructured.DatabaseManager
A CouchDB-specific extension of
DatabaseManager that provides an additional
feature to count the number of documents in the database.
This interface offers a count() method to retrieve the total number of documents
stored in the CouchDB database. It extends the DatabaseManager to align with
Eclipse JNoSQL's database management abstraction.
Example Usage:
@Inject
private CouchDBDocumentManager documentManager;
long totalDocuments = documentManager.count();
- See Also:
-
DatabaseManager
-
Method Summary
Modifier and TypeMethodDescriptionlongcount()Retrieves the total number of documents in the database.Methods inherited from interface org.eclipse.jnosql.communication.semistructured.DatabaseManager
close, count, count, delete, deleteAndCount, exists, insert, insert, insert, insert, name, prepare, prepare, query, query, select, selectCursor, singleResult, update, update, update
-
Method Details
-
count
long count()Retrieves the total number of documents in the database. Note: Not all CouchDB implementations support this feature. If the operation is not supported, anUnsupportedOperationExceptionwill be thrown.- Returns:
- the total number of documents in the database
- Throws:
UnsupportedOperationException- if the database does not support counting documents
-