From d316ef55243c472e37a3084bb99657ac2774a274 Mon Sep 17 00:00:00 2001 From: Peter W Date: Sun, 26 Jun 2016 04:21:40 +1000 Subject: [PATCH] Fix example code for connect event (#14) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 4b494efc..a6482659 100644 --- a/README.md +++ b/README.md @@ -207,8 +207,8 @@ Fired whenever the pool creates a __new__ `pg.Client` instance and successfully Example: ```js -var pg = require('pg') -var pool = new pg.Pool() +const Pool = require('pg-pool') +const pool = new Pool() var count = 0 @@ -220,10 +220,10 @@ pool .connect() .then(client => { return client - .query('SELECT $1::int AS "clientCount', [client.count]) + .query('SELECT $1::int AS "clientCount"', [client.count]) .then(res => console.log(res.rows[0].clientCount)) // outputs 0 .then(() => client) - })) + }) .then(client => client.release()) ```