Use a CHAR(1) you can then use it as an enumeration.
Don’t use T/F for true/false use it for the actual sematic meaning for the thing that the Boolean is toggling. E g. S for subscribed, U for unsubscribed, or whatever.
It also means when you inevitably grow to needing a tri-state it makes sense.
Unless SQLite actually supports enumerations, then just use them
What do you use instead of booleans ? floats ?
strings “true” and “false” ofc like any sane developer
I got a better one: O for true and N for false.
Seen in production for quite important stuff (payment requests).
O is from Oui, N from Non, of course!
😐🫤
This is awful and aweful at the same time.
good fucking god
it allows for mood changes, some parts of the code can check
charAt(0) == 't'others can doval != 'false'just let it flow.lord mary joseph make it stop
And for double fun if the output doesn’t matter you can make if endsWith(“e”).
Smallest INT it can support and only ever use 0 and 1.
Sometimes it’s 0 and 1
Use a
CHAR(1)you can then use it as an enumeration.Don’t use
T/Ffor true/false use it for the actual sematic meaning for the thing that the Boolean is toggling. E g. S for subscribed, U for unsubscribed, or whatever.It also means when you inevitably grow to needing a tri-state it makes sense.
Unless SQLite actually supports enumerations, then just use them
I think you could use a CHECK constraint to effectively create en enum