Class Query
Query influx using the Flux language
Inheritance
Namespace: InfluxDB.Client.Api.Domain
Assembly: InfluxDB.Client.dll
Syntax
public class Query : IEquatable<Query>
Constructors
Query()
Initializes a new instance of the Query class.
Declaration
protected Query()
Query(File, String, Nullable<Query.TypeEnum>, Dictionary<String, Object>, Dialect, Nullable<DateTime>)
Initializes a new instance of the Query class.
Declaration
public Query(File _extern = null, string query = null, Query.TypeEnum? type = null, Dictionary<string, object> _params = null, Dialect dialect = null, DateTime? now = null)
Parameters
Type | Name | Description |
---|---|---|
File | _extern | _extern. |
System.String | query | Query script to execute. (required). |
System.Nullable<Query.TypeEnum> | type | The type of query. Must be "flux".. |
Dictionary<System.String, System.Object> | _params | Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both). |
Dialect | dialect | dialect. |
System.Nullable<DateTime> | now | Specifies the time that should be reported as "now" in the query. Default is the server's now time.. |
Properties
_Query
Query script to execute.
Declaration
public string _Query { get; set; }
Property Value
Type | Description |
---|---|
System.String | Query script to execute. |
Dialect
Gets or Sets Dialect
Declaration
public Dialect Dialect { get; set; }
Property Value
Type | Description |
---|---|
Dialect |
Extern
Gets or Sets Extern
Declaration
public File Extern { get; set; }
Property Value
Type | Description |
---|---|
File |
Now
Specifies the time that should be reported as "now" in the query. Default is the server's now time.
Declaration
public DateTime? Now { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<DateTime> | Specifies the time that should be reported as "now" in the query. Default is the server's now time. |
Params
Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both)
Declaration
public Dictionary<string, object> Params { get; set; }
Property Value
Type | Description |
---|---|
Dictionary<System.String, System.Object> | Enumeration of key/value pairs that respresent parameters to be injected into query (can only specify either this field or extern and not both) |
Type
The type of query. Must be "flux".
Declaration
public Query.TypeEnum? Type { get; set; }
Property Value
Type | Description |
---|---|
System.Nullable<Query.TypeEnum> | The type of query. Must be "flux". |
Methods
Equals(Query)
Returns true if Query instances are equal
Declaration
public bool Equals(Query input)
Parameters
Type | Name | Description |
---|---|---|
Query | input | Instance of Query to be compared |
Returns
Type | Description |
---|---|
System.Boolean | Boolean |
Equals(Object)
Returns true if objects are equal
Declaration
public override bool Equals(object input)
Parameters
Type | Name | Description |
---|---|---|
System.Object | input | Object to be compared |
Returns
Type | Description |
---|---|
System.Boolean | Boolean |
GetHashCode()
Gets the hash code
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | Hash code |
ToJson()
Returns the JSON string presentation of the object
Declaration
public virtual string ToJson()
Returns
Type | Description |
---|---|
System.String | JSON string presentation of the object |
ToString()
Returns the string presentation of the object
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | String presentation of the object |