Skip to content

DataqueryBuilder🔗

Constructor🔗

new DataqueryBuilder()

Methods🔗

build🔗

Builds the object.

build()

alias🔗

alias(string $alias)

channel🔗

channel(string $channel)

csvContent🔗

csvContent(string $csvContent)

csvFileName🔗

csvFileName(string $csvFileName)

csvWave🔗

@param array<\Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Testdata\CSVWave>> $csvWave

csvWave(array $csvWave)

datasource🔗

For mixed data sources the selected datasource is on the query level.

For non mixed scenarios this is undefined.

TODO find a better way to do this ^ that's friendly to schema

TODO this shouldn't be unknown but DataSourceRef | null

@param mixed $datasource

datasource($datasource)

dropPercent🔗

Drop percentage (the chance we will lose a point 0-100)

dropPercent(float $dropPercent)

errorType🔗

errorType(\Grafana\Foundation\Testdata\DataqueryErrorType $errorType)

flamegraphDiff🔗

flamegraphDiff(bool $flamegraphDiff)

hide🔗

true if query is disabled (ie should not be returned to the dashboard)

Note this does not always imply that the query should not be executed since

the results from a hidden query may be used as the input to other queries (SSE etc)

hide(bool $hide)

labels🔗

labels(string $labels)

levelColumn🔗

levelColumn(bool $levelColumn)

lines🔗

lines(int $lines)

nodes🔗

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Testdata\NodesQuery> $nodes

nodes(\Grafana\Foundation\Cog\Builder $nodes)

points🔗

@param array> $points

points(array $points)

pulseWave🔗

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Testdata\PulseWaveQuery> $pulseWave

pulseWave(\Grafana\Foundation\Cog\Builder $pulseWave)

queryType🔗

Specify the query flavor

TODO make this required and give it a default

queryType(string $queryType)

rawFrameContent🔗

rawFrameContent(string $rawFrameContent)

refId🔗

A unique identifier for the query within the list of targets.

In server side expressions, the refId is used as a variable name to identify results.

By default, the UI will assign A->Z; however setting meaningful names may be useful.

refId(string $refId)

scenarioId🔗

scenarioId(\Grafana\Foundation\Testdata\TestDataQueryType $scenarioId)

seriesCount🔗

seriesCount(int $seriesCount)

sim🔗

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Testdata\SimulationQuery> $sim

sim(\Grafana\Foundation\Cog\Builder $sim)

spanCount🔗

spanCount(int $spanCount)

stream🔗

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Testdata\StreamingQuery> $stream

stream(\Grafana\Foundation\Cog\Builder $stream)

stringInput🔗

stringInput(string $stringInput)

usa🔗

@param \Grafana\Foundation\Cog\Builder<\Grafana\Foundation\Testdata\USAQuery> $usa

usa(\Grafana\Foundation\Cog\Builder $usa)

See also🔗