Table of Contents

Class QueryPlanEqualityComparer

Namespace
NextORM.Core
Assembly
nextorm.core.dll

Equality comparer that keys a whole QueryCommand plan (shape flags, expressions, joins, paging, ...) in the plan cache.

public sealed class QueryPlanEqualityComparer : IEqualityComparer<QueryCommand?>
Inheritance
QueryPlanEqualityComparer
Implements
Inherited Members
Extension Methods

Constructors

QueryPlanEqualityComparer(IQueryRegistry)

Creates a comparer that reuses the registry's expression and shape comparers.

public QueryPlanEqualityComparer(IQueryRegistry queryProvider)

Parameters

queryProvider IQueryRegistry

The registry owning the nested comparers.

Methods

Equals(QueryCommand?, QueryCommand?)

Determines whether two commands would produce the same cached plan.

public bool Equals(QueryCommand? x, QueryCommand? y)

Parameters

x QueryCommand

The first command.

y QueryCommand

The second command.

Returns

bool

true when both commands are logically equal.

GetHashCode(QueryCommand?)

Returns the plan-cache hash of obj, combining the precomputed sub-plan hashes with the plan-shape flags, paging and outer references.

public int GetHashCode(QueryCommand? obj)

Parameters

obj QueryCommand

The command to hash.

Returns

int

The plan hash, or 0 when obj is null.