mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Merge branch 'master' of https://github.com/brianc/node-postgres
This commit is contained in:
commit
de7f90f315
@ -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
|
||||
|
||||
|
||||
@ -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",
|
||||
|
||||
@ -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();
|
||||
})
|
||||
}))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user