Dan Horne wrote: >> From: [EMAIL PROTECTED] [mailto:dbix-class- >> [EMAIL PROTECTED] On Behalf Of Hartmaier Alexander >> Sent: Tuesday, 6 June 2006 8:59 p.m. >> >> I created on_connect_do for exactly this purpose. >> I use Oracle and needed to set the date format because the one in the >> oracle init file isn't used with perl DBI. >> I assumed that DBD::Oracle sets it to some DBI standard datetime format... >> So I set the date format you seem to use too (from you example) and use >> this one everywhere. >> >> -Alex > > Hi Alex > > Thanks for your response. I write my app against MySQL, but I periodically > test it against Oracle to ensure that no db-specific code has crept in. > What's the best way to deal with on_connect_do without breaking a db-generic > solution? > > I've been chipping away at this problem as I get time, and this is what I've > done so far. Since posting my question I've created a module called > DateTime::Format::Oracle which implements parse_datetime, parse_date, > format_datetime and format_date based on the NLS_DATE_FORMAT environment > variable. Once I've written the tests, I'll ask the DateTime list for > feedback. > > If this all works, I'll hopefully be able to reference the parser to > DBIx::Class::Storage::DBI::Oracle so that > DBIx::Class::InflateColumn::DateTime will work with Oracle too.
Awesome. I look forward to seeing the finished version and patch :) _______________________________________________ List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class Wiki: http://dbix-class.shadowcatsystems.co.uk/ IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/
