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.

Reading a conflict targetdoctest
$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> $terms
public Scalar|null $where = null

Methods§

public function __construct(list<SortTerm> $terms, public Scalar|null $where = null)

Parameters

$termslist<SortTerm>The indexed columns or expressions; at least one
$whereScalar|nullThe predicate of a partial index
Calls 2
public function render(Output $out): void

Writes the target.

Parameters

$outOutput
Calls 2

Test cases 4§

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 3

Relations§

Instantiated in 2
Type declarations 2