[Dbix-class] Oracle Built-In Functions
Duncan Garland
Duncan.Garland at motortrak.com
Thu Aug 5 08:00:59 GMT 2010
Hi,
I tried
$rs->date_updated( DateTime->now );
And several other variations on the theme and they didn't work. I began it wonder if it could recognise the standard Oracle DATE column type.
All the best.
Duncan
From: Dan Horne [mailto:dan.horne at redbone.co.nz]
Sent: 04 August 2010 23:41
To: DBIx::Class user and developer list
Subject: Re: [Dbix-class] Oracle Built-In Functions
On 4 August 2010 22:25, Duncan Garland <Duncan.Garland at motortrak.com<mailto:Duncan.Garland at motortrak.com>> wrote:
Hi,
I'm struggling to persuade DBIx::Class to use simple Oracle built-ins such as SYSDATE, DECODE and NVL.
Eg UPDATE table1 SET date_updated = SYSDATE, destination = NVL( $destination, 'home' ) WHERE ... ;
$rs->date_updated( 'SYSDATE' );
Doesn't work, nor can any variation on a theme that I can think of.
I'm sure it must be possible and I'm sure it must be in the docs, but I can't 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/bc534bc1/attachment.htm
More information about the DBIx-Class
mailing list