当前位置:Gxlcms > 数据库问题 > MySQL driver for Node

MySQL driver for Node

时间:2021-07-01 10:21:17 帮助过:31人阅读

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

标签:exec   send   from   com   建立   example   driver   ges   png   

人气教程排行