updated type list script
This commit is contained in:
parent
3fd8d3f853
commit
d81547d7c0
@ -1,24 +1,6 @@
|
|||||||
var net = require('net')
|
var helper = require(__dirname + "/../test/integration/test-helper");
|
||||||
var Connection = require(__dirname+'/../lib/connection');
|
var pg = helper.pg;
|
||||||
|
pg.connect(helper.connectionString(), assert.success(function(client) {
|
||||||
var con = new Connection({stream: new net.Stream()});
|
var query = client.query('select oid, typname from pg_type where typtype = \'b\' order by oid');
|
||||||
con.connect('5432', 'localhost');
|
query.on('row', console.log);
|
||||||
|
}))
|
||||||
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();
|
|
||||||
});
|
|
||||||
|
Loading…
Reference in New Issue
Block a user