++ed by:
BEROV HARRYL

2 PAUSE users
1 non-PAUSE user.

Svetoslav Naydenov

NAME

Mojo::MySQL5::Transaction - Transaction

SYNOPSIS

  use Mojo::MySQL5::Transaction;

  my $tx = Mojo::MySQL5::Transaction->new(db => $db);
  $tx->commit;

DESCRIPTION

Mojo::MySQL5::Transaction is a cope guard for transactions started by $db->begin.

ATTRIBUTES

Mojo::MySQL5::Transaction implements the following attributes.

db

  my $db = $tx->db;
  $tx    = $tx->db(Mojo::MySQL5::Database->new);

Mojo::MySQL5::Database object this transaction belongs to.

METHODS

Mojo::MySQL5::Transaction inherits all methods from Mojo::Base and implements the following ones.

commit

  $tx = $tx->commit;

Commit transaction.

new

  my $tx = Mojo::MySQL5::Transaction->new;
  my $tx = Mojo::MySQL5::Transaction->new(db => Mojo::MySQL5::Database->new);

Construct a new Mojo::MySQL5::Transaction object.

SEE ALSO

Mojo::MySQL5.