3 ms·
I don't think it would mangle your data directly, but it could lead to incorrect results since there is a degree of mystery from query to query. You should def
by nilved 10y ago
I don't think it would mangle your data directly, but it could lead to incorrect results since there is a degree of mystery from query to query. You should definitely base a conclusion on their words and not mine.
https://www.sqlite.org/datatype3.html https://www.sqlite.org/datatype3.html
- qwertyuiop924 10y agoThanks for the link. Yeah, it's as I remember: type affinities will convert to their type if possible, and if not... well, you get out what you put in. The reason most people don't complain about this is that it's a far from common issue to totally miswrite your SQL statements so badly that you wind up mixing up columns. And when you do, it's usually detected pretty fast.
- simcop2387 10y agoSince 3.3 you can use check constraints to enforce things, but I don't know what kind of performance impact that has.
- mvc 10y agoYou also need to enable them each time you connect.
- simcop2387 10y agoReally? dang that's terrible. I thought they'd stay that way as part of the table schema. Glad I normally use an ORM that'll take care of the type checking ahead of time.
- qwertyuiop924 10y agoApparently, they actually do stay around.
- SQLite 10y agoNo you don't. CHECK constraints always work. Maybe you are thinking about foreign key constraints, which for backwards compatibility are off by default, unless you use a compile-time option to make then on by default.
- mvc 10y agoYou also need to enable them each time you connect.