classConstraintInference
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.
$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 $constraintMethods§
public function render(Output $out): voidWrites ON CONSTRAINT and the name.
Parameters
$out | Output |
Calls 2
- method-call Output::keyword() line 40
- class-const NameUse::Column() line 40
Test cases 2§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 1
ConstraintInferenceTestcalls
Other tests reaching this symbol 1
Relations§
Instantiated in 1
Type declarations 3
- type SqlSemantics\Platform\PostgreSql\Lowering\Manipulation\InsertRule packages/sql-semantics-postgres/src/Lowering/Manipulation/InsertRule.php:203
- type SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Conflict\ConflictDoNothing packages/sql-semantics-postgres/src/Statement/Manipulation/Conflict/ConflictDoNothing.php:30
- type SqlSemantics\Platform\PostgreSql\Statement\Manipulation\Conflict\ConflictDoUpdate packages/sql-semantics-postgres/src/Statement/Manipulation/Conflict/ConflictDoUpdate.php:48