Re: [racket-users] Trouble with "on delete cascade" using sqlite

2017-04-18 Thread Philip McGrath
Thanks, that solved it! -Philip On Tue, Apr 18, 2017 at 4:54 PM, David Storrs wrote: > IIRC, SQLite defaults to PRAGMA foreign_keys = OFF when you open a > database. Without FKs being on there is nothing for the CASCADE to trigger > on. You'll need to turn the FKs on

Re: [racket-users] Trouble with "on delete cascade" using sqlite

2017-04-18 Thread David Storrs
IIRC, SQLite defaults to PRAGMA foreign_keys = OFF when you open a database. Without FKs being on there is nothing for the CASCADE to trigger on. You'll need to turn the FKs on before it will work. Just add this line before the first 'insert into tUsers' and then it will work: (query-exec db

[racket-users] Trouble with "on delete cascade" using sqlite

2017-04-18 Thread Philip McGrath
The following program returns '(#("demo" "j...@example.com")), whereas I think it should return '(), because I expect deleting the row from "tUsers" to delete the corresponding row in "tEmail". Is this a bug in the db library (or elsewhere, or am I doing something wrong)? #lang at-exp racket