News for hackers. Stuff that matters.
Re:SQLite or PostgreSQL? It's Complicated by oh-4-fucks-sake on Tuesday June 28, 2022 @02:08PM (#31910993)
In the JVM world, jOOQ is great happy-medium technology between the extremes of string SQL and full-blown ORM:

- Type-safe DSL generated from your schema that looks like SQL

- (If you can write the SQL, you can write it in jOOQ)

- SQL-injection protection

- Strong multi-dialect and vendor-specific support

- Custom-type mappers

- Composable queries

- Compile-time, schema-aware query safety

- Fine-grained transaction control

- And so much more...

Re:SQLite or PostgreSQL? It's Complicated by gmac on Tuesday June 28, 2022 @03:40PM (#31912084)
There are various non-ORM database libraries for TypeScript too. I develop Zapatos, but Slonik and pg-typed are probably better known.

https://jawj.github.io/zapatos/

https://github.com/gajus/slonik

https://pgtyped.vercel.app/