From: Matt S Trout Date: Sat, 20 May 2006 00:33:14 +0000 (+0000) Subject: added datetime parser types for the dbs I can find them for X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=45fa82889e637f9382eb2890b44fc58ef122de25;p=dbsrgits%2FDBIx-Class-Historic.git added datetime parser types for the dbs I can find them for --- diff --git a/lib/DBIx/Class/Storage/DBI/DB2.pm b/lib/DBIx/Class/Storage/DBI/DB2.pm index 83e2bc7..8e867e0 100644 --- a/lib/DBIx/Class/Storage/DBI/DB2.pm +++ b/lib/DBIx/Class/Storage/DBI/DB2.pm @@ -21,6 +21,8 @@ sub last_insert_id } +sub datetime_parser_type { "DateTime::Format::DB2"; } + 1; =head1 NAME diff --git a/lib/DBIx/Class/Storage/DBI/Pg.pm b/lib/DBIx/Class/Storage/DBI/Pg.pm index 526abac..5940de2 100644 --- a/lib/DBIx/Class/Storage/DBI/Pg.pm +++ b/lib/DBIx/Class/Storage/DBI/Pg.pm @@ -35,6 +35,8 @@ sub sqlt_type { return 'PostgreSQL'; } +sub datetime_parser_type { return "DateTime::Format::Pg"; } + 1; =head1 NAME diff --git a/t/lib/DBICTest/Schema/Event.pm b/t/lib/DBICTest/Schema/Event.pm index 92dad5d..e9642e3 100644 --- a/t/lib/DBICTest/Schema/Event.pm +++ b/t/lib/DBICTest/Schema/Event.pm @@ -2,15 +2,4 @@ package DBICTest::Schema::Event; use base qw/DBIx::Class/; -__PACKAGE__->load_components(qw/InflateColumn::DateTime PK::Auto Core/); - -__PACKAGE__->table('event'); - -__PACKAGE__->add_columns( - id => { data_type => 'integer', is_auto_increment => 1 }, - starts_at => { data_type => 'datetime' } -); - -__PACKAGE__->set_primary_key('id'); - -1; +__PACKAGE__->load_components(qw/