Skip to content

EventCursorSelector

Defined in: runtime/selector.ts:133

Selector for querying events. Events are immutable, so there is no write variant. This selector is only available in system/sudo context.

Events are queried by structured fields only - payload filtering is not supported.

TEvent

after(date): this

Defined in: runtime/selector.ts:138

Filter by the timestamp the event was created. Only events created after the supplied date will be returned.

number | Date | DateTime<boolean>

this


before(date): this

Defined in: runtime/selector.ts:144

Filter by the timestamp the event was created. Only events created before the supplied date will be returned.

number | Date | DateTime<boolean>

this


cursor(value): this

Defined in: runtime/selector.ts:57

CursorInput

this

CursorSelector.cursor


debug(): this

Defined in: runtime/selector.ts:149

Enables debug mode for the selector.

this


execute(): CursorSelectorResult<TEvent>

Defined in: runtime/selector.ts:58

CursorSelectorResult<TEvent>

CursorSelector.execute


first(): Promise<TEvent | undefined>

Defined in: runtime/selector.ts:59

Promise<TEvent | undefined>

CursorSelector.first


itemId(id): this

Defined in: runtime/selector.ts:154

Filter by the item targeted by the event.

SelectorIdInput

this


iterator(): AsyncGenerator<TEvent, void, undefined>

Defined in: runtime/selector.ts:60

AsyncGenerator<TEvent, void, undefined>

CursorSelector.iterator


limit(value): this

Defined in: runtime/selector.ts:61

number

this

CursorSelector.limit


parentEvent(id): this

Defined in: runtime/selector.ts:159

Filter by the parent event (the event that triggered this event).

SelectorIdInput

this


prn(prn): this

Defined in: runtime/selector.ts:164

Filter by event PRN (the event type/topic as defined in the schema).

string | string[]

this


rootParent(id): this

Defined in: runtime/selector.ts:169

Filter by the root parent event (top-level event in the trace).

SelectorIdInput

this


traceId(id): this

Defined in: runtime/selector.ts:174

Filter by trace ID for correlation.

string

this