mysql2 3.6.0 → 3.6.2
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/lib/connection.js +4 -2
- package/package.json +3 -3
- package/promise.d.ts +5 -5
- package/typings/mysql/lib/Connection.d.ts +1 -1
- package/typings/mysql/lib/Pool.d.ts +1 -1
- package/typings/mysql/lib/PoolCluster.d.ts +1 -1
- package/typings/mysql/lib/protocol/sequences/Prepare.d.ts +1 -1
- package/typings/mysql/lib/protocol/sequences/Query.d.ts +1 -1
package/lib/connection.js
CHANGED
|
@@ -622,7 +622,8 @@ class Connection extends EventEmitter {
|
|
|
622
622
|
// execute(options, cb)
|
|
623
623
|
options = {
|
|
624
624
|
...options,
|
|
625
|
-
...sql
|
|
625
|
+
...sql,
|
|
626
|
+
sql: sql.sql
|
|
626
627
|
};
|
|
627
628
|
if (typeof values === 'function') {
|
|
628
629
|
cb = values;
|
|
@@ -911,7 +912,8 @@ class Connection extends EventEmitter {
|
|
|
911
912
|
// query(options, cb)
|
|
912
913
|
options = {
|
|
913
914
|
...options,
|
|
914
|
-
...sql
|
|
915
|
+
...sql,
|
|
916
|
+
sql: sql.sql
|
|
915
917
|
};
|
|
916
918
|
if (typeof values === 'function') {
|
|
917
919
|
cb = values;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mysql2",
|
|
3
|
-
"version": "3.6.
|
|
3
|
+
"version": "3.6.2",
|
|
4
4
|
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"directories": {
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"c8": "^8.0.0",
|
|
76
76
|
"error-stack-parser": "^2.0.3",
|
|
77
77
|
"eslint": "^8.27.0",
|
|
78
|
-
"eslint-config-prettier": "^
|
|
78
|
+
"eslint-config-prettier": "^9.0.0",
|
|
79
79
|
"eslint-plugin-async-await": "0.0.0",
|
|
80
80
|
"eslint-plugin-markdown": "^3.0.0",
|
|
81
81
|
"husky": "^8.0.2",
|
|
82
|
-
"lint-staged": "^
|
|
82
|
+
"lint-staged": "^14.0.1",
|
|
83
83
|
"portfinder": "^1.0.28",
|
|
84
84
|
"prettier": "^3.0.0",
|
|
85
85
|
"progress": "^2.0.3",
|
package/promise.d.ts
CHANGED
|
@@ -18,13 +18,13 @@ export * from './index.js';
|
|
|
18
18
|
|
|
19
19
|
// Expose class interfaces
|
|
20
20
|
declare class QueryableAndExecutableBase extends QueryableBaseClass(
|
|
21
|
-
ExecutableBaseClass(EventEmitter)
|
|
21
|
+
ExecutableBaseClass(EventEmitter),
|
|
22
22
|
) {}
|
|
23
23
|
|
|
24
24
|
export interface PreparedStatementInfo {
|
|
25
25
|
close(): Promise<void>;
|
|
26
26
|
execute(
|
|
27
|
-
|
|
27
|
+
parameters: any | any[] | { [param: string]: any },
|
|
28
28
|
): Promise<
|
|
29
29
|
[
|
|
30
30
|
(
|
|
@@ -34,7 +34,7 @@ export interface PreparedStatementInfo {
|
|
|
34
34
|
| OkPacket[]
|
|
35
35
|
| ResultSetHeader
|
|
36
36
|
),
|
|
37
|
-
FieldPacket[]
|
|
37
|
+
FieldPacket[],
|
|
38
38
|
]
|
|
39
39
|
>;
|
|
40
40
|
}
|
|
@@ -115,14 +115,14 @@ export interface PoolCluster extends EventEmitter {
|
|
|
115
115
|
|
|
116
116
|
of(pattern: string, selector?: string): PoolNamespace;
|
|
117
117
|
|
|
118
|
-
on(event: string, listener: (args: any[]) => void): this;
|
|
118
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
119
119
|
on(event: 'remove', listener: (nodeId: number) => void): this;
|
|
120
120
|
on(event: 'warn', listener: (err: Error) => void): this;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
123
|
export function createConnection(connectionUri: string): Promise<Connection>;
|
|
124
124
|
export function createConnection(
|
|
125
|
-
config: ConnectionOptions
|
|
125
|
+
config: ConnectionOptions,
|
|
126
126
|
): Promise<Connection>;
|
|
127
127
|
|
|
128
128
|
export function createPool(connectionUri: string): Pool;
|
|
@@ -357,7 +357,7 @@ declare class Connection extends QueryableBase(ExecutableBase(EventEmitter)) {
|
|
|
357
357
|
|
|
358
358
|
format(sql: string, values?: any | any[] | { [param: string]: any }): string;
|
|
359
359
|
|
|
360
|
-
on(event: string, listener: (args: any[]) => void): this;
|
|
360
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
361
361
|
|
|
362
362
|
rollback(callback: (err: QueryError | null) => void): void;
|
|
363
363
|
|
|
@@ -63,7 +63,7 @@ declare class Pool extends QueryableBase(ExecutableBase(EventEmitter)) {
|
|
|
63
63
|
callback?: (err: NodeJS.ErrnoException | null, ...args: any[]) => any
|
|
64
64
|
): void;
|
|
65
65
|
|
|
66
|
-
on(event: string, listener: (args: any[]) => void): this;
|
|
66
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
67
67
|
on(event: 'connection', listener: (connection: PoolConnection) => any): this;
|
|
68
68
|
on(event: 'acquire', listener: (connection: PoolConnection) => any): this;
|
|
69
69
|
on(event: 'release', listener: (connection: PoolConnection) => any): this;
|
|
@@ -78,7 +78,7 @@ declare class PoolCluster extends EventEmitter {
|
|
|
78
78
|
|
|
79
79
|
of(pattern: string, selector?: string): PoolNamespace;
|
|
80
80
|
|
|
81
|
-
on(event: string, listener: (args: any[]) => void): this;
|
|
81
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
82
82
|
on(event: 'remove', listener: (nodeId: number) => void): this;
|
|
83
83
|
on(event: 'warn', listener: (err: Error) => void): this;
|
|
84
84
|
}
|
|
@@ -18,7 +18,7 @@ export class PrepareStatementInfo {
|
|
|
18
18
|
| OkPacket[]
|
|
19
19
|
| ResultSetHeader
|
|
20
20
|
>(
|
|
21
|
-
|
|
21
|
+
parameters: any | any[] | { [param: string]: any },
|
|
22
22
|
callback?: (err: QueryError | null, result: T, fields: FieldPacket[]) => any
|
|
23
23
|
): Query;
|
|
24
24
|
}
|
|
@@ -133,7 +133,7 @@ declare class Query extends Sequence {
|
|
|
133
133
|
*/
|
|
134
134
|
stream(options?: StreamOptions): Readable;
|
|
135
135
|
|
|
136
|
-
on(event: string, listener: (args: any[]) => void): this;
|
|
136
|
+
on(event: string, listener: (...args: any[]) => void): this;
|
|
137
137
|
on(event: 'error', listener: (err: QueryError) => any): this;
|
|
138
138
|
on(
|
|
139
139
|
event: 'fields',
|