Skip to main content

delete_foreign_key_violations

Function delete_foreign_key_violations 

Source
pub fn delete_foreign_key_violations(
    conn: &Connection,
    violations: &[(String, i64)],
) -> Result<usize, AppError>
Expand description

Deletes the rows reported by find_foreign_key_violations.

The table name arrives from the pragma, so it already comes from sqlite_master; it is still checked against the live table list before being interpolated, because a name reaching SQL by string concatenation deserves a witness rather than an assumption.

§Errors

Returns Err when a delete fails, or when a reported table does not exist.