final class UpsertMutationRow

Names the columns an UPSERT carries its assignment values under.

The rewritten statement works out, per row, whether the conflict clause applied and what each assignment came to, and reads both back alongside the row. Those columns are carried under names no table would use, and taken off again before the row is handed to the caller.

Type Aliases§

Row = import from TableDefinition

Methods§

public function valueColumn(int $index): string
public function incomingRow(Row $row, int $valueCount): Row

Takes the carried columns off a row, leaving the row the statement wrote.

Parameters

$rowRowRow as the rewritten statement read it back
$valueCountintHow many assignments the conflict clause declares

Returns

Row The row as the caller should see it
Test cases 3
Called from 1
Calls 2

Private surface 2§

Implementation details, listed for orientation only.

private const VALUE_PREFIX = '__ztd_upsert_value_'
private const PREDICATE = '__ztd_upsert_predicate'

Test cases 20§

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

Dedicated tests 12
Other tests reaching this symbol 8

Relations§

Instantiated in 1
Method calls 5
Type declarations 1