On Thu, 2006-05-18 at 18:12 +0200, A. Pagaltzis wrote:
> * Nigel Metheringham <[EMAIL PROTECTED]> [2006-05-16 15:00]:
> > Here's an example I have it returns all items in one table
> > (TaskLog) old than $fromdate and not referenced by another
> > (task_last_run)
> >
> > my $rs = $schema->resultset('TaskLog');
> > my $subsel = '(SELECT tl_id FROM task_last_run)';
> > my $qry = $rs->search(
> > {
> > tl_timestamp => { '<=', $fromdate },
> > tl_id => { -not_in => \$subsel }
> > }
> > );
> >
> > The magic trick is the reference to a string containing raw SQL
> > - this is documented in the SQL::Abstract documentation.
>
> Are you sure that this works? Has SQL::Abstract had an API
> upgrade while I wasn’t looking? A year ago, I spent several
> evenings trying to coerce it to do subqueries sanely but failed.
It doesn't work as written - although I am sure I had it doing so at
some point, but that must be delusion since I really can't reproduce it
now. See the messages I wrote yesterday for an alternative working
method.
Nigel.
--
[ Nigel Metheringham [EMAIL PROTECTED] ]
[ - Comments in this message are my own and not ITO opinion/policy - ]
_______________________________________________
List: http://lists.rawmode.org/cgi-bin/mailman/listinfo/dbix-class
Wiki: http://dbix-class.shadowcatsystems.co.uk/
IRC: irc.perl.org#dbix-class
SVN: http://dev.catalyst.perl.org/repos/bast/trunk/DBIx-Class/