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

Hartmaier Alexander alexander.hartmaier at t-systems.at
Thu Apr 17 13:34:30 GMT 2014


On 2014-04-17 15:29, Adam Witney wrote:
>
>
> 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.
Show us your complete code and look at which sql queries are executed
after connecting using DBIC_TRACE.

>
> _______________________________________________
> List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class
> IRC: irc.perl.org#dbix-class
> SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/
> Searchable Archive:
> http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk



*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
T-Systems Austria GesmbH Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.
*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*"*



More information about the DBIx-Class mailing list