Permalink
Browse files

Added --unbuffered command-line option to receive rows as they become…

… available.
  • Loading branch information...
1 parent 75b9043 commit 9e95983e69dcbe270852a00488d78b5f44bc5b08 @mscdex committed May 4, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 node-poormansmysql.js
View
2 node-poormansmysql.js
@@ -80,7 +80,7 @@ function MysqlConnection(newconfig) {
for (var i = 0, len = queries.length; i < len; i++)
strQueries += queries[i].query.replace("\\", "\\\\").replace("\"", "\\\"") + (i + 1 < len ? ";\n" : "");
- proc = spawn('/bin/sh', ['-c', 'echo "' + strQueries + '" | mysql --xml --quick --disable-auto-rehash --connect_timeout=' + config.connect_timeout + ' --host=' + config.host + ' --port=' + config.port + ' --user=' + config.user + ' --password=' + config.password + (config.db != null ? ' --database=' + config.db : '') + (config.force == true ? ' --force' : '') + ' | cat']);
+ proc = spawn('/bin/sh', ['-c', 'echo "' + strQueries + '" | mysql --xml --quick --unbuffered --disable-auto-rehash --connect_timeout=' + config.connect_timeout + ' --host=' + config.host + ' --port=' + config.port + ' --user=' + config.user + ' --password=' + config.password + (config.db != null ? ' --database=' + config.db : '') + (config.force == true ? ' --force' : '') + ' | cat']);
proc.stdout.setEncoding('utf8');
proc.stderr.setEncoding('utf8');

0 comments on commit 9e95983

Please sign in to comment.