new QueryResult()
Query result providing a Stream of events.
Methods
-
merge(other) → {QueryResult}
-
Merge this result with
other
, combining original events and edit events, to produce an QueryResult of type VALUE_EVENT_STREAMThe following rules are applied to calculate the result:
- If this result and
other
have an event with equal sequence numbers, the event fromother
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:
Name Type Description other
QueryResult the other query result to merge Returns:
the merged result- Type
- QueryResult
- If this result and
-
stream() → {Stream}
-
Provides a stream from which to consume events.
Returns:
the events.- Type
- Stream