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 |
|---|---|
| System.Collections.Generic.IEnumerable<IEvent<TValue>> | The events as a |
IsComplete
Returns whether this result includes all events selected by the query.
Declaration
bool IsComplete { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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
otherhave an event with equal sequence numbers, the event fromotheris 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.
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentNullException |
|