diff options
author | John Christopher Anderson <jchris@apache.org> | 2008-11-14 03:47:21 +0000 |
---|---|---|
committer | John Christopher Anderson <jchris@apache.org> | 2008-11-14 03:47:21 +0000 |
commit | d32d8acff4bac6f51b87ddef7091c04ff7245d40 (patch) | |
tree | ab7cb32ee8e54c971d8eb28dc6881fad18aae678 /share/www/script/couch.js | |
parent | 41e60ecc969649e9c1deee5d293f2451e8238ac6 (diff) |
fix for _all_docs_by_seq with include_docs
git-svn-id: https://svn.apache.org/repos/asf/incubator/couchdb/trunk@713914 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www/script/couch.js')
-rw-r--r-- | share/www/script/couch.js | 14 |
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); |