Table of Contents

Struct SqlScalarQueryReader<T>

Namespace
LfrlAnvil.Sql.Statements
Assembly
LfrlAnvil.Sql.Core.dll

Represents a generic scalar query reader.

public readonly record struct SqlScalarQueryReader<T> : IEquatable<SqlScalarQueryReader<T>>

Type Parameters

T

Value type.

Implements
Inherited Members
Extension Methods

Constructors

SqlScalarQueryReader(SqlDialect, Func<IDataReader, SqlScalarQueryResult<T>>)

Represents a generic scalar query reader.

public SqlScalarQueryReader(SqlDialect Dialect, Func<IDataReader, SqlScalarQueryResult<T>> Delegate)

Parameters

Dialect SqlDialect

SQL dialect with which this query reader is associated.

Delegate Func<IDataReader, SqlScalarQueryResult<T>>

Underlying delegate.

Properties

Delegate

Underlying delegate.

public Func<IDataReader, SqlScalarQueryResult<T>> Delegate { get; init; }

Property Value

Func<IDataReader, SqlScalarQueryResult<T>>

Dialect

SQL dialect with which this query reader is associated.

public SqlDialect Dialect { get; init; }

Property Value

SqlDialect

Methods

Read(IDataReader)

Reads a scalar value.

[Pure]
public SqlScalarQueryResult<T> Read(IDataReader reader)

Parameters

reader IDataReader

IDataReader to read from.

Returns

SqlScalarQueryResult<T>

Returns a read scalar value.