final class HashBound
    implements PartitionBound
    uses Snapshot
Public API: explicitly declared with @visibility public.

A hash partition bound: FOR VALUES WITH (MODULUS m, REMAINDER r).

Mirrors PartitionBoundSpec with PARTITION_STRATEGY_HASH. An item other than modulus and remainder is reported. Source: https://www.postgresql.org/docs/17/sql-createtable.html.

Writing a hash bounddoctest
(new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE p1 PARTITION OF p FOR VALUES WITH (modulus 4, remainder 0)')->toString() // => 'CREATE TABLE p1 PARTITION OF p FOR VALUES WITH (modulus 4, remainder 0)'

Properties§

public non-empty-list<HashModulus> $items

Methods§

public function __construct(list<HashModulus> $items)

Parameters

$itemslist<HashModulus>The items; at least one
Calls 2
public function deriveClause(Derivation $derivation, Environment $environment): void

Reports the items the server does not recognize.

Parameters

$derivationDerivation
$environmentEnvironment
Calls 3
public function render(Output $out): void

Writes the bound.

Parameters

$outOutput
Calls 1

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