mysql2 2.3.3 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/index.d.ts +23 -9
- package/index.js +2 -0
- package/lib/auth_plugins/index.js +8 -0
- package/lib/auth_plugins/mysql_clear_password.js +17 -0
- package/lib/auth_plugins/sha256_password.js +2 -2
- package/lib/commands/auth_switch.js +3 -1
- package/lib/commands/change_user.js +19 -0
- package/lib/commands/client_handshake.js +40 -1
- package/lib/commands/prepare.js +2 -1
- package/lib/commands/quit.js +3 -3
- package/lib/commands/server_handshake.js +36 -1
- package/lib/connection.js +56 -11
- package/lib/connection_config.js +20 -3
- package/lib/constants/charset_encodings.js +4 -1
- package/lib/constants/charsets.js +41 -13
- package/lib/constants/client.js +8 -0
- package/lib/constants/ssl_profiles.js +274 -0
- package/lib/constants/types.js +60 -28
- package/lib/helpers.js +3 -1
- package/lib/packets/auth_next_factor.js +35 -0
- package/lib/packets/binary_row.js +49 -2
- package/lib/packets/column_definition.js +2 -0
- package/lib/packets/execute.js +62 -0
- package/lib/packets/index.js +6 -0
- package/lib/parsers/parser_cache.js +1 -1
- package/lib/parsers/text_parser.js +11 -4
- package/lib/pool.js +1 -1
- package/package.json +21 -14
- package/promise.d.ts +22 -2
- package/promise.js +12 -2
- package/typings/mysql/index.d.ts +43 -4
- package/typings/mysql/lib/Connection.d.ts +52 -8
- package/typings/mysql/lib/Pool.d.ts +4 -2
- package/typings/mysql/lib/PoolCluster.d.ts +3 -3
- package/typings/mysql/lib/PoolConnection.d.ts +1 -0
- package/typings/mysql/lib/Server.d.ts +13 -0
- package/typings/mysql/lib/protocol/packets/index.d.ts +5 -1
- package/typings/mysql/lib/protocol/packets/params/ErrorPacketParams.d.ts +6 -0
- package/typings/mysql/lib/protocol/packets/params/OkPacketParams.d.ts +9 -0
- package/typings/mysql/lib/protocol/sequences/Prepare.d.ts +52 -0
- package/typings/mysql/lib/protocol/sequences/Query.d.ts +12 -2
|
@@ -16,6 +16,11 @@ declare namespace Query {
|
|
|
16
16
|
*/
|
|
17
17
|
values?: any | any[] | { [param: string]: any };
|
|
18
18
|
|
|
19
|
+
/**
|
|
20
|
+
* This overrides the namedPlaceholders option set at the connection level.
|
|
21
|
+
*/
|
|
22
|
+
namedPlaceholders?: boolean;
|
|
23
|
+
|
|
19
24
|
/**
|
|
20
25
|
* Every operation takes an optional inactivity timeout option. This allows you to specify appropriate timeouts for
|
|
21
26
|
* operations. It is important to note that these timeouts are not part of the MySQL protocol, and rather timeout
|
|
@@ -54,9 +59,14 @@ declare namespace Query {
|
|
|
54
59
|
|
|
55
60
|
/**
|
|
56
61
|
* This overrides the same option set at the connection level.
|
|
57
|
-
*
|
|
62
|
+
*
|
|
58
63
|
*/
|
|
59
64
|
rowsAsArray?: boolean
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* By specifying a function that returns a readable stream, an arbitrary stream can be sent when sending a local fs file.
|
|
68
|
+
*/
|
|
69
|
+
infileStreamFactory?: (path: string) => Readable;
|
|
60
70
|
}
|
|
61
71
|
|
|
62
72
|
export interface StreamOptions {
|
|
@@ -126,7 +136,7 @@ declare class Query extends Sequence {
|
|
|
126
136
|
*
|
|
127
137
|
* @param options The options for the stream.
|
|
128
138
|
*/
|
|
129
|
-
stream(options
|
|
139
|
+
stream(options?: Query.StreamOptions): Readable;
|
|
130
140
|
|
|
131
141
|
on(event: string, listener: Function): this;
|
|
132
142
|
on(event: 'error', listener: (err: Query.QueryError) => any): this;
|