News for hackers. Stuff that matters.
Re:Writing Composable SQL Using Knex and Pipelines by mythz on Thursday November 28, 2024 @12:53PM (#42267262)
I've also just released a type safe, SQL-like parameterized TypeScript/JS ORM for SQLite, MySQL and PostgreSQL. I wrote it because I couldn't find any other ORMs with type-safe query builders where joined tables and column references are type checked against my data models to enable design-time type checking and safe refactoring.

It's also highly composable as SQL expressions can be embedded within SQL Builders which can themselves be embedded within other Query Builders.

https://litdb.dev

Re:Writing Composable SQL Using Knex and Pipelines by damidekronik on Thursday November 28, 2024 @01:04PM (#42267328)
What's missing from https://kysely.dev/?
Re:Writing Composable SQL Using Knex and Pipelines by mythz on Thursday November 28, 2024 @01:09PM (#42267367)
Looks pretty good, but APIs look more stringly typed and APIs don't look natural, I prefer using SQL expressions with typed references.

The query builder also looks coupled to execution, litdb query builders and aren't coupled to a driver implementation, i.e. they're just used to generate SQL with parameters that could then be executed with any driver.