summaryrefslogtreecommitdiff
path: root/share/www/script/couch.js
diff options
context:
space:
mode:
Diffstat (limited to 'share/www/script/couch.js')
-rw-r--r--share/www/script/couch.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/share/www/script/couch.js b/share/www/script/couch.js
index cc50ad2e..cae0abc9 100644
--- a/share/www/script/couch.js
+++ b/share/www/script/couch.js
@@ -162,6 +162,20 @@ function CouchDB(name, options) {
return JSON.parse(req.responseText);
}
+ this.allDocsBySeq = function(options,keys) {
+ var req = null;
+ if(!keys) {
+ req = request("GET", this.uri + "_all_docs_by_seq" + encodeOptions(options));
+ } else {
+ req = request("POST", this.uri + "_all_docs_by_seq" + encodeOptions(options), {
+ headers: {"Content-Type": "application/json"},
+ body: JSON.stringify({keys:keys})
+ });
+ }
+ maybeThrowError(req);
+ return JSON.parse(req.responseText);
+ }
+
this.compact = function() {
var req = request("POST", this.uri + "_compact");
maybeThrowError(req);