Hacker News new | past | comments | ask | show | jobs | submit login

> - Booleans in the API are `true` or `undefined`. Seriously.

But why???




Because they are not real boolean datatype, just strings probably.


Wonder what they use underneath; don't most relation dbs implement as int?


When 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.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: