Struct SqlAsyncParameterizedQueryReaderExecutor<TParameter, TRow>
- Namespace
- LfrlAnvil.Sql.Statements
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents an SqlAsyncQueryReaderExecutor<TRow> bound to an SqlParameterBinder<TSource> instance.
public readonly record struct SqlAsyncParameterizedQueryReaderExecutor<TParameter, TRow> : IEquatable<SqlAsyncParameterizedQueryReaderExecutor<TParameter, TRow>> where TParameter : notnull where TRow : notnull
Type Parameters
TParameterParameter source type.
TRowRow type.
- Implements
-
IEquatable<SqlAsyncParameterizedQueryReaderExecutor<TParameter, TRow>>
- Inherited Members
Constructors
SqlAsyncParameterizedQueryReaderExecutor(SqlParameterBinder<TParameter>, SqlAsyncQueryReaderExecutor<TRow>)
Represents an SqlAsyncQueryReaderExecutor<TRow> bound to an SqlParameterBinder<TSource> instance.
public SqlAsyncParameterizedQueryReaderExecutor(SqlParameterBinder<TParameter> ParameterBinder, SqlAsyncQueryReaderExecutor<TRow> Reader)
Parameters
ParameterBinderSqlParameterBinder<TParameter>Underlying parameter binder.
ReaderSqlAsyncQueryReaderExecutor<TRow>Underlying query reader.
Properties
ParameterBinder
Underlying parameter binder.
public SqlParameterBinder<TParameter> ParameterBinder { get; init; }
Property Value
- SqlParameterBinder<TParameter>
Reader
Underlying query reader.
public SqlAsyncQueryReaderExecutor<TRow> Reader { get; init; }
Property Value
Methods
ExecuteAsync(IDbCommand, TParameter?, SqlQueryReaderOptions?, CancellationToken)
Asynchronously creates an IDataReader instance and reads a collection of rows,
using the given parameters.
[Pure]
public ValueTask<SqlQueryResult<TRow>> ExecuteAsync(IDbCommand command, TParameter? parameters, SqlQueryReaderOptions? options = null, CancellationToken cancellationToken = default)
Parameters
commandIDbCommandIDbCommand to read from.
parametersTParameterSource of parameters to bind.
optionsSqlQueryReaderOptions?Query reader options.
cancellationTokenCancellationTokenOptional CancellationToken.
Returns
- ValueTask<SqlQueryResult<TRow>>
ValueTask<TResult> that returns a collection of read rows.