final class SequenceRule
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.

Lowers sequence options.

Rule: PG-SEQUENCE-OPTION-LOWER-001. Scope: OptSeqOptList, OptParenthesizedSeqOptList, SeqOptList, SeqOptElem, opt_by. The optional BY of INCREMENT and WITH of START and RESTART are noise (TableNoise, LeafNoise). Termination: lists are flattened iteratively. Source: https://www.postgresql.org/docs/17/sql-createsequence.html. Status: Implemented.

Methods§

public function __construct(private Lowering $lowering)

Parameters

$loweringLoweringThe hub
public function alter(Node $statement): AlterSequence
public function optional(Node $clause): list<SequenceOption>
public function noise(Node $words, string ...$signatures): void

Checks a production that only writes noise words: it must be one of the given ones.

Parameters

$wordsNode
$signaturesstring

Throws

ImplementationGap When the production has no rule
Test cases 1
Called from 1
Calls 2

Private surface 3§

Implementation details, listed for orientation only.

private const FLAGS = ['SeqOptElem: CYCLE' => \SqlSemantics\Platform\PostgreSql\Statement\Table\Seque…
private const NUMBERS = ['SeqOptElem: CACHE NumericOnly' => [\SqlSemantics\Platform\PostgreSql\Statemen…
private Lowering $lowering

Test cases 7§

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

Dedicated tests 7

Relations§

Instantiated in 5
Method calls 5