changed Connection#startupMessage to Connection#startup
This commit is contained in:
parent
e89aa9c84c
commit
d927e7e3f5
@ -37,7 +37,7 @@ p.connect = function() {
|
||||
con.connect(this.port, this.host);
|
||||
|
||||
con.on('connect', function() {
|
||||
con.startupMessage({
|
||||
con.startup({
|
||||
user: self.user,
|
||||
database: self.database
|
||||
});
|
||||
|
@ -47,7 +47,7 @@ p.connect = function(port, host) {
|
||||
});
|
||||
};
|
||||
|
||||
p.startupMessage = function(config) {
|
||||
p.startup = function(config) {
|
||||
var buffer = new BufferList()
|
||||
.addInt16(3)
|
||||
.addInt16(0)
|
||||
|
@ -43,7 +43,7 @@ var people
|
||||
con.connect(config.port, config.host);
|
||||
con.on('connect', function() {
|
||||
console.log('connected');
|
||||
con.startupMessage({
|
||||
con.startup({
|
||||
user: config.user,
|
||||
database: config.database
|
||||
});
|
||||
|
@ -5,7 +5,7 @@ var con = new Connection({stream: new net.Stream()});
|
||||
con.connect('5432', 'localhost');
|
||||
|
||||
con.on('connect', function() {
|
||||
con.startupMessage({
|
||||
con.startup({
|
||||
user: 'brian',
|
||||
database: 'postgres'
|
||||
});
|
||||
|
@ -10,7 +10,7 @@ var authConnect = function(username, database, callback) {
|
||||
var connection = new Connection({stream: new net.Stream()});
|
||||
connection.connect('5432','localhost');
|
||||
connection.once('connect', function() {
|
||||
connection.startupMessage({
|
||||
connection.startup({
|
||||
user: username,
|
||||
database: database
|
||||
});
|
||||
|
@ -11,7 +11,7 @@ assert.recieved = function(stream, buffer) {
|
||||
};
|
||||
|
||||
test("sends startup message", function() {
|
||||
con.startupMessage({
|
||||
con.startup({
|
||||
user: 'brian',
|
||||
database: 'bang'
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user