File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed
jnosql-couchdb/src/main/java/org/eclipse/jnosql/databases/couchdb/communication Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change 1919import org .eclipse .jnosql .communication .semistructured .DatabaseManager ;
2020
2121/**
22- * A couchdb extension where it does provide a {@link CouchDBDocumentManager#count()} feature.
22+ * A CouchDB-specific extension of {@link DatabaseManager} that provides an additional
23+ * feature to count the number of documents in the database.
24+ * <p>
25+ * This interface offers a {@code count()} method to retrieve the total number of documents
26+ * stored in the CouchDB database. It extends the {@link DatabaseManager} to align with
27+ * Eclipse JNoSQL's database management abstraction.
28+ * </p>
29+ *
30+ * Example Usage:
31+ * <pre>{@code
32+ * @Inject
33+ * private CouchDBDocumentManager documentManager;
34+ *
35+ * long totalDocuments = documentManager.count();
36+ * }</pre>
37+ *
38+ * @see DatabaseManager
2339 */
2440public interface CouchDBDocumentManager extends DatabaseManager {
2541
2642 /**
27- * Returns the number of elements of database
43+ * Retrieves the total number of documents in the database.
44+ * Note: Not all CouchDB implementations support this feature. If the operation is not
45+ * supported, an {@link UnsupportedOperationException} will be thrown.
2846 *
29- * @return the number of elements
30- * @throws UnsupportedOperationException when the database dot not have support
47+ * @return the total number of documents in the database
48+ * @throws UnsupportedOperationException if the database does not support counting documents
3149 */
3250 long count ();
3351}
You can’t perform that action at this time.
0 commit comments