Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add allDocuments(int revision) && clearified comments

  • Loading branch information...
commit c3dc8a03526e721c22ff543300f5db9edf3e727c 1 parent 5aad0b0
JanLehnardt authored
Showing with 10 additions and 1 deletion.
  1. +10 −1 src/java/com/fourspaces/couchdb/Database.java
View
11 src/java/com/fourspaces/couchdb/Database.java
@@ -69,7 +69,8 @@ public int getDocumentCount() {
return documentCount;
}
/**
- * The update seq from the initial database load. I'm not sure what this actually is...
+ * The update seq from the initial database load. The update sequence is the 'revision id' of an entire database. Useful for getting all documents in a database since a certain revision
+ * @see getAllDocuments()
* @return
*/
public int getUpdateSeq() {
@@ -83,6 +84,14 @@ public int getUpdateSeq() {
public ViewResults getAllDocuments() {
return view("_all_docs");
}
+
+ /**
+ * Runs "_all_docs_by_update_seq?startkey=revision" view on this database
+ * @return ViewResults - the results of the view... this can be iterated over to get each document.
+ */
+ public ViewResults getAllDocuments(int revision) {
+ return view("_all_docs_by_update_seq?startkey=" + revision);
+ }
/**
* Runs a named view on the database
Please sign in to comment.
Something went wrong with that request. Please try again.