MssqlProjectedQuery<R> class
A query whose result is R, not an entity row.
There is no create / update / relation getter here: a projection is
a read shape. Putting writes on it would imply updating a DTO that has
no table identity.
Constructors
-
MssqlProjectedQuery({required MssqlSession session, required MssqlDialect dialect, required MssqlProjection<
R> projection, required MssqlQuery build(List<MssqlExpression> columns), Duration? timeout, MssqlQueryOptions options = const MssqlQueryOptions(), MssqlCapabilityCache? capabilities})
Properties
- capabilities → MssqlCapabilityCache?
-
final
- dialect → MssqlDialect
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- options → MssqlQueryOptions
-
final
-
projection
→ MssqlProjection<
R> -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- session → MssqlSession
-
final
- timeout → Duration?
-
final
Methods
-
chunk(
{int size = 500}) → Stream< List< R> > - Keyset chunks of projected rows. OFFSET is not used.
-
count(
) → Future< int> - How many rows this projection returns.
-
cursorPage(
{int size = 25, MssqlCursor? after, MssqlCursor? before, MssqlReadConsistency consistency = MssqlReadConsistency.committed}) → Future< MssqlCursorPage< R> > -
A keyset page of projected rows.
afterandbeforeare exclusive. -
first(
) → Future< R?> - The first projected row, or null.
-
get(
) → Future< List< R> > - Every projected row.
-
lazy(
{int size = 500}) → Stream< R> - chunk as a row stream.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
page(
{int size = 25, int offset = 0, bool total = false, MssqlReadConsistency consistency = MssqlReadConsistency.committed}) → Future< MssqlPage< R> > - One OFFSET page of projected rows.
-
stream(
) → Stream< R> - Streams projected rows from the native row stream.
-
toString(
) → String -
A string representation of this object.
inherited
-
watch(
{required Iterable< String> tables, MssqlWatchStrategy strategy = MssqlWatchStrategy.polling, Duration interval = const Duration(seconds: 1), MssqlChangeHub? hub}) → Stream<List< R> > -
Re-runs this projection when
tablesmay have changed.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited