1 package DBIx::Class::Storage::DBI::ODBC::Firebird;
5 use base 'DBIx::Class::Storage::DBI::InterBase';
12 DBIx::Class::Storage::DBI::ODBC::Firebird - Driver for using the Firebird RDBMS
17 Most functionality is provided by L<DBIx::Class::Storage::DBI::Interbase>, see
18 that module for details.
20 To build the ODBC driver for Firebird on Linux for unixODBC, see:
22 L<http://www.firebirdnews.org/?p=1324>
24 This driver does not suffer from the nested statement handles across commits
25 issue that the L<DBD::InterBase|DBIx::Class::Storage::DBI::InterBase> based
26 driver does. This makes it more suitable for long running processes such as
31 __PACKAGE__->datetime_parser_type ('DBIx::Class::Storage::DBI::ODBC::Firebird::DateTime::Format');
33 # XXX seemingly no equivalent to ib_time_all from DBD::InterBase via ODBC
34 sub connect_call_datetime_setup { 1 }
36 # we don't need DBD::InterBase-specific initialization
39 # ODBC uses dialect 3 by default, good
40 sub _set_sql_dialect { 1 }
42 # releasing savepoints doesn't work for some reason, but that shouldn't matter
43 sub _svp_release { 1 }
46 my ($self, $name) = @_;
49 $self->_dbh->do("ROLLBACK TO SAVEPOINT $name")
52 # Firebird ODBC driver bug, ignore
53 if (not /Unable to fetch information about the error/) {
54 $self->throw_exception($_);
59 package # hide from PAUSE
60 DBIx::Class::Storage::DBI::ODBC::Firebird::DateTime::Format;
62 # inherit parse/format date
63 our @ISA = 'DBIx::Class::Storage::DBI::InterBase::DateTime::Format';
65 my $timestamp_format = '%Y-%m-%d %H:%M:%S'; # %F %T, no fractional part
70 require DateTime::Format::Strptime;
71 $timestamp_parser ||= DateTime::Format::Strptime->new(
72 pattern => $timestamp_format,
75 return $timestamp_parser->parse_datetime(shift);
80 require DateTime::Format::Strptime;
81 $timestamp_parser ||= DateTime::Format::Strptime->new(
82 pattern => $timestamp_format,
85 return $timestamp_parser->format_datetime(shift);
96 This driver (unlike L<DBD::InterBase>) does not currently support reading or
97 writing C<TIMESTAMP> values with sub-second precision.
103 See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
107 You may distribute this code under the same terms as Perl itself.