3 ms·
I wouldn't call that better. I'd much rather have a self escaping sql literal, something like: var query = "select id, name from table where id = #{id:int
by failed_ideas 12y ago
I wouldn't call that better. I'd much rather have a self escaping sql literal, something like:
var query = "select id, name from table where id = #{id:int}"
- dingdingdang 12y agoAgreed, the value of magic fades very quickly when you're trying to to retro-implement complex SQL query from Stackoverflow into "smart query" language.
- lucian1900 12y agoThat won't use a parametrised query, though.
- failed_ideas 12y agoWhy not, I'm talking about a construct that doesn't exist. A SQL literal string can be stored and auto parameterized prior to interpolation. You see the :int isn't the name, it's the parameter/type safeyness that any good dev would want.