Class JoinExpressionPlanEqualityComparer
Compares and hashes joins for query-plan caching, taking the join type, strictness, global flag, condition and joined source into account.
public sealed class JoinExpressionPlanEqualityComparer : IEqualityComparer<JoinExpression>
- Inheritance
-
JoinExpressionPlanEqualityComparer
- Implements
- Inherited Members
- Extension Methods
Constructors
JoinExpressionPlanEqualityComparer(IQueryRegistry)
Initializes a comparer without a logger.
public JoinExpressionPlanEqualityComparer(IQueryRegistry queryProvider)
Parameters
queryProviderIQueryRegistryThe registry that supplies the nested plan comparers.
JoinExpressionPlanEqualityComparer(IQueryRegistry, ILogger?)
Initializes a comparer.
public JoinExpressionPlanEqualityComparer(IQueryRegistry queryProvider, ILogger? logger)
Parameters
queryProviderIQueryRegistryThe registry that supplies the nested plan comparers.
loggerILoggerAn optional logger; currently unused.
Methods
Equals(JoinExpression?, JoinExpression?)
Determines whether two joins are equal for plan-cache purposes.
public bool Equals(JoinExpression? x, JoinExpression? y)
Parameters
xJoinExpressionThe first join.
yJoinExpressionThe second join.
Returns
- bool
truewhen both joins describe the same operation with equivalent expressions.
GetHashCode(JoinExpression)
Returns a hash code for a join consistent with the equality comparison.
public int GetHashCode(JoinExpression obj)
Parameters
objJoinExpressionThe join to hash.
Returns
- int
The hash code, or zero when
objisnull.