Struct SqlQueryReaderExecutor
- Namespace
- LfrlAnvil.Sql.Statements
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents an SqlQueryReader bound to a specific Sql statement.
public readonly record struct SqlQueryReaderExecutor : IEquatable<SqlQueryReaderExecutor>
- Implements
- Inherited Members
Constructors
SqlQueryReaderExecutor(SqlQueryReader, string)
Represents an SqlQueryReader bound to a specific Sql statement.
public SqlQueryReaderExecutor(SqlQueryReader Reader, string Sql)
Parameters
Reader
SqlQueryReaderUnderlying query reader.
Sql
stringBound SQL statement.
Properties
Reader
Underlying query reader.
public SqlQueryReader Reader { get; init; }
Property Value
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 Execute(IDbCommand command, SqlQueryReaderOptions? options = null)
Parameters
command
IDbCommandIDbCommand to read from.
options
SqlQueryReaderOptions?Query reader options.
Returns
- SqlQueryResult
Returns a collection of read rows.