final class LoadHistogram
    implements Histogram
    uses Snapshot
Public API: explicitly declared with @visibility public.

UPDATE HISTOGRAM ON column USING DATA 'json': a request to store a histogram given as its JSON form (MySQL 8.0.31 and later).

The columns are those of the one table ANALYZE TABLE names; the statement checks them (MYSQL-HISTOGRAM-001). Source: https://dev.mysql.com/doc/refman/8.4/en/analyze-table.html.

Reading the histogram requestdoctest
$analyze = (new \SqlSemantics\Platform\MySql\Semantics())->analyze("ANALYZE TABLE t UPDATE HISTOGRAM ON a USING DATA '{}'");
    [$analyze->toString(), $analyze->statement->histogram->data->value === '{}'] // => ["ANALYZE TABLE t UPDATE HISTOGRAM ON a USING DATA '{}'", true]

Properties§

public list<Name> $columns
public Text $data

Methods§

public function __construct(list<Name> $columns, public Text $data)

Parameters

$columnslist<Name>The column names in written order; at least one
$dataTextThe JSON form of the histogram

Throws

InvalidConstruction When the column list is empty
Calls 2
public function columns(): list<Name>

Answers the column names in written order.

Returns

list<Name>
Test cases 1
public function render(Output $out): void

Writes the request.

Parameters

$outOutput
Calls 3

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1
Type declarations 1