mysql2 3.2.4 → 3.3.1
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/index.d.ts +2 -1
- package/lib/connection.js +1 -1
- package/lib/constants/errors.js +3952 -2078
- package/lib/parsers/parser_cache.js +1 -1
- package/package.json +2 -2
- package/promise.d.ts +1 -3
- package/typings/mysql/index.d.ts +2 -2
- package/typings/mysql/lib/Connection.d.ts +4 -2
- package/typings/mysql/lib/Pool.d.ts +7 -1
package/index.d.ts
CHANGED
|
@@ -78,6 +78,7 @@ export interface Connection extends mysql.Connection {
|
|
|
78
78
|
writeEof(warnings?: number, statusFlags?: number): void;
|
|
79
79
|
writeTextResult(rows?: Array<any>, columns?: Array<any>): void;
|
|
80
80
|
writePacket(packet: any): void;
|
|
81
|
+
promise(promiseImpl?: PromiseConstructor): PromiseConnection;
|
|
81
82
|
sequenceId: number;
|
|
82
83
|
}
|
|
83
84
|
|
|
@@ -157,7 +158,7 @@ export interface Pool extends mysql.Connection {
|
|
|
157
158
|
on(event: 'enqueue', listener: () => any): this;
|
|
158
159
|
unprepare(sql: string): mysql.PrepareStatementInfo;
|
|
159
160
|
prepare(sql: string, callback?: (err: mysql.QueryError | null, statement: mysql.PrepareStatementInfo) => any): mysql.Prepare;
|
|
160
|
-
|
|
161
|
+
promise(promiseImpl?: PromiseConstructor): PromisePoolConnection;
|
|
161
162
|
config: mysql.PoolOptions;
|
|
162
163
|
}
|
|
163
164
|
|
package/lib/connection.js
CHANGED
|
@@ -22,7 +22,7 @@ const EventEmitter = require('events').EventEmitter;
|
|
|
22
22
|
const Readable = require('stream').Readable;
|
|
23
23
|
const Queue = require('denque');
|
|
24
24
|
const SqlString = require('sqlstring');
|
|
25
|
-
const LRU = require('lru-cache');
|
|
25
|
+
const LRU = require('lru-cache').default;
|
|
26
26
|
|
|
27
27
|
const PacketParser = require('./packet_parser.js');
|
|
28
28
|
const Packets = require('./packets/index.js');
|