changes the output of as_query (should not cause compat issues)
- Support ancient DB2 versions (5.4 and older), with proper limit
dialect
+ - Support sub-second precision for TIMESTAMPs for Firebird over ODBC
* Fixes
- Fix ::Storage::DBI::* MRO problems on 5.8.x perls
You will need the L<DateTime::Format::Strptime> module for inflation to work.
-For L<DBIx::Class::Storage::DBI::ODBC::Firebird>, this is a noop and sub-second
-precision is not currently available.
+For L<DBIx::Class::Storage::DBI::ODBC::Firebird>, this is a noop.
=cut
greater, L<auto_nextval|DBIx::Class::ResultSource/auto_nextval> however should
work with earlier versions.
-=item *
-
-Sub-second precision for TIMESTAMPs is not currently available when using the
-L<ODBC|DBIx::Class::Storage::DBI::ODBC::Firebird> driver.
-
=back
=head1 AUTHOR
L<http://www.firebirdnews.org/?p=1324>
This driver does not suffer from the nested statement handles across commits
-issue that the L<DBD::InterBase|DBIx::Class::Storage::DBI::InterBase> based
-driver does. This makes it more suitable for long running processes such as
-under L<Catalyst>.
+issue that the L<DBD::InterBase|DBIx::Class::Storage::DBI::InterBase> or the
+L<DBD::Firebird|DBIx::Class::Storage::DBI::Firebird> based driver does. This
+makes it more suitable for long running processes such as under L<Catalyst>.
=cut
# inherit parse/format date
our @ISA = 'DBIx::Class::Storage::DBI::InterBase::DateTime::Format';
-my $timestamp_format = '%Y-%m-%d %H:%M:%S'; # %F %T, no fractional part
+my $timestamp_format = '%Y-%m-%d %H:%M:%S.%4N'; # %F %T
my $timestamp_parser;
sub parse_datetime {
1;
-=head1 CAVEATS
-
-=over 4
-
-=item *
-
-This driver (unlike L<DBD::InterBase>) does not currently support reading or
-writing C<TIMESTAMP> values with sub-second precision.
-
-=back
-
=head1 AUTHOR
See L<DBIx::Class/AUTHOR> and L<DBIx::Class/CONTRIBUTORS>.
my ($updated) = $schema->resultset('Artist')->search({name => 'foo'});
is eval { $updated->rank }, 4, 'and the update made it to the database';
-
# test LIMIT support
my $lim = $ars->search( {},
{
"created_on" TIMESTAMP
)
SQL
- my $rs = $schema->resultset('Event');
+ my $rs = $schema->resultset('Event');
my $dt = DateTime->now;
- $dt->set_nanosecond($dsn =~ /odbc/i ? 0 : 555600000);
+ $dt->set_nanosecond(555600000);
my $date_only = DateTime->new(
year => $dt->year, month => $dt->month, day => $dt->day
is $row->created_on, $dt, 'TIMESTAMP as DateTime roundtrip';
cmp_ok $row->created_on->nanosecond, '==', $dt->nanosecond,
- 'fractional part of a second survived' if 0+$dt->nanosecond;
+ 'fractional part of a second survived';
is $row->starts_at, $date_only, 'DATE as DateTime roundtrip';
}