couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jch...@apache.org
Subject svn commit: r939443 - /couchdb/trunk/share/www/script/jquery.couch.js
Date Thu, 29 Apr 2010 18:33:38 GMT
Author: jchris
Date: Thu Apr 29 18:33:37 2010
New Revision: 939443

URL: http://svn.apache.org/viewvc?rev=939443&view=rev
Log:
list functionality for jquery.couch.js

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=939443&r1=939442&r2=939443&view=diff
==============================================================================
--- couchdb/trunk/share/www/script/jquery.couch.js [utf-8] (original)
+++ couchdb/trunk/share/www/script/jquery.couch.js [utf-8] Thu Apr 29 18:33:37 2010
@@ -352,6 +352,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