3 ms·
> SQL queries from another programming language without an ORM means that you do everything by manipulating strings by hand, with zero type safety. This is not
by stickfigure 6y ago
> SQL queries from another programming language without an ORM means that you do everything by manipulating strings by hand, with zero type safety.
This is not true at all. If you connect IntelliJ to your database (which you should - the query tools are fantastic), it becomes incredibly good at validating SQL strings in code. Even when doing crazy conditional construction.
I like ORMs. I use Hibernate a lot. But I write all my queries in native SQL.
- dgellow 6y agoDo you have a link to Intellij documentation for this feature? That sounds interesting.
- andylynch 6y agoHere you go: https://blog.jetbrains.com/idea/2020/06/language-injections-in-intellij-idea/ https://blog.jetbrains.com/idea/2020/06/language-injections-... (Overview with link to the full docs) It’s been a while since I’ve used it but it works great (and not just for SQL but pretty much anything IntelliJ knows about).
- dgellow 6y agoThank you!