DB-CouchDB-Schema
view release on metacpan or search on metacpan
lib/DB/CouchDB.pm view on Meta::CPAN
257258259260261262263264265266267268269270271272273274275276277}
=head2 update_doc
Updates a doc in the database.
my $result = $db->update_doc($docname, $doc) #returns a DB::CouchDB::Result object
=cut
sub
update_doc {
my
$self
=
shift
;
my
$name
=
shift
;
my
$doc
=
shift
;
my
$jdoc
=
$self
->json()->encode(
$doc
);
return
DB::CouchDB::Result->new(
$self
->_call(
PUT
=>
$self
->_uri_db_doc(
$name
),
$jdoc
));
}
=head2 delete_doc
Deletes a doc in the database. you must supply a rev parameter to represent the
( run in 0.269 second using v1.01-cache-2.11-cpan-e5176c747c2 )