classConflictTarget
final class ConflictTarget
implements Node
uses Snapshot
Public API: explicitly declared with
@visibility public.The uniqueness constraint an upsert clause reacts to: indexed columns and the predicate of a partial index.
Source: https://sqlite.org/lang_upsert.html.
$insert = (new \SqlSemantics\Platform\Sqlite\Semantics())->analyze('INSERT INTO t VALUES (1) ON CONFLICT (a) WHERE a > 0 DO NOTHING');
[count($insert->statement->upserts[0]->target->terms), $insert->statement->upserts[0]->target->where !== null] // => [1, true]Properties§
public non-empty-list<SortTerm> $termspublic Scalar|null $where = nullMethods§
public function __construct(list<SortTerm> $terms, public Scalar|null $where = null)Parameters
$terms | list<SortTerm> | The indexed columns or expressions; at least one |
$where | Scalar|null | The predicate of a partial index |
Calls 2
- static-call Check::listOf() line 39
- class-const SortTerm::class() line 39
public function render(Output $out): voidWrites the target.
Parameters
$out | Output |
Calls 2
- method-call Output::symbol() line 47
- method-call Output::keyword() line 49
Test cases 4§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.