3 ms·
Doesn't seem like it performs result set nesting on joins? For example with the one to many of owner -> pet, I'd like the results to look something like `{ pers
by eevo 3y ago
Doesn't seem like it performs result set nesting on joins? For example with the one to many of owner -> pet, I'd like the results to look something like `{ person: Person, pets: Pet[] }[]`. Knex doesn't do this either (afaict) - wrote a few "deep" queries with some convoluted lodash to group things up but mostly gave up and just live with raw resultsets.
I guess I still prefer that to a full on ORM, but that's really the one missing feature I want from these SQL query builder libraries
- igalklebanov 3y agoHave you read this recipe? https://kysely.dev/docs/recipes/relations https://kysely.dev/docs/recipes/relations
- eevo 3y agoOh sure, knex had a github issue with a similar recommendation. Interesting approach, and I suppose json -> ts is a smooth transformation, thanks for the tip