FAQ
I'm not a DBIC expert, but I don't think so. The [...] construct creates an
arrayref, so the leading '\' would just create a reference to a reference
which is probably NOT what you want. :-) Perhaps you're thinking about
passing a scalar ref to put raw SQL into the query, ie. \"some sql"?

Drew

On Tue, Jan 26, 2010 at 10:09 PM, Justin Hunter
wrote:
shouldn't that be


$rs->search({
state => $state,
last_modified => *\*[ "< TIMEDIFF( NOW(), ? SECONDS", $seconds ],
})->delete_all;

Justin

On Tue, Jan 26, 2010 at 2:24 PM, Rob Kinyon wrote:
On Tue, Jan 26, 2010 at 16:16, Kiffin Gish wrote:
Very true, but there must be better ways to do this than the reactions
so far.
What's wrong with:

$rs->search({
state => $state,
last_modified => [ "< TIMEDIFF( NOW(), ? SECONDS", $seconds ],
})->delete_all;

Standard SQL::Abstract stuff, described in both the DBIC cookbook and
the SQL::Abstract docs.

Remember - date/time manipulation is NOT standardized.

Rob

_______________________________________________
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

_______________________________________________
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20100126/24cf281c/attachment.htm

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 12 of 16 | next ›
Discussion Overview
groupdbix-class @
categoriesperl, catalyst
postedJan 23, '10 at 9:28p
activeJan 27, '10 at 9:50a
posts16
users11
websitedbix-class.org
irc#dbix-class

People

Translate

site design / logo © 2022 Grokbase