[Dbix-class] DBIx::Class::InflateColumn::DateTime for DB2
Jess Robinson
castaway at desert-island.demon.co.uk
Wed Jan 17 09:11:51 GMT 2007
On Tue, 16 Jan 2007, Takashi Karino wrote:
> Hi, all
>
> I encountered a problem as below while tyring to use
> DBIx::Class::InflateColumn::DateTime.
>
> 'register_column' method of DBIx::Class::InflateColumn::DateTime
> changes 'timestamp' to 'datetime' internally, then call
> 'parse_datetime' method of DateTime::Format::XX object.
> but, DateTime::Format::DB2 doesn't have parse_datetime.
>
> So I have to make some fix for DBIx::Class::InflateColumn::DateTime to
> call parse_timestamp or add parase(format)_datetime method to
> DateTime::Format::DB2 as my code get done correctly.
>
> I think the fix for DateTime::Format::DB2 is easier, but DB2 actually
> does't have datetime type unlike other DBMS (Oracle, MySQL).
>
> Could anyone give some comments which one is more appropriate.
Hiho,
Well, if someone could check that all DateTime::Format::X modules contain
parse_ functions named after the appropriate datatypes, I would prefer to
remove the "timestamp isa datetime" line in InflateColumn::DateTime.
IIRC, some DBs have both, and the formatting isn't quite the same? MySQL
3.x anyone?
However, it appears that I have a copy of DateTime::Format::DB2 here that
I added parse_datetime to, so it could be it was decided the other way a
while back and I forgot to release it.. so I'll do that.
Jess
More information about the Dbix-class
mailing list