projects
/
dbsrgits/DBIx-Class-Historic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
5642f1e
)
added datetime parser types for the dbs I can find them for
Matt S Trout [Sat, 20 May 2006 00:33:14 +0000 (
00:33
+0000)]
lib/DBIx/Class/Storage/DBI/DB2.pm
patch
|
blob
|
blame
|
history
lib/DBIx/Class/Storage/DBI/Pg.pm
patch
|
blob
|
blame
|
history
t/lib/DBICTest/Schema/Event.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/DBIx/Class/Storage/DBI/DB2.pm
b/lib/DBIx/Class/Storage/DBI/DB2.pm
index
83e2bc7
..
8e867e0
100644
(file)
--- 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
(file)
--- 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
(file)
--- 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/