DBIx/Class/Storage/DBI/ODBC/Firebird.pm

filter: Statementstmt 64.2% 18 / 28 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 54.5% 6 / 11 Podpod n/a totaltotal 55.8% 24 / 43 CC 3 SCAR 10.2
CC
3
Cov
56%
__ANON__
6.0
__ANON__
6.0
__ANON__
2.0
CRAP 2.8
« DBIx/Class/Storage/DBI/AutoCast.pm ↑ Summary DBIx/Class/ResultSetManager.pm »
1 package DBIx::Class::Storage::DBI::ODBC::Firebird;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 use base qw/
6 DBIx::Class::Storage::DBI::ODBC
7 DBIx::Class::Storage::DBI::Firebird::Common
8 1 ▶/;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 1 ▶use mro 'c3';
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Try::Tiny;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 =head1 NAME
14  
15 DBIx::Class::Storage::DBI::ODBC::Firebird - Driver for using the Firebird RDBMS
16 through ODBC
17  
18 =head1 DESCRIPTION
19  
20 Most functionality is provided by
21 L<DBIx::Class::Storage::DBI::Firebird::Common>, see that driver for details.
22  
23 To build the ODBC driver for Firebird on Linux for unixODBC, see:
24  
25 L<http://www.firebirdnews.org/?p=1324>
26  
27 This driver does not suffer from the nested statement handles across commits
28 issue that the L<DBD::InterBase|DBIx::Class::Storage::DBI::InterBase> or the
29 L<DBD::Firebird|DBIx::Class::Storage::DBI::Firebird> based driver does. This
30 makes it more suitable for long running processes such as under L<Catalyst>.
31  
32 =cut
33  
34 # batch operations in DBD::ODBC 1.35 do not work with the official ODBC driver
35 sub _run_connection_actions {
36 0 ▶ my $self = shift;
Subroutine __ANON__: not called CC=2 SCAR=17.9
37  
38 0 ▶ if ($self->_dbh_get_info('SQL_DRIVER_NAME') eq 'OdbcFb') {
Branch: 1 branch
BranchTrueFalseTotal
if ($self->_dbh_get_info("SQL_DRIVER_NAME") eq "OdbcFb") 0 0 0
39 0 $self->_disable_odbc_array_ops;
40 }
41  
42 0 return $self->next::method(@_);
43 }
44  
45 # releasing savepoints doesn't work for some reason, but that shouldn't matter
46 0 ▶sub _exec_svp_release { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
47  
48 sub _exec_svp_rollback {
49 0 ▶ my ($self, $name) = @_;
Subroutine __ANON__: not called CC=1 SCAR=6.9
50  
51 try {
52 0 ▶ $self->_dbh->do("ROLLBACK TO SAVEPOINT $name")
Subroutine __ANON__: not called CC=1 SCAR=6.9
53 }
54 catch {
55 # Firebird ODBC driver bug, ignore
56 0 ▶ if (not /Unable to fetch information about the error/) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
if (not /Unable to fetch information about the error/) 0 0 0
57 0 $self->throw_exception($_);
58 }
59 0 };
60 }
61  
62 =head1 AUTHOR
63  
64 See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
65  
66 =head1 LICENSE
67  
68 You may distribute this code under the same terms as Perl itself.
69  
70 =cut
71 # vim:sts=2 sw=2:
« DBIx/Class/Storage/DBI/AutoCast.pm ↑ Summary DBIx/Class/ResultSetManager.pm »