couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r814364 - /couchdb/trunk/share/www/script/jquery.couch.js
Date Sun, 13 Sep 2009 17:53:57 GMT
Author: jan
Date: Sun Sep 13 17:53:57 2009
New Revision: 814364

URL: http://svn.apache.org/viewvc?rev=814364&view=rev
Log:
enable multi-key-get in jquery.couch.js, patch by Benoit Chesneau, closes COUHCDB-376

Modified:
    couchdb/trunk/share/www/script/jquery.couch.js

Modified: couchdb/trunk/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/couchdb/trunk/share/www/script/jquery.couch.js?rev=814364&r1=814363&r2=814364&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.couch.js [utf-8] Sun Sep 13 17:53:57 2009
@@ -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