Class QueryApiSync
The synchronous version of QueryApi.
The client uses HttpClient is supposed to use maximus size of the body to int.MaxValue.
If you want to query large data, use QueryAsync(String, String, CancellationToken) method.
Inheritance
Implements
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public class QueryApiSync : AbstractQueryClient, IQueryApiSync
Constructors
QueryApiSync(InfluxDBClientOptions, QueryService, IFluxResultMapper)
Declaration
protected QueryApiSync(InfluxDBClientOptions options, QueryService service, IFluxResultMapper mapper)
Parameters
| Type | Name | Description |
|---|---|---|
| InfluxDBClientOptions | options | |
| QueryService | service | |
| InfluxDB.Client.Core.Flux.Internal.IFluxResultMapper | mapper |
Methods
AfterIntercept<T>(Int32, Func<IEnumerable<HeaderParameter>>, T)
Declaration
protected override T AfterIntercept<T>(int statusCode, Func<IEnumerable<HeaderParameter>> headers, T body)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | statusCode | |
| Func<IEnumerable<HeaderParameter>> | headers | |
| T | body |
Returns
| Type | Description |
|---|---|
| T |
Type Parameters
| Name | Description |
|---|---|
| T |
BeforeIntercept(RestRequest)
Declaration
protected override void BeforeIntercept(RestRequest request)
Parameters
| Type | Name | Description |
|---|---|---|
| RestRequest | request |
QuerySync(Query, String, CancellationToken)
Executes the Flux query against the InfluxDB 2.x and synchronously map whole response to FluxTables.
NOTE: This method is not intended for large query results.
Declaration
public List<FluxTable> QuerySync(Query query, string org = null, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Query | query | the flux query to execute |
| System.String | org | specifies the source organization. If the org is not specified then is used config from Org. |
| CancellationToken | cancellationToken | Token that enables callers to cancel the request. |
Returns
| Type | Description |
|---|---|
| List<FluxTable> | FluxTables that are matched the query |
QuerySync(String, String, CancellationToken)
Executes the Flux query against the InfluxDB 2.x and synchronously map whole response to FluxTables.
NOTE: This method is not intended for large query results.
Declaration
public List<FluxTable> QuerySync(string query, string org = null, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | query | the flux query to execute |
| System.String | org | specifies the source organization. If the org is not specified then is used config from Org. |
| CancellationToken | cancellationToken | Token that enables callers to cancel the request. |
Returns
| Type | Description |
|---|---|
| List<FluxTable> | FluxTables that are matched the query |
QuerySync<T>(Query, String, CancellationToken)
Executes the Flux query against the InfluxDB 2.x and synchronously map whole response to list of object with given type.
NOTE: This method is not intended for large query results.
Declaration
public List<T> QuerySync<T>(Query query, string org = null, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| Query | query | the flux query to execute |
| System.String | org | specifies the source organization. If the org is not specified then is used config from Org. |
| CancellationToken | cancellationToken | Token that enables callers to cancel the request. |
Returns
| Type | Description |
|---|---|
| List<T> | Measurements which are matched the query |
Type Parameters
| Name | Description |
|---|---|
| T | the type of measurement |
QuerySync<T>(String, String, CancellationToken)
Executes the Flux query against the InfluxDB 2.x and synchronously map whole response to list of object with given type.
NOTE: This method is not intended for large query results.
Declaration
public List<T> QuerySync<T>(string query, string org = null, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | query | the flux query to execute |
| System.String | org | specifies the source organization. If the org is not specified then is used config from Org. |
| CancellationToken | cancellationToken | Token that enables callers to cancel the request. |
Returns
| Type | Description |
|---|---|
| List<T> | Measurements which are matched the query |
Type Parameters
| Name | Description |
|---|---|
| T | the type of measurement |