A new db is specified like this: db = $.couch.db("spec_db");
It then has to be created before you can do anything with it.
Does a POST request to the db and "_compact". Compacts the db.
{"ok" : true}
Does a POST request to the db and "_view_cleanup". Cleans old view output from disk.
{"ok" : true}
Does a POST request to the db, "_compact" and the groupname. Cleans old output from this view from disk. Raises a 404 error when the design doesn't exist.
{"ok" : true}
Creates the db.
The db is created, with update sequence 0.
{"ok" : true}
Deletes the db.
The db is deleted.
{"ok" : true}
Does a GET request to the db.
db_name, doc_count, doc_del_count, update_seq, purge_seq, compact_running, disk_size, instance_start_time, disk_format_version
Does a GET request to "_all_docs" with the options as params. Options can include the Querying Options of the HTTP view API.
The total number of rows and an array of rows, each row containing one result of the query.
Applies the mandatory map function and the optional reduce function to the contents of database and returns the results. Options can include the Querying Options of the HTTP view API. The language of the query has to be specified when another language than the default JavaScript is used. Erlang views have to be enabled beforehand.
The total number of rows and an array of rows, each row containing one result of the query.
db.query("function(doc) { emit(doc._id, null); }", null, "javascript", {})
Applies the view to the contents of database and returns the results. When there are no keys given, it does a GET request to the view path with the options as params, or a POST request with the keys as body. Options can include the Querying Options of the HTTP view API. The result can be specified more by querying only for single keys. Keys are part of the options hash.
The total number of rows and an array of rows, each row containing one result of the query, or null when the view doesn't exist.
db.view('spec_db/viewname', {"include_docs":"true", "keys":["456"]})
Does a GET request to the db and the propName with the options as params.
The property value.
Does a PUT request to the db and the propName with the options as params and the propValue as body.
The db property is set to the specified value.
{"ok" : true}