classCatalogColumn
final class CatalogColumn
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Interprets PostgreSQL catalog type and default metadata.
Methods§
public function mapDataType(array{data_type: string, character_maximum_length: ?string, numeric_precision: ?string, numeric_scale: ?string, udt_name: string} $col): stringParameters
$col | array{data_type: string, character_maximum_length: ?string, numeric_precision: ?string, numeric_scale: ?string, udt_name: string} |
Returns
stringTest cases 2
Called from 1
Calls 2
- function-call
strtoupperline 19 - method-call CatalogColumn::elementType() line 38
public function elementType(string $udtName): stringNames the declared type of an array element from the catalog type of the array, such as _int4.
Parameters
$udtName | string | Catalog type name of the array, with its leading underscore |
Returns
string The type name a CREATE TABLE declares, such as `INTEGER`Test cases 1
Called from 2
- method-call SqlFixture\Platform\PostgreSql\Schema\CatalogColumn::mapDataType() packages/sql-fixture/src/Platform/PostgreSql/Schema/CatalogColumn.php:38
- method-call SqlFixture\Platform\PostgreSql\Schema\CatalogColumn::resolveType() packages/sql-fixture/src/Platform/PostgreSql/Schema/CatalogColumn.php:80
public function resolveType(array{data_type: string, udt_name: string, character_maximum_length: ?string, numeric_precision: ?string, numeric_scale: ?string} $row): stringParameters
$row | array{data_type: string, udt_name: string, character_maximum_length: ?string, numeric_precision: ?string, numeric_scale: ?string} |
Returns
stringTest cases 2
Called from 1
Calls 2
- function-call
strtoupperline 77 - method-call CatalogColumn::elementType() line 80
public function parseDefault(?string $value): int|float|bool|string|nullParses default.
Parameters
$value | ?string |
Returns
int|float|bool|string|nullTest cases 2
Called from 1
Test cases 16§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
CatalogColumnTest::testElementTypeNamesTheDeclaredTypecallsCatalogColumnTest::testMapDataTypeFormatsNumericAndLengthParameterscallsCatalogColumnTest::testMapDataTypeRetainsTheCatalogDeclarationcallsCatalogColumnTest::testParseDefaultInterpretsCatalogLiteralscallsCatalogColumnTest::testParseDefaultRemovesCastsAndRecognizesSequencescallsCatalogColumnTest::testResolveTypeNormalizesArrayElementscalls
Other tests reaching this symbol 10
PostgreSqlEndToEndTestcallsSqliteIntegrationTestcallsPostgreSqlSchemaFetcherTestcallsCatalogDdlTestcallsCatalogSchemaTestcallsDatabaseFixtureProviderTestcallsFileFixtureProviderTestcallsFixtureProviderTestcallsPlatformFactoryTestcallsSqlSchemaProviderTestcalls
Relations§
Instantiated in 3
- new SqlFixture\Platform\PostgreSql\Schema\CatalogDdl::reconstructCreateTable() packages/sql-fixture/src/Platform/PostgreSql/Schema/CatalogDdl.php:39
- new SqlFixture\Platform\PostgreSql\Schema\CatalogSchema::fetchSchemaFromInformationSchema() packages/sql-fixture/src/Platform/PostgreSql/Schema/CatalogSchema.php:42
- new SqlFixture\Platform\PostgreSql\Schema\CatalogSchema::fetchSchemaFromInformationSchema() packages/sql-fixture/src/Platform/PostgreSql/Schema/CatalogSchema.php:47
Method calls 3
- method-call SqlFixture\Platform\PostgreSql\Schema\CatalogDdl::reconstructCreateTable() packages/sql-fixture/src/Platform/PostgreSql/Schema/CatalogDdl.php:39
- method-call SqlFixture\Platform\PostgreSql\Schema\CatalogSchema::fetchSchemaFromInformationSchema() packages/sql-fixture/src/Platform/PostgreSql/Schema/CatalogSchema.php:42
- method-call SqlFixture\Platform\PostgreSql\Schema\CatalogSchema::fetchSchemaFromInformationSchema() packages/sql-fixture/src/Platform/PostgreSql/Schema/CatalogSchema.php:47