classIdentifiers
final class Identifiers
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Reads identifiers using token kinds and dialect-specific quoting and case rules.
Properties§
public Dialect $dialectMethods§
public function __construct(public Dialect $dialect)Binds the dependencies used for semantic binding.
Parameters
$dialect | Dialect |
public function name(Token $token): stringDecodes identifier quoting and applies the supplied name policy.
Parameters
$token | Token |
Returns
stringTest cases 2
Called from 5
- method-call SqlSemantics\Core\Ast\ConstraintReader::references() packages/sql-semantics/src/Core/Ast/ConstraintReader.php:76
- method-call SqlSemantics\Core\Ast\Identifiers::parts() packages/sql-semantics/src/Core/Ast/Identifiers.php:41
- method-call SqlSemantics\Core\Ast\TokenGroups::keyNames() packages/sql-semantics/src/Core/Ast/TokenGroups.php:62
- method-call SqlSemantics\Core\Ast\TokenGroups::constraintHeader() packages/sql-semantics/src/Core/Ast/TokenGroups.php:87
- method-call SqlSemantics\Core\Ast\TokenGroups::names() packages/sql-semantics/src/Core/Ast/TokenGroups.php:99
Calls 1
- method-call Dialect::platform() line 30
public function parts(Node $node): list<string>Parameters
$node | Node |
Returns
list<string>Called from 4
- method-call SqlSemantics\Platform\Sqlite\SchemaRules::qualify() packages/sql-semantics-sqlite/src/SchemaRules.php:115
- method-call SqlSemantics\Core\Ast\ColumnReader::read() packages/sql-semantics/src/Core/Ast/ColumnReader.php:40
- method-call SqlSemantics\Core\Ast\SchemaChanges::drop() packages/sql-semantics/src/Core/Ast/SchemaChanges.php:36
- method-call SqlSemantics\Core\Ast\SchemaReader::table() packages/sql-semantics/src/Core/Ast/SchemaReader.php:74
Calls 2
- method-call Node::tokens() line 39
- method-call Identifiers::name() line 41
public function equal(string $left, string $right): boolCompares column or correlation names using this dialect.
Parameters
$left | string | |
$right | string |
Returns
boolCalled from 1
Calls 1
- method-call Dialect::platform() line 53
public function relationEqual(string $left, string $right): boolCompares relation names under the default table name case policy.
Parameters
$left | string | |
$right | string |
Returns
boolCalled from 5
- method-call SqlSemantics\Core\Binding\Scope::matches() packages/sql-semantics/src/Core/Binding/Scope.php:72
- method-call SqlSemantics\Core\Binding\Scope::matches() packages/sql-semantics/src/Core/Binding/Scope.php:76
- method-call SqlSemantics\Core\Binding\Scope::matches() packages/sql-semantics/src/Core/Binding/Scope.php:77
- method-call SqlSemantics\Core\Binding\Scope::combine() packages/sql-semantics/src/Core/Binding/Scope.php:87
- method-call SqlSemantics\Core\Binding\TableResolver::resolve() packages/sql-semantics/src/Core/Binding/TableResolver.php:37
Calls 1
- method-call Dialect::platform() line 61
Test cases 62§
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 60
SchemaAnalyzerTestcallsColumnPropertiesTestcallsColumnReaderTestcallsConstraintReaderTestcallsSchemaChangesTestcallsSchemaReaderTestcallsStatementListTestcallsTokenGroupsTest::testConstraintHeaderSeparatesQuotedNamescallsTokenGroupsTest::testNamesPreservesQuotedCommascallsTreeTestcallsTypeReaderTestcallsBinderTestcallsBoundRelationTest::testKeepsScopeAndRelationAtTheSameStagecallsExpressionBinderTest::testTokenRejectsUnmodeledTerminalscallsExpressionRulesTestcallsFromBinderTest::testKindRecognizesRightAndRejectsNaturalcallsIdentitySequenceTestcallsLiteralBinderTestcallsNullFactsTestcallsProjectionBinderTestcallsScopeTest::testExtendDoesNotMutateTheInputScopecallsSelectBinderTestcallsSelectModifiersBinderTestcallsSyntaxGuardTestcallsTableResolverTestcallsTypeResolutionTestcallsDialectTestcallsBoundSelectTestcallsColumnBindingTestcallsExpressionKindTestcallsExpressionTestcallsJoinKindTestcallsJoinTestcallsOrderingTestcallsOutputColumnTestcallsTableUseTestcallsPlatformTestcallsNameRulesTest::testNameHonorsAnInjectedPolicycallsQueryRulesTest::testOrderingNodesHonorsAnInjectedPolicycallsSchemaRulesTest::testColumnNodesHonorsAnInjectedPolicycallsSyntaxRulesTestcallsTypeRulesTestcallsColumnDefinitionTestcallsColumnGenerationTestcallsConstraintKindTestcallsGenerationKindTestcallsInvariantTestcallsTableConstraintTestcallsTableDefinitionTestcallsSchemaBuilderTestcallsSchemaTestcallsSemanticExceptionTestcallsNullabilityTestcallsTypeDescriptorTestcallsSchemaTestcallsNameRulesTestcallsPlatformTestcallsQueryRulesTestcallsSchemaRulesTestcallsTypeRulesTestcalls
Relations§
Instantiated in 2
Method calls 14
- method-call SqlSemantics\Platform\Sqlite\SchemaRules::qualify() packages/sql-semantics-sqlite/src/SchemaRules.php:115
- method-call SqlSemantics\Core\Ast\ColumnReader::read() packages/sql-semantics/src/Core/Ast/ColumnReader.php:40
- method-call SqlSemantics\Core\Ast\ConstraintReader::references() packages/sql-semantics/src/Core/Ast/ConstraintReader.php:76
- method-call SqlSemantics\Core\Ast\SchemaChanges::drop() packages/sql-semantics/src/Core/Ast/SchemaChanges.php:36
- method-call SqlSemantics\Core\Ast\SchemaReader::table() packages/sql-semantics/src/Core/Ast/SchemaReader.php:74
- method-call SqlSemantics\Core\Ast\TokenGroups::keyNames() packages/sql-semantics/src/Core/Ast/TokenGroups.php:62
- method-call SqlSemantics\Core\Ast\TokenGroups::constraintHeader() packages/sql-semantics/src/Core/Ast/TokenGroups.php:87
- method-call SqlSemantics\Core\Ast\TokenGroups::names() packages/sql-semantics/src/Core/Ast/TokenGroups.php:99
- method-call SqlSemantics\Core\Binding\Scope::column() packages/sql-semantics/src/Core/Binding/Scope.php:49
- method-call SqlSemantics\Core\Binding\Scope::matches() packages/sql-semantics/src/Core/Binding/Scope.php:72
- method-call SqlSemantics\Core\Binding\Scope::matches() packages/sql-semantics/src/Core/Binding/Scope.php:76
- method-call SqlSemantics\Core\Binding\Scope::matches() packages/sql-semantics/src/Core/Binding/Scope.php:77
- method-call SqlSemantics\Core\Binding\Scope::combine() packages/sql-semantics/src/Core/Binding/Scope.php:87
- method-call SqlSemantics\Core\Binding\TableResolver::resolve() packages/sql-semantics/src/Core/Binding/TableResolver.php:37
Type declarations 14
- type SqlSemantics\Platform\MySql\SchemaRules packages/sql-semantics-mysql/src/SchemaRules.php:91
- type SqlSemantics\Platform\PostgreSql\SchemaRules packages/sql-semantics-postgres/src/SchemaRules.php:91
- type SqlSemantics\Platform\Sqlite\SchemaRules packages/sql-semantics-sqlite/src/SchemaRules.php:112
- type SqlSemantics\Core\Ast\ColumnProperties packages/sql-semantics/src/Core/Ast/ColumnProperties.php:23
- type SqlSemantics\Core\Ast\ColumnReader packages/sql-semantics/src/Core/Ast/ColumnReader.php:24
- type SqlSemantics\Core\Ast\ConstraintReader packages/sql-semantics/src/Core/Ast/ConstraintReader.php:23
- type SqlSemantics\Core\Ast\SchemaChanges packages/sql-semantics/src/Core/Ast/SchemaChanges.php:20
- type SqlSemantics\Core\Ast\SchemaReader packages/sql-semantics/src/Core/Ast/SchemaReader.php:27
- type SqlSemantics\Core\Ast\TokenGroups packages/sql-semantics/src/Core/Ast/TokenGroups.php:54
- type SqlSemantics\Core\Ast\TokenGroups packages/sql-semantics/src/Core/Ast/TokenGroups.php:82
- type SqlSemantics\Core\Ast\TokenGroups packages/sql-semantics/src/Core/Ast/TokenGroups.php:97
- type SqlSemantics\Core\Binding\Scope packages/sql-semantics/src/Core/Binding/Scope.php:29
- type SqlSemantics\Core\Binding\TableResolver packages/sql-semantics/src/Core/Binding/TableResolver.php:23
- type SqlSemantics\Core\Policy\SchemaRules packages/sql-semantics/src/Core/Policy/SchemaRules.php:60