classPgSqlNativeUpsertProjector
final class PgSqlNativeUpsertProjector
Native upsert projector for PostgreSQL queries.
Methods§
public function __construct()Initializes the collaborators and state used by this native upsert projector.
Calls 1
public function project(
string $incomingSql,
string $tableName,
list<string> $tableColumns,
array<string, array<int, string>> $candidateKeys,
array<string, string> $assignments,
?string $predicate = null,
?string $conflictPredicate = null,
): stringParameters
$incomingSql | string | |
$tableName | string | |
$tableColumns | list<string> | |
$candidateKeys | array<string, array<int, string>> | |
$assignments | array<string, string> | |
$predicate | ?string | |
$conflictPredicate | ?string |
Returns
stringTest cases 6
PgSqlNativeUpsertProjectorTest::testBindsPartialConflictPredicateToExistingAndIncomingRowscallsPgSqlNativeUpsertProjectorTest::testBindsQualifiedAndQuotedIdentifiersWithoutChangingForeignNamespacescallsPgSqlNativeUpsertProjectorTest::testBindsUnqualifiedQuotedIdentifiercallsPgSqlNativeUpsertProjectorTest::testMatchesColumnsAndIncomingNamespaceCaseInsensitivelycallsPgSqlNativeUpsertProjectorTest::testProjectKeepsIdentifiersInsideScalarSubqueryInTheirNativeScopecallsPgSqlNativeUpsertProjectorTest::testReturnsIncomingProjectionWhenConflictMetadataIsUnavailablecalls
Called from 1
Calls 13
- method-call IdentifierQuoter::quote() line 54
- class-const PgSqlNativeUpsertProjector::INCOMING_ALIAS() line 54
- class-const PgSqlNativeUpsertProjector::EXISTING_ALIAS() line 55
- method-call ConflictPredicate::conflictPredicate() line 57
- new ConflictPredicate line 57
- method-call ConflictPredicate::withPredicate() line 59
- new UpsertMutationRow line 67
- function-call
array_valuesline 68 - method-call ExpressionBinder::bindExpression() line 69
- new ExpressionBinder line 69
- method-call UpsertMutationRow::valueColumn() line 70
- method-call UpsertMutationRow::predicateColumn() line 75
- function-call
implodeline 79
Private surface 4§
Implementation details, listed for orientation only.
private const INCOMING_ALIAS = '__ztd_incoming'private const EXISTING_ALIAS = '__ztd_existing'private IdentifierQuoter $quoterprivate non-empty-list<string> $incomingNamespacesTest cases 12§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
PgSqlNativeUpsertProjectorTest::testBindsPartialConflictPredicateToExistingAndIncomingRowscallsPgSqlNativeUpsertProjectorTest::testBindsQualifiedAndQuotedIdentifiersWithoutChangingForeignNamespacescallsPgSqlNativeUpsertProjectorTest::testBindsUnqualifiedQuotedIdentifiercallsPgSqlNativeUpsertProjectorTest::testMatchesColumnsAndIncomingNamespaceCaseInsensitivelycallsPgSqlNativeUpsertProjectorTest::testProjectKeepsIdentifiersInsideScalarSubqueryInTheirNativeScopecallsPgSqlNativeUpsertProjectorTest::testReturnsIncomingProjectionWhenConflictMetadataIsUnavailablecalls
Other tests reaching this symbol 6
PgSqlSessionFactoryTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsUpsertProjectionTest::testProjectUpsertcallsInsertTransformerTestcallsPgSqlTransformerTestcalls
Relations§
Instantiated in 1
Method calls 1
Type declarations 3
- type ZtdQuery\Platform\Postgres\Rewrite\Transformer\Insert\UpsertProjection packages/ztd-query-postgres/src/Rewrite/Transformer/Insert/UpsertProjection.php:20
- type ZtdQuery\Platform\Postgres\Rewrite\Transformer\Insert\UpsertProjection packages/ztd-query-postgres/src/Rewrite/Transformer/Insert/UpsertProjection.php:25
- type ZtdQuery\Platform\Postgres\Rewrite\Transformer\InsertTransformer packages/ztd-query-postgres/src/Rewrite/Transformer/InsertTransformer.php:29