Cast boolean values (0,1) to real boolean types in JS
Hello!
In SQLite, thare no real boolean values.
SQLite does not have a separate Boolean storage class. Instead, Boolean values are stored as integers 0 (false) and 1 (true). https://www.sqlite.org/datatype3.html
To allow better comparison and strict equals in javascript, shouldn't select statements return 0 as false and 1 as true? Or should the DB work as single source of truth.
What are your thoughts?
So far i know almost all Relational database stores boolean as numbers but SQLite does not have any specific datatype for this like Microsoft SQL Server has bit datatype which store 1 and 0 only. you can simply use INTEGER and handle the logic in you code.
Any update on this? I think it should be handled in the driver.
I think this is extremely unlikely to ever happen - it's such a big breaking change that the switchover would be rough and I think everyone who uses SQLite knows of its quirks 🙂 I'm going to close this for now