I am able to create new documents using CouchDB::Client as well as able to verify if any doc is present. What i am not able to do is to retrieve the contents of any doc. The reason is i am not able to get the correct syntax which is to be used for it. I am not a perl genius so taking a look at the source code did not help me either.
use warnings; use CouchDB::Client; my $c = CouchDB::Client->new(uri => 'http://127.0.0.1:5984/'); my $db = $c->newDB('test'); my $doc = $db->newDoc('12345', undef, {'foo'=>'bar'})->create; if ($db->docExists('12345')){ print "hello\n"; } #my $doc=CouchDB::Client::Doc->new($db); print $doc->retrieve('12345');
I am able to create document but then i need to comment that line on next run as this will give storage error. But after commenting i have no way to retrieve the doc as i have no object remaining. But this should not be the constraint as there should be a way to retrieve doc using the db object by giving id to it.
In reply to Retrieving content from couchdb using CouchDB::Client by shivam99aa
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |