final class ExclusionElement
    implements Clause
    uses Snapshot
Public API: explicitly declared with @visibility public.

One element of an exclusion constraint: a key and the operator no two rows may satisfy together.

Mirrors one pair of the exclusions list of CONSTR_EXCLUSION. The operator is written as an operator or as OPERATOR(...), which the operator name keeps. Source: https://www.postgresql.org/docs/17/sql-createtable.html#SQL-CREATETABLE-EXCLUDE.

Reading the operator of an exclusion elementdoctest
$create = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('CREATE TABLE t (c circle, EXCLUDE USING gist (c WITH &&))');
    $create->statement->definition->elements[1]->elements[0]->operator->name->value // => '&&'

Properties§

public IndexElement $element
public OperatorName $operator

Methods§

public function __construct(public IndexElement $element, public OperatorName $operator)

Parameters

$elementIndexElementThe key
$operatorOperatorNameThe operator
public function deriveClause(Derivation $derivation, Environment $environment): void

Derives the key.

Parameters

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

Writes the key, WITH and the operator.

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 2
Constant reads 1