6 ms·
What happens if a query compares a string to a number?
by bazoom42 29d ago
What happens if a query compares a string to a number?
- mike_hearn 29d agoYou get a type error from the database.
- bazoom42 28d agoAs far as I can tell, some engines will implicitly coerce types so “7” = 7
- moljac024 28d agoBut when do you get that type error? This is the important bit. You get it after the app is deployed, the query is ran and a result is expected. When do I get a type error from my language if it's statically typed? That's right, before I even deploy.