classPartitionRule
final class PartitionRule
Lowers partition keys and partition bounds.
Rule: PG-PARTITION-LOWER-001. Scope: OptPartitionSpec, PartitionSpec, part_params, part_elem, PartitionBoundSpec, hash_partbound, hash_partbound_elem. A one-part column reference named minvalue or maxvalue in a range bound is the infinite bound the server reads it as (transformPartitionRangeBounds). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createtable.html. Status: Implemented.
Methods§
public function specification(Node $clause): ?PartitionSpecLowers OptPartitionSpec; none is null.
Parameters
$clause | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 4
- static-call ImplementationGap::production() line 58
- method-call Lowering::items() line 65
- method-call PartitionRule::element() line 66
- new PartitionSpec line 69
public function element(Node $element): PartitionElementLowers part_elem.
Parameters
$element | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 4
- new ColumnKey line 81
- new ExpressionKey line 82
- static-call ImplementationGap::production() line 84
- new PartitionElement line 87
public function bound(Node $bound): PartitionBoundLowers PartitionBoundSpec.
Parameters
$bound | Node |
Returns
Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 2
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterTableRule::partition() packages/sql-semantics-postgres/src/Lowering/Table/AlterTableRule.php:135
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule::form() packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:137
Calls 7
- new HashBound line 100
- method-call PartitionRule::hash() line 100
- new ListBound line 101
- new RangeBound line 102
- method-call PartitionRule::datums() line 102
- new DefaultBound line 103
- static-call ImplementationGap::production() line 104
public function hash(Node $list): list<HashModulus>Lowers hash_partbound.
Parameters
$list | Node |
Returns
list<HashModulus>Throws
ImplementationGap When the production has no ruleTest cases 1
Called from 1
Calls 3
- method-call Lowering::items() line 118
- static-call ImplementationGap::production() line 121
- new HashModulus line 123
public function datums(Node $list): list<Scalar|RangeLimit>Lowers the expr_list of a range bound: MINVALUE and MAXVALUE become infinite bounds.
Parameters
$list | Node |
Returns
list<Scalar|RangeLimit>Test cases 1
Called from 1
Calls 3
- function-call
countline 138 - function-call
in_arrayline 138 - new RangeLimit line 139
Private surface 1§
Implementation details, listed for orientation only.
private Lowering $loweringTest cases 5§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
Relations§
Instantiated in 3
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterTableRule::partition() packages/sql-semantics-postgres/src/Lowering/Table/AlterTableRule.php:135
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule::statement() packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:94
- new SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule::form() packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:137
Method calls 3
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Table\AlterTableRule::partition() packages/sql-semantics-postgres/src/Lowering/Table/AlterTableRule.php:135
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule::statement() packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:94
- method-call SqlSemantics\Platform\PostgreSql\Lowering\Table\CreateTableRule::form() packages/sql-semantics-postgres/src/Lowering/Table/CreateTableRule.php:137