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 <[email protected]>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 <[email protected]> wrote: > >> On Tue, Jan 26, 2010 at 16:16, Kiffin Gish <[email protected]> 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/[email protected] >> > > > _______________________________________________ > 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] >
_______________________________________________ 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]
