final class ModificationScope
Restricted visibility: declared "@visibility SqlSemantics\Platform\PostgreSql". Code outside that scope must not name this declaration.

Derives the parts that INSERT, UPDATE, DELETE and MERGE share: common tables, the target, other inputs and RETURNING.

Rule: PG-MODIFICATION-SCOPE-001. The common tables of the statement are bound first, in the outer environment, and every query of the statement sees them. The target follows PG-TARGET-TABLE-001. The FROM items of UPDATE, the USING items of DELETE and the source of MERGE follow PG-FROM-SCOPE-001 in the environment of the common tables; they do not see the target. A FROM item that the same name qualifies as the target is reported, unless neither has a correlation name and the two names differ. RETURNING sees the target and the other inputs; its items follow PG-TARGET-001 and PG-STAR-001 and are the rows of the statement, which has no columns without RETURNING. Source: https://www.postgresql.org/docs/17/sql-update.html, https://www.postgresql.org/docs/17/sql-delete.html, https://www.postgresql.org/docs/17/dml-returning.html. Status: Implemented.

Methods§

public function open(
    ?CommonTables $with,
    TargetTable $target,
    Derivation $derivation,
    Environment $outer,
    bool $merge = false,
): array{Environment, VisibleRelation}
public function conflicts(
    VisibleRelation $target,
    list<VisibleRelation> $others,
    Derivation $derivation,
): void

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 6
Method calls 15