NAME
Mojo::mysql::Transaction - Transaction
SYNOPSIS
use Mojo::mysql::Transaction;
my $tx = Mojo::mysql::Transaction->new(dbh => $dbh);
$tx->commit;
DESCRIPTION
Mojo::mysql::Transaction is a cope guard for DBD::mysql transactions used by Mojo::mysql::Database.
ATTRIBUTES
Mojo::mysql::Transaction implements the following attributes.
dbh
my $dbh = $tx->dbh;
$tx = $tx->dbh($dbh);
DBD::mysql database handle this transaction belongs to.
METHODS
Mojo::mysql::Transaction inherits all methods from Mojo::Base and implements the following new ones.
commit
$tx = $tx->commit;
Commit transaction.
new
my $tx = Mojo::mysql::Transaction->new;
Construct a new Mojo::mysql::Transaction object.