node-postgres/test/api-tests.js

18 lines
412 B
JavaScript
Raw Normal View History

require(__dirname+"/test-helper");
var client = new Client({
2010-10-03 13:27:16 +08:00
user: 'brian',
database: 'pgjstest'
});
2010-10-03 13:56:35 +08:00
2010-09-29 14:01:52 +08:00
client.connect();
2010-10-03 13:45:10 +08:00
client.on('ReadyForQuery', function() {
client.disconnect();
2010-09-29 15:46:44 +08:00
});
2010-10-03 13:45:10 +08:00
// client.query('create temporary table bang (id integer)');
// client.query('insert into bang(id) VALUES(1)');
// client.query('select * from bang',function(err, results, fields) {
// assert.equal(err, null);
// });