Commit | Line | Data |
dff4c3a3 |
1 | package DBIx::Class::Storage::DBI::ODBC::Firebird; |
2 | |
3 | use strict; |
4 | use warnings; |
aca3b4c3 |
5 | use base qw/ |
6 | DBIx::Class::Storage::DBI::ODBC |
7 | DBIx::Class::Storage::DBI::Firebird::Common |
8 | /; |
dff4c3a3 |
9 | use mro 'c3'; |
e02b39b4 |
10 | use Try::Tiny; |
ddcc02d1 |
11 | use DBIx::Class::_Util 'dbic_internal_try'; |
e02b39b4 |
12 | use namespace::clean; |
dff4c3a3 |
13 | |
dff4c3a3 |
14 | =head1 NAME |
15 | |
16 | DBIx::Class::Storage::DBI::ODBC::Firebird - Driver for using the Firebird RDBMS |
17 | through ODBC |
18 | |
d1fc96c7 |
19 | =head1 DESCRIPTION |
dff4c3a3 |
20 | |
e46df41a |
21 | Most functionality is provided by |
22 | L<DBIx::Class::Storage::DBI::Firebird::Common>, see that driver for details. |
dff4c3a3 |
23 | |
90489c23 |
24 | To build the ODBC driver for Firebird on Linux for unixODBC, see: |
25 | |
26 | L<http://www.firebirdnews.org/?p=1324> |
27 | |
d1fc96c7 |
28 | This driver does not suffer from the nested statement handles across commits |
a870aa85 |
29 | issue that the L<DBD::InterBase|DBIx::Class::Storage::DBI::InterBase> or the |
30 | L<DBD::Firebird|DBIx::Class::Storage::DBI::Firebird> based driver does. This |
31 | makes it more suitable for long running processes such as under L<Catalyst>. |
d1fc96c7 |
32 | |
1ae0a36c |
33 | =cut |
34 | |
3edfebff |
35 | # batch operations in DBD::ODBC 1.35 do not work with the official ODBC driver |
5c6696c8 |
36 | sub _run_connection_actions { |
3edfebff |
37 | my $self = shift; |
38 | |
3edfebff |
39 | if ($self->_dbh_get_info('SQL_DRIVER_NAME') eq 'OdbcFb') { |
11f7049f |
40 | $self->_disable_odbc_array_ops; |
3edfebff |
41 | } |
5c6696c8 |
42 | |
43 | return $self->next::method(@_); |
3edfebff |
44 | } |
45 | |
e02b39b4 |
46 | # releasing savepoints doesn't work for some reason, but that shouldn't matter |
90d7422f |
47 | sub _exec_svp_release { 1 } |
5c6ed0b5 |
48 | |
90d7422f |
49 | sub _exec_svp_rollback { |
e02b39b4 |
50 | my ($self, $name) = @_; |
51 | |
ddcc02d1 |
52 | dbic_internal_try { |
e02b39b4 |
53 | $self->_dbh->do("ROLLBACK TO SAVEPOINT $name") |
54 | } |
55 | catch { |
56 | # Firebird ODBC driver bug, ignore |
57 | if (not /Unable to fetch information about the error/) { |
58 | $self->throw_exception($_); |
59 | } |
60 | }; |
61 | } |
62 | |
a2bd3796 |
63 | =head1 FURTHER QUESTIONS? |
dff4c3a3 |
64 | |
a2bd3796 |
65 | Check the list of L<additional DBIC resources|DBIx::Class/GETTING HELP/SUPPORT>. |
dff4c3a3 |
66 | |
a2bd3796 |
67 | =head1 COPYRIGHT AND LICENSE |
68 | |
69 | This module is free software L<copyright|DBIx::Class/COPYRIGHT AND LICENSE> |
70 | by the L<DBIx::Class (DBIC) authors|DBIx::Class/AUTHORS>. You can |
71 | redistribute it and/or modify it under the same terms as the |
72 | L<DBIx::Class library|DBIx::Class/COPYRIGHT AND LICENSE>. |
dff4c3a3 |
73 | |
dff4c3a3 |
74 | |
75 | =cut |
a2bd3796 |
76 | |
e02b39b4 |
77 | # vim:sts=2 sw=2: |
f3d7b702 |
78 | |
79 | 1; |