Notice: Undefined index: HTTP_ACCEPT in /var/local/cache/midgard/midgard/31-100-217-0.php(66) : eval()'d code on line 11

New release of the jqCouch library

This entry was posted on 2007-12-04 20:57:19 EET in 60° 43.992 N 24° 46.302 E Riihimäki, FI to

I'm happy to announce the release of totally rewritten jqCouch -library. Major changes were made so this version is no longer compatible with the older release. Talking with CouchDB is now done through 3 type of connections.

db -connection:
This is used to handle all those Database related tasks such as creating and deleting.
Available methods:

  • exists
  • info
  • create
  • del
  • all
  • restart
doc -connection:
This is used to handle all those Document related tasks. Creating, Updating, Deleting documents.
Available methods:
  • get
  • all
  • save
  • bulk_save
  • del
  • (post)
  • (put)
view -connection:
This handles all actions related to Views.
Available methods:
  • exists
  • info
  • get
  • save
  • del
  • temp
  • (put)
All result methods (methods that return something from the database) return their results through wrapper which can be extended with own custom method. This can be used to render the results to something else or execute other actions as soon as the query is ready. One can register this mapping method globally, for connection or for each method separately.

Some basic usage examples:

creating connections:
//Database connection
var dbc = $.jqCouch.connection('db');
//Document connection with custom config
var dc = $.jqCouch.connection('doc', {cache:true});
//View connection with connection specific mapping function
var vc = $.jqCouch.connection('view', function(data){return data;});
//Database connection with connection specific mapping function and custom settings
var dbc = $.jqCouch.connection('db', function(data){return data;}, {cache:true});

Setting global configurations:
$.jqCouch.set_defaults({
    cache: true
});
Creating new document (One liner):
var revision = $.jqCouch.connection('doc').save('doc_db', {id: "0", title: 'test'})._rev;


More info can be found from the source of the library and the testsuite included in the release This library is part of the Ajatus - Distributed CRM

For some reason the jQuery website is not working properly and it seem that it has reverted to some old backup as the release no longer exists there. Here is a local link to the release: jqcouch-2.0.1.zip

Back