logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Mojo::SQLite::Transaction - Transaction

Attributes

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

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

       Mojo::SQLite::Database object this transaction belongs to. Note that this attribute is weakened.

Author

       Dan Book, "dbook@cpan.org"

Bugs

       Report any issues on the public bugtracker.

Description

       Mojo::SQLite::Transaction is a scope guard for DBD::SQLite transactions used by Mojo::SQLite::Database.

Methods

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

   new
         my $tx = Mojo::SQLite::Transaction->new;
         my $tx = Mojo::SQLite::Transaction->new(db => Mojo::SQLite::Database->new);
         my $tx = Mojo::SQLite::Transaction->new({db => Mojo::SQLite::Database->new});

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

   commit
         $tx->commit;

       Commit transaction.

Name

       Mojo::SQLite::Transaction - Transaction

See Also

       Mojo::SQLite

perl v5.40.1                                       2025-02-18                     Mojo::SQLite::Transaction(3pm)

Synopsis

         use Mojo::SQLite::Transaction;

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

See Also