4 ms·
I don't think I've ever wanted SQL embedded in my Java source over loading it as a resource. Loading it as a resource allows me to edit the SQL in a sql-aware t
by emidln 8y ago
I don't think I've ever wanted SQL embedded in my Java source over loading it as a resource. Loading it as a resource allows me to edit the SQL in a sql-aware text editor.
- stickfigure 8y agoIntelliJ is aware of SQL in text strings, and even validates it against the database schema. I like my SQL right next to the code that sets parameters, processes results, etc - mismatches are apparent (and also validated by IntelliJ).
- orf 8y agoNot just SQL, but any language. It's one of my favourite (and IMO very under-appreciated) features of the Jetbrains editors.
- halfastack 8y agoIntellij also automatically escapes your string and inputs newlines wherever necessary, so if you copy a long string, it's generally done for you (I've copied pieces of XML and it generally worked totally fine).