Interface ISqlQueryReaderFactory
- Namespace
- LfrlAnvil.Sql.Statements.Compilers
- Assembly
- LfrlAnvil.Sql.Core.dll
Represents a factory of delegates used by query reader expression instances.
public interface ISqlQueryReaderFactory
- Extension Methods
Properties
Dialect
SQL dialect that this factory is associated with.
SqlDialect Dialect { get; }
Property Value
SupportsAsync
Specifies whether or not generic asynchronous query readers can be constructed by this factory.
bool SupportsAsync { get; }
Property Value
Methods
Create(SqlQueryReaderCreationOptions?)
Creates a new SqlQueryReader instance.
[Pure]
SqlQueryReader Create(SqlQueryReaderCreationOptions? options = null)
Parameters
options
SqlQueryReaderCreationOptions?Optional SqlQueryReaderCreationOptions.
Returns
- SqlQueryReader
New SqlQueryReader instance.
CreateAsync(SqlQueryReaderCreationOptions?)
Creates a new SqlAsyncQueryReader instance.
[Pure]
SqlAsyncQueryReader CreateAsync(SqlQueryReaderCreationOptions? options = null)
Parameters
options
SqlQueryReaderCreationOptions?Optional SqlQueryReaderCreationOptions.
Returns
- SqlAsyncQueryReader
New SqlAsyncQueryReader instance.
CreateAsyncExpression(Type, SqlQueryReaderCreationOptions?)
Creates a new SqlAsyncQueryReaderExpression instance.
[Pure]
SqlAsyncQueryReaderExpression CreateAsyncExpression(Type rowType, SqlQueryReaderCreationOptions? options = null)
Parameters
rowType
TypeRow type.
options
SqlQueryReaderCreationOptions?Optional SqlQueryReaderCreationOptions.
Returns
- SqlAsyncQueryReaderExpression
New SqlAsyncQueryReaderExpression instance.
Exceptions
- SqlCompilerException
When
rowType
is not a valid row type or does not contain a valid constructor or does not contain any valid members or this factory does not support asynchronous expressions.
CreateAsyncScalar()
Creates a new SqlAsyncScalarQueryReader instance.
[Pure]
SqlAsyncScalarQueryReader CreateAsyncScalar()
Returns
- SqlAsyncScalarQueryReader
New SqlAsyncScalarQueryReader instance.
CreateAsyncScalarExpression(Type, bool)
Creates a new SqlAsyncScalarQueryReaderExpression instance.
[Pure]
SqlAsyncScalarQueryReaderExpression CreateAsyncScalarExpression(Type resultType, bool isNullable = false)
Parameters
resultType
TypeValue type.
isNullable
boolSpecifies whether or not the result is nullable. Equal to false by default.
Returns
Exceptions
- SqlCompilerException
When
resultType
is not a valid result type or this factory does not support asynchronous expressions.
CreateExpression(Type, SqlQueryReaderCreationOptions?)
Creates a new SqlQueryReaderExpression instance.
[Pure]
SqlQueryReaderExpression CreateExpression(Type rowType, SqlQueryReaderCreationOptions? options = null)
Parameters
rowType
TypeRow type.
options
SqlQueryReaderCreationOptions?Optional SqlQueryReaderCreationOptions.
Returns
- SqlQueryReaderExpression
New SqlQueryReaderExpression instance.
Exceptions
- SqlCompilerException
When
rowType
is not a valid row type or does not contain a valid constructor or does not contain any valid members.
CreateScalar()
Creates a new SqlScalarQueryReader instance.
[Pure]
SqlScalarQueryReader CreateScalar()
Returns
- SqlScalarQueryReader
New SqlScalarQueryReader instance.
CreateScalarExpression(Type, bool)
Creates a new SqlScalarQueryReaderExpression instance.
[Pure]
SqlScalarQueryReaderExpression CreateScalarExpression(Type resultType, bool isNullable = false)
Parameters
resultType
TypeValue type.
isNullable
boolSpecifies whether or not the result is nullable. Equal to false by default.
Returns
- SqlScalarQueryReaderExpression
New SqlScalarQueryReaderExpression instance.
Exceptions
- SqlCompilerException
When
resultType
is not a valid result type.