Closed
Description
I had issues with running out of connections when starting out from the async/await example in the docs.
// async/await - check out a client
(async () => {
const client = await pool.connect()
try {
const res = await pool.query('SELECT * FROM users WHERE id = $1', [1])
console.log(res.rows[0])
} finally {
client.release()
}
})().catch(e => console.log(e.stack))
Should pool.query
actually be client.query
here?
Metadata
Metadata
Assignees
Labels
No labels