turn on ib_softcommit, savepoint tests now pass for DBD::InterBase
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / ODBC / Firebird.pm
1 package DBIx::Class::Storage::DBI::ODBC::Firebird;
2
3 use strict;
4 use warnings;
5 use base qw/DBIx::Class::Storage::DBI::InterBase/;
6 use mro 'c3';
7
8 =head1 NAME
9
10 DBIx::Class::Storage::DBI::ODBC::Firebird - Driver for using the Firebird RDBMS
11 through ODBC
12
13 =head1 SYNOPSIS
14
15 Most functionality is provided by L<DBIx::Class::Storage::DBI::Interbase>, see
16 that module for details.
17
18 To build the ODBC driver for Firebird on Linux for unixODBC, see:
19
20 L<http://www.firebirdnews.org/?p=1324>
21
22 =cut
23
24 # XXX seemingly no equivalent to ib_time_all in DBD::InterBase via ODBC
25 sub connect_call_datetime_setup { 1 }
26
27 # from MSSQL
28
29 sub build_datetime_parser {
30   my $self = shift;
31   my $type = "DateTime::Format::Strptime";
32   eval "use ${type}";
33   $self->throw_exception("Couldn't load ${type}: $@") if $@;
34   return $type->new(
35     pattern => '%Y-%m-%d %H:%M:%S', # %F %T
36     on_error => 'croak',
37   );
38 }
39
40 # we don't need DBD::InterBase-specific initialization
41 sub _init { 1 }
42
43 # ODBC uses dialect 3 by default, good
44 sub _set_sql_dialect { 1 }
45
46 1;
47
48 =head1 CAVEATS
49
50 =over 4
51
52 =item *
53
54 This driver (unlike L<DBD::InterBase>) does not currently support reading or
55 writing C<TIMESTAMP> values with sub-second precision.
56
57 =back
58
59 =head1 AUTHOR
60
61 See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
62
63 =head1 LICENSE
64
65 You may distribute this code under the same terms as Perl itself.
66
67 =cut