classTableBody
final class TableBody
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Table body operations for PostgreSQL definition.
Methods§
public function tableBody(string $sql): ?stringTable body.
Parameters
$sql | string |
Returns
?stringTest cases 1
Called from 1
Calls 5
- static-call SqlTokenStream::tokenize() line 24
- static-call PgSqlLexerProfile::create() line 24
- method-call TableBody::openingParenthesis() line 26
- method-call TableBody::isSymbol() line 31
- function-call
substrline 32
public function qualifiedIdentifierAt(
SqlTokenStream $stream,
list<SqlToken> $tokens,
int $index,
): array{name: string, next: int}|nullParameters
$stream | SqlTokenStream | |
$tokens | list<SqlToken> | |
$index | int |
Returns
array{name: string, next: int}|nullTest cases 1
Called from 2
- method-call ZtdQuery\Platform\Postgres\Schema\Definition\TableBody::qualifiedIdentifierAt() packages/ztd-query-postgres/src/Schema/Definition/TableBody.php:59
- method-call ZtdQuery\Platform\Postgres\Schema\Definition\TableBody::openingParenthesis() packages/ztd-query-postgres/src/Schema/Definition/TableBody.php:158
Calls 6
- function-call
in_arrayline 49 - class-const SqlTokenKind::Word() line 49
- class-const SqlTokenKind::QuotedIdentifier() line 49
- method-call SqlTokenStream::identifierAt() line 52
- method-call TableBody::isSymbol() line 58
- method-call TableBody::qualifiedIdentifierAt() line 59
public function isSymbol(SqlToken $token, string $symbol): boolIs symbol.
Parameters
$token | SqlToken | |
$symbol | string |
Returns
boolTest cases 1
Called from 3
- method-call ZtdQuery\Platform\Postgres\Schema\Definition\TableBody::tableBody() packages/ztd-query-postgres/src/Schema/Definition/TableBody.php:31
- method-call ZtdQuery\Platform\Postgres\Schema\Definition\TableBody::qualifiedIdentifierAt() packages/ztd-query-postgres/src/Schema/Definition/TableBody.php:58
- method-call ZtdQuery\Platform\Postgres\Schema\Definition\TableBody::openingParenthesis() packages/ztd-query-postgres/src/Schema/Definition/TableBody.php:167
Calls 1
- class-const SqlTokenKind::Symbol() line 75
public function splitTableBody(string $body): list<string>Split table body by top-level commas (respecting parentheses).
Parameters
$body | string |
Returns
list<string>Test cases 1
Called from 1
Calls 4
- function-call
strlenline 88 - static-call QuotedSpan::quotedLength() line 94
- function-call
substrline 94 - function-call
trimline 113
public function openingParenthesis(SqlTokenStream $stream, list<SqlToken> $tokens): ?SqlTokenResolves CREATE TABLE, optional existence guards and its qualified identifier.
Parameters
$stream | SqlTokenStream | |
$tokens | list<SqlToken> |
Returns
Test cases 1
Called from 1
Calls 3
- method-call TableBody::skipExistenceGuard() line 154
- method-call TableBody::qualifiedIdentifierAt() line 158
- method-call TableBody::isSymbol() line 167
Test cases 15§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
Other tests reaching this symbol 9
PgSqlSessionFactoryTestcallsTableContextTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsPgSqlSchemaParserTestcallsSchemaInitializerTestcallsRowMutationResolverTestcallsTableMutationResolverTestcallsPgSqlMutationResolverTestcalls