MssqlScopeSelection class

Immutable snapshot of which scopes a query carries.

The soft-delete filter and the named global scopes follow the query through every terminal — get, page, count, exists, write — because they all read this selection rather than a mutable field on the repository.

withoutScope and withoutGlobalScopes remove named scopes but never touch the soft-delete switch: "show me everything" and "show me deleted rows too" are different intentions.

Annotations
  • @immutable

Constructors

MssqlScopeSelection({MssqlTrashed trashed = MssqlTrashed.without, Set<String> withoutScopes = const <String>{}})
MssqlScopeSelection.empty()
const

Properties

hashCode → int
The hash code for this object.
no setteroverride
hidesTrashed → bool
Whether this selection still applies the soft-delete filter.
no setter
onlyTrashedRows → bool
Whether this selection sees only soft-deleted rows.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trashed → MssqlTrashed
Which soft-deleted rows this selection sees.
final
withoutScopes → Set<String>
Names of global scopes switched off.
final

Methods

isOff(String name) → bool
Whether name is switched off.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onlyTrashed() → MssqlScopeSelection
Only soft-deleted rows.
toString() → String
A string representation of this object.
override
withoutGlobalScopes(List<MssqlScope> all) → MssqlScopeSelection
Switches every named global scope off.
withoutScope(String name) → MssqlScopeSelection
Switches one named global scope off.
withoutTrashed() → MssqlScopeSelection
Back to the default: deleted rows hidden.
withTrashed() → MssqlScopeSelection
Include soft-deleted rows.

Operators

operator ==(Object other) → bool
The equality operator.
override