Net::CouchDb::Database - Interface to a CouchDb database
Represents a single couchdb database.
This should be created via Net::CouchDb's database method.
Get a document with a specific ID, takes additional parameters for revision.
If rev is provided returns a list of the specified revisions,
Will pass other parameters on to CouchDb, see http://wiki.apache.org/couchdb/HttpDocumentApi for details of other parameters.
Add or update a named document.
(put and post are similar, put is only useful if you want to ensure any document inserted already has an id specified.)
Add or update a document.
Create a new empty document in memory. Takes an optional hash reference with contents. Returns a Net::CouchDb::Document object, which you should call the ->create method on to actually insert the data.
create
my $doc = $db->new_doc; $doc->subject = "Test"; $doc->create or die "Failed to create";
Performs a bulk insert/update of all the documents referenced by the given array reference.
Updates the revisions and ids in the given documents.
(NB: this uses the new style bulk request, see http://wiki.apache.org/couchdb/HttpDocumentApi for details.)
Delete a document with the given ID
Return the URI of this database.
Return the database information (doc_count, update_seq).
Return a list of all documents.
Make a REST/JSON call, automatically adding the correct database to the URI. See Net::CouchDb::call for parameters.
David Leadbeater, <dgl at dgl dot cx>
<dgl at dgl dot cx>
Copyright 2007 David Leadbeater, all rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Net::CouchDb, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Net::CouchDb
CPAN shell
perl -MCPAN -e shell install Net::CouchDb
For more information on module installation, please visit the detailed CPAN module installation guide.