[Dbix-class] SQL::Abstract 1.50
BUCHMULLER Norbert
norbi.lists at nix.hu
Sun Feb 15 15:41:46 GMT 2009
On Sat, 14 Feb 2009 17:59:38 +0100 Zbigniew Lukasiak wrote:
> There was a discussion at IRC about the need for -in to accept a
> subquery. Like this:
>
> my $cdrs2 = $cdrs->search({
> artist => {
> -in => $art_rs->get_column( 'artistid' )->as_query,
> },
> });
>
> I am attaching a simple patch to
> http://dev.catalyst.perl.org/repos/bast/SQL-Abstract/1.x/branches/1.50_RC
> that enables this (with one test) plus a test for DBIC (svn diff
> againsthttp://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/branches/subquery).
Hi Zbigniew,
thanks for spotting out this problem and for the patch. (In the general
case, eg. "col => { '<' => \[$sql, @bind] }" it already worked, but the
special case for '-in' was missed.) The patch was applied, with slight
modifications (just to fit into the SQLA coding habits better):
http://dev.catalystframework.org/svnweb/bast/revision?rev=5477
norbi
More information about the DBIx-Class
mailing list