Class | CouchRest::Database |
In: |
lib/couchrest/core/database.rb
|
Parent: | Object |
bulk_save_cache_limit | [RW] | |
host | [R] | |
name | [R] | |
root | [R] | |
server | [R] | |
uri | [R] |
Create a CouchRest::Database adapter for the supplied CouchRest::Server and database name.
server<CouchRest::Server>: | database host |
name<String>: | database name |
COPY an existing document to a new id. If the destination id currently exists, a rev must be provided. dest can take one of two forms if overwriting: "id_to_overwrite?rev=revision" or the actual doc hash with a ‘_rev’ key
DELETE the document from CouchDB that has the given _id and _rev.
If bulk is true (false by default) the deletion is recorded for bulk-saving (bulk-deletion :) later. Bulk saving happens automatically when bulk_save_cache limit is exceded, or on the next non bulk save.
Replicates via "pulling" from another database to this database. Makes no attempt to deal with conflicts.
Save a document to CouchDB. This will use the _id field from the document as the id for PUT, or request a new UUID from CouchDB, if no _id is present on the document. IDs are attached to documents on the client side because POST has the curious property of being automatically retried by proxies in the event of network segmentation and lost responses.
If bulk is true (false by default) the document is cached for bulk-saving later. Bulk saving happens automatically when bulk_save_cache limit is exceded, or on the next non bulk save.
Query a CouchDB view as defined by a _design document. Accepts paramaters as described in wiki.apache.org/couchdb/HttpViewApi