Hacker News new | ask | show | jobs
by timmy-turner 2266 days ago
Thanks for sharing these projects. So far I only knew tsql.

I'm in the avoid code generation camp as well as typically my build processes are complex enough and don't need another step.

But I am not quite satisfied by the existing query generators. Also after having read https://github.com/jawj/mostly-ormless/blob/master/README.md I wanted to put Postgres' `json_agg` function into use as it looks like it is simplifying a lot of the nested objects stuff one serves over REST APIs.

So I designed my own https://github.com/hoeck/typesafe-query-builder - with special support for `json_agg` and `json_build_object`. Its working already in production and for me, the dev UX is unprecedented in working with database code. Typechecks and autocompletions really boost it. But to be honest, I'm a bit worried about Typescript compiler bugs and compilation times when the project grows.