Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

more docs

  • Loading branch information...
commit 895b319a90f7716ae1d2a5580899238510e9212f 1 parent d8fc2d0
John Beppu authored
Showing with 90 additions and 0 deletions.
  1. +20 −0 lib/AnyEvent/CouchDB.pm
  2. +70 −0 lib/AnyEvent/CouchDB/DB.pm
View
20 lib/AnyEvent/CouchDB.pm
@@ -67,7 +67,9 @@ AnyEvent::CouchDB - a non-blocking CouchDB client based on jquery.couch.js
=head1 SYNOPSIS
+ use AnyEvent::CouchDB;
use Data::Dump 'pp';
+
my $couch = AnyEvent::CouchDB->new('http://localhost:5984/');
print pp( $couch->all_dbs->recv ), "\n";
print pp( $couch->info->recv ), "\n";
@@ -97,6 +99,24 @@ AnyEvent::CouchDB is a non-blocking CouchDB client based on jquery.couch.js.
=head1 SEE ALSO
+=head2 Related Modules
+
+L<AnyEvent::CouchDB::DB>, L<AnyEvent::HTTP>, L<AnyEvent>
+
+=head2 Other CouchDB-related Perl Modules
+
+=head3 Client Libraries
+
+L<Net::CouchDb>
+
+=head3 View Servers
+
+L<CouchDB::View>
+
+=head3 Search Servers
+
+None exist, yet.
+
=head1 AUTHOR
John BEPPU E<lt>beppu@cpan.orgE<gt>
View
70 lib/AnyEvent/CouchDB/DB.pm
@@ -159,3 +159,73 @@ sub view {
}
1;
+
+__END__
+
+=head1 NAME
+
+AnyEvent::CouchDB::DB - an object representing a CouchDB database
+
+=head1 SYNOPSIS
+
+ use AnyEvent::CouchDB;
+ use Data::Dump 'pp';
+
+ my $couch = AnyEvent::CouchDB->new;
+ my $db = $couch->db('database');
+
+ print pp($db->info->recv), "\n";
+ my $cv = $db->save_doc({ just => 'give', me => 'a', hashref => { } });
+ #
+ # do other time-consuming operations
+ #
+ $cv->recv; # when recv returns, the couchdb request finished
+
+=head1 DESCRIPTION
+
+Objects of this class represent a single CouchDB database.
+
+=head1 API
+
+=head2 General
+
+=head3 new
+
+=head3 name
+
+=head3 uri
+
+=head2 Database Level Operations
+
+=head3 create
+
+=head3 drop
+
+=head3 info
+
+=head3 compact
+
+=head2 Document Level Operations
+
+=head3 open_doc
+
+=head3 save_doc
+
+=head3 remove_doc
+
+=head2 Database Queries
+
+=head3 query
+
+Ad-hoc query - give it an arbitrary map and reduce function
+
+=head3 view
+
+View query - use map/reduce functions that have been defined in design
+documents
+
+=head3 search
+
+NOT IMPLEMENTED YET - It'll be a full-text search
+
+=cut
Please sign in to comment.
Something went wrong with that request. Please try again.