They do but we have for instance education to reduce their hallucinations in narrow fields of expertise. And a system of guardrails to only let educated people work in those fields to avoid harm.
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.
Not getting warm with any query/ORM library out there.
My own take of interfacing with an SQL database with Typescript: a query generator that uses mapped types a lot to infer result set types from queries and a schema file.