isInQuery<F extends Fields> method
Tests membership in a subquery selecting one SQL expression.
The subquery must belong to the enclosing query's context and dialect.
Implementation
Expr<bool?> isInQuery<F extends Fields>(Query<T, F> query) {
if (query.querySelection is! Expr<T>) {
throw const OrmException(
'QUERY.SCALAR',
'IN subqueries select one SQL expression.',
);
}
return Expr.internal(
BinaryNode(expressionNode, 'IN', SubqueryNode(query)),
Codecs.boolean.nullable(),
);
}