GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  MOJO::PG::TRANSACTION (3)

.ds Aq ’

NAME

Mojo::Pg::Transaction - Transaction

CONTENTS

SYNOPSIS



  use Mojo::Pg::Transaction;

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



DESCRIPTION

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

ATTRIBUTES

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

    db



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



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

METHODS

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

    commit



  $tx->commit;



Commit transaction.

    new



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



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

SEE ALSO

Mojo::Pg, Mojolicious::Guides, <http://mojolicious.org>.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 MOJO::PG::TRANSACTION (3) 2016-01-02

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.