I am looking for a mySQL driver for nodejs that supports stored procedures. http://nodejsdb.org/db-mysql/ that I have been using gives the error
PROCEDURE can\'t r
it works in nodejs-mysql-native
stored procedure:
DELIMITER //
CREATE PROCEDURE test1p1()
BEGIN
SELECT 1+1;
END //
DELIMITER ;
node.js script:
mysql = require('mysql-native');
var db = mysql.createTCPClient();
db.auth('test', 'tester', ''); // db, user, password
db.query('call test.test1p1;').on('row', function(r) {
console.log(r);
}).on('end', function() {
console.log('OK!');
});
output:
{ '1+1': 2 }
OK!