classColumnNames
final class ColumnNames
Checks and writes the bare column name lists of partitioning clauses and table changes.
Rule: MYSQL-COLUMN-NAMES-001. A column name is known to be absent only when every relation visible at the position has a completely known row shape and none of them has a slot of that name; names are compared with the column name comparison of the context (MySQL column names are not case sensitive). An absent name is the diagnostic UnknownColumn; nothing is reported while a shape is open. Terminates: one pass over the names and slots. Source: https://dev.mysql.com/doc/refman/8.4/en/identifier-case-sensitivity.html. Status: Implemented.
Methods§
public function check(list<Name> $names, Derivation $derivation, Environment $scope): voidReports each name that no visible relation of the scope has.
Parameters
$names | list<Name> | The column names |
$derivation | Derivation | |
$scope | Environment |
Called from 2
- method-call SqlSemantics\Platform\MySql\Statement\Partition\Method\ColumnsMethod::deriveMethod() packages/sql-semantics-mysql/src/Statement/Partition/Method/ColumnsMethod.php:52
- method-call SqlSemantics\Platform\MySql\Statement\Partition\Method\KeyMethod::deriveMethod() packages/sql-semantics-mysql/src/Statement/Partition/Method/KeyMethod.php:54
Calls 3
- method-call ColumnNames::present() line 39
- method-call Derivation::report() line 40
- new UnknownColumn line 40
public function present(Name $name, Environment $scope): ?boolTells whether a visible relation of the scope has a column, or answers null when an open shape leaves it undecided.
Parameters
$name | Name | |
$scope | Environment |
Returns
?boolCalled from 1
Calls 1
- method-call ColumnNames::count() line 52
public function count(RowShape $shape, Name $name, Environment $scope): intCounts the slots of a row shape a name denotes.
Parameters
$shape | RowShape | |
$name | Name | |
$scope | Environment |
Returns
intWrites a parenthesized, comma-separated list of column names.
Called from 2
- method-call SqlSemantics\Platform\MySql\Statement\Partition\Method\ColumnsMethod::render() packages/sql-semantics-mysql/src/Statement/Partition/Method/ColumnsMethod.php:61
- method-call SqlSemantics\Platform\MySql\Statement\Partition\Method\KeyMethod::render() packages/sql-semantics-mysql/src/Statement/Partition/Method/KeyMethod.php:69
Calls 3
- method-call Output::symbol() line 83
- method-call Output::name() line 88
- class-const NameUse::Column() line 88
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ColumnNamesTestcalls
Relations§
Instantiated in 4
- new SqlSemantics\Platform\MySql\Statement\Partition\Method\ColumnsMethod::deriveMethod() packages/sql-semantics-mysql/src/Statement/Partition/Method/ColumnsMethod.php:52
- new SqlSemantics\Platform\MySql\Statement\Partition\Method\ColumnsMethod::render() packages/sql-semantics-mysql/src/Statement/Partition/Method/ColumnsMethod.php:61
- new SqlSemantics\Platform\MySql\Statement\Partition\Method\KeyMethod::deriveMethod() packages/sql-semantics-mysql/src/Statement/Partition/Method/KeyMethod.php:54
- new SqlSemantics\Platform\MySql\Statement\Partition\Method\KeyMethod::render() packages/sql-semantics-mysql/src/Statement/Partition/Method/KeyMethod.php:69
Method calls 4
- method-call SqlSemantics\Platform\MySql\Statement\Partition\Method\ColumnsMethod::deriveMethod() packages/sql-semantics-mysql/src/Statement/Partition/Method/ColumnsMethod.php:52
- method-call SqlSemantics\Platform\MySql\Statement\Partition\Method\ColumnsMethod::render() packages/sql-semantics-mysql/src/Statement/Partition/Method/ColumnsMethod.php:61
- method-call SqlSemantics\Platform\MySql\Statement\Partition\Method\KeyMethod::deriveMethod() packages/sql-semantics-mysql/src/Statement/Partition/Method/KeyMethod.php:54
- method-call SqlSemantics\Platform\MySql\Statement\Partition\Method\KeyMethod::render() packages/sql-semantics-mysql/src/Statement/Partition/Method/KeyMethod.php:69