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] Commented: (COUCHDB-751) [patch] to add ability to do a list function GET / POST to jquery.couch.js
Date Mon, 26 Apr 2010 12:14:32 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12860903#action_12860903
] 

Jarrod Roberson commented on COUCHDB-751:
-----------------------------------------

I detail the patch here http://www.vertigrated.com/blog/2010/04/list-query-support-couchapp/

> [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
>         Attachments: jquery.couch.js
>
>
> 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