Permalink
Browse files

More changes

  • Loading branch information...
1 parent 8e6f507 commit a076b6cc9466fc30cefa535e3bc9cdfef4b2765b @carlsverre carlsverre committed Dec 3, 2009
Showing with 5 additions and 4 deletions.
  1. +1 −1 .gitignore
  2. +3 −2 demo.js
  3. +1 −1 postgres.js
View
@@ -1,3 +1,3 @@
.bzr
.bzrignore
-test.js
+test.js
View
@@ -1,8 +1,9 @@
var sys = require("sys");
var Postgres = require("./postgres");
-var db = new Postgres.Connection("database", "username", "password");
-db.query("SELECT * FROM sometable", function (data) {
+var db = new Postgres.Connection("dbname", "username", "password");
+db.query("SELECT * FROM test");
+db.query("SELECT * FROM test", function (data) {
sys.p(data);
});
db.close();
View
@@ -255,7 +255,7 @@ exports.Connection = function (database, username, password, port, host) {
events.addListener('ReadyForQuery', function () {
if (query_queue.length > 0) {
var query = query_queue.shift();
- query_callback = query.callback;
+ query_callback = query.callback || function() {};
sendMessage('Query', [query.sql]);
readyState = false;
} else {

0 comments on commit a076b6c

Please sign in to comment.