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

Derives and writes the referenced side of a foreign key.

Rule: PG-FOREIGN-KEY-001. The referenced table is resolved by PG-TABLE-TARGET-001 and recorded as the relation facts of the constraint; a relation declared as another kind than a table is reported (PG-RELATION-KIND-001: referenced relation "%s" is not a table). When its column list is complete, a referenced column it lacks is reported ("column referenced in foreign key constraint does not exist"). At most one ON UPDATE and one ON DELETE clause are written, in either order. MATCH PARTIAL is not implemented by the server, and a SET NULL or SET DEFAULT column list is accepted only for ON DELETE; both are reported. Source: https://www.postgresql.org/docs/17/sql-createtable.html#SQL-CREATETABLE-PARMS-REFERENCES. Termination: one pass over the columns and actions. Status: Implemented.

Methods§

public function derive(
    Derivation $derivation,
    Node $constraint,
    QualifiedName $table,
    list<Name> $columns,
    ?KeyMatch $match,
    list<ReferentialAction> $actions,
): 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 6