Created
September 28, 2015 18:45
-
-
Save wzrdtales/f679c3251ea3488a7fec to your computer and use it in GitHub Desktop.
test case that proofs that an update never returns any result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mariasql = require('mariasql'); | |
var connection = new mariasql(); | |
connection.connect({ | |
"host": "localhost", | |
"port": 3306, | |
"user": "root", | |
"password": "fancydancypassword", | |
"db": "curlydb", | |
"multiStatements": true | |
}); | |
connection.on('ready', function() { | |
connection.query('UPDATE `user` SET time_last_active = NOW() \ | |
WHERE `user`.`id` = ? LIMIT 1', [ 1 ]) | |
.on('result', function(result) { | |
console.log('got a result!'); //no you dont :( | |
result.on('data', function(row) { | |
console.log(row); | |
}) | |
.on('end', function() { | |
// we also never reach here? | |
console.log(result.info); | |
}); | |
}) | |
.on('end', function() { | |
console.log(arguments); //nothing here? no its empty :/ | |
}); | |
} ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment