classTablePartitionRelation
final class TablePartitionRelation
What makes one table a partition of another.
A partition holds the rows of its parent that satisfy the predicate, so a statement against the parent reaches it and a statement against it does not reach the parent. Both are needed to work out which of them a row belongs in.
Properties§
public string $parentTablepublic string|null $predicateMethods§
public function __construct(string $parentTable, ?string $predicate)Parameters
$parentTable | string | |
$predicate | ?string |
Throws
InvalidDefinitionException When the parent table or the predicate is emptyCalls 2
- function-call
trimline 34 - new InvalidDefinitionException line 36
Test cases 13§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 2
Other tests reaching this symbol 11
TableContextTest::testApplyPartitionsUsesSharedParentRowscallsPgSqlPartitionPredicateRendererTest::testRendersDefaultPartitionPredicateFromSiblingscallsPgSqlPartitionPredicateRendererTest::testRendersSpecificPartitionPredicatecallsStorageTableTest::testStorageTableFollowsNestedParentsAndStopsCyclescallsPgSqlRewriterTest::testChildPartitionSelectUsesFilteredParentShadowSourcecallsPgSqlRewriterTest::testChildPartitionWriteMutationTargetsRootParentcallsPgSqlRewriterTest::testDefaultPartitionExcludesOnlySpecificSiblingsOfSameParentcallsPgSqlRewriterTest::testNestedPartitionInsertAllocatesIdentityFromRootRowscallsTableDefinitionTest::testCandidateKeysWithPartitionKeyCandidateKeysPartitionMetadataCopiesPreserveOtherSchemaStatecallsTableDefinitionTest::testWithPartitionRelationAnswersATableThatIsPartOfAnothercallsPgSqlMutationResolverTest::testNestedPartitionDmlTargetsRootStoragecalls
Relations§
Instantiated in 3
- new ZtdQuery\Platform\Postgres\Schema\Partition\PgSqlPartitionReflector::reflect() packages/ztd-query-postgres/src/Schema/Partition/PgSqlPartitionReflector.php:58
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:95
- new ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser::parseRelation() packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:107
Type declarations 5
- type ZtdQuery\Schema\TableDefinition packages/ztd-query-core/src/Schema/TableDefinition.php:64
- type ZtdQuery\Schema\TableDefinition packages/ztd-query-core/src/Schema/TableDefinition.php:100
- type ZtdQuery\Schema\TableDefinition packages/ztd-query-core/src/Schema/TableDefinition.php:182
- type ZtdQuery\Platform\Postgres\Rewrite\Partition\PgSqlPartitionPredicateRenderer packages/ztd-query-postgres/src/Rewrite/Partition/PgSqlPartitionPredicateRenderer.php:17
- type ZtdQuery\Platform\Postgres\Sql\Partition\PgSqlPartitionParser packages/ztd-query-postgres/src/Sql/Partition/PgSqlPartitionParser.php:79