summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorJason David Davies <jasondavies@apache.org>2010-05-27 23:00:09 +0000
committerJason David Davies <jasondavies@apache.org>2010-05-27 23:00:09 +0000
commitc83d31a3408469e45aabbefee369aa4bd64e453e (patch)
tree756f3956106e03480c782a45b4458586165fa1ef /share
parent9b7b00743715ea0a1bf3fabfa534845c50514534 (diff)
Add support for multi-document-fetch (via _all_docs) to jquery.couch.js.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@949037 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share')
-rw-r--r--share/www/script/jquery.couch.js15
1 files changed, 13 insertions, 2 deletions
diff --git a/share/www/script/jquery.couch.js b/share/www/script/jquery.couch.js
index 4c42211c..4923dafe 100644
--- a/share/www/script/jquery.couch.js
+++ b/share/www/script/jquery.couch.js
@@ -231,8 +231,19 @@
);
},
allDocs: function(options) {
- ajax(
- {url: this.uri + "_all_docs" + encodeOptions(options)},
+ var type = "GET";
+ var data = null;
+ if (options["keys"]) {
+ type = "POST";
+ var keys = options["keys"];
+ delete options["keys"];
+ data = toJSON({ "keys": keys });
+ }
+ ajax({
+ type: type,
+ data: data,
+ url: this.uri + "_all_docs" + encodeOptions(options)
+ },
options,
"An error occurred retrieving a list of all documents"
);