3 ms·
> It's trivial to write your own function to use parameterized queries and add in all the type checking etc you need. It's only a few lines of code. It's fairl
by sellyme 5y ago
> It's trivial to write your own function to use parameterized queries and add in all the type checking etc you need. It's only a few lines of code.
It's fairly trivial to do this, but now you're potentially adding thousands of parameters per query in circumstances where the contents of the IN() are variable in count. This is not ideal for a number of reasons.
Additionally, a language should be designed such that the easiest possible way to do something is at least moderately secure. If you need to attach some boilerplate code on top of the standard libraries every single time you use them for it to be safe, then there is no reason for that boilerplate to not be in the standard libraries.