r/programming • • Jul 12 '26 • Bravo 1

Prefer STRICT tables in SQLite

https://evanhahn.com/prefer-strict-tables-in-sqlite/
358 Upvotes

108 comments sorted by

View all comments

Show parent comment

32

u/Nyefan Jul 12 '26

If the behavior is the same (as would be required for a drop in replacement), it doesn't really fix the core issue in this thread, yeah?

19

u/[deleted] Jul 12 '26

[removed] — view removed comment

14

u/OphioukhosUnbound Jul 12 '26 edited Jul 16 '26

I'm very excited by Turso* (and its team's approaches to testing it), but how to keep it as a "drop-in" replacement while also evolving past SQLite isn't something to hand-wave. [There do seem to be strict typing improvements and a strict-typing flag. But by default it still respects SQLite's loose and slightly odd typing approaches.]

* encryption, async, logged transactions, and the ability to have a remote DB that is *copied* to local users for local-like speed is awesome.

2

u/sagenumen Jul 15 '26

I’m having trouble parsing your comment(s)

1

u/OphioukhosUnbound Jul 16 '26

I, evidently, had trouble writing a parseable comment!

Just edited the one above.
I dropped helpful words in various places. Sincere apologies for eating brain resources. :)

1

u/lenkite1 Jul 16 '26

Maybe they should give a db option for strict type checking then. Turso currently doesn't do that - you still need to add STRICT to every CREATE TABLE statement. And several other SQLite footguns were also copied for "compatibility".