Skip to content

Commit

Permalink
more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
John Beppu committed Jul 12, 2008
1 parent d8fc2d0 commit 895b319
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/AnyEvent/CouchDB.pm
Expand Up @@ -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";
Expand Down Expand Up @@ -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>
Expand Down
70 changes: 70 additions & 0 deletions lib/AnyEvent/CouchDB/DB.pm
Expand Up @@ -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

0 comments on commit 895b319

Please sign in to comment.