scopedQuery method
A SELECT with no projection, only scope conditions — for exists and
count, which do not need the full column list.
scopes carries the operation's snapshot, as in baseQuery.
Implementation
MssqlQuery scopedQuery(
MssqlScopeSelection selection, {
MssqlScopeCompiler? scopes,
}) {
var query = MssqlQuery.fromParts(binding.nameParts, ref: binding.sourceRef);
for (final condition
in (scopes ?? scopeCompiler(selection)).readConditions) {
query = query.where(condition);
}
return query;
}