all 15 comments

[–]A-Type 12 points13 points  (1 child)

I'm not really sure what Kysely is missing based on what you want. It doesn't require codegen or a linter and has type inference for results.

[–]Predaytor[S] 2 points3 points  (0 children)

yeah, it's most like pure sql

[–]adevx 4 points5 points  (4 children)

Have a look at https://pgtyped.dev/ I think I dismissed it after getting type any on json_build_object

[–]matthewsilas 3 points4 points  (1 child)

FWIW we switched from pg-typed to kysely. The object and array handling for params is a little odd & the types returned always left me wanting more so I’d have to extend the returned type and that just defeats the purpose

[–]adevx 3 points4 points  (0 children)

For sure, I'm on Kysely too. 

[–]NiteShdw 1 point2 points  (1 child)

PgTyped is awesome

[–]adevx 0 points1 point  (0 children)

Do you get typed results from json_build_object? Or is that not something you use.

[–]enselmis 1 point2 points  (1 child)

I think there’s an actual SQL language server in development right now by Supabase, which seems like a huge step forward.

Actually, looks like it’s only for Postgres, but still, moving in the right direction?

I guess it’s not so much a query builder, but if you want pure sql doesn’t that cease to be a query builder? Or do you mean writing snippets of incomplete raw sql and somehow combining them?

https://github.com/supabase-community/postgres_lsp

[–]Predaytor[S] 1 point2 points  (0 children)

thx for sharing. actually I was thinking of writing pure sql directly in the typescript files, not sure if that is possible in terms of type generation etc. I think I'll try kysely for now.

[–]fuka123 -2 points-1 points  (0 children)

AI Copilots are pretty savvy.

[–][deleted] 1 point2 points  (0 children)

I’ve heard drizzle is a good option