If put is called with data and data._self exists then the document will be updated with the new data.
coll.upsert(id, data, cb)
Atomic create/update. This is to be preferred over .put() which is for backwards compatibility.
coll.get(id, cb)
Gets a document from a collection. Calls back with data stored at id.
coll.delete(id, cb)
Deletes a document from a collection.
coll.query(q, opts, cb)
A simplified query mechanism that builds a sql query based on properties of q. If you want more control use .sqlquery() which takes custom query objects.
q object with properties to query for
opts object
opts.orderby order based on this property
opts.sortby sort by ascending ('asc') or descending ('desc'), default is 'asc'
opts.limit limit the results
opts.offset offset of limited results
Get all documents with the property foo set to 'bar', limit the results to 10 and offset 10.