updated type list script

This commit is contained in:
Brian Carlson 2011-01-21 16:53:07 -06:00
parent 3fd8d3f853
commit d81547d7c0

View File

@ -1,24 +1,6 @@
var net = require('net')
var Connection = require(__dirname+'/../lib/connection');
var con = new Connection({stream: new net.Stream()});
con.connect('5432', 'localhost');
con.on('connect', function() {
con.startup({
user: 'brian',
database: 'postgres'
});
});
con.on('dataRow', function(msg) {
console.log(msg.fields);
});
con.on('readyForQuery', function() {
con.query('select oid, typname from pg_type where typtype = \'b\' order by typname');
});
con.on('commandComplete', function() {
con.end();
});
var helper = require(__dirname + "/../test/integration/test-helper");
var pg = helper.pg;
pg.connect(helper.connectionString(), assert.success(function(client) {
var query = client.query('select oid, typname from pg_type where typtype = \'b\' order by oid');
query.on('row', console.log);
}))