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