[Dbix-class] Oracle Built-In Functions

Dan Horne dan.horne at redbone.co.nz
Wed Aug 4 22:41:29 GMT 2010


On 4 August 2010 22:25, Duncan Garland <Duncan.Garland at motortrak.com> wrote:

>  Hi,
>
>
>
> I=92m struggling to persuade DBIx::Class to use simple Oracle built-ins s=
uch
> as SYSDATE, DECODE and NVL.
>
>
>
> Eg UPDATE table1 SET date_updated =3D SYSDATE, destination =3D NVL(
> $destination, =91home=92 ) WHERE ... ;
>
>
>
> $rs->date_updated( =91SYSDATE=92 );
>
>
>
> Doesn=92t work, nor can any variation on a theme that I can think of.
>
>
>
> I=92m sure it must be possible and I=92m sure it must be in the docs, but=
 I
> can=92t find it.
>
>
>
> Can anybody help?
>
>
>
> Regards
>
>
>
> Duncan
>

I do most of my development against Oracle, although I try to make my code
DB generic where possible. If you use a DateTime object rather than sysdate,
DBIC will deflate it for you. Of course, creating the new object is slower
than simply using sysdate, so I guess it depends how speed sensitive your
app is...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100805/27e=
bb18f/attachment.htm


More information about the DBIx-Class mailing list