Files
neoirc/internal/db
sneak 654ff2daaa
check / check (push) Waiting to run
Keep foreign keys on for every database connection (closes #207)
SQLite keeps the foreign keys setting per connection, and the server
turned it on once with a PRAGMA. A query cancelled while it runs makes
the pool close its only connection and open a new one, which then ran
without foreign keys until a restart.

connect now adds `_pragma=foreign_keys(1)` to the database URL. The
driver runs every `_pragma` parameter on each connection it opens, so
this also holds for a `DBURL` without `_pragma` parameters. The new
test cancels a query on a file database, then checks that the tables
are still there and that foreign keys are on.

Model: opus-5-5
2026-10-27 09:29:35 +00:00
..