4 ms·
> - Booleans in the API are `true` or `undefined`. Seriously. But why???
by Vmody2 6y ago
> - Booleans in the API are `true` or `undefined`. Seriously.
But why???
- unixhero 6y agoBecause they are not real boolean datatype, just strings probably.
- tluyben2 6y agoWonder what they use underneath; don't most relation dbs implement as int?
- aidos 6y agoWhen you’re doing dynamic structure in relational dbs (traditionally) options include storing a wide row with all the data types and you choose which column to use, or storing as lowest common denominator (string) and casting in and out at runtime. These days you can work around this stuff with json / schemaless models. Airtable allow switching data types on a column (from memory). Maybe they store everything as string and then the column definition is for display and allowed operations. Hubspot do this (poorly) so they’re forever giving you back things like dates as string of a number representing a date.