mysql2 3.17.3 → 3.17.4
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mysql2",
|
|
3
|
-
"version": "3.17.
|
|
3
|
+
"version": "3.17.4",
|
|
4
4
|
"description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"typings": "typings/mysql/index",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"lint": "eslint . && prettier --check .",
|
|
10
10
|
"lint:fix": "eslint . --fix && prettier --write .",
|
|
11
11
|
"test": "npm run test:parallel && npm run test:global",
|
|
12
|
-
"test:parallel": "poku -c=\"poku.config.mjs\" test
|
|
13
|
-
"test:global": "cross-env SUITE=global poku -c=\"poku.config.mjs\" test/
|
|
12
|
+
"test:parallel": "poku -c=\"poku.config.mjs\" test",
|
|
13
|
+
"test:global": "cross-env SUITE=global poku -c=\"poku.config.mjs\" test/global",
|
|
14
14
|
"test:bun": "npm run test:bun:parallel",
|
|
15
|
-
"test:bun:parallel": "bun poku -c=\"poku.config.mjs\" test
|
|
15
|
+
"test:bun:parallel": "bun poku -c=\"poku.config.mjs\" test",
|
|
16
16
|
"test:deno": "npm run test:deno:parallel && npm run test:deno:global",
|
|
17
|
-
"test:deno:parallel": "deno run --allow-read --allow-env --allow-run npm:poku@canary -c=\"poku.config.mjs\" test
|
|
18
|
-
"test:deno:global": "cross-env SUITE=global deno run --allow-read --allow-env --allow-run npm:poku@canary -c=\"poku.config.mjs\" test/
|
|
17
|
+
"test:deno:parallel": "deno run --allow-read --allow-env --allow-run npm:poku@canary -c=\"poku.config.mjs\" test",
|
|
18
|
+
"test:deno:global": "cross-env SUITE=global deno run --allow-read --allow-env --allow-run npm:poku@canary -c=\"poku.config.mjs\" test/global",
|
|
19
19
|
"test:docker:up": "docker compose -f test/docker-compose.yml up --abort-on-container-exit --remove-orphans",
|
|
20
20
|
"test:docker:down": "docker compose -f test/docker-compose.yml down",
|
|
21
21
|
"test:docker:node": "npm run test:docker:up -- node && npm run test:docker:down",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"test:docker:deno": "npm run test:docker:up -- deno && npm run test:docker:down",
|
|
24
24
|
"test:docker:coverage": "npm run test:docker:up -- coverage && npm run test:docker:down",
|
|
25
25
|
"test:coverage": "c8 npm test",
|
|
26
|
-
"typecheck": "cd \"test/tsc-build\" && tsc -p \"tsconfig.json\" && cd
|
|
26
|
+
"typecheck": "cd \"test/tsc-build\" && tsc -p \"tsconfig.json\" && cd .. && tsc -p \"tsconfig.json\" --noEmit",
|
|
27
27
|
"benchmark": "node ./benchmarks/benchmark.js",
|
|
28
28
|
"wait-port": "wait-on"
|
|
29
29
|
},
|
|
@@ -3,6 +3,18 @@ import { OkPacket, RowDataPacket, FieldPacket } from '../packets/index.js';
|
|
|
3
3
|
import { Readable } from 'stream';
|
|
4
4
|
import { TypeCast } from '../../parsers/typeCast.js';
|
|
5
5
|
|
|
6
|
+
export type QueryValues =
|
|
7
|
+
| string
|
|
8
|
+
| number
|
|
9
|
+
| bigint
|
|
10
|
+
| boolean
|
|
11
|
+
| Date
|
|
12
|
+
| null
|
|
13
|
+
| Blob
|
|
14
|
+
| Buffer
|
|
15
|
+
| ({} | null)[]
|
|
16
|
+
| { [key: string]: QueryValues };
|
|
17
|
+
|
|
6
18
|
export interface QueryOptions {
|
|
7
19
|
/**
|
|
8
20
|
* The SQL for the query
|
|
@@ -12,7 +24,7 @@ export interface QueryOptions {
|
|
|
12
24
|
/**
|
|
13
25
|
* The values for the query
|
|
14
26
|
*/
|
|
15
|
-
values?:
|
|
27
|
+
values?: QueryValues;
|
|
16
28
|
|
|
17
29
|
/**
|
|
18
30
|
* This overrides the namedPlaceholders option set at the connection level.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FieldPacket, QueryResult } from '../../packets/index.js';
|
|
2
|
-
import { QueryOptions, QueryableConstructor } from '../Query.js';
|
|
2
|
+
import { QueryOptions, QueryableConstructor, QueryValues } from '../Query.js';
|
|
3
3
|
|
|
4
4
|
export declare function ExecutableBase<T extends QueryableConstructor>(
|
|
5
5
|
Base?: T
|
|
@@ -8,14 +8,14 @@ export declare function ExecutableBase<T extends QueryableConstructor>(
|
|
|
8
8
|
execute<T extends QueryResult>(sql: string): Promise<[T, FieldPacket[]]>;
|
|
9
9
|
execute<T extends QueryResult>(
|
|
10
10
|
sql: string,
|
|
11
|
-
values:
|
|
11
|
+
values: QueryValues
|
|
12
12
|
): Promise<[T, FieldPacket[]]>;
|
|
13
13
|
execute<T extends QueryResult>(
|
|
14
14
|
options: QueryOptions
|
|
15
15
|
): Promise<[T, FieldPacket[]]>;
|
|
16
16
|
execute<T extends QueryResult>(
|
|
17
17
|
options: QueryOptions,
|
|
18
|
-
values:
|
|
18
|
+
values: QueryValues
|
|
19
19
|
): Promise<[T, FieldPacket[]]>;
|
|
20
20
|
};
|
|
21
21
|
} & T;
|