node-mysql 2.0.0-alpha9 发布,改进内容包括:
- Add query to pool to execute queries directly using the pool
- Pool option to set queue limit
- Pool sends 'connection' event when it opens a new connection
- Added stringifyObjects option to treat input as strings rather than objects (#501)
- Support for poolClusters
- Datetime improvements
- Bug fixes
node.js mysql 驱动库,示例代码:
var mysql = require('mysql'); var connection = mysql.createConnection({ host : 'localhost', user : 'me', password : 'secret', }); connection.connect(); connection.query('SELECT 1 + 1 AS solution', function(err, rows, fields) { if (err) throw err; console.log('The solution is: ', rows[0].solution); }); connection.end();
暂无更多评论