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

true if this result includes all events selected by the query.

selectedCount

selectedCount: number

The number of events selected by the query.

This number may be greater than events.length 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

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 be true and QueryResult.selectedCount to contain the count of events in the events array, regardless of whether this result is complete.

    Parameters

    Returns QueryResult

    the merged result