changed Connection#startupMessage to Connection#startup

This commit is contained in:
brianc 2010-10-24 21:28:10 -05:00
parent e89aa9c84c
commit d927e7e3f5
6 changed files with 6 additions and 6 deletions

View File

@ -37,7 +37,7 @@ p.connect = function() {
con.connect(this.port, this.host); con.connect(this.port, this.host);
con.on('connect', function() { con.on('connect', function() {
con.startupMessage({ con.startup({
user: self.user, user: self.user,
database: self.database database: self.database
}); });

View File

@ -47,7 +47,7 @@ p.connect = function(port, host) {
}); });
}; };
p.startupMessage = function(config) { p.startup = function(config) {
var buffer = new BufferList() var buffer = new BufferList()
.addInt16(3) .addInt16(3)
.addInt16(0) .addInt16(0)

View File

@ -43,7 +43,7 @@ var people
con.connect(config.port, config.host); con.connect(config.port, config.host);
con.on('connect', function() { con.on('connect', function() {
console.log('connected'); console.log('connected');
con.startupMessage({ con.startup({
user: config.user, user: config.user,
database: config.database database: config.database
}); });

View File

@ -5,7 +5,7 @@ var con = new Connection({stream: new net.Stream()});
con.connect('5432', 'localhost'); con.connect('5432', 'localhost');
con.on('connect', function() { con.on('connect', function() {
con.startupMessage({ con.startup({
user: 'brian', user: 'brian',
database: 'postgres' database: 'postgres'
}); });

View File

@ -10,7 +10,7 @@ var authConnect = function(username, database, callback) {
var connection = new Connection({stream: new net.Stream()}); var connection = new Connection({stream: new net.Stream()});
connection.connect('5432','localhost'); connection.connect('5432','localhost');
connection.once('connect', function() { connection.once('connect', function() {
connection.startupMessage({ connection.startup({
user: username, user: username,
database: database database: database
}); });

View File

@ -11,7 +11,7 @@ assert.recieved = function(stream, buffer) {
}; };
test("sends startup message", function() { test("sends startup message", function() {
con.startupMessage({ con.startup({
user: 'brian', user: 'brian',
database: 'bang' database: 'bang'
}); });