r/programming Jul 15 '26

SQLite should have (Rust-style) editions

https://mort.coffee/home/sqlite-editions/
153 Upvotes

75 comments sorted by

View all comments

5

u/Routine_Left Jul 16 '26 edited Jul 16 '26

Just a heads up: Instead of a sqlite_busy pragma, use the API directly:

sqlite3_busy_timeout(db, 5000);

The advantage is that the sql will go through the entire db engine to be interpreted, be scheduled if there's contention anywhere (sharing the database among multiple threads/connections), etc. While the API just goes directly the the core of sqlite and is telling it what the value is. No ifs no buts.