KiokuDB::Backend::Role::TXN - Backend level transaction support.
package MyBackend; use Moose; with qw( KiokuDB::Backend KiokuDB::Backend::Role::TXN ); sub txn_begin { ... } sub txn_commit { ... } sub txn_rollback { ... }
This API is inspired by standard database transactions much like you get with DBI.
This is the low level interface required by "txn_do" in KiokuDB.
This method should evaluate the code reference in the context of a transaction, inside an eval. If any errors are caught the transaction should be aborted, otherwise it should be committed. This is much like "txn_do" in DBIx::Class::Schema.
eval
The rollback callback should be fired when the transaction will be aborted.
rollback
Begin a new transaction.
This method can return a transaction handle that will later be passed to txn_commit or txn_rollback as necessary.
txn_commit
txn_rollback
The current handle will be passed to nested calls to txn_begin.
txn_begin
Commit the transaction.
Rollback the transaction.
To install KiokuDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KiokuDB
CPAN shell
perl -MCPAN -e shell install KiokuDB
For more information on module installation, please visit the detailed CPAN module installation guide.