Struct SqlScalarQueryReaderExecutor
- Namespace
- LfrlAnvil.Sql.Statements
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents an SqlScalarQueryReader bound to a specific Sql statement.
public readonly record struct SqlScalarQueryReaderExecutor : IEquatable<SqlScalarQueryReaderExecutor>
- Implements
- Inherited Members
Constructors
SqlScalarQueryReaderExecutor(SqlScalarQueryReader, string)
Represents an SqlScalarQueryReader bound to a specific Sql statement.
public SqlScalarQueryReaderExecutor(SqlScalarQueryReader Reader, string Sql)
Parameters
Reader
SqlScalarQueryReaderUnderlying query reader.
Sql
stringBound SQL statement.
Properties
Reader
Underlying query reader.
public SqlScalarQueryReader Reader { get; init; }
Property Value
Sql
Bound SQL statement.
public string Sql { get; init; }
Property Value
Methods
Execute(IDbCommand)
Creates an IDataReader instance and reads a scalar value, using the specified Sql statement.
[Pure]
public SqlScalarQueryResult Execute(IDbCommand command)
Parameters
command
IDbCommandIDbCommand to read from.
Returns
- SqlScalarQueryResult
Returns a read scalar value.