[Dbix-class] Where to set database date format for InflateColumn::DateTime?

Adam Witney awitney at sgul.ac.uk
Thu Apr 17 13:29:57 GMT 2014



On 17. 4. 2014 14:20, Hartmaier Alexander wrote:
> On 2014-04-17 14:37, Adam Witney wrote:
>>
>>>> Great thanks,
>>>>
>>>>    on_connect_do => "SET datestyle = 'sql, mdy'",
>>>>
>>>> did the trick
>>> mea culpa! You should use on_connect_call => 'datetime_setup' which does
>>> the right thing for every supported RDBMS, so you can use your model
>>> e.g. for testing on sqlplus but deploy to postgres.
>>
>> ok great thanks, changed it to
>>
>> on_connect_call => [[ do_sql => "SET datestyle = 'sql, mdy'"]],
> It should be on_connect_call => 'datatime_setup', literally!

But this gives the same error as without the on_connect_call.



More information about the DBIx-Class mailing list