Mojo::SQLite::Transaction - Transaction
Contents
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.
Bugs
Report any issues on the public bugtracker.
Copyright And License
Copyright 2015, Dan Book.
This library is free software; you may redistribute it and/or modify it under the terms of the Artistic
License version 2.0.
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;
