Skip to content

Offset

Defined in: src/persistence/query/PersistenceQuery.ts:112

Cursor used by tag queries. Composite by design so two events that share a timestamp (which happens whenever a batch of events is persisted in the same Date.now() tick) still have a deterministic order — (timestamp, persistenceId, sequenceNr) is unique per event.

Compare via offsetGreaterOrEqual / offsetCompare — the tuple structure makes naive >= comparison wrong.

readonly persistenceId: string

Defined in: src/persistence/query/PersistenceQuery.ts:120

Tiebreaker when two events share timestamp. Set to the empty string for the “from-the-beginning” sentinel; the comparator treats '' as “before any real persistence id”.


readonly sequenceNr: number

Defined in: src/persistence/query/PersistenceQuery.ts:122

Tiebreaker within a persistence id when timestamps collide.


readonly timestamp: number

Defined in: src/persistence/query/PersistenceQuery.ts:114

Wall-clock time of the event’s persist call.