Table of Contents

Class QueryExplanation

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

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

Terminal ExplainTerminal

The terminal that ran.

QueryPath QueryAccessPath?

The query-level path when one applies to the whole query (Empty, Spatial); null when each archetype chose its own, listed in Archetypes.

Archetypes IReadOnlyList<ArchetypeAccess>

One entry per archetype the scan visited, in the order it visited them; empty when QueryPath answered for the whole query.

PendingSpawnRows int

Rows contributed by the transaction's own uncommitted spawns, which no index or map holds yet.

WhereFilterRemoved int

Rows a Where(Func) post-filter removed, or -1 when the query has none.

ResultCount int

What 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

IReadOnlyList<ArchetypeAccess>

PendingSpawnRows

Rows contributed by the transaction's own uncommitted spawns, which no index or map holds yet.

public int PendingSpawnRows { get; init; }

Property Value

int

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

QueryAccessPath?

ResultCount

What the terminal returned (the set's size, or the count).

public int ResultCount { get; init; }

Property Value

int

Terminal

The terminal that ran.

public ExplainTerminal Terminal { get; init; }

Property Value

ExplainTerminal

WhereFilterRemoved

Rows a Where(Func) post-filter removed, or -1 when the query has none.

public int WhereFilterRemoved { get; init; }

Property Value

int

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

Terminal ExplainTerminal
QueryPath QueryAccessPath?
Archetypes IReadOnlyList<ArchetypeAccess>
PendingSpawnRows int
WhereFilterRemoved int
ResultCount int

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

Equals(QueryExplanation?)

public bool Equals(QueryExplanation? other)

Parameters

other QueryExplanation

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

Operators

operator ==(QueryExplanation?, QueryExplanation?)

public static bool operator ==(QueryExplanation? left, QueryExplanation? right)

Parameters

left QueryExplanation
right QueryExplanation

Returns

bool

operator !=(QueryExplanation?, QueryExplanation?)

public static bool operator !=(QueryExplanation? left, QueryExplanation? right)

Parameters

left QueryExplanation
right QueryExplanation

Returns

bool