Hacker News new | ask | show | jobs
by AspireOne 685 days ago
Depends on the environment - in rust for example, you can get by with raw sql using sqlx and it'll have typed queries and outputs. In typescript, that's just not possible, so an ORM as a thin layer above the SQL is a great middleground - you'll get type safe everything, including some basic raw sql queries. I'm using Kysely for a production app (which for example exposes a "sql" macro which can be used to write simple raw typesafe queries), and it's miraculous how far they have pushed the typescript engine. I have no complains at all.