Skip to content

Query events with Pool #1070

@jtuu

Description

@jtuu

With a client we can use the "row" event of a query.
client.query("select id from table").on("row", row => console.log(row))

{ id: 1 }
{ id: 2 }
{ id: 3 }
{ id: 4 }
{ id: 5 }

But with a pool we can't do this.
pool.query("select id from table").on("row", row => console.log(row))
TypeError: pool.query(...).on is not a function

Is it possible to use the query events with pool?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions