classTableDefinitionClauses
final class TableDefinitionClauses
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Table definition clauses operations for PostgreSQL statement.
Methods§
public function extractTruncateTables(string $sql): list<string>Parameters
$sql | string |
Returns
list<string>Test cases 1
Called from 2
Calls 4
- static-call SqlTokenStream::tokenize() line 23
- static-call PgSqlLexerProfile::create() line 23
- method-call IdentifierDecoder::truncateIdentifierAt() line 41
- new IdentifierDecoder line 41
public function extractCreateTableName(string $sql): ?stringExtract table name from CREATE TABLE statement.
Parameters
$sql | string |
Returns
?stringTest cases 1
Called from 1
Calls 5
- static-call PostgreSqlLexicalMasker::maskComments() line 76
- function-call
preg_matchline 77 - method-call IdentifierDecoder::unquoteIdentifier() line 78
- new IdentifierDecoder line 78
- method-call IdentifierDecoder::stripSchemaPrefix() line 78
public function hasIfNotExists(string $sql): boolCheck if CREATE TABLE has IF NOT EXISTS.
Parameters
$sql | string |
Returns
boolTest cases 1
Called from 1
Calls 2
- static-call PostgreSqlLexicalMasker::maskComments() line 89
- function-call
preg_matchline 90
public function hasCreateTableAsSelect(string $sql): boolCheck if CREATE TABLE has AS SELECT.
Parameters
$sql | string |
Returns
boolTest cases 1
Called from 1
Calls 2
- static-call PostgreSqlLexicalMasker::maskComments() line 98
- function-call
preg_matchline 99
public function extractCreateTableSelectSql(string $sql): ?stringExtract the SELECT SQL from CREATE TABLE ... AS SELECT.
Parameters
$sql | string |
Returns
?stringTest cases 1
Called from 1
Calls 3
- static-call PostgreSqlLexicalMasker::maskComments() line 107
- function-call
preg_matchline 108 - function-call
trimline 109
public function hasCreateTableLike(string $sql): boolCheck if CREATE TABLE has LIKE clause.
Parameters
$sql | string |
Returns
boolTest cases 1
Called from 1
Calls 2
- static-call PostgreSqlLexicalMasker::maskComments() line 120
- function-call
preg_matchline 121
public function extractCreateTableLikeSource(string $sql): ?stringExtract the LIKE source table name.
Parameters
$sql | string |
Returns
?stringTest cases 1
Called from 1
Calls 5
- static-call PostgreSqlLexicalMasker::maskComments() line 129
- function-call
preg_matchline 130 - method-call IdentifierDecoder::unquoteIdentifier() line 131
- new IdentifierDecoder line 131
- method-call IdentifierDecoder::stripSchemaPrefix() line 131
public function extractDropTableName(string $sql): ?stringExtract table name from DROP TABLE statement.
Parameters
$sql | string |
Returns
?stringTest cases 1
Called from 1
Calls 5
- static-call PostgreSqlLexicalMasker::maskComments() line 142
- function-call
preg_matchline 143 - method-call IdentifierDecoder::unquoteIdentifier() line 144
- new IdentifierDecoder line 144
- method-call IdentifierDecoder::stripSchemaPrefix() line 144
public function hasDropTableIfExists(string $sql): boolCheck if DROP TABLE has IF EXISTS.
Parameters
$sql | string |
Returns
boolTest cases 1
Called from 1
Calls 2
- static-call PostgreSqlLexicalMasker::maskComments() line 155
- function-call
preg_matchline 156
public function extractAlterTableName(string $sql): ?stringExtract table name from ALTER TABLE statement.
Parameters
$sql | string |
Returns
?stringTest cases 1
Called from 1
Calls 5
- static-call PostgreSqlLexicalMasker::maskComments() line 164
- function-call
preg_matchline 165 - method-call IdentifierDecoder::unquoteIdentifier() line 166
- new IdentifierDecoder line 166
- method-call IdentifierDecoder::stripSchemaPrefix() line 166
Test cases 27§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 10
TableDefinitionClausesTest::testExtractAlterTableNamecallsTableDefinitionClausesTest::testExtractCreateTableLikeSourcecallsTableDefinitionClausesTest::testExtractCreateTableNamecallsTableDefinitionClausesTest::testExtractCreateTableSelectSqlcallsTableDefinitionClausesTest::testExtractDropTableNamecallsTableDefinitionClausesTest::testExtractTruncateTablescallsTableDefinitionClausesTest::testHasCreateTableAsSelectcallsTableDefinitionClausesTest::testHasCreateTableLikecallsTableDefinitionClausesTest::testHasDropTableIfExistscallsTableDefinitionClausesTest::testHasIfNotExistscalls
Other tests reaching this symbol 17
PgSqlSessionFactoryTestcallsTableContextTestcallsPgSqlQueryGuardTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsDeleteTransformerTestcallsSelectProjectionTestcallsUpsertProjectionTestcallsValueProjectionTestcallsInsertSelectRendererTestcallsInsertTransformerTestcallsPgSqlTransformerTestcallsUpdateTransformerTestcallsRowMutationResolverTestcallsTableMutationResolverTestcallsPgSqlMutationResolverTestcallsPgSqlParserTestcalls
Relations§
Instantiated in 11
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractTruncateTable() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:265
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractTruncateTables() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:276
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractCreateTableName() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:287
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::hasIfNotExists() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:298
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::hasCreateTableAsSelect() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:309
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractCreateTableSelectSql() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:320
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::hasCreateTableLike() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:331
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractCreateTableLikeSource() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:342
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractDropTableName() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:353
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::hasDropTableIfExists() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:364
- new ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractAlterTableName() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:375
Method calls 11
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractTruncateTable() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:265
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractTruncateTables() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:276
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractCreateTableName() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:287
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::hasIfNotExists() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:298
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::hasCreateTableAsSelect() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:309
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractCreateTableSelectSql() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:320
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::hasCreateTableLike() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:331
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractCreateTableLikeSource() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:342
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractDropTableName() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:353
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::hasDropTableIfExists() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:364
- method-call ZtdQuery\Platform\Postgres\Sql\PgSqlParser::extractAlterTableName() packages/ztd-query-postgres/src/Sql/PgSqlParser.php:375