Table of Contents

Class JoinExpressionPlanEqualityComparer

Namespace
NextORM.Core
Assembly
nextorm.core.dll

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

queryProvider IQueryRegistry

The registry that supplies the nested plan comparers.

JoinExpressionPlanEqualityComparer(IQueryRegistry, ILogger?)

Initializes a comparer.

public JoinExpressionPlanEqualityComparer(IQueryRegistry queryProvider, ILogger? logger)

Parameters

queryProvider IQueryRegistry

The registry that supplies the nested plan comparers.

logger ILogger

An 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

x JoinExpression

The first join.

y JoinExpression

The second join.

Returns

bool

true when 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

obj JoinExpression

The join to hash.

Returns

int

The hash code, or zero when obj is null.