Class QueryExplanation
What an EcsQuery<TArchetype> did when it ran: the path each archetype took, the predicates pushed into an index, and the rows each produced.
public sealed record QueryExplanation : IEquatable<QueryExplanation>
- Inheritance
-
QueryExplanation
- Implements
- Inherited Members
Remarks
Recorded by the executing code itself while the terminal runs, so it reports the engine's decision rather than a re-derivation of it. A diagnostic surface: fields may change before 1.0.
Constructors
QueryExplanation(ExplainTerminal, QueryAccessPath?, IReadOnlyList<ArchetypeAccess>, int, int, int)
What an EcsQuery<TArchetype> did when it ran: the path each archetype took, the predicates pushed into an index, and the rows each produced.
public QueryExplanation(ExplainTerminal Terminal, QueryAccessPath? QueryPath, IReadOnlyList<ArchetypeAccess> Archetypes, int PendingSpawnRows, int WhereFilterRemoved, int ResultCount)
Parameters
TerminalExplainTerminalThe terminal that ran.
QueryPathQueryAccessPath?The query-level path when one applies to the whole query (Empty, Spatial); null when each archetype chose its own, listed in
Archetypes.ArchetypesIReadOnlyList<ArchetypeAccess>One entry per archetype the scan visited, in the order it visited them; empty when
QueryPathanswered for the whole query.PendingSpawnRowsintRows contributed by the transaction's own uncommitted spawns, which no index or map holds yet.
WhereFilterRemovedintRows a
Where(Func)post-filter removed, or -1 when the query has none.ResultCountintWhat the terminal returned (the set's size, or the count).
Remarks
Recorded by the executing code itself while the terminal runs, so it reports the engine's decision rather than a re-derivation of it. A diagnostic surface: fields may change before 1.0.
Properties
Archetypes
One entry per archetype the scan visited, in the order it visited them; empty when QueryPath answered for the whole query.
public IReadOnlyList<ArchetypeAccess> Archetypes { get; init; }
Property Value
PendingSpawnRows
Rows contributed by the transaction's own uncommitted spawns, which no index or map holds yet.
public int PendingSpawnRows { get; init; }
Property Value
QueryPath
The query-level path when one applies to the whole query (Empty, Spatial); null when each
archetype chose its own, listed in Archetypes.
public QueryAccessPath? QueryPath { get; init; }
Property Value
ResultCount
What the terminal returned (the set's size, or the count).
public int ResultCount { get; init; }
Property Value
Terminal
The terminal that ran.
public ExplainTerminal Terminal { get; init; }
Property Value
WhereFilterRemoved
Rows a Where(Func) post-filter removed, or -1 when the query has none.
public int WhereFilterRemoved { get; init; }
Property Value
Methods
Deconstruct(out ExplainTerminal, out QueryAccessPath?, out IReadOnlyList<ArchetypeAccess>, out int, out int, out int)
public void Deconstruct(out ExplainTerminal Terminal, out QueryAccessPath? QueryPath, out IReadOnlyList<ArchetypeAccess> Archetypes, out int PendingSpawnRows, out int WhereFilterRemoved, out int ResultCount)
Parameters
TerminalExplainTerminalQueryPathQueryAccessPath?ArchetypesIReadOnlyList<ArchetypeAccess>PendingSpawnRowsintWhereFilterRemovedintResultCountint
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
Equals(QueryExplanation?)
public bool Equals(QueryExplanation? other)
Parameters
otherQueryExplanation
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(QueryExplanation?, QueryExplanation?)
public static bool operator ==(QueryExplanation? left, QueryExplanation? right)
Parameters
leftQueryExplanationrightQueryExplanation
Returns
operator !=(QueryExplanation?, QueryExplanation?)
public static bool operator !=(QueryExplanation? left, QueryExplanation? right)
Parameters
leftQueryExplanationrightQueryExplanation