You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I think postgres.js is the best query client out there and includes it's own type hinting facility as well. Instead of bridging pgtyped connection from pg to postgres.js, why not enable usage of the postgres.js client while still using @pgtyped/cli? This also gets us transactions for free.
Describe the solution you'd like
Have the cli read and generate postgres.js sql queries, which differ from @pgtyped/runtime sql in their use of templates. For instance
// postgres.js
await sql`SELECT * from users where id = ${userID}`
can be augmented into
await sql<Users[]>`SELECT * from users where id = ${userID}`
Is your feature request related to a problem? Please describe.
I think postgres.js is the best query client out there and includes it's own type hinting facility as well. Instead of bridging pgtyped connection from pg to postgres.js, why not enable usage of the postgres.js client while still using @pgtyped/cli? This also gets us transactions for free.
Describe the solution you'd like
Have the cli read and generate postgres.js sql queries, which differ from @pgtyped/runtime sql in their use of templates. For instance
can be augmented into
The list of dynamic query templating is finite: https://github.com/porsager/postgres?tab=readme-ov-file#queries
Additional context
Would love postgres.js to collab too, but thought it'd be straightfwd to support it in the cli here.
The text was updated successfully, but these errors were encountered: