couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jarrod Roberson (JIRA)" <j...@apache.org>
Subject [jira] Created: (COUCHDB-751) [patch] to add ability to do a list function GET / POST to jquery.couch.js
Date Mon, 26 Apr 2010 12:12:32 GMT
[patch] to add ability to do a list function GET / POST to jquery.couch.js
--------------------------------------------------------------------------

                 Key: COUCHDB-751
                 URL: https://issues.apache.org/jira/browse/COUCHDB-751
             Project: CouchDB
          Issue Type: Improvement
    Affects Versions: 0.11
            Reporter: Jarrod Roberson
            Priority: Trivial


I added a list function query support to jquery.couch.js. 

        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'
          ); 
        },

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message