Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface QueryResult

Query result providing a Stream of events.

Hierarchy

  • QueryResult

Index

Properties

events

events: Array<Event<any>>

The timeseries events returned

isComplete

isComplete: boolean

Returns whether this result includes all events selected by the query.

selectedCount

selectedCount: number

Returns the number of events selected by the query.

This number may be greater than stream().count() due to a policy of the time series topic to limit the number of returned results, or the use of RangeQuery.limit.

streamStructure

streamStructure: StreamStructure

Returns a description of the structure of the result stream.

Methods

merge

  • Merge this result with other , combining original events and edit events, to produce a new QueryResult.

    The following rules are applied to calculate the result:

    • If this result and other have an event with equal sequence numbers, the event from other is selected.
    • An edit event is selected in place of its original event.
    • If there are multiple edit events of an original edit, the one with the highest sequence is selected.

    The returned result implements QueryResult.isComplete to return true and QueryResult.selectedCount to return the count of events in the stream, regardless of whether this result is complete.

    Parameters

    Returns QueryResult

    the merged result