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.

Reading a hash bound itemdoctest
$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 $name

Methods§

public function __construct(public Name $name, public IntegerConstant $value)

Parameters

$nameNameThe word: modulus or remainder
$valueIntegerConstantThe number
public function render(Output $out): void

Writes the word and the number.

Parameters

$outOutput
Calls 2

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1
Constant reads 1