12
12
13
13
__ 目录__
14
14
15
- - [ MySQL2的历史以及选择原因] ( #history-and-why-mysql2 )
16
- - [ 安装] ( #installation )
17
- - [ 查询数据] ( #first-query )
18
- - [ SQL预处理的使用] ( #using-prepared-statements )
19
- - [ 连接池的使用] ( #using-connection-pools )
20
- - [ Promise封装的使用 ] ( #using-promise-wrapper )
21
- - [ API配置项] ( #api-and-configuration )
22
- - [ 文档] ( #documentation )
23
- - [ 鸣谢] ( #acknowledgements )
24
- - [ 贡献] ( #contributing )
15
+ - [ MySQL2的历史以及选择原因] ( #MySQL2的历史以及选择原因 )
16
+ - [ 安装] ( #安装 )
17
+ - [ 查询数据] ( #查询数据 )
18
+ - [ SQL预处理的使用] ( #SQL预处理的使用 )
19
+ - [ 连接池的使用] ( #连接池的使用 )
20
+ - [ Promise封装 ] ( #Promise封装 )
21
+ - [ API配置项] ( #API配置项 )
22
+ - [ 文档] ( #文档 )
23
+ - [ 鸣谢] ( #鸣谢 )
24
+ - [ 贡献] ( #贡献 )
25
25
26
26
## MySQL2的历史以及选择原因
27
27
@@ -36,8 +36,8 @@ MySQL2 大部分 API 与 [mysqljs][node-mysql] 兼容,并支持大部分功能
36
36
- 对编码和排序规则有很好的支持
37
37
- [ Promise封装] ( https://github.com/sidorares/node-mysql2/tree/master/documentation/Promise-Wrapper.md )
38
38
- 支持压缩
39
- - SSL and [ Authentication Switch] ( https://github.com/sidorares/node-mysql2/tree/master/documentation/Authentication-Switch.md )
40
- - [ Custom Streams ] ( https://github.com/sidorares/node-mysql2/tree/master/documentation/Extras.md )
39
+ - SSL 和 [ Authentication Switch] ( https://github.com/sidorares/node-mysql2/tree/master/documentation/Authentication-Switch.md )
40
+ - [ 自定义流 ] ( https://github.com/sidorares/node-mysql2/tree/master/documentation/Extras.md )
41
41
- [ 连接池] ( #using-connection-pools )
42
42
43
43
## 安装
@@ -86,7 +86,6 @@ connection.query(
86
86
87
87
- [ 如何防止预处理语句SQL注入攻击] ( http://stackoverflow.com/questions/8263371/how-can-prepared-statements-protect-from-sql-injection-attacks )
88
88
89
- MySQL provides ` execute ` helper which will prepare and query the statement. You can also manually prepare / unprepare statement with ` prepare ` / ` unprepare ` methods.
90
89
MySQL 提供了 ` execute ` 辅助函数,它将准备和查询语句。 您还可以使用 ` prepare ` / ` unprepare ` 方法手动准备/取消准备。
91
90
92
91
``` js
@@ -114,7 +113,7 @@ connection.execute(
114
113
);
115
114
```
116
115
117
- ## 使用连接池
116
+ ## 连接池的使用
118
117
119
118
连接池通过重用以前的连接来帮助减少连接到 MySQL 服务器所花费的时间,当你完成它们时让它们保持打开而不是关闭。
120
119
@@ -253,13 +252,13 @@ MySQL2大部分的API与 [Node MySQL][node-mysql] 基本上相同,你应该查
253
252
254
253
你可以在[这里](https://github.com/sidorares/node-mysql2/tree/master/documentation)获得更多的详细文档,并且你应该查阅各种代码[示例](https://github.com/sidorares/node-mysql2/tree/master/examples)来获得更高级的概念。
255
254
256
- ## 致谢
255
+ ## 鸣谢
257
256
258
- - Internal protocol is written by @sidorares [MySQL-Native](https://github.com/sidorares/nodejs-mysql-native)
259
- - Constants, SQL parameters interpolation, Pooling, ` ConnectionConfig` class taken from [node-mysql](https://github.com/mysqljs/mysql)
260
- - SSL upgrade code based on @TooTallNate [code ](https://gist.github.com/TooTallNate/848444)
261
- - Secure connection / compressed connection api flags compatible to [MariaSQL](https://github.com/mscdex/node-mariasql/) client.
262
- - [Contributors ](https://github.com/sidorares/node-mysql2/graphs/contributors)
257
+ - 内部协议由@sidorares编写 [MySQL-Native](https://github.com/sidorares/nodejs-mysql-native)
258
+ - 常量、SQL参数插值、连接池、 ` ConnectionConfig` 类取自 [node-mysql](https://github.com/mysqljs/mysql)
259
+ - 基于@TooTallNate的SSL代码升级[代码地址 ](https://gist.github.com/TooTallNate/848444)
260
+ - 与 [MariaSQL](https://github.com/mscdex/node-mariasql/)客户端兼容安全连接/压缩连接 API。
261
+ - [贡献者 ](https://github.com/sidorares/node-mysql2/graphs/contributors)
263
262
264
263
## 贡献
265
264
0 commit comments