NAME
DBIx::DataModel::Schema::ResultAs::Subquery - SQL and bind values in a form suitable for a subquery
DESCRIPTION
Returns a ref to an arrayref containing \["($sql)", @bind]
. This is meant to be passed to a second query through the -in
or -not_in
operator of SQL::Abstract, as in :
my $subquery = $source1->select(..., -result_as => 'subquery');
my $rows = $source2->select(
-columns => ...,
-where => {foo => 123, bar => {-not_in => $subquery}}
);