mysql2 3.2.1 → 3.2.3
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
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Connection as PromiseConnection,
|
|
3
|
-
Pool as PromisePool,
|
|
4
3
|
PoolConnection as PromisePoolConnection,
|
|
5
4
|
} from './promise';
|
|
6
5
|
|
|
@@ -71,7 +70,6 @@ export interface Connection extends mysql.Connection {
|
|
|
71
70
|
) => any
|
|
72
71
|
): mysql.Query;
|
|
73
72
|
ping(callback?: (err: mysql.QueryError | null) => any): void;
|
|
74
|
-
promise(promiseImpl?: PromiseConstructor): PromiseConnection;
|
|
75
73
|
unprepare(sql: string): mysql.PrepareStatementInfo;
|
|
76
74
|
prepare(sql: string, callback?: (err: mysql.QueryError | null, statement: mysql.PrepareStatementInfo) => any): mysql.Prepare;
|
|
77
75
|
serverHandshake(args: any): any;
|
|
@@ -157,7 +155,6 @@ export interface Pool extends mysql.Connection {
|
|
|
157
155
|
on(event: 'acquire', listener: (connection: PoolConnection) => any): this;
|
|
158
156
|
on(event: 'release', listener: (connection: PoolConnection) => any): this;
|
|
159
157
|
on(event: 'enqueue', listener: () => any): this;
|
|
160
|
-
promise(promiseImpl?: PromiseConstructor): PromisePool;
|
|
161
158
|
unprepare(sql: string): mysql.PrepareStatementInfo;
|
|
162
159
|
prepare(sql: string, callback?: (err: mysql.QueryError | null, statement: mysql.PrepareStatementInfo) => any): mysql.Prepare;
|
|
163
160
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mysql2",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.3",
|
|
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": {
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"lint:code": "eslint index.js promise.js \"lib/**/*.js\" \"test/**/*.js\" \"benchmarks/**/*.js\"",
|
|
13
13
|
"lint:docs": "eslint Contributing.md \"documentation/**/*.md\" \"examples/*.js\"",
|
|
14
14
|
"test": "node ./test/run.js",
|
|
15
|
+
"test:tsc-build": "cd \"test/tsc-build\" && npx tsc -p \"tsconfig.json\"",
|
|
15
16
|
"coverage-test": "c8 -r cobertura -r lcov -r text node ./test/run.js",
|
|
16
17
|
"benchmark": "node ./benchmarks/benchmark.js",
|
|
17
18
|
"prettier": "prettier --single-quote --trailing-comma none --write \"{lib,examples,test}/**/*.js\"",
|
package/typings/mysql/index.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ import BasePrepare = require('./lib/protocol/sequences/Prepare');
|
|
|
12
12
|
import {QueryOptions, StreamOptions, QueryError} from './lib/protocol/sequences/Query';
|
|
13
13
|
import {PrepareStatementInfo} from './lib/protocol/sequences/Prepare';
|
|
14
14
|
import Server = require('./lib/Server');
|
|
15
|
+
import { Pool as PromisePool } from '../../promise';
|
|
15
16
|
|
|
16
17
|
export function createConnection(connectionUri: string): Connection;
|
|
17
18
|
export function createConnection(config: BaseConnection.ConnectionOptions): Connection;
|
|
@@ -39,7 +40,9 @@ export {
|
|
|
39
40
|
export * from './lib/protocol/packets/index';
|
|
40
41
|
|
|
41
42
|
// Expose class interfaces
|
|
42
|
-
export interface Connection extends BaseConnection {
|
|
43
|
+
export interface Connection extends BaseConnection {
|
|
44
|
+
promise(promiseImpl?: PromiseConstructor): PromisePool;
|
|
45
|
+
}
|
|
43
46
|
export interface PoolConnection extends BasePoolConnection {}
|
|
44
47
|
export interface Pool extends BasePool {}
|
|
45
48
|
export interface PoolCluster extends BasePoolCluster {}
|
|
@@ -11,6 +11,12 @@ import {EventEmitter} from 'events';
|
|
|
11
11
|
declare namespace Connection {
|
|
12
12
|
|
|
13
13
|
export interface ConnectionOptions {
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* DECIMAL and NEWDECIMAL types will be returned as numbers if this option is set to `true` ( default: `false`).
|
|
17
|
+
*/
|
|
18
|
+
decimalNumbers?: boolean;
|
|
19
|
+
|
|
14
20
|
/**
|
|
15
21
|
* The MySQL user to authenticate as
|
|
16
22
|
*/
|
|
@@ -290,8 +296,6 @@ declare class Connection extends EventEmitter {
|
|
|
290
296
|
unprepare(sql: string): any;
|
|
291
297
|
|
|
292
298
|
serverHandshake(args: any): any;
|
|
293
|
-
|
|
294
|
-
promise(): Promise<Connection>;
|
|
295
299
|
}
|
|
296
300
|
|
|
297
301
|
export = Connection;
|