Skip to main content

Module foreign_keys

Module foreign_keys 

Source
Expand description

PRAGMA foreign_key_check: measuring it, judging it, and repairing it.

Split out of connection.rs when that file crossed the 800-line ceiling. The split follows the seam the gate asks for rather than convenience: opening a database and applying pragmas is one responsibility, deciding whether the file satisfies its own foreign keys is another, and the second is the one that grew โ€” a guard, a repair, and the tests that keep the guard from being wider than the action it verifies.

Functionsยง

delete_foreign_key_violations
Deletes the rows reported by find_foreign_key_violations.
find_foreign_key_violations
Every PRAGMA foreign_key_check row, as (child table, rowid).