classTableDefinition
final class TableDefinition
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Reads the table name, columns and primary key from a CREATE TABLE statement.
Methods§
public function extractTableName(CreateStatement $stmt, string $sql): stringReads the declared table identifier.
Parameters
$stmt | CreateStatement | |
$sql | string |
Returns
stringThrows
Test cases 2
Called from 1
Calls 1
public function extractColumns(
CreateStatement $stmt,
string $tableName,
): array<string, ColumnDefinition>Parameters
$stmt | CreateStatement | |
$tableName | string |
Returns
array<string, ColumnDefinition>Test cases 2
Called from 1
Calls 6
- function-call
is_iterableline 39 - new MissingColumnDefinitionsException line 40
- method-call TableDefinition::extractPrimaryKeys() line 44
- function-call
is_stringline 48 - method-call ColumnParser::parseColumnDefinition() line 57
- new ColumnParser line 57
public function extractPrimaryKeys(CreateStatement $stmt): list<string>Parameters
$stmt | CreateStatement |
Returns
list<string>Test cases 2
Called from 2
Test cases 21§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 4
Other tests reaching this symbol 17
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsDatabaseFixtureProviderTestcallsFileFixtureProviderTestcallsRowMaterializerTestcallsPlanGeneratorTestcallsPlanSchemaValidatorTestcallsRowGenerationTestcallsFixtureGeneratorTestcallsFixtureProviderTestcallsConstructorHydrationTestcallsPropertyHydrationTestcallsMySqlSchemaFetcherTestcallsMySqlSchemaParserTestcallsPlatformFactoryTestcallsSqlSchemaProviderTestcallsMySqlSchemaParserTestcalls
Relations§
Instantiated in 3
- new SqlFixture\Platform\MySql\MySqlSchemaParser::parse() packages/sql-fixture/src/Platform/MySql/MySqlSchemaParser.php:38
- new SqlFixture\Platform\MySql\MySqlSchemaParser::parse() packages/sql-fixture/src/Platform/MySql/MySqlSchemaParser.php:39
- new SqlFixture\Platform\MySql\MySqlSchemaParser::parse() packages/sql-fixture/src/Platform/MySql/MySqlSchemaParser.php:40
Method calls 3
- method-call SqlFixture\Platform\MySql\MySqlSchemaParser::parse() packages/sql-fixture/src/Platform/MySql/MySqlSchemaParser.php:38
- method-call SqlFixture\Platform\MySql\MySqlSchemaParser::parse() packages/sql-fixture/src/Platform/MySql/MySqlSchemaParser.php:39
- method-call SqlFixture\Platform\MySql\MySqlSchemaParser::parse() packages/sql-fixture/src/Platform/MySql/MySqlSchemaParser.php:40