final class UpdateTransformer
    implements SqlTransformer

Transforms UPDATE statements into SELECT projections with CTE shadowing for SQLite.

SQLite does not support multi-table UPDATE, so this is simpler than MySQL.

Methods§

public function __construct(SqliteParser $parser, SelectTransformer $selectTransformer)

Binds the dependencies used by this operation.

Parameters

$parserSqliteParser
$selectTransformerSelectTransformer
Calls 1
public function buildProjection(
    string $sql,
    string $targetTable,
    array<int, string> $columns,
    array<int, string> $primaryKeys = [],
): string

Build a result-select SQL from an UPDATE statement.

Parameters

$sqlstring
$targetTablestring
$columnsarray<int, string>
$primaryKeysarray<int, string>

Returns

string
Test cases 10
Called from 2
Calls 9
public function buildProjectionMeta(
    string $sql,
    array<int, string> $columns,
): array{sql: string, table: string}

Build projection metadata for mutation resolver.

Parameters

$sqlstring
$columnsarray<int, string>

Returns

array{sql: string, table: string}

Throws

RuntimeException
Test cases 2
Calls 3

Private surface 3§

Implementation details, listed for orientation only.

private SqliteParser $parser
private SelectTransformer $selectTransformer
private SqliteCteShadowComposer $cteComposer

Test cases 114§

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

Dedicated tests 19
Other tests reaching this symbol 95

Relations§

Instantiated in 1
Method calls 1
Type declarations 2