News for hackers. Stuff that matters.
Re:Human genes renamed to stop Microsoft Excel from misreadi... by mort96 on Monday April 11, 2022 @09:15AM (#30988208)
I'm curious, how do you achieve a strongly-typed database with sqlite?

sqlite's lack of verifying that your data fits in your defined schema is by far my biggest problem with sqlite.

Re:Human genes renamed to stop Microsoft Excel from misreadi... by dotancohen on Monday April 11, 2022 @09:36AM (#30988468)
SQLite has a powerful data-validation function for each column, look for CHECK Constraints: https://www.sqlite.org/lang_createtable.html

But the real nice thing is that SQLite will allow spreadsheet-like behaviour by allowing one to enter an invalid data type. I could check that in Python or I can store it and warn "Invalid type blah blah blah". This will make life easier for those coming from a spreadsheet, or importing data. As the program matures, I can reevaluate what to do with invalid data as a default and what options to give the user.

Additionally, because SQLite allows arbitrary data in any column, adding support for e.g. formulae is greatly simplified.

Re:Human genes renamed to stop Microsoft Excel from misreadi... by simonw on Monday April 11, 2022 @06:07PM (#30995725)
SQLite fixed that a few releases ago with STRICT tables: https://www.sqlite.org/stricttables.html
Re:Human genes renamed to stop Microsoft Excel from misreadi... by ElectricalUnion on Monday April 11, 2022 @09:23AM (#30988293)
check (typeof(column) = 'integer')