You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Jarrod Roberson (JIRA)" <ji...@apache.org> on 2010/04/26 14:12:32 UTC
[jira] Created: (COUCHDB-751) [patch] to add ability to do a list
function GET / POST to jquery.couch.js
[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.
[jira] Closed: (COUCHDB-751) [patch] to add ability to do a list
function GET / POST to jquery.couch.js
Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris Anderson closed COUCHDB-751.
----------------------------------
Resolution: Fixed
thanks for the patch! applied in r939443
> [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.
[jira] Commented: (COUCHDB-751) [patch] to add ability to do a list
function GET / POST to jquery.couch.js
Posted by "Jarrod Roberson (JIRA)" <ji...@apache.org>.
[ 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.
[jira] Updated: (COUCHDB-751) [patch] to add ability to do a list
function GET / POST to jquery.couch.js
Posted by "Jarrod Roberson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jarrod Roberson updated COUCHDB-751:
------------------------------------
Attachment: jquery.couch.js
here is the fully editied jquery.couch.js that you can diff against to get the changes.
> [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.