You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ngcp-panel/lib/NGCP/Panel/Model/InterceptDB.pm

24 lines
420 B

package NGCP::Panel::Model::InterceptDB;
use strict;
use warnings;
use base 'Catalyst::Model::DBIC::Schema';
__PACKAGE__->config(
connect_info => [],
);
sub set_transaction_isolation {
my ($self,$level) = @_;
return $self->storage->dbh_do(
sub {
my ($storage, $dbh, @args) = @_;
$dbh->do("SET TRANSACTION ISOLATION LEVEL " . $args[0]);
},
$level,
);
}
1;