e143b5bd724b332c90c18e313cafc436e898e147
[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 # releasing savepoints doesn't work, but that shouldn't matter
47 sub _svp_release { 1 }
48
49 1;
50
51 =head1 CAVEATS
52
53 =over 4
54
55 =item *
56
57 This driver (unlike L<DBD::InterBase>) does not currently support reading or
58 writing C<TIMESTAMP> values with sub-second precision.
59
60 =item *
61
62 Releasing savepoints does not work, but you should still be able to safely use
63 savepoints.
64
65 =back
66
67 =head1 AUTHOR
68
69 See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
70
71 =head1 LICENSE
72
73 You may distribute this code under the same terms as Perl itself.
74
75 =cut