+1
-1
| { | ||
| "name": "mysql2", | ||
| "version": "3.18.1", | ||
| "version": "3.18.2-canary.2ad5f0b2", | ||
| "description": "fast mysql driver. Implements core protocol, prepared statements, ssl and compression in native JS", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -8,2 +8,3 @@ // This file was modified by Oracle on November 04, 2021. | ||
| import { Readable } from 'stream'; | ||
| import { Timezone } from 'sql-escaper'; | ||
| import { Query, QueryError } from './protocol/sequences/Query.js'; | ||
@@ -154,3 +155,3 @@ import { Prepare, PrepareStatementInfo } from './protocol/sequences/Prepare.js'; | ||
| */ | ||
| timezone?: string | 'local'; | ||
| timezone?: Timezone; | ||
@@ -157,0 +158,0 @@ /** |
@@ -6,2 +6,3 @@ import { FieldPacket, QueryResult } from '../packets/index.js'; | ||
| QueryOptions, | ||
| ExecuteValues, | ||
| QueryableConstructor, | ||
@@ -22,3 +23,3 @@ } from './Query.js'; | ||
| sql: string, | ||
| values: any, | ||
| values: ExecuteValues, | ||
| callback?: | ||
@@ -31,3 +32,3 @@ | ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) | ||
| callback?: | ||
| | ((err: QueryError | null, result: T, fields?: FieldPacket[]) => any) | ||
| | ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) | ||
| | undefined | ||
@@ -37,3 +38,3 @@ ): Query; | ||
| options: QueryOptions, | ||
| values: any, | ||
| values: ExecuteValues, | ||
| callback?: | ||
@@ -40,0 +41,0 @@ | ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) |
| import { FieldPacket, QueryResult } from '../../packets/index.js'; | ||
| import { QueryOptions, QueryableConstructor, QueryValues } from '../Query.js'; | ||
| import { QueryOptions, QueryableConstructor, ExecuteValues } from '../Query.js'; | ||
@@ -8,15 +8,11 @@ export declare function ExecutableBase<T extends QueryableConstructor>( | ||
| new (...args: any[]): { | ||
| execute<T extends QueryResult>(sql: string): Promise<[T, FieldPacket[]]>; | ||
| execute<T extends QueryResult>( | ||
| sql: string, | ||
| values?: QueryValues | ||
| values?: ExecuteValues | ||
| ): Promise<[T, FieldPacket[]]>; | ||
| execute<T extends QueryResult>( | ||
| options: QueryOptions | ||
| ): Promise<[T, FieldPacket[]]>; | ||
| execute<T extends QueryResult>( | ||
| options: QueryOptions, | ||
| values?: QueryValues | ||
| values?: ExecuteValues | ||
| ): Promise<[T, FieldPacket[]]>; | ||
| }; | ||
| } & T; |
| import { FieldPacket, QueryResult } from '../../packets/index.js'; | ||
| import { QueryOptions, QueryableConstructor } from '../Query.js'; | ||
| import { QueryOptions, QueryValues, QueryableConstructor } from '../Query.js'; | ||
@@ -8,15 +8,12 @@ export declare function QueryableBase<T extends QueryableConstructor>( | ||
| new (...args: any[]): { | ||
| query<T extends QueryResult>(sql: string): Promise<[T, FieldPacket[]]>; | ||
| query<T extends QueryResult>( | ||
| sql: string, | ||
| values?: any | ||
| values?: QueryValues | ||
| ): Promise<[T, FieldPacket[]]>; | ||
| query<T extends QueryResult>( | ||
| options: QueryOptions | ||
| ): Promise<[T, FieldPacket[]]>; | ||
| query<T extends QueryResult>( | ||
| options: QueryOptions, | ||
| values?: any | ||
| values?: QueryValues | ||
| ): Promise<[T, FieldPacket[]]>; | ||
| }; | ||
| } & T; |
| import { Sequence } from './Sequence.js'; | ||
| import { OkPacket, RowDataPacket, FieldPacket } from '../packets/index.js'; | ||
| import { Readable } from 'stream'; | ||
| import { Timezone } from 'sql-escaper'; | ||
| import { TypeCast } from '../../parsers/typeCast.js'; | ||
| export type ExecuteValues = | ||
| | string | ||
| | number | ||
| | bigint | ||
| | boolean | ||
| | Date | ||
| | null | ||
| | Blob | ||
| | Buffer | ||
| | ({} | null)[] | ||
| | { [key: string]: ExecuteValues }; | ||
| export type QueryValues = | ||
@@ -15,3 +28,3 @@ | string | ||
| | Buffer | ||
| | ({} | null)[] | ||
| | ({} | null | undefined)[] | ||
| | { [key: string]: QueryValues }; | ||
@@ -99,2 +112,31 @@ | ||
| infileStreamFactory?: (path: string) => Readable; | ||
| /** | ||
| * When dealing with big numbers (BIGINT and DECIMAL columns) in the database, you should enable this option | ||
| * (Default: false) | ||
| */ | ||
| supportBigNumbers?: boolean; | ||
| /** | ||
| * Enabling both supportBigNumbers and bigNumberStrings forces big numbers (BIGINT and DECIMAL columns) to be | ||
| * always returned as JavaScript String objects (Default: false). Enabling supportBigNumbers but leaving | ||
| * bigNumberStrings disabled will return big numbers as String objects only when they cannot be accurately | ||
| * represented with JavaScript Number objects (which happens when they exceed the [-2^53, +2^53] range), | ||
| * otherwise they will be returned as Number objects. | ||
| * This option is ignored if supportBigNumbers is disabled. | ||
| */ | ||
| bigNumberStrings?: boolean; | ||
| /** | ||
| * Force date types (TIMESTAMP, DATETIME, DATE) to be returned as strings rather then inflated into JavaScript Date | ||
| * objects. Can be true/false or an array of type names to keep as strings. | ||
| * | ||
| * (Default: false) | ||
| */ | ||
| dateStrings?: boolean | Array<'TIMESTAMP' | 'DATETIME' | 'DATE'>; | ||
| /** | ||
| * The timezone used to store local dates. (Default: 'local') | ||
| */ | ||
| timezone?: Timezone; | ||
| } | ||
@@ -101,0 +143,0 @@ |
@@ -6,2 +6,3 @@ import { FieldPacket, QueryResult } from '../packets/index.js'; | ||
| QueryOptions, | ||
| QueryValues, | ||
| QueryableConstructor, | ||
@@ -22,3 +23,3 @@ } from './Query.js'; | ||
| sql: string, | ||
| values: any, | ||
| values: QueryValues, | ||
| callback?: | ||
@@ -31,3 +32,3 @@ | ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) | ||
| callback?: | ||
| | ((err: QueryError | null, result: T, fields?: FieldPacket[]) => any) | ||
| | ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) | ||
| | undefined | ||
@@ -37,3 +38,3 @@ ): Query; | ||
| options: QueryOptions, | ||
| values: any, | ||
| values: QueryValues, | ||
| callback?: | ||
@@ -40,0 +41,0 @@ | ((err: QueryError | null, result: T, fields: FieldPacket[]) => any) |
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 2 instances in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
533223
0.22%14509
0.22%1
Infinity%