diff --git a/README.md b/README.md index dde2d6e4..60115bd1 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ node-postgres supports both an 'event emitter' style API and a 'callback' style. name: 'insert beatle', values: ['Paul', 63, new Date(1945, 04, 03)] }); - var query = client.query("SELECT * FROM beatles WHERE name = $1", ['john']); + var query = client.query("SELECT * FROM beatles WHERE name = $1", ['John']); //can stream row results back 1 at a time query.on('row', function(row) { @@ -108,6 +108,7 @@ Many thanks to the following: * [pjornblomqvist](https://github.com/bjornblomqvist) * [JulianBirch](https://github.com/JulianBirch) * [ef4](https://github.com/ef4) +* [napa3um](https://github.com/napa3um) ## Documentation diff --git a/package.json b/package.json index 1ee2b37c..ac30385b 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name": "pg", - "version": "0.4.1", + "version": "0.5.0", "description": "PostgreSQL client - pure javascript & libpq with the same API", "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"], "homepage": "http://github.com/brianc/node-postgres", diff --git a/test/integration/client/type-coercion-tests.js b/test/integration/client/type-coercion-tests.js index 01790eeb..1d6375df 100644 --- a/test/integration/client/type-coercion-tests.js +++ b/test/integration/client/type-coercion-tests.js @@ -126,3 +126,15 @@ test("timestampz round trip", function() { client.on('drain', client.end.bind(client)); }); +helper.pg.connect(helper.connectionString(), assert.calls(function(err, client) { + assert.isNull(err); + client.query('select null as res;', assert.calls(function(err, res) { + assert.isNull(err); + assert.strictEqual(res.rows[0].res, null) + })) + client.query('select 7 <> $1 as res;',[null], function(err, res) { + assert.isNull(err); + assert.strictEqual(res.rows[0].res, null); + client.end(); + }) +}))