Re:Show HN: Kysely, a type-safe SQL query builder for TypeSc...
by afavour on Wednesday June 21, 2023 @12:04PM
(#36420324)
Has anyone used this and compared to the types provided by Knex? I’m largely very happy with Knex but when you start dealing with subqueries and the like the types fall apart. Suspect this kind of thing is pushing TS types to their limit, though.
[ Parent
| on HN ]
Re:Show HN: Kysely, a type-safe SQL query builder for TypeSc...
by nadanke on Wednesday June 21, 2023 @01:32PM
(#36421661)
You should try it. I switched from Knex to Kysely since I was early in a project and Knex lost its lead developer (IIRC) and the typing Kysely gives you is extremely effortless and works very well.
Re:Show HN: Kysely, a type-safe SQL query builder for TypeSc...
by igalklebanov on Wednesday June 21, 2023 @02:24PM
(#36422316)
We love Knex, and are inspired by it. Sadly its not type-safe and reaching type-safety would require a rewrite.
We care a lot about our TypeScript compilation performance and Developer eXperience in general.
v0.25 introduced internal changes that doubled the possible complexity of CTEs, joins and conditional selects.
We also provide helper methods that "reset" the stack in a type-safe way.