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