AnyEvent-CouchDB
view release on metacpan or search on metacpan
lib/AnyEvent/CouchDB.pm view on Meta::CPAN
=head3 $cv = $couch->all_dbs()
This method requests an arrayref that contains the names of all the databases
hosted on the current CouchDB server. It returns an AnyEvent condvar that
you'll be expected to call C<recv> on to get the data back.
=head3 $cv = $couch->info()
This method requests a hashref of info about the current CouchDB server and
returns a condvar that you should call C<recv> on. The hashref that's returned
looks like this:
{
couchdb => 'Welcome',
version => '0.7.3a658574'
}
=head3 $cv = $couch->config()
This method requests a hashref of info regarding the configuration of the
current CouchDB server. It returns a condvar that you should call C<recv> on.
lib/AnyEvent/CouchDB.pm view on Meta::CPAN
# local to remote
$couch->replicate('local_db', 'http://elsewhere/remote_db')->recv
# remote to local
$couch->replicate('http://elsewhere/remote_db', 'local_db')->recv
# local to remote with continuous replication
$couch->replicate('local_db', 'http://elsewhere/remote_db', {continuous => 1})->recv
As usual, this method returns a condvar that you're expected to call C<recv> on.
Doing this will return a hashref that looks something like this upon success:
{
history => [
{
docs_read => 0,
docs_written => 0,
end_last_seq => 149,
end_time => "Thu, 17 Jul 2008 18:08:13 GMT",
missing_checked => 44,
missing_found => 0,
( run in 0.350 second using v1.01-cache-2.11-cpan-64827b87656 )