MssqlQueryExecution extension

Terminal helpers that also reshape an ordinary query before running it.

on

Methods

avg<T>(MssqlSession session, String column, {MssqlDialect dialect = MssqlDialect.sql2012}) Future<T?>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

AVG of column over the rows this query returns, or null for none.
chunk(MssqlSession session, int size, Future<bool> handle(List<MssqlRow> rows), {MssqlDialect dialect = MssqlDialect.sql2012}) Future<void>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

Walks the whole result in keyset pages of size, without holding it all in memory.
count(MssqlSession session, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout, MssqlCancellationToken? cancellationToken, MssqlQueryOptions options = MssqlQueryOptions.defaults}) Future<int>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

How many rows this query returns.
countDistinctColumns(MssqlSession session, Iterable<String> columns, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout}) Future<int>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

How many distinct values of columns the matched rows hold.
doesntExist(MssqlSession session, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout}) Future<bool>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

exists(MssqlSession session, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout}) Future<bool>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

Whether the query matches anything.
first(MssqlSession session, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout, MssqlCancellationToken? cancellationToken, MssqlQueryOptions options = MssqlQueryOptions.defaults}) Future<MssqlRow?>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

The first row, or null.
firstOrFail(MssqlSession session, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout}) Future<MssqlRow>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

The first row, or StateError.
lazy(MssqlSession session, {int size = 500, MssqlDialect dialect = MssqlDialect.sql2012}) Stream<MssqlRow>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

chunk as a stream, for a caller that would rather iterate than pass a callback.
max<T>(MssqlSession session, String column, {MssqlDialect dialect = MssqlDialect.sql2012}) Future<T?>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

min<T>(MssqlSession session, String column, {MssqlDialect dialect = MssqlDialect.sql2012}) Future<T?>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

pluck<T>(MssqlSession session, String column, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout}) Future<List<T?>>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

One column of every row.
stream(MssqlSession session, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout, MssqlCancellationToken? cancellationToken, MssqlQueryOptions options = MssqlQueryOptions.defaults}) Stream<MssqlRow>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

Maps the native row stream without buffering the whole result.
sum<T>(MssqlSession session, String column, {MssqlDialect dialect = MssqlDialect.sql2012}) Future<T?>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

SUM of column over the rows this query returns, or null for none.
value<T>(MssqlSession session, String column, {MssqlDialect dialect = MssqlDialect.sql2012, Duration? timeout}) Future<T?>

Available on MssqlQuery, provided by the MssqlQueryExecution extension

One column of the first row.