final class OperatorFamilyAddition
    implements Statement
    uses Snapshot
Public API: explicitly declared with @visibility public.

ALTER OPERATOR FAMILY name USING method ADD item, ...: adds operators and support functions to a family.

Mirrors PostgreSQL's AlterOpFamilyStmt with isDrop false. The grammar accepts a STORAGE item, which the server rejects. Source: https://www.postgresql.org/docs/17/sql-alteropfamily.html.

Counting the added itemsdoctest
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER OPERATOR FAMILY f USING btree ADD OPERATOR 1 < (int4, int8)');
    count($operation->statement->items) // => 1

Properties§

public non-empty-list<OperatorClassItem> $items
public DottedName $name
public Name $method

Methods§

public function __construct(
    public DottedName $name,
    public Name $method,
    list<OperatorClassItem> $items,
)

Parameters

$nameDottedNameThe family name
$methodNameThe index access method
$itemslist<OperatorClassItem>The added items; at least one
Calls 2
public function deriveStatement(Derivation $derivation): void

Derives the items and reports a storage type.

Parameters

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

Writes the statement.

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