News for hackers. Stuff that matters.
Re:Objection to ORM Hatred by yyyk on Monday January 16, 2023 @04:49AM (#34398789)
>template based

There's a reason why the modern approach is parameterized: The old PHP-style templating led to galore SQL injections, and worse performance. Don't see any reason to ever go back.

Re:Objection to ORM Hatred by mirekrusin on Monday January 16, 2023 @01:33PM (#34403899)
This is common misunderstanding.

Tagged templates in js allow you to write safe, injection free sql templates, tsql does exactly that.

Performance is better if anything, but irrelevant - you're talking about sql rendering performance, which is several orders of magnitude lower than invoking query?

You should double check it. See examples of usage. We use it for mssql but same principles apply to other vendors. Mssql has many interesting things in its dialect that can't be expressed in orm. With templates you simply write sql and aid yourself with functional combinators for complex statements. It works really well.

Re:Objection to ORM Hatred by yyyk on Thursday January 19, 2023 @12:33AM (#34437051)
I'm referring to possible performance loss due to lack of parameterization. Yeah, one could enable forced parameterization and let parameter sniffing do its job, but that can be a double edged sword.