MssqlQueryState class
Immutable snapshot of every selection a query carries: scope state, user predicates, ordering, and native execution options.
Every method that narrows a query — where, orderBy, withTrashed,
withoutScope, .options(...) — returns a new MssqlQueryState rather
than mutating this one. Two chains derived from the same base cannot
drift into each other, because neither holds a reference to mutable state
the other can change.
The scope part (scope) is an MssqlScopeSelection of its own so it can
be queried and copied independently — a relation loader, for instance,
applies the parent's scope selection to a child query without carrying the
parent's where or orderBy along.
- Annotations
-
- @immutable
Constructors
-
MssqlQueryState({MssqlScopeSelection scope = const MssqlScopeSelection.empty(), List<
MssqlCondition> where = const <MssqlCondition>[], List<MssqlOrder> orderBy = const <MssqlOrder>[], MssqlQueryOptions options = const MssqlQueryOptions(), List<MssqlTypedCte> ctes = const <MssqlTypedCte>[]}) - MssqlQueryState.empty()
-
const
Properties
-
ctes
→ List<
MssqlTypedCte> -
Common table expressions this query's statement has to declare.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- options → MssqlQueryOptions
-
Native execution options, or defaults.
final
-
orderBy
→ List<
MssqlOrder> -
User-supplied ordering.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scope → MssqlScopeSelection
-
Which scopes this query carries.
final
-
where
→ List<
MssqlCondition> -
User-supplied predicates, ANDed together.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onlyTrashed(
) → MssqlQueryState -
thenBy(
List< MssqlOrder> extra) → MssqlQueryState -
A copy with
extraappended to orderBy. -
toString(
) → String -
A string representation of this object.
override
-
where_(
MssqlCondition condition) → MssqlQueryState -
A copy with
conditionappended to where. -
withCte(
MssqlTypedCte cte) → MssqlQueryState -
A copy with
cteappended to ctes. -
withOptions(
MssqlQueryOptions options) → MssqlQueryState -
A copy with
optionsreplaced. -
withOrderBy(
List< MssqlOrder> ordering) → MssqlQueryState -
A copy with
orderingreplacing orderBy. -
withoutGlobalScopes(
List< MssqlScope> all) → MssqlQueryState -
withoutScope(
String name) → MssqlQueryState -
withoutTrashed(
) → MssqlQueryState -
withScope(
MssqlScopeSelection scope) → MssqlQueryState -
A copy with
scopereplaced. -
withTrashed(
) → MssqlQueryState
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override