classHashModulus
final class HashModulus
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.One item of a hash partition bound: MODULUS or REMAINDER and its number.
The grammar reads any word; the server accepts modulus and remainder once each and reports any other word. Source: https://www.postgresql.org/docs/17/sql-createtable.html.
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE p1 PARTITION OF p FOR VALUES WITH (MODULUS 4, REMAINDER 1)');
[$create->statement->definition->bound->items[1]->name->value, $create->statement->definition->bound->items[1]->value->digits] // => ['remainder', '1']Properties§
public Name $namepublic IntegerConstant $valueMethods§
public function __construct(public Name $name, public IntegerConstant $value)Parameters
$name | Name | The word: modulus or remainder |
$value | IntegerConstant | The number |
public function render(Output $out): voidWrites the word and the number.
Parameters
$out | Output |
Calls 2
- method-call Output::name() line 42
- class-const NameUse::Qualifier() line 42
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
HashModulusTestcalls