Class OptimizationContext
- Namespace
- LinqToDB.SqlProvider
- Assembly
- linq2db.dll
public class OptimizationContext
- Inheritance
-
OptimizationContext
- Extension Methods
-
Constructors
OptimizationContext(EvaluationContext, AliasesContext, bool, Func<IQueryParametersNormalizer>)
public OptimizationContext(EvaluationContext context, AliasesContext aliases, bool isParameterOrderDependent, Func<IQueryParametersNormalizer> parametersNormalizerFactory)
Parameters
context
EvaluationContext
aliases
AliasesContext
isParameterOrderDependent
bool
parametersNormalizerFactory
Func<IQueryParametersNormalizer>
Properties
Aliases
public AliasesContext Aliases { get; }
Property Value
- AliasesContext
Context
public EvaluationContext Context { get; }
Property Value
- EvaluationContext
IsParameterOrderDependent
public bool IsParameterOrderDependent { get; }
Property Value
- bool
Methods
AddParameter(SqlParameter)
public SqlParameter AddParameter(SqlParameter parameter)
Parameters
parameter
SqlParameter
Returns
- SqlParameter
ClearParameters()
public void ClearParameters()
ConvertAll<T>(RunOptimizationContext, T, Func<ConvertVisitor<RunOptimizationContext>, IQueryElement, IQueryElement>, Func<ConvertVisitor<RunOptimizationContext>, bool>)
public T ConvertAll<T>(BasicSqlOptimizer.RunOptimizationContext context, T element, Func<ConvertVisitor<BasicSqlOptimizer.RunOptimizationContext>, IQueryElement, IQueryElement> convertAction, Func<ConvertVisitor<BasicSqlOptimizer.RunOptimizationContext>, bool> parentAction) where T : class, IQueryElement
Parameters
context
BasicSqlOptimizer.RunOptimizationContext
element
T
convertAction
Func<ConvertVisitor<BasicSqlOptimizer.RunOptimizationContext>, IQueryElement, IQueryElement>
parentAction
Func<ConvertVisitor<BasicSqlOptimizer.RunOptimizationContext>, bool>
Returns
- T
Type Parameters
T
GetParameters()
public IReadOnlyList<SqlParameter> GetParameters()
Returns
- IReadOnlyList<SqlParameter>
HasParameters()
public bool HasParameters()
Returns
- bool
IsOptimized(IQueryElement, out IQueryElement?)
public bool IsOptimized(IQueryElement element, out IQueryElement? newExpr)
Parameters
element
IQueryElement
newExpr
IQueryElement
Returns
- bool
RegisterOptimized(IQueryElement, IQueryElement)
public void RegisterOptimized(IQueryElement element, IQueryElement newExpr)
Parameters
element
IQueryElement
newExpr
IQueryElement
SuggestDynamicParameter(DbDataType, object?)
public SqlParameter SuggestDynamicParameter(DbDataType dbDataType, object? value)
Parameters
dbDataType
DbDataType
value
object
Returns
- SqlParameter