classUpsertProjection
final class UpsertProjection
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Upsert projection operations for PostgreSQL insert.
Methods§
public function __construct(PgSqlParser $parser, PgSqlNativeUpsertProjector $upsertProjector)Supplies the dependencies used by this UpsertProjection.
Parameters
$parser | PgSqlParser | |
$upsertProjector | PgSqlNativeUpsertProjector |
public function projectUpsert(
string $sql,
string $selectSql,
string $tableName,
list<string> $tableColumns,
array<string, array{candidateKeys?: array<string, array<int, string>>, partialUniqueIndexes?: array<string, PartialUniqueIndex>}> $tables,
): stringParameters
$sql | string | |
$selectSql | string | |
$tableName | string | |
$tableColumns | list<string> | |
$tables | array<string, array{candidateKeys?: array<string, array<int, string>>, partialUniqueIndexes?: array<string, PartialUniqueIndex>}> |
Returns
stringTest cases 1
Called from 2
- method-call ZtdQuery\Platform\Postgres\Rewrite\Transformer\InsertTransformer::transform() packages/ztd-query-postgres/src/Rewrite/Transformer/InsertTransformer.php:74
- method-call ZtdQuery\Platform\Postgres\Rewrite\Transformer\InsertTransformer::transform() packages/ztd-query-postgres/src/Rewrite/Transformer/InsertTransformer.php:80
Calls 5
- method-call PgSqlParser::extractOnConflictUpdateColumns() line 45
- new CandidateKeySet line 46
- method-call PgSqlParser::extractOnConflictTarget() line 50
- method-call PgSqlNativeUpsertProjector::project() line 63
- method-call PgSqlParser::extractOnConflictUpdateWhere() line 69
Private surface 2§
Implementation details, listed for orientation only.
private PgSqlParser $parserprivate PgSqlNativeUpsertProjector $upsertProjectorTest cases 6§
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 5
PgSqlSessionFactoryTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsInsertTransformerTestcallsPgSqlTransformerTestcalls
Relations§
Instantiated in 2
- new ZtdQuery\Platform\Postgres\Rewrite\Transformer\InsertTransformer::transform() packages/ztd-query-postgres/src/Rewrite/Transformer/InsertTransformer.php:74
- new ZtdQuery\Platform\Postgres\Rewrite\Transformer\InsertTransformer::transform() packages/ztd-query-postgres/src/Rewrite/Transformer/InsertTransformer.php:80
Method calls 2
- method-call ZtdQuery\Platform\Postgres\Rewrite\Transformer\InsertTransformer::transform() packages/ztd-query-postgres/src/Rewrite/Transformer/InsertTransformer.php:74
- method-call ZtdQuery\Platform\Postgres\Rewrite\Transformer\InsertTransformer::transform() packages/ztd-query-postgres/src/Rewrite/Transformer/InsertTransformer.php:80