Interface IQueryResult<TValue>

The query result providing a stream of events.

Namespace: PushTechnology.ClientInterface.Client.Features.TimeSeries
Assembly: Diffusion.Client.dll
Syntax
public interface IQueryResult<TValue>
Type Parameters
Name Description
TValue

The query value type.

Remarks

Added in version 6.1.

Properties

Events

Gets the events as a System.Collections.Generic.IEnumerable{T}.

Declaration
IEnumerable<IEvent<TValue>> Events { get; }
Property Value
Type Description
IEnumerable<IEvent<TValue>>

The events as a System.Collections.Generic.IEnumerable{T} interface. Instances benefit from the various combinator and reduction methods provided by System.Linq.

IsComplete

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

Declaration
bool IsComplete { get; }
Property Value
Type Description
System.Boolean

true if SelectedCount is equal to the amount of events in Events. Otherwise false.

SelectedCount

Gets the number of events selected by the query.

Declaration
long SelectedCount { get; }
Property Value
Type Description
System.Int64

The number of events selected by the query.

Remarks

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 Limit(Int64).

StreamStructure

Gets the structure of the events.

Declaration
StreamStructure StreamStructure { get; }
Property Value
Type Description
StreamStructure

The stream structure of the provided events.

Methods

Merge(IQueryResult<TValue>)

Merges this result with other, combining original events and edit events, to produce an IQueryResult<TValue> of type VALUE_EVENT_STREAM.

Declaration
IQueryResult<TValue> Merge(IQueryResult<TValue> other)
Parameters
Type Name Description
IQueryResult<TValue> other

The other query result to merge with.

Returns
Type Description
IQueryResult<TValue>

The newly merged query result.

Remarks

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 IsComplete to return true and SelectedCount to return the count of events in the stream, regardless of whether this result is complete.

Back to top