Re:Many small queries are efficient in SQLite
by rini17 on Tuesday February 16, 2021 @03:09AM
(#26151902)
It is possible to create check constraints that do the type checking. Actually, if they shipped some predefined ones and said "if you want strong type checking do this", like, syntax to automatically populate the table columns with type check constraints, it would be IMO perfectly backward compatible.
Re:Many small queries are efficient in SQLite
by darksaints on Tuesday February 16, 2021 @06:57AM
(#26153102)
At the very least we could get strict versions of data types, or some sort of key word used in the ddl to specify strict typing.
Re:Many small queries are efficient in SQLite
by attilakun on Tuesday February 16, 2021 @10:34AM
(#26154807)
This might help: https://dba.stackexchange.com/a/222271
> Flexible typing is considered a feature of SQLite, not a bug. Nevertheless, we recognize that this feature does sometimes cause confusion and pain for developers who are acustomed to working with other databases that are more judgmental with regard to data types. In retrospect, perhaps it would have been better if SQLite had merely implemented an ANY datatype so that developers could explicitly state when they wanted to use flexible typing, rather than making flexible typing the default. But that is not something that can be changed now without breaking the millions of applications and trillions of database files that already use SQLite's flexible typing feature.
https://sqlite.org/quirks.html#flexible_typing