A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/sidorares/nodejs-mysql-native below:

sidorares/nodejs-mysql-native: Native mysql async client for node.js

Deprecated . If you are using it, please consider migrating to node-mysql2

Mysql client module for node.js, written in JavaScript. No other mysql runtime required.

npm install mysql-native

Check out the google group http://groups.google.com/group/node-mysql-native for questions/answers from users of the driver.

var db = require("mysql-native").createTCPClient(); // localhost:3306 by default
db.auto_prepare = true;
function dump_rows(cmd)
{
   cmd.addListener('row', function(r) { console.dir(r); } );
}

db.auth("test", "testuser", "testpass");
dump_rows(db.query("select 1+1,2,3,'4',length('hello')"));
dump_rows(db.execute("select 1+1,2,3,'4',length(?)", ["hello"]));
db.close();

output is: row: [ 2, 2, 3, "4", 5] row: [ 2, 2, 3, "4", 5]

#API

All commands fire 'end'() event at the end of command executing.

MySql protocol documentation:

Other node.js mysql clients:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4