MssqlScopeCompiler class
Builds the MssqlCondition list a query carries for a given binding and scope selection, once.
One place, used by every terminal — read, exists, count, write, include, relation aggregate, through/pivot — so the same scopes apply the same way everywhere. The soft-delete filter is separate from the named scopes because MssqlScopeSelection keeps them separate.
An MssqlScope carries a factory: MssqlCondition? Function(), so a
tenant scope reads whatever the application's ambient tenant is at the
moment it runs. Calling that factory once per statement would let a
page() and its total count, or a read and its includes, land on two
different tenants across an await — the second half of a page would be
scoped to somebody else. So one instance of this class resolves each
factory exactly once and hands the same list out for every statement of
the operation that created it. Create one per terminal call, not one
per statement, and never cache one on a long-lived object: a
process-lifetime instance would freeze the first tenant it ever saw.
Constructors
-
MssqlScopeCompiler(MssqlTableBinding<
Object?> binding, MssqlScopeSelection selection)
Properties
-
binding
→ MssqlTableBinding<
Object?> -
final
-
globalConditions
→ List<
MssqlCondition> -
Every predicate except the soft-delete filter.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
readConditions
→ List<
MssqlCondition> -
Every predicate a read carries: the soft-delete filter and the scopes
that are still on.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- selection → MssqlScopeSelection
-
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited