Post #2354974
2026-05-10 18:59 UTC
What do you use instead of booleans ? floats ?
Replies (4)
-
@MultipleAnimals@sopuli.xyz 2026-05-10 19:04
strings “true” and “false” ofc like any sane developer
-
@irelephant@lemmy.dbzer0.com 2026-05-10 19:59
Sometimes it’s 0 and 1
-
@deadbeef79000@lemmy.nz 2026-05-10 19:50
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
-
@lord_ryvan@ttrpg.network 2026-05-11 10:06
Smallest INT it can support and only ever use 0 and 1.