-
-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add support for streaming #569
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
export interface IDatabaseConnection { | ||
query: (query: string, bindings: any[]) => Promise<{ rows: any[] }>; | ||
stream?: (query: string, bindings: any[]) => ICursor<any[]>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this optional to not break backwards compatibility. If you use it anyway it will throw an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @EloB. Looks really good.
Will you be able to add a change to docs to document this?
Maybe when I have time. Would appreciate if this got merged. Right now I patched it for my client using |
Thanks @EloB |
@adelsz when will you release this? |
Link to my feature request issue!
More context:
pg-cursor
is maintained by the same author aspg
and also part of his official documentation.Links:
pg-cursor
is documented onREADME
https://github.com/brianc/node-postgres
pg-cursor
is located in same monorepo aspg
https://github.com/brianc/node-postgres/tree/master/packages/pg-cursor
Official
pg-cursor
documentationhttps://node-postgres.com/apis/cursor
Usage
Fixes #568