Struct SqlQueryReaderExecutor<TRow>
- Namespace
- LfrlAnvil.Sql.Statements
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents an SqlQueryReader<TRow> bound to a specific Sql statement.
public readonly record struct SqlQueryReaderExecutor<TRow> : IEquatable<SqlQueryReaderExecutor<TRow>> where TRow : notnull
Type Parameters
TRow
Row type.
- Implements
-
IEquatable<SqlQueryReaderExecutor<TRow>>
- Inherited Members
Constructors
SqlQueryReaderExecutor(SqlQueryReader<TRow>, string)
Represents an SqlQueryReader<TRow> bound to a specific Sql statement.
public SqlQueryReaderExecutor(SqlQueryReader<TRow> Reader, string Sql)
Parameters
Reader
SqlQueryReader<TRow>Underlying query reader.
Sql
stringBound SQL statement.
Properties
Reader
Underlying query reader.
public SqlQueryReader<TRow> Reader { get; init; }
Property Value
- SqlQueryReader<TRow>
Sql
Bound SQL statement.
public string Sql { get; init; }
Property Value
Methods
Execute(IDbCommand, SqlQueryReaderOptions?)
Creates an IDataReader instance and reads a collection of rows, using the specified Sql statement.
[Pure]
public SqlQueryResult<TRow> Execute(IDbCommand command, SqlQueryReaderOptions? options = null)
Parameters
command
IDbCommandIDbCommand to read from.
options
SqlQueryReaderOptions?Query reader options.
Returns
- SqlQueryResult<TRow>
Returns a collection of read rows.