I'm using TypeORM with MS SQL Server.
In TypeORM default set up SQL queries, generated by .insert and .update methods are compiling in parametrized queries in SQL.
Is there a way to switch to inlining of data instead of parametrization?
P.S. I know about possibility of SQL injections in this case, but:
- my data is validated before being persisted in my code and
- from tests (we operate with big data sets (5m record with 1 column - integer, 10K records with 30 columns of different data types) that needs to be inserted or based on them, existing rows should be updated) - insert without parametrization works much faster.
You can use this style of inserts:
And as you are aware, you need to escape anything inserted that way to protect against SQL injection.