Add sql.describe() - #98
Conversation
e465335 to
1477727
Compare
|
Moved |
|
@porsager i think this is pretty cool, but should the PR go to version 2.? |
|
Oh man, I'm sorry I haven't had time to look at this, haven't read through it until now.. I think it would a great addition. Your PR looks good, but what do you think about making the API like this: That way it's in line with .stream(), .cursor() etc. |
|
Rebased and fixed conflicts 👍 |
|
The reason I added it as |
|
@akheron Sorry this has been hanging so long. I've finally found some time for Postgres.js again.. I'd still like if we could have it as |
Hi! I'm the author of sqltyper, a tool for automatically creating TypeScript typings for PosgreSQL queries.
One of the things sqltyper does is calling Postgres to describe the input parameters and output columns of a statement. Currently I'm using node-postgres, which doesn't support describing statements. So I've added the support and have an in-tree copy of node-postgres. There's an open PR, but it doesn't seem to move forward.
I would like to use this library for its speed and simplicity instead. Adding support for describing statements didn't require much code, which is nice!
Let me know what you think.