classConflictPredicate
final class ConflictPredicate
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.
Conflict predicate operations for PostgreSQL upsert.
Methods§
public function __construct(IdentifierQuoter $quoter)Supplies the dependencies used by this ConflictPredicate.
Parameters
$quoter | IdentifierQuoter |
public function conflictPredicate(
array<string, array<int, string>> $candidateKeys,
string $existingAlias,
string $incomingAlias,
): stringParameters
$candidateKeys | array<string, array<int, string>> | |
$existingAlias | string | |
$incomingAlias | string |
Returns
stringTest cases 1
Called from 1
Calls 2
- method-call IdentifierQuoter::quote() line 38
- function-call
implodeline 41
public function qualified(string $alias, string $column): stringQualified.
Parameters
$alias | string | |
$column | string |
Returns
stringTest cases 1
Called from 2
- method-call ZtdQuery\Platform\Postgres\Rewrite\Upsert\ExpressionBinder::bindExpression() packages/ztd-query-postgres/src/Rewrite/Upsert/ExpressionBinder.php:77
- method-call ZtdQuery\Platform\Postgres\Rewrite\Upsert\ExpressionBinder::qualifiedReplacement() packages/ztd-query-postgres/src/Rewrite/Upsert/ExpressionBinder.php:139
Calls 1
- method-call IdentifierQuoter::quote() line 52
public function withPredicate(
string $conflict,
string $conflictPredicate,
string $tableName,
list<string> $tableColumns,
non-empty-list<string> $incomingNamespaces,
): stringApplies a partial-index predicate to both existing and incoming candidate rows.
Parameters
$conflict | string | |
$conflictPredicate | string | |
$tableName | string | |
$tableColumns | list<string> | |
$incomingNamespaces | non-empty-list<string> |
Returns
stringCalled from 1
Calls 2
- method-call ExpressionBinder::bindExpression() line 61
- new ExpressionBinder line 61
Private surface 1§
Implementation details, listed for orientation only.
private IdentifierQuoter $quoterTest cases 11§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 8
PgSqlSessionFactoryTestcallsPgSqlRewriterTestcallsStatementRewriterTestcallsUpsertProjectionTestcallsInsertTransformerTestcallsPgSqlTransformerTestcallsExpressionBinderTestcallsPgSqlNativeUpsertProjectorTestcalls
Relations§
Instantiated in 4
- new ZtdQuery\Platform\Postgres\Rewrite\Upsert\ExpressionBinder::bindExpression() packages/ztd-query-postgres/src/Rewrite/Upsert/ExpressionBinder.php:77
- new ZtdQuery\Platform\Postgres\Rewrite\Upsert\ExpressionBinder::qualifiedReplacement() packages/ztd-query-postgres/src/Rewrite/Upsert/ExpressionBinder.php:139
- new ZtdQuery\Platform\Postgres\Rewrite\Upsert\PgSqlNativeUpsertProjector::project() packages/ztd-query-postgres/src/Rewrite/Upsert/PgSqlNativeUpsertProjector.php:57
- new ZtdQuery\Platform\Postgres\Rewrite\Upsert\PgSqlNativeUpsertProjector::project() packages/ztd-query-postgres/src/Rewrite/Upsert/PgSqlNativeUpsertProjector.php:59
Method calls 4
- method-call ZtdQuery\Platform\Postgres\Rewrite\Upsert\ExpressionBinder::bindExpression() packages/ztd-query-postgres/src/Rewrite/Upsert/ExpressionBinder.php:77
- method-call ZtdQuery\Platform\Postgres\Rewrite\Upsert\ExpressionBinder::qualifiedReplacement() packages/ztd-query-postgres/src/Rewrite/Upsert/ExpressionBinder.php:139
- method-call ZtdQuery\Platform\Postgres\Rewrite\Upsert\PgSqlNativeUpsertProjector::project() packages/ztd-query-postgres/src/Rewrite/Upsert/PgSqlNativeUpsertProjector.php:57
- method-call ZtdQuery\Platform\Postgres\Rewrite\Upsert\PgSqlNativeUpsertProjector::project() packages/ztd-query-postgres/src/Rewrite/Upsert/PgSqlNativeUpsertProjector.php:59