Interface IQuery<TValue>

The configured query.

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

The query value type.

Remarks

A default query that performs a value range query of an entire time series can be obtained using RangeQuery and further configured using methods of the IRangeQuery<TValue> interface.

Added in version 6.1.

Methods

SelectFromAsync(String)

Evaluates this query for a time series topic.

Declaration
Task<IQueryResult<TValue>> SelectFromAsync(string topicPath)
Parameters
Type Name Description
System.String topicPath

The path of the time series topic to query.

Returns
Type Description
Task<IQueryResult<TValue>>

The Task representing the current operation.

Remarks

The calling session must have the READ_TOPIC topic permission for topicPath to evaluate the query. The QUERY_OBSOLETE_TIME_SERIES_EVENTS topic permission is also required if this is a ForEdits() range query, or a ForValues() range query with an EditRange().

If the operation completes successfully, the Task result will be the IQueryResult<TValue> of the requested selection.

This method is the same as calling SelectFromAsync(String, CancellationToken) with System.Threading.CancellationToken.None.

Exceptions
Type Condition
NoSuchTopicException

There is no topic bound to topicPath. Thrown by the returned Task.

IncompatibleTopicException

The TValue type does not match the event data type of the time series topic bound to topicPath, or the topic bound to topicPath is not a time series topic. Thrown by the returned Task.

InvalidQueryException

The range query is not valid for the time series. Thrown by the returned Task.

SessionSecurityException

The calling session does not have READ_TOPIC permission for topicPath. The calling session does not have QUERY_OBSOLETE_TIME_SERIES_EVENTS permission for topicPath and this is a ForEdits() range query, or a ForValues() range query with an EditRange(). Thrown by the returned Task.

SessionClosedException

The calling session is closed. Thrown by the returned Task.

See Also
SelectFromAsync(String, CancellationToken)

SelectFromAsync(String, CancellationToken)

Evaluates this query for a time series topic.

Declaration
Task<IQueryResult<TValue>> SelectFromAsync(string topicPath, CancellationToken cancellationToken)
Parameters
Type Name Description
System.String topicPath

The path of the time series topic to query.

CancellationToken cancellationToken

The cancellation token used to cancel the current operation.

Returns
Type Description
Task<IQueryResult<TValue>>

The Task representing the current operation.

Remarks

The calling session must have the READ_TOPIC topic permission for topicPath to evaluate the query. The QUERY_OBSOLETE_TIME_SERIES_EVENTS topic permission is also required if this is a ForEdits() range query, or a ForValues() range query with an EditRange().

If the operation completes successfully, the Task result will be the IQueryResult<TValue> of the requested selection.

Exceptions
Type Condition
NoSuchTopicException

There is no topic bound to topicPath. Thrown by the returned Task.

IncompatibleTopicException

The TValue type does not match the event data type of the time series topic bound to topicPath, or the topic bound to topicPath is not a time series topic. Thrown by the returned Task.

InvalidQueryException

The range query is not valid for the time series. Thrown by the returned Task.

SessionSecurityException

The calling session does not have READ_TOPIC permission for topicPath. The calling session does not have QUERY_OBSOLETE_TIME_SERIES_EVENTS permission for topicPath and this is a ForEdits() range query, or a ForValues() range query with an EditRange(). Thrown by the returned Task.

SessionClosedException

The calling session is closed. Thrown by the returned Task.

Back to top