6
6
[ ![ Build Status] [ travis-image ]] [ travis-url ]
7
7
[ ![ Test Coverage] [ coveralls-image ]] [ coveralls-url ]
8
8
9
+ ## Table of Contents
10
+
11
+ - [ Install] ( #install )
12
+ - [ Introduction] ( #introduction )
13
+ - [ Contributors] ( #contributors )
14
+ - [ Sponsors] ( #sponsors )
15
+ - [ Community] ( #community )
16
+ - [ Establishing connections] ( #establishing-connections )
17
+ - [ Connection options] ( #connection-options )
18
+ - [ SSL options] ( #ssl-options )
19
+ - [ Terminating connections] ( #terminating-connections )
20
+ - [ Pooling connections] ( #pooling-connections )
21
+ - [ Pool options] ( #pool-options )
22
+ - [ Pool events] ( #pool-events )
23
+ - [ Closing all the connections in a pool] ( #closing-all-the-connections-in-a-pool )
24
+ - [ PoolCluster] ( #poolcluster )
25
+ - [ PoolCluster Option] ( #poolcluster-option )
26
+ - [ Switching users and altering connection state] ( #switching-users-and-altering-connection-state )
27
+ - [ Server disconnects] ( #server-disconnects )
28
+ - [ Escaping query values] ( #escaping-query-values )
29
+ - [ Escaping query identifiers] ( #escaping-query-identifiers )
30
+ - [ Preparing Queries] ( #preparing-queries )
31
+ - [ Custom format] ( #custom-format )
32
+ - [ Getting the id of an inserted row] ( #getting-the-id-of-an-inserted-row )
33
+ - [ Getting the number of affected rows] ( #getting-the-number-of-affected-rows )
34
+ - [ Getting the number of changed rows] ( #getting-the-number-of-changed-rows )
35
+ - [ Getting the connection ID] ( #getting-the-connection-id )
36
+ - [ Executing queries in parallel] ( #executing-queries-in-parallel )
37
+ - [ Streaming query rows] ( #streaming-query-rows )
38
+ - [ Piping results with Streams2] ( #piping-results-with-streams2 )
39
+ - [ Multiple statement queries] ( #multiple-statement-queries )
40
+ - [ Stored procedures] ( #stored-procedures )
41
+ - [ Joins with overlapping column names] ( #joins-with-overlapping-column-names )
42
+ - [ Transactions] ( #transactions )
43
+ - [ Timeouts] ( #timeouts )
44
+ - [ Error handling] ( #error-handling )
45
+ - [ Exception Safety] ( #exception-safety )
46
+ - [ Type casting] ( #type-casting )
47
+ - [ Connection Flags] ( #connection-flags )
48
+ - [ Debugging and reporting problems] ( #debugging-and-reporting-problems )
49
+ - [ Running tests] ( #running-tests )
50
+ - [ Todo] ( #todo )
51
+
9
52
## Install
10
53
11
54
``` sh
@@ -197,9 +240,9 @@ fails assumed to be plaintext strings.
197
240
The ` ssl ` option in the connection options takes a string or an object. When given a string,
198
241
it uses one of the predefined SSL profiles included. The following profiles are included:
199
242
200
- * ` "Amazon RDS" ` : this profile is for connecting to an Amazon RDS server and contains the
201
- ca from https://rds.amazonaws.com/doc/rds-ssl-ca-cert.pem
202
-
243
+ * ` "Amazon RDS" ` : this profile is for connecting to an Amazon RDS server and contains the
244
+ ca from https://rds.amazonaws.com/doc/rds-ssl-ca-cert.pem
245
+
203
246
When connecting to other servers, you will need to provide an object of options, in the
204
247
same format as [ crypto.createCredentials] ( http://nodejs.org/api/crypto.html#crypto_crypto_createcredentials_details ) .
205
248
Please note the arguments expect a string of the certificate, not a file name to the
@@ -441,7 +484,7 @@ var clusterConfig = {
441
484
var poolCluster = mysql .createPoolCluster (clusterConfig);
442
485
```
443
486
444
- ## Switching users / altering connection state
487
+ ## Switching users and altering connection state
445
488
446
489
MySQL offers a changeUser command that allows you to alter the current user and
447
490
other aspects of the connection without shutting down the underlying socket:
@@ -638,7 +681,7 @@ string, otherwise it will throw.
638
681
This option is also required when fetching big numbers from the database, otherwise
639
682
you will get values rounded to hundreds or thousands due to the precision limit.
640
683
641
- ## Getting the number of affected rows.
684
+ ## Getting the number of affected rows
642
685
643
686
You can get the number of affected rows from an insert, update or delete statement.
644
687
@@ -650,7 +693,7 @@ connection.query('DELETE FROM posts WHERE title = "wrong"', function (err, resul
650
693
})
651
694
```
652
695
653
- ## Getting the number of changed rows.
696
+ ## Getting the number of changed rows
654
697
655
698
You can get the number of changed rows from an update statement.
656
699
0 commit comments