final class ConstraintInference
    implements Node
    uses Snapshot
Public API: explicitly declared with @visibility public.

The conflict target ON CONSTRAINT constraint_name that names the constraint ON CONFLICT arbitrates on.

Mirrors the conname of PostgreSQL's InferClause. Source: https://www.postgresql.org/docs/17/sql-insert.html#SQL-ON-CONFLICT.

Reading the constraint namedoctest
$insert = (new \SqlSemantics\Platform\PostgreSql\Semantics())->analyze('INSERT INTO t VALUES (1) ON CONFLICT ON CONSTRAINT t_pkey DO NOTHING');
    $insert->statement->conflict->target->constraint->value // => 't_pkey'

Properties§

public Name $constraint

Methods§

public function __construct(public Name $constraint)

Parameters

$constraintNameThe constraint name
public function render(Output $out): void

Writes ON CONSTRAINT and the name.

Parameters

$outOutput
Calls 2

Test cases 2§

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

Dedicated tests 1
Other tests reaching this symbol 1

Relations§

Instantiated in 1
Type declarations 3