final class TokenGroups
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Reads balanced declaration groups from tokens already classified by sql-parser.

Methods§

public static function keyNames(list<Token> $tokens, Identifiers $identifiers): list<string>

Reads named index keys, skipping expression keys and their nested identifiers. Length prefixes, collations and sort directions are properties of a key.

Parameters

$tokenslist<Token>
$identifiersIdentifiers

Returns

list<string>
Called from 2
Calls 1
public static function constraintHeader(
    list<Token> $tokens,
    Identifiers $identifiers,
): array{?string, list<Token>}

Separates an optional constraint name from its integrity clause.

Parameters

$tokenslist<Token>
$identifiersIdentifiers

Returns

array{?string, list<Token>}
Test cases 1
Called from 2
Calls 4
public static function names(list<Token> $tokens, Identifiers $identifiers): list<string>

Parameters

$tokenslist<Token>
$identifiersIdentifiers

Returns

list<string>
Test cases 1
Calls 5

Test cases 62§

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

Dedicated tests 3
Other tests reaching this symbol 59

Relations§

Static calls 6