Struct SqlAsyncQueryReaderExecutor
- Namespace
- LfrlAnvil.Sql.Statements
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents an SqlAsyncQueryReader bound to a specific Sql statement.
public readonly record struct SqlAsyncQueryReaderExecutor : IEquatable<SqlAsyncQueryReaderExecutor>
- Implements
- Inherited Members
Constructors
SqlAsyncQueryReaderExecutor(SqlAsyncQueryReader, string)
Represents an SqlAsyncQueryReader bound to a specific Sql statement.
public SqlAsyncQueryReaderExecutor(SqlAsyncQueryReader Reader, string Sql)
Parameters
Reader
SqlAsyncQueryReaderUnderlying query reader.
Sql
stringBound SQL statement.
Properties
Reader
Underlying query reader.
public SqlAsyncQueryReader Reader { get; init; }
Property Value
Sql
Bound SQL statement.
public string Sql { get; init; }
Property Value
Methods
ExecuteAsync(IDbCommand, SqlQueryReaderOptions?, CancellationToken)
Asynchronously creates an IDataReader instance and reads a collection of rows, using the specified Sql statement.
[Pure]
public ValueTask<SqlQueryResult> ExecuteAsync(IDbCommand command, SqlQueryReaderOptions? options = null, CancellationToken cancellationToken = default)
Parameters
command
IDbCommandIDbCommand to read from.
options
SqlQueryReaderOptions?Query reader options.
cancellationToken
CancellationTokenOptional CancellationToken.
Returns
- ValueTask<SqlQueryResult>
ValueTask<TResult> that returns a collection of read rows.