final class OrdinalityColumn
    implements JsonTableColumn
    uses Snapshot
Public API: explicitly declared with @visibility public.

A name FOR ORDINALITY column of JSON_TABLE: the number of the row, counting from 1.

Rule: MYSQL-JSON-TABLE-COLUMN-001 (ordinality). The column is an INT UNSIGNED that is never NULL at its own nesting level. Terminates: a leaf. Source: https://dev.mysql.com/doc/refman/8.4/en/json-table-functions.html. Status: Implemented.

Reading an ordinality columndoctest
(new \SqlSemantics\Platform\MySql\Statement\Call\Json\OrdinalityColumn(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('n')))->name->value // => 'n'

Properties§

public Name $name

Methods§

public function __construct(public Name $name)

Parameters

$nameNameThe column name
public function deriveColumns(
    Derivation $derivation,
    Environment $environment,
): list<OutputSlot>
public function render(Output $out): void

Writes the column.

Parameters

$outOutput
Test cases 1
Calls 2

Test cases 7§

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

Dedicated tests 2
Other tests reaching this symbol 5

Relations§

Instantiated in 1