NAME

Egg::Plugin::DBI::Transaction - Plugin that supports transaction of DBI.

SYNOPSIS

use Egg qw/ DBI::Transaction /;

# It accesses the data base handler.
$e->dbh;

# Committing then and there.
$e->dbh_commit;

# Rollback then and there.
$e->dbh_rollback;

# Committing is issued at the end of processing.
$e->commit_ok(1);

# The rollback is issued at the end of processing.
$e->rollback(1);

DESCRIPTION

This plugin semi-automates the Transaction processing of DBI.

Rollback is done without fail at the end of processing usually.

commit is done when 'Commit_ok' is effective.

When DBI->dbh->{AutoCommit} is effective, any method of the transaction system is not done.

METHODS

dbh

The data base handler is returned.

dbh_commit

It commits when it is called and it reports with $e->debug_out.

commit_ok ( [BOOL] )

The flag to commit it at the end of processing is hoisted.

* It influences rollback_ok.

dbh_rollback

When it is called, it reports on the rollback by doing $e->debug_out.

rollback_ok ( [BOOL] )

The flag to do the rollback at the end of processing is hoisted.

is_autocommit

The state of DBI->dbh->{AutoCommit} is returned.

SEE ALSO

DBI, Ima::DBI, Egg::Model::DBI, Egg::Plugin::DBI::Easy, Egg::Release,

AUTHOR

Masatoshi Mizuno <lushe@cpan.org>

COPYRIGHT

Copyright (C) 2007 by Bee Flag, Corp. <http://egg.bomcity.com/>, All Rights Reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.6 or, at your option, any later version of Perl 5 you may have available.