query

package
v2.7.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildDefaultAST

func BuildDefaultAST(query string) api.Query

BuildDefaultAST wraps a raw query string in the AST structure expected by the query API, injecting default values expected by the CLI formatter.

func BuildExternAST

func BuildExternAST(profilers []string) *api.Extern

BuildExternAST constructs a Flux AST tree to import and set the profilers option.

See the docs for more info: https://docs.influxdata.com/influxdb/cloud/reference/flux/stdlib/profiler/

func NewFormattingPrinter

func NewFormattingPrinter() *formattingPrinter

Types

type Client

type Client struct {
	clients.CLI
	api.QueryApi
	ResultPrinter
}

func (Client) Query

func (c Client) Query(ctx context.Context, params *Params) error

type Params

type Params struct {
	clients.OrgParams
	Query     string
	Profilers []string
}

type ResultPrinter

type ResultPrinter interface {
	PrintQueryResults(resultStream io.ReadCloser, out io.Writer) error
}
var RawResultPrinter ResultPrinter = &rawResultPrinter{}

RawResultPrinter streams query results directly to the output without any parsing or formatting.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL