Permalink
Browse files

add allDocuments(int revision) && clearified comments

  • Loading branch information...
1 parent 5aad0b0 commit c3dc8a03526e721c22ff543300f5db9edf3e727c JanLehnardt committed Sep 28, 2007
Showing with 10 additions and 1 deletion.
  1. +10 −1 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

0 comments on commit c3dc8a0

Please sign in to comment.