58a36758dd3d5a3293f36d5c9eec1f9d20627afe
[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 1;
41
42 =head1 CAVEATS
43
44 This driver (unlike L<DBD::InterBase>) does not currently support reading or
45 writing C<TIMESTAMP> values with sub-second precision.
46
47 =head1 AUTHOR
48
49 See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
50
51 =head1 LICENSE
52
53 You may distribute this code under the same terms as Perl itself.
54
55 =cut