Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Interesting. Have you tried https://github.com/kysely-org/kysely ? I know Prisma is an ORM and kysely is a "type-safe typescript SQL query builder" but I just wanted to know if you had the opportunity to try it and your opinion about it.

I'm searching for SQL typescript tooling for my next project.



I would recommend to use just good old database client and send your queries as text, nothing it's easier than that, every orm struggles when you want to do some relatively complex query, I struggled to do something like this with kysely `LEFT JOIN table2 ON (table1.id = tabl2.id AND table2.status = 1` was insane how complicated it was, sure you can pass raw sql, but what's the point of the orm then.


Having the simple CRUD apis for a table/model is super helpful though.

I use prisma, and then when it becomes too complex, or is annoying, switch to sql.

Sometimes I don’t want to have to manually deserialize rows into my objects (and yes, orms do this for us, and some non-orms do too).


Have you tried Slonik (https://github.com/gajus/slonik)? It won't generate types from queries automatically, but it encourages writing SQL vs. a query builder and allows type annotations of queries with Zod. Query results are validated at runtime to ensure the queries are typed correctly.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: