首页 > 数据库技术 > 详细

MySQL driver for Node

时间:2017-02-01 10:36:03      阅读:227      评论:0      收藏:0      [点我收藏+]

MySQL driver for Node

1、安装

  技术分享

2、一个示例

  技术分享

  From this example, you can learn the following:

  • Every method you invoke on a connection is queued and executed in sequence.
  • Closing the connection is done using end() which makes sure all remaining queries are executed before sending a quit packet to the mysql server.

3、处理connect回调。The recommended way to establish a connection is this:

  技术分享

4、直接query也能建立连接。However, a connection can also be implicitly established by invoking a query:

  技术分享

参考:https://github.com/mysqljs/mysql

MySQL driver for Node

原文:http://www.cnblogs.com/tekkaman/p/6359720.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!