Table of Contents

Struct Transaction.IndexEntityEnumerator<T, TKey>

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

MVCC-correct streaming enumerator over any index B+Tree leaf chain. Use CurrentComponent for zero-copy ref access into page memory, or Current for a convenience copy. Supports both unique and AllowMultiple indexes (including PK).

public ref struct Transaction.IndexEntityEnumerator<T, TKey> where T : unmanaged where TKey : unmanaged

Type Parameters

T
TKey
Inherited Members

Properties

Current

Convenience accessor — copies the component into a tuple. Prefer CurrentComponent for zero-copy.

public (long EntityPK, TKey Key, T Component) Current { get; }

Property Value

(long EntityPK, TKey Key, T Component)

CurrentComponent

Zero-copy ref into the epoch-protected page memory. Valid until the next MoveNext() call.

public ref readonly T CurrentComponent { get; }

Property Value

T

CurrentEntityPK

The primary key of the current entity.

public long CurrentEntityPK { get; }

Property Value

long

CurrentKey

The index key of the current entry.

public TKey CurrentKey { get; }

Property Value

TKey

Methods

Dispose()

Releases the underlying B+Tree range enumerator and its accessors (unpins accessed pages). Idempotent.

public void Dispose()

GetEnumerator()

Returns this enumerator (enables the foreach pattern).

public Transaction.IndexEntityEnumerator<T, TKey> GetEnumerator()

Returns

Transaction.IndexEntityEnumerator<T, TKey>

MoveNext()

Advances to the next index entry visible at this transaction's snapshot (skipping entries hidden by MVCC), positioning Current / CurrentComponent. Returns false when the range is exhausted.

public bool MoveNext()

Returns

bool