classOperatorFamilyAddition
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.
$operation = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('ALTER OPERATOR FAMILY f USING btree ADD OPERATOR 1 < (int4, int8)');
count($operation->statement->items) // => 1Properties§
public non-empty-list<OperatorClassItem> $itemspublic DottedName $namepublic Name $methodMethods§
public function __construct(
public DottedName $name,
public Name $method,
list<OperatorClassItem> $items,
)Parameters
$name | DottedName | The family name |
$method | Name | The index access method |
$items | list<OperatorClassItem> | The added items; at least one |
Calls 2
- static-call Check::listOf() line 46
- class-const OperatorClassItem::class() line 46
public function deriveStatement(Derivation $derivation): voidDerives the items and reports a storage type.
Parameters
$derivation | Derivation |
Calls 4
- method-call Derivation::environment() line 54
- method-call Derivation::report() line 58
- new ObjectProblem line 58
- class-const ObjectProblemKind::StorageInFamily() line 58
public function render(Output $out): voidWrites the statement.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 68
- class-const NameUse::Column() line 68
Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.