DBIx-Sunny
view release on metacpan or search on metacpan
0.22 2014-05-29T05:49:43Z
- re-packaging with Minilla
- requries DBIx::TransactionManager 0.13. for fork safe
0.21 Wed Dec 5 15:04:58 2012
- add schema txn test
- switch to Module::Build
0.20 Tue Dec 4 14:00:33 2012
- [Schema] Schema does not need weaken in txn_scope
0.19 Tue Dec 4 13:48:22 2012
- fixed cyclic reference bug
0.18 txn_scope is broken. don't use it
0.18 Fri Nov 30 13:03:48 2012
- fixed cyclic reference with txn_scope
0.17 Wed Jun 27 22:16:11 2012
- fixed fill_arrayref() with multiple arrayref binds ( Thank you motemen san)
lib/DBIx/Sunny.pm view on Meta::CPAN
$attr->{pg_enable_utf8} = 1;
}
$class->SUPER::connect($dsn, $user, $pass, $attr);
}
package DBIx::Sunny::db;
our @ISA = qw(DBI::db);
use DBIx::Sunny::Util qw/bind_and_execute expand_placeholder/;
use DBIx::TransactionManager 0.13;
use Scalar::Util qw/weaken/;
sub connected {
my $dbh = shift;
my ($dsn, $user, $pass, $attr) = @_;
$dbh->{RaiseError} = 1;
$dbh->{PrintError} = 0;
$dbh->{ShowErrorStatement} = 1;
$dbh->{AutoInactiveDestroy} = 1;
if ($dsn =~ /^dbi:SQLite:/) {
$dbh->{sqlite_use_immediate_transaction} = 1;
lib/DBIx/Sunny.pm view on Meta::CPAN
$dbh->{private_connect_info} = [@_];
$dbh->SUPER::connected(@_);
}
sub connect_info { $_[0]->{private_connect_info} }
sub txn_scope {
my $self = shift;
if ( ! $self->{private_txt_manager} ) {
$self->{private_txt_manager} = DBIx::TransactionManager->new($self);
weaken($self->{private_txt_manager}->{dbh});
}
$self->{private_txt_manager}->txn_scope(
caller => [caller(0)]
);
}
sub __set_comment {
my $self = shift;
my $query = shift;
( run in 0.664 second using v1.01-cache-2.11-cpan-65fba6d93b7 )