final class NameRule
Restricted visibility: declared "@visibility SqlSemantics\Platform\Sqlite". Code outside that scope must not name this declaration.

Lowers identifier tokens and name lists into decoded names.

Rule: SQLITE-NAME-001. Scope: nm, dbnm, fullname, idlist, idlist_opt, collate and the identifier token classes. A name is decoded by SQLITE-IDENTIFIER-DECODE-001 and recorded as an operand leaf; in nm dbnm the first name is the schema when the second is present. Terminates: lists are flattened iteratively. Source: https://sqlite.org/lang_keywords.html, https://sqlite.org/lang_naming.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe lowering this rule belongs to
public function scoped(Node $name, Node $second): QualifiedName

Lowers nm dbnm: a name that the optional second name turns into its schema.

Parameters

$nameNode
$secondNode

Throws

ImplementationGap When the production has no rule
Calls 3
public function qualified(Node $fullname): QualifiedName

Lowers a fullname: a name with its optional schema.

Parameters

$fullnameNode

Throws

ImplementationGap When the production has no rule
Calls 4
public function pair(Node $schema, Node $name): QualifiedName

Lowers a schema name and an object name written around a dot.

Parameters

$schemaNode
$nameNode
Called from 1
Calls 2
public function list(Node $idlist): list<Name>

Lowers an idlist into its names in written order.

Parameters

$idlistNode

Returns

list<Name>

Throws

ImplementationGap When a production has no rule
Called from 1
Calls 4
public function optionalList(Node $list): list<Name>|null

Lowers an idlist_opt: the names in written order, or null when the list is absent.

Parameters

$listNode

Returns

list<Name>|null

Throws

ImplementationGap When the production has no rule
Calls 2
public function collation(Node $collate): ?Name

Lowers a collate: the collation name, or null when none is written.

Parameters

$collateNode

Returns

Throws

ImplementationGap When the production has no rule
Calls 2

Private surface 1§

Implementation details, listed for orientation only.

private Lowering $lowering

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