From c83d31a3408469e45aabbefee369aa4bd64e453e Mon Sep 17 00:00:00 2001 From: Jason David Davies Date: Thu, 27 May 2010 23:00:09 +0000 Subject: 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 --- share/www/script/jquery.couch.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'share') 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" ); -- cgit v1.2.3