Class SqlAsyncQueryLambdaExpression<TDataReader, TRow>
- Namespace
- LfrlAnvil.Sql.Statements.Compilers
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents a generic asynchronous query lambda expression.
public sealed class SqlAsyncQueryLambdaExpression<TDataReader, TRow> : ISqlAsyncQueryLambdaExpression<TRow>, ISqlAsyncQueryLambdaExpression where TDataReader : DbDataReader where TRow : notnull
Type Parameters
TDataReader
DB data reader type.
TRow
Row type.
- Inheritance
-
SqlAsyncQueryLambdaExpression<TDataReader, TRow>
- Implements
- Inherited Members
Properties
InitExpression
Underlying expression that creates an SqlAsyncQueryReaderInitResult instance.
public Expression<Func<TDataReader, SqlAsyncQueryReaderInitResult>> InitExpression { get; }
Property Value
- Expression<Func<TDataReader, SqlAsyncQueryReaderInitResult>>
ReadRowExpression
Underlying expression that reads and returns a single row.
public LambdaExpression ReadRowExpression { get; }
Property Value
Methods
Compile()
Compiles this expression.
[Pure]
public Func<IDataReader, SqlQueryReaderOptions, CancellationToken, ValueTask<SqlQueryResult<TRow>>> Compile()
Returns
- Func<IDataReader, SqlQueryReaderOptions, CancellationToken, ValueTask<SqlQueryResult<TRow>>>
Compiled Delegate.
Create(Expression<Func<TDataReader, SqlAsyncQueryReaderInitResult>>, Expression<Func<TDataReader, int[], SqlResultSetField[], TRow>>)
Creates a new SqlAsyncQueryLambdaExpression<TDataReader, TRow> instance that extracts field types.
[Pure]
public static SqlAsyncQueryLambdaExpression<TDataReader, TRow> Create(Expression<Func<TDataReader, SqlAsyncQueryReaderInitResult>> initExpression, Expression<Func<TDataReader, int[], SqlResultSetField[], TRow>> readRowExpression)
Parameters
initExpression
Expression<Func<TDataReader, SqlAsyncQueryReaderInitResult>>Underlying expression that creates an SqlAsyncQueryReaderInitResult instance.
readRowExpression
Expression<Func<TDataReader, int[], SqlResultSetField[], TRow>>Underlying expression that reads and returns a single row.
Returns
- SqlAsyncQueryLambdaExpression<TDataReader, TRow>
New SqlAsyncQueryLambdaExpression<TDataReader, TRow> instance.
Create(Expression<Func<TDataReader, SqlAsyncQueryReaderInitResult>>, Expression<Func<TDataReader, int[], TRow>>)
Creates a new SqlAsyncQueryLambdaExpression<TDataReader, TRow> instance that does not extract field types.
[Pure]
public static SqlAsyncQueryLambdaExpression<TDataReader, TRow> Create(Expression<Func<TDataReader, SqlAsyncQueryReaderInitResult>> initExpression, Expression<Func<TDataReader, int[], TRow>> readRowExpression)
Parameters
initExpression
Expression<Func<TDataReader, SqlAsyncQueryReaderInitResult>>Underlying expression that creates an SqlAsyncQueryReaderInitResult instance.
readRowExpression
Expression<Func<TDataReader, int[], TRow>>Underlying expression that reads and returns a single row.
Returns
- SqlAsyncQueryLambdaExpression<TDataReader, TRow>
New SqlAsyncQueryLambdaExpression<TDataReader, TRow> instance.