Documentation ¶
Index ¶
- Variables
- func QueryWith(api *influxapi.QueryAPI, f Fluxer) (res *influxapi.QueryTableResult, err error)
- type FilterBuilder
- func (b FilterBuilder) And(and string) FilterBuilder
- func (b FilterBuilder) Eq(eq string) FilterBuilder
- func (b FilterBuilder) Field(field string) FilterBuilder
- func (b FilterBuilder) GreaterThan(gt string) FilterBuilder
- func (b FilterBuilder) GreaterThanEq(gte string) FilterBuilder
- func (b FilterBuilder) LessThan(lt string) FilterBuilder
- func (b FilterBuilder) LessThanEq(lte string) FilterBuilder
- func (b FilterBuilder) Measurement(measurement string) FilterBuilder
- func (b FilterBuilder) NotEq(neq string) FilterBuilder
- func (b FilterBuilder) Or(or string) FilterBuilder
- func (b FilterBuilder) Tag(tag string) FilterBuilder
- func (b FilterBuilder) ToFlux() (qString string, args []interface{}, err error)
- type Fluxer
- type FromBuilder
- type StatementBuilderType
Constants ¶
This section is empty.
Variables ¶
var ErrClientNotSet = fmt.Errorf("cannot run; no Client set (Query)")
client not set error is reused in multiple different places
var StatementBuilder = StatementBuilderType(builder.EmptyBuilder)
StatementBuilder is a parent builder for other builders, e.g. SelectBuilder.
Functions ¶
Types ¶
type FilterBuilder ¶
filter builder type
func (FilterBuilder) And ¶
func (b FilterBuilder) And(and string) FilterBuilder
func (FilterBuilder) Eq ¶
func (b FilterBuilder) Eq(eq string) FilterBuilder
func (FilterBuilder) Field ¶
func (b FilterBuilder) Field(field string) FilterBuilder
func (FilterBuilder) GreaterThan ¶
func (b FilterBuilder) GreaterThan(gt string) FilterBuilder
func (FilterBuilder) GreaterThanEq ¶
func (b FilterBuilder) GreaterThanEq(gte string) FilterBuilder
func (FilterBuilder) LessThan ¶
func (b FilterBuilder) LessThan(lt string) FilterBuilder
func (FilterBuilder) LessThanEq ¶
func (b FilterBuilder) LessThanEq(lte string) FilterBuilder
func (FilterBuilder) Measurement ¶
func (b FilterBuilder) Measurement(measurement string) FilterBuilder
func (FilterBuilder) NotEq ¶
func (b FilterBuilder) NotEq(neq string) FilterBuilder
func (FilterBuilder) Or ¶
func (b FilterBuilder) Or(or string) FilterBuilder
func (FilterBuilder) Tag ¶
func (b FilterBuilder) Tag(tag string) FilterBuilder
func (FilterBuilder) ToFlux ¶
func (b FilterBuilder) ToFlux() (qString string, args []interface{}, err error)
generates string query to pass to influx client
type Fluxer ¶
Fluxer is the interface that wraps the ToFlux method.
ToFlux will return a FluxQL(string) representation of the Fluxer (with arguments) It may also return an error.
For variables within Builder types, ToFlux is consumed by the appendToFlux method which will append the result of ToFlux to the query string
[]interface{} is used to pass arguments to the query string
type FromBuilder ¶
FromBuilder is the builder type for the from('bucket') function creates the actual fromQuery variable
func From ¶
func From(bucket string) FromBuilder
From returns a new FromBuilder with the given bucket name.
func (FromBuilder) From ¶
func (b FromBuilder) From(from string) FromBuilder
func (FromBuilder) Range ¶
func (b FromBuilder) Range(t map[string]string) FromBuilder
func (FromBuilder) ToFlux ¶
func (b FromBuilder) ToFlux() (qString string, args []interface{}, err error)
generates string query to pass to influx client
type StatementBuilderType ¶
func (StatementBuilderType) From ¶
func (b StatementBuilderType) From(from string) FromBuilder