Class SqlQueryDependentAttribute
- Namespace
- LinqToDB.Expressions
- Assembly
- linq2db.dll
Used for controlling query caching of custom SQL Functions. Parameter with this attribute will be evaluated on client side before generating SQL.
[AttributeUsage(AttributeTargets.Parameter)]
public class SqlQueryDependentAttribute : Attribute, _Attribute
- Inheritance
-
SqlQueryDependentAttribute
- Implements
- Derived
- Extension Methods
Methods
ExpressionsEqual<TContext>(TContext, Expression, Expression, Func<TContext, Expression, Expression, bool>)
Compares two expressions during expression tree comparison. Has to be overriden if specific comparison required.
public virtual bool ExpressionsEqual<TContext>(TContext context, Expression expr1, Expression expr2, Func<TContext, Expression, Expression, bool> comparer)
Parameters
context
TContextexpr1
Expressionexpr2
Expressioncomparer
Func<TContext, Expression, Expression, bool>Default function for comparing expressions.
Returns
- bool
Result of comparison
Type Parameters
TContext
ObjectsEqual(object?, object?)
Compares two objects during expression tree comparison. Handles sequences also. Has to be overriden if specific comparison required.
public virtual bool ObjectsEqual(object? obj1, object? obj2)
Parameters
Returns
- bool
Result of comparison
PrepareForCache(Expression)
Used for preparation method argument to cached expression value.
public virtual Expression PrepareForCache(Expression expression)
Parameters
expression
ExpressionExpression for caching.
Returns
- Expression
Ready to cache expression.
SplitExpression(Expression)
Returns sub-expressions, if attribute applied to composite expression.
Default (non-composite) implementation returns expression
.
public virtual IEnumerable<Expression> SplitExpression(Expression expression)
Parameters
expression
ExpressionExpression to split.
Returns
- IEnumerable<Expression>
Passed expression of sub-expressions for composite expression.