query method
Runs sql and buffers every result set.
parameters is either a Map<String, Object?> of named parameters or an
Iterable<MssqlParameter> for full control over SQL type, size and
direction.
options carries the reusable settings; the named arguments after it
override individual fields when they are given, and change nothing when
they are omitted.
Implementation
@override
Future<MssqlExecutionResult> query(
String sql, {
Object parameters = const <String, Object?>{},
MssqlQueryOptions options = MssqlQueryOptions.defaults,
Duration? timeout,
MssqlCancellationToken? cancellationToken,
int? batchRows,
int? maximumRows,
int? maximumBytes,
MssqlRetryPolicy? retry,
}) => _watch(
sql,
parameters,
MssqlOrmQueryKind.query,
() => inner.query(
sql,
parameters: parameters,
options: options,
timeout: timeout,
cancellationToken: cancellationToken,
batchRows: batchRows,
maximumRows: maximumRows,
maximumBytes: maximumBytes,
retry: retry,
),
rows: _rowsOf,
affected: (result) => result.affectedRows,
batchRows: batchRows ?? options.batchRows,
queryName: options.queryName,
);