classOrdinalityColumn
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.
(new \SqlSemantics\Platform\MySql\Statement\Call\Json\OrdinalityColumn(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('n')))->name->value // => 'n'Properties§
public Name $nameMethods§
public function deriveColumns(
Derivation $derivation,
Environment $environment,
): list<OutputSlot>Answers the counter column.
Parameters
$derivation | Derivation | |
$environment | Environment |
Returns
list<OutputSlot>Test cases 2
Calls 6
- new OutputSlot line 51
- new Known line 51
- new Integral line 51
- class-const IntegralKind::Int() line 51
- class-const NumericModifier::Unsigned() line 51
- class-const Nullability::NotNull() line 51
public function render(Output $out): voidWrites the column.
Parameters
$out | Output |
Test cases 1
Calls 2
- method-call Output::name() line 59
- class-const NameUse::Column() line 59
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
JsonRuleTest::testColumnLowersAnOrdinalityColumncallsJsonRuleTest::testColumnsLowersEveryColumnFormcallsNestedColumnsTest::testDeriveColumnsFlattensTheNestedColumnsAsNullablecallsNestedColumnsTest::testRenderWritesTheNestedColumnscallsJsonTableColumnTest::testDeriveColumnsAnswersTheOutputSlotscalls