[Dbix-class] SQL::Abstract 1.x subqueries patch

BUCHMULLER Norbert norbi.lists at nix.hu
Fri Oct 31 19:30:54 GMT 2008


Hi,

do you still accept patches for SQL::Abstract 1.x, or should I wait for
2.0 to come out instead? (BTW, what's the proposed time frame for that?)

I rather miss the subquery functionality from 1.x to be able to write SQL
stored procedure calls on the right-hand side of WHERE conditions like
this:

{
  foo => \["mangle_name(?)", $name]
}

With 1.x this is the best workaround I could devise (assuming DBIC):

{
  foo => \(
    sprintf '= mangle_name(%s)',
      $schema->storage->dbh->quote($name)
  )
}

And I don't like it. :-)

The attached patch adds subquery support to the 1.x trunk. (Includes the
corresponding tests taken & adapted from 2.000 trunk.)

norbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sqla_subqueries.diff
Type: text/x-patch
Size: 3220 bytes
Desc: not available
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20081031/90ce8b3b/sqla_subqueries.bin


More information about the DBIx-Class mailing list