couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kxe...@apache.org
Subject [01/50] jquery-couch commit: updated refs/heads/import-master to 66dbcbf
Date Tue, 01 Apr 2014 08:52:06 GMT
Repository: couchdb-jquery-couch
Updated Branches:
  refs/heads/import-master [created] 66dbcbfc1


enable multi-key-get in jquery.couch.js, patch by Benoit Chesneau, closes COUHCDB-376

git-svn-id: https://svn.apache.org/repos/asf/couchdb/trunk@814364 13f79535-47bb-0310-9956-ffa450edef68


Project: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/commit/ec1fff9e
Tree: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/tree/ec1fff9e
Diff: http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/diff/ec1fff9e

Branch: refs/heads/import-master
Commit: ec1fff9e1d034111f95dfd528cd36e6b3d05401d
Parents: fd400b2
Author: Jan Lehnardt <jan@apache.org>
Authored: Sun Sep 13 17:53:57 2009 +0000
Committer: Alexander Shorin <kxepal@gmail.com>
Committed: Sun Sep 13 17:53:57 2009 +0000

----------------------------------------------------------------------
 jquery.couch.js | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb-jquery-couch/blob/ec1fff9e/jquery.couch.js
----------------------------------------------------------------------
diff --git a/jquery.couch.js b/jquery.couch.js
index 8e51727..5d189b2 100644
--- a/jquery.couch.js
+++ b/jquery.couch.js
@@ -249,8 +249,20 @@
           );
         },
         view: function(name, options) {
-          name = name.split('/');
+          var name = name.split('/');
+          var options = options || {};
+          var type = "GET";
+          var data= null;
+          if (options["keys"]) {
+            type = "POST";
+            var keys = options["keys"];
+            delete options["keys"];
+            data = toJSON({ "keys": keys });
+            console.log(data);
+          }
           ajax({
+              type: type,
+              data: data,
               url: this.uri + "_design/" + name[0] +
                    "/_view/" + name[1] + encodeOptions(options)
             },


Mime
View raw message