From d927e7e3f5006bed96bb5ad71e96438a1aaae37f Mon Sep 17 00:00:00 2001 From: brianc Date: Sun, 24 Oct 2010 21:28:10 -0500 Subject: [PATCH] changed Connection#startupMessage to Connection#startup --- lib/client.js | 2 +- lib/connection.js | 2 +- script/create-test-tables.js | 2 +- script/list-db-types.js | 2 +- test/integration/connection/test-helper.js | 2 +- test/unit/connection/outbound-sending-tests.js | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/client.js b/lib/client.js index b433794..7c2cf1a 100644 --- a/lib/client.js +++ b/lib/client.js @@ -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 }); diff --git a/lib/connection.js b/lib/connection.js index 2c53ce8..d501d4f 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -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) diff --git a/script/create-test-tables.js b/script/create-test-tables.js index bb25de1..bcced4f 100644 --- a/script/create-test-tables.js +++ b/script/create-test-tables.js @@ -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 }); diff --git a/script/list-db-types.js b/script/list-db-types.js index d7f4137..d2f02c1 100644 --- a/script/list-db-types.js +++ b/script/list-db-types.js @@ -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' }); diff --git a/test/integration/connection/test-helper.js b/test/integration/connection/test-helper.js index c80514d..7f1d052 100644 --- a/test/integration/connection/test-helper.js +++ b/test/integration/connection/test-helper.js @@ -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 }); diff --git a/test/unit/connection/outbound-sending-tests.js b/test/unit/connection/outbound-sending-tests.js index 67ec29c..baa030c 100644 --- a/test/unit/connection/outbound-sending-tests.js +++ b/test/unit/connection/outbound-sending-tests.js @@ -11,7 +11,7 @@ assert.recieved = function(stream, buffer) { }; test("sends startup message", function() { - con.startupMessage({ + con.startup({ user: 'brian', database: 'bang' });