classColumnDeclaration
final class ColumnDeclaration
Public API: explicitly declared with
@visibility public.How a column was declared: the family it belongs to, and the platform's own words for it.
The family is what every platform agrees on, so the shadow can reason about a column without knowing which database it came from. The native text is what that database actually wrote, kept verbatim because only it can say what precision, width or signedness was asked for.
$type = new \ZtdQuery\Schema\ColumnType(\ZtdQuery\Schema\ColumnTypeFamily::INTEGER, 'BIGINT');
$type->family // => \ZtdQuery\Schema\ColumnTypeFamily::INTEGER
$type->nativeType // => 'BIGINT'Properties§
public ColumnTypeFamily $familypublic string $nativeTypeMethods§
public function __construct(public ColumnTypeFamily $family, public string $nativeType)Parameters
$family | ColumnTypeFamily | The family every platform agrees this belongs to |
$nativeType | string | The platform's own words for the type, verbatim |
Test cases 41§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
ColumnDeclarationTest::testDifferentFamiliescovers and callsColumnDeclarationTest::testKeepsTheFamilyAndTheNameTheDatabaseGivesTheTypecovers and calls
Other tests reaching this symbol 39
CastRendererContractTest::testAllColumnTypeFamiliesHandledcallsCastRendererContractTest::testRenderCastForIntegerProducesExactFormcallsCastRendererContractTest::testRenderCastForStringIncludesStringTypecallsCastRendererContractTest::testRenderCastIsDeterministiccallsCastRendererContractTest::testRenderCastReturnsNonEmptyStringcallsCastRendererContractTest::testRenderNullCastContainsCastKeywordcallsCastRendererContractTest::testRenderNullCastContainsNullKeywordcallsCastRendererContractTest::testRenderNullCastProducesExactFormcallsCastRendererContractTest::testRenderNullCastReturnsNonEmptyStringcallsTransformerContractTest::emptyRowsTableContextcallsTransformerContractTest::singleRowTableContextcallsTransformerContractTest::testCteContainsSelectUnionStructurecallsFakeCastRenderercallsFakeResultColumnTypeResolver::resolvecallsFakeSchemaParser::parsecallsFakeSqlTransformer::buildCtecallsFakeValueRenderercallsResultColumnTest::testCarriesNameAndTypecallsResultSetTest::testCarriesEmptyRowsAndColumnsIndependentlycallsStatementInterfaceTest::testResultColumnsRemainAvailableForAResultWithNoRowscallsCastRendererTest::testRenderCastWritesTheExpressionAsTheTypeItIsBeingReadForcallsCastRendererTest::testRenderNullCastWritesANullTheServerWillReadAsThatTypecallsValueRendererTest::testRenderValueTakesTheColumnTypeIntoAccountWhereOneIsKnowncallsResultSelectRunnerTest::testReadResultSetReadsMetadataBeforeRowscallsResultSelectRunnerTest::testRunResultSetRetainsColumnsWhenRowsAreEmptycallsTableDefinitionTest::testKeepsEverythingATableDeclaresAboutItselfcallsResultSetMutationTest::testApplyResultSetGivesTheNewTableTheColumnsTheResultDescribedcallsResultSetMutationTest::testApplyResultSetGivesTheNewTableTheRowsTheResultCarriedcallsCreateTableAsSelectMutationTest::testApplyInfersColumnsFromResultRowsForSelectStarcallsCreateTableAsSelectMutationTest::testApplyKeepsParsedProjectionNamesWhenMetadataIsUnavailablecallsCreateTableAsSelectMutationTest::testApplyRegistersTableWithColumnsFromSelectcallsCreateTableAsSelectMutationTest::testApplyResultSetCreatesEmptyTableFromMetadatacallsCreateTableAsSelectMutationTest::testApplyResultSetKeepsExplicitColumnNamesWithMetadataTypescallsCreateTableAsSelectMutationTest::testApplyResultSetUsesMetadataTypesInsteadOfTextFallbackcallsCreateTableAsSelectMutationTest::testApplyStoresRowsFromSelectResultcallsCreateTableAsSelectMutationTest::testApplyThrowsExceptionWhenTableExistscallsCreateTableAsSelectMutationTest::testApplyWithIfNotExistsSkipsWhenTableExistscallsCreateTableAsSelectMutationTest::testTableNameReturnsNewTableNamecallsShadowSavepointTestcalls
Relations§
Constant reads 1
- class-const packages/ztd-query-core/src/Compatibility/ClassAliases.php packages/ztd-query-core/src/Compatibility/ClassAliases.php:44
Type declarations 8
- type ZtdQuery\Connection\ResultColumn packages/ztd-query-core/src/Connection/ResultColumn.php:22
- type ZtdQuery\Platform\CastRenderer packages/ztd-query-core/src/Platform/CastRenderer.php:24
- type ZtdQuery\Platform\CastRenderer packages/ztd-query-core/src/Platform/CastRenderer.php:34
- type ZtdQuery\Platform\MissingResultColumnTypeResolver packages/ztd-query-core/src/Platform/MissingResultColumnTypeResolver.php:31
- type ZtdQuery\Platform\ResultColumnTypeResolver packages/ztd-query-core/src/Platform/ResultColumnTypeResolver.php:21
- type ZtdQuery\Platform\ValueRenderer packages/ztd-query-core/src/Platform/ValueRenderer.php:38
- type ZtdQuery\Shadow\Mutation\Table\CreateTableAsSelectMutation packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableAsSelectMutation.php:28
- type ZtdQuery\Shadow\Mutation\Table\CreateTableAsSelectMutation packages/ztd-query-core/src/Shadow/Mutation/Table/CreateTableAsSelectMutation.php:42