withExists<TChild> method
MssqlProjectedQuery<(TRow, bool)>
withExists<TChild>(
- MssqlRelation<
TRow, TChild> relation(- TFields fields
Parent rows plus whether any matching child exists, as a bit.
Implementation
MssqlProjectedQuery<(TRow, bool)> withExists<TChild>(
MssqlRelation<TRow, TChild> Function(TFields fields) relation,
) {
final rel = relation(fields);
final expr = existsValue(_existsQuery(rel));
return _projectAdded(
'withExists',
expr,
(value) => value == true || value == 1,
);
}