final class ForeignKeyIntegrity

Refuses a shadow in which some child references a parent that is not there.

This is the check that runs once the cascades have finished, so that a statement whose consequences left the shadow inconsistent is refused rather than read back. A key with a null in it references nothing and is left alone, which is what SQL says a partly-null key means.

Methods§

public function __construct(
    private TableDefinitionRegistry $registry,
    private ForeignKeyEnds $ends,
    private ParentKeyLookup $parents = new \ZtdQuery\Shadow\ParentKeyLookup(),
    private RowMatch $rows = new \ZtdQuery\Shadow\Row\RowMatch(),
)

Private surface 4§

Implementation details, listed for orientation only.

private TableDefinitionRegistry $registry
private ForeignKeyEnds $ends
private ParentKeyLookup $parents = new \ZtdQuery\Shadow\ParentKeyLookup()
private RowMatch $rows = new \ZtdQuery\Shadow\Row\RowMatch()

Test cases 9§

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

Dedicated tests 5
Other tests reaching this symbol 4

Relations§

Instantiated in 1
Method calls 1