Re:Show HN: ORM for TypeScript with no query-builder, suppor...
by hv42 on Friday September 04, 2020 @04:41PM
(#24378681)
You should be able to do this with IntelliJ e.g. where you can inject a language into a string. This is quite handy as you can reformat and open the string in a separate editor if needed.
The caveat is that it does not work well if you are composing the SQL queries from multiple small parts.
see https://www.jetbrains.com/help/idea/running-injected-sql-sta...
I suppose that other editors or IDE can do similar things.
Raw SQL query strings also do not compose well and I miss auto completion when writing them (yes, I'm a spoiled kid after so much Typescript usage).
As with everybody else, I didn't like existing ORM/builder approaches, so I built and use my own with type-inference: https://github.com/hoeck/typesafe-query-builder. Any feedback would be great because I have the gut feeling that this one has gone way too far on the type astronaut side of things.