File Coverage

blib/lib/DBIx/Class/Storage/DBI/ODBC/Firebird.pm
Criterion Covered Total %
statement 18 28 64.2
branch 0 4 0.0
condition n/a
subroutine 6 11 54.5
pod n/a
total 24 43 55.8


line stmt bran cond sub pod time code
1             package DBIx::Class::Storage::DBI::ODBC::Firebird;
2              
3 2     2   781 use strict;
  2         5  
  2         48  
4 2     2   9 use warnings;
  2         5  
  2         48  
5 2         240 use base qw/
6             DBIx::Class::Storage::DBI::ODBC
7             DBIx::Class::Storage::DBI::Firebird::Common
8 2     2   9 /;
  2         4  
9 2     2   13 use mro 'c3';
  2         3  
  2         10  
10 2     2   44 use DBIx::Class::_Util qw( dbic_internal_try dbic_internal_catch );
  2         7  
  2         82  
11 2     2   11 use namespace::clean;
  2         4  
  2         9  
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, see that driver for details.
22              
23             To build the ODBC driver for Firebird on Linux for unixODBC, see:
24              
25             L
26              
27             This driver does not suffer from the nested statement handles across commits
28             issue that the L or the
29             L based driver does. This
30             makes it more suitable for long running processes such as under L.
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     0     my $self = shift;
37              
38 0 0         if ($self->_dbh_get_info('SQL_DRIVER_NAME') eq 'OdbcFb') {
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     0     sub _exec_svp_release { 1 }
47              
48             sub _exec_svp_rollback {
49 0     0     my ($self, $name) = @_;
50              
51             dbic_internal_try {
52 0     0     $self->_dbh->do("ROLLBACK TO SAVEPOINT $name")
53             }
54             dbic_internal_catch {
55             # Firebird ODBC driver bug, ignore
56 0 0   0     if (not /Unable to fetch information about the error/) {
57 0           $self->throw_exception($_);
58             }
59 0           };
60             }
61              
62             =head1 FURTHER QUESTIONS?
63              
64             Check the list of L.
65              
66             =head1 COPYRIGHT AND LICENSE
67              
68             This module is free software L
69             by the L. You can
70             redistribute it and/or modify it under the same terms as the
71             L.
72              
73              
74             =cut
75              
76             # vim:sts=2 sw=2:
77              
78             1;