Remix.run Logo
poidos 2 hours ago

It’s a stated [0] goal of the project:

> SQLite strives to be flexible regarding the datatype of the content that it stores.

[0]: https://sqlite.org/stricttables.html

masklinn an hour ago | parent [-]

You can be flexible with strict tables, type every column as ANY and you pretty much get back the original behaviour.

poidos an hour ago | parent [-]

Sure, but you lose the representation of the developer’s intention that way. I would be pretty pissed off if I inherited a project and the schema was all ANYs.

masklinn an hour ago | parent | next [-]

The intent of ANY is obviously that the values be flexible. That’s why it’s there if you need it.

drdexebtjl an hour ago | parent | prev [-]

“I intended this to be an integer but it could really be anything” is not very useful.

poidos an hour ago | parent [-]

Sure it is. If you encounter something that’s not an int, that could be a signal you have a bug in your writers. Or in the source of the data. That’s useful information compared to “oh, I have some ints and some strings, that’s ANY, everything is ok.”