final class SynchronizeMutation
    implements DataMutation

Replaces a table with a database-evaluated complete result set.

Type Aliases§

Row = import from TableDefinition

Methods§

public function __construct(
    private string $tableName,
    private ?TableDefinition $definition = null,
    private string $sql = '',
    private RowMatch $match = new \ZtdQuery\Shadow\Row\RowMatch(),
    private RowMultiset $rows = new \ZtdQuery\Shadow\Row\RowMultiset(),
)

Binds the instance to what it will work from.

Parameters

$tableNamestringTable the result set stands for
$definition?TableDefinitionWhat that table will and will not hold, where it is known
$sqlstringStatement to name in anything it refuses
$matchRowMatchFinds a row among rows by the key that identifies it
$rowsRowMultisetAccounts for rows that repeat
Test cases 7
Calls 2
public function apply(ShadowStore $store, array $rows): void
public function tableName(): string

Table name.

Returns

string
Test cases 1
public function affectedRowCount(array<int, Row> $before, array<int, Row> $after): int

Private surface 5§

Implementation details, listed for orientation only.

private string $tableName
private ?TableDefinition $definition = null
private string $sql = ''
private RowMatch $match = new \ZtdQuery\Shadow\Row\RowMatch()
private RowMultiset $rows = new \ZtdQuery\Shadow\Row\RowMultiset()

Test cases 10§

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

Dedicated tests 7
Other tests reaching this symbol 3

Relations§

Constant reads 1
Type checks 2