final class SelectProjection
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

Builds the result-select projection of an INSERT SELECT source.

Methods§

public function __construct(
    private PgSqlParser $parser,
    private ShadowIdentityAllocator $identityAllocator,
    private InsertSelectRenderer $insertSelectRenderer,
    private PgSqlCteShadowComposer $cteComposer,
)

Shares the INSERT transformer's staged identity state and prefix renderer.

Parameters

$parserPgSqlParser
$identityAllocatorShadowIdentityAllocator
$insertSelectRendererInsertSelectRenderer
$cteComposerPgSqlCteShadowComposer
public function render<T>(
    string $sql,
    string $identityTable,
    list<string> $tableColumns,
    list<string> $insertColumns,
    array<string, string> $columnDefaults,
    array<string, IdentityGenerationStrategy> $identityStrategies,
    array<int, array<string, T>> $existingRows,
): string

Projects an INSERT SELECT source with generated identity starting values.

Parameters

$sqlstring
$identityTablestring
$tableColumnslist<string>
$insertColumnslist<string>
$columnDefaultsarray<string, string>
$identityStrategiesarray<string, IdentityGenerationStrategy>
$existingRowsarray<int, array<string, T>>

Returns

string
Test cases 1
Called from 1
Calls 5

Private surface 4§

Implementation details, listed for orientation only.

private PgSqlParser $parser
private ShadowIdentityAllocator $identityAllocator
private InsertSelectRenderer $insertSelectRenderer
private PgSqlCteShadowComposer $cteComposer

Test cases 7§

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 6

Relations§

Instantiated in 1
Method calls 1