Yes, it's another question about using SQL functions in an update. I
know I can pass a reference to a string containing literal SQL, as in:
$row->update({ mydate => \ 'NOW()' });
However, in this case I need to pass arguments to the function, one of
which needs to be quoted. Here's what I'm using right now:
my $date = DateTime->now();
my $until = "GREATEST(paused_until, " .
$schema->storage->dbh->quote("$dt") . ")";
$row->update({ paused_until => \$until });
Ideally, I could do something like this:
$row->update({ paused_until =>
{ GREATEST => [ \ 'paused_until', $dt ] } });
Suggestions?
Ronald
_______________________________________________
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/[EMAIL PROTECTED]