[Dbix-class] Announcement: DBIx-Class-0.06999_01
Matt S Trout
dbix-class at trout.me.uk
Mon May 29 00:24:53 CEST 2006
Dan Horne wrote:
>> On Behalf Of Matt S Trout
>> Dan Horne wrote:
>>>> From: dbix-class-bounces at lists.rawmode.org [mailto:dbix-class-
>>>> bounces at lists.rawmode.org] On Behalf Of Aran Deltac
>>> [snip]
>>>> Also, the change list stated that there is a new
>>>> AutoInflate::DateTime module. This modules name is actually
>>>> InflateColumn::DateTime.
>>>>
>>>> Aran
>>> I'm curious to know how to make use of
>> InflateColumn::DateTime. Do I
>>> need to explicitly define date time columns as a datetime
>> data type in
>>> my table classes, or does this happen automagically?
>> Needs to be defined in your table class currently; I always
>> use DBIC to
>> generate my CREATE TABLE statements so I'm defining all my data types
>> anyway.
>
> Ah - I use a CASE tool, so it's a bit more problematic.
Teach SQL::Translator about your CASE tool then :)
The thing is, the setup is once-only whereas for it to happen
automagically it'd have to detect at connection time instead, which I
suspect would rapidly become icky.
>>> Will this work with DBs like Oracle?
>> It'll work with any db for which the datetime_parser method on the
>> appropriate Storage class returns a suitable class/object. I've done
>> sqlite, mysql, pg, db and (hopefully) SQL Server; testing of the rest
>> and suitable patches would be very welcome.
>>
>
> Well, I'm new to DBIx::Class and have only started looking under the covers,
> but if someone's willing to give me some pointers, I'm happy to look at the
> Oracle side of things if it hasn't been looked at already ... unless I'm
> stepping on someone's toes...
Have a quick look at the datetime_parser_type method in
Storage::DBI::Pg, and the datetime_parser method in Storage::DBI::MSSQL.
We don't really do stepping on toes here, if somebody'd already done it
they'd have committed it - and if they haven't that's their problem (and
we've never yet had a situation where there weren't bits of both
implementations that were worth keeping, anyway :)
More information about the Dbix-class
mailing list