mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
parent
97eea2d7a4
commit
2c3adf25f9
@ -136,7 +136,7 @@ because its so common to just run a query and return the client to the pool afte
|
||||
var pool = new Pool()
|
||||
var time = await pool.query('SELECT NOW()')
|
||||
var name = await pool.query('select $1::text as name', ['brianc'])
|
||||
console.log(name.rows[0].name, 'says hello at', time.rows[0].name)
|
||||
console.log(name.rows[0].name, 'says hello at', time.rows[0].now)
|
||||
```
|
||||
|
||||
you can also use a callback here if you'd like:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user