I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-05-31 18:38:50-07 by pmarquess in response to 5272
Re: How to use transactions with cursors?
Here is the idiom translated
$env = new BerkeleyDB::Env... $db = tie %hash, BerkeleyDB::Hash,... -Env => $env, ... $txn = $env->txn_begin() $db->Txn($txn); $cursor = $db->create_cursor(); # do some stuff undef $cursor; $txn->commit();
The secret is this line
$db->Txn($txn);
It will assocuiate the transaction with all operations on the database behind the scenes.
Paul
Direct Responses: Write a response