Skip to content

Commit de7f90f

Browse files
committed
Merge branch 'master' of https://github.com/brianc/node-postgres
2 parents 7fb6c43 + d33ebd8 commit de7f90f

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ node-postgres supports both an 'event emitter' style API and a 'callback' style.
5858
name: 'insert beatle',
5959
values: ['Paul', 63, new Date(1945, 04, 03)]
6060
});
61-
var query = client.query("SELECT * FROM beatles WHERE name = $1", ['john']);
61+
var query = client.query("SELECT * FROM beatles WHERE name = $1", ['John']);
6262

6363
//can stream row results back 1 at a time
6464
query.on('row', function(row) {
@@ -108,6 +108,7 @@ Many thanks to the following:
108108
* [pjornblomqvist](https://github.com/bjornblomqvist)
109109
* [JulianBirch](https://github.com/JulianBirch)
110110
* [ef4](https://github.com/ef4)
111+
* [napa3um](https://github.com/napa3um)
111112

112113
## Documentation
113114

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{ "name": "pg",
2-
"version": "0.4.1",
2+
"version": "0.5.0",
33
"description": "PostgreSQL client - pure javascript & libpq with the same API",
44
"keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"],
55
"homepage": "http://github.com/brianc/node-postgres",

test/integration/client/type-coercion-tests.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,3 +126,15 @@ test("timestampz round trip", function() {
126126
client.on('drain', client.end.bind(client));
127127
});
128128

129+
helper.pg.connect(helper.connectionString(), assert.calls(function(err, client) {
130+
assert.isNull(err);
131+
client.query('select null as res;', assert.calls(function(err, res) {
132+
assert.isNull(err);
133+
assert.strictEqual(res.rows[0].res, null)
134+
}))
135+
client.query('select 7 <> $1 as res;',[null], function(err, res) {
136+
assert.isNull(err);
137+
assert.strictEqual(res.rows[0].res, null);
138+
client.end();
139+
})
140+
}))

0 commit comments

Comments
 (0)