classSelectProjection
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
$parser | PgSqlParser | |
$identityAllocator | ShadowIdentityAllocator | |
$insertSelectRenderer | InsertSelectRenderer | |
$cteComposer | PgSqlCteShadowComposer |
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,
): stringProjects an INSERT SELECT source with generated identity starting values.
Parameters
$sql | string | |
$identityTable | string | |
$tableColumns | list<string> | |
$insertColumns | list<string> | |
$columnDefaults | array<string, string> | |
$identityStrategies | array<string, IdentityGenerationStrategy> | |
$existingRows | array<int, array<string, T>> |
Returns
stringThrows
Called from 1
Calls 5
- method-call PgSqlParser::extractInsertSelectSql() line 39
- new UnsupportedSqlException line 41
- method-call ShadowIdentityAllocator::allocateSelectStarts() line 45
- method-call InsertSelectRenderer::render() line 51
- method-call PgSqlCteShadowComposer::carryPrefix() line 52
Private surface 4§
Implementation details, listed for orientation only.
private PgSqlParser $parserprivate ShadowIdentityAllocator $identityAllocatorprivate InsertSelectRenderer $insertSelectRendererprivate PgSqlCteShadowComposer $cteComposerTest 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
PgSqlSessionFactoryTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsInsertSelectRendererTestcallsInsertTransformerTestcallsPgSqlTransformerTestcalls