ForeignKeyViolation
A foreign key violation produced by PRAGMA foreign_key_check
See https://www.sqlite.org/pragma.html#pragma_foreign_key_check
-
The name of the table that contains the
REFERENCESclause -
The rowid of the row that contains the invalid
REFERENCESclause, or nil if the origin table is aWITHOUT ROWIDtable. -
The name of the table that is referred to.
-
The id of the specific foreign key constraint that failed. This id matches
ForeignKeyInfo.id. SeeDatabase.foreignKeys(on:)for more information. -
-
-
Returns a precise description of the foreign key violation.
For example: ‘FOREIGN KEY constraint violation - from player(teamId) to team(id), in [id:1 teamId:2 name:“O'Brien” score: 1000]’
-
Returns a DatabaseError of extended code
SQLITE_CONSTRAINT_FOREIGNKEY
View on GitHub
Install in Dash
ForeignKeyViolation Structure Reference