couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r954878 - /couchdb/branches/0.11.x/share/www/script/jquery.couch.js
Date Tue, 15 Jun 2010 13:37:41 GMT
Author: jan
Date: Tue Jun 15 13:37:40 2010
New Revision: 954878

URL: http://svn.apache.org/viewvc?rev=954878&view=rev
Log:
Merge r939443 from trunk:

list functionality for jquery.couch.js

Modified:
    couchdb/branches/0.11.x/share/www/script/jquery.couch.js

Modified: couchdb/branches/0.11.x/share/www/script/jquery.couch.js
URL: http://svn.apache.org/viewvc/couchdb/branches/0.11.x/share/www/script/jquery.couch.js?rev=954878&r1=954877&r2=954878&view=diff
==============================================================================
--- couchdb/branches/0.11.x/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/branches/0.11.x/share/www/script/jquery.couch.js [utf-8] Tue Jun 15 13:37:40 2010
@@ -364,6 +364,26 @@
             "An error occurred querying the database"
           );
         },
+        list: function(list, view, options) {
+          var list = list.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 });
+          }
+          ajax({
+              type: type,
+              data: data,
+              url: this.uri + '_design/' + list[0] +
+                   '/_list/' + list[1] + '/' + view + encodeOptions(options)
+              },
+              options, 'An error occured accessing the list'
+          );
+        },
         view: function(name, options) {
           var name = name.split('/');
           var options = options || {};



Mime
View raw message