Skip to content

Commit

Permalink
fix: add ProcedureCallPacket to query overloads
Browse files Browse the repository at this point in the history
  • Loading branch information
wellwelwel committed Jun 30, 2023
1 parent 3566ef7 commit 352c3bc
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions typings/mysql/lib/protocol/sequences/QueryableBase.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ import {
FieldPacket,
RowDataPacket,
ResultSetHeader,
ProcedureCallPacket,
} from '../packets/index.js';
import {
Query,
QueryError,
QueryOptions,
QueryableConstructor,
} from './Query.js';

export declare function QueryableBase<T extends QueryableConstructor>(
Base?: T
): {
Expand All @@ -21,51 +23,55 @@ export declare function QueryableBase<T extends QueryableConstructor>(
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
| ProcedureCallPacket
>(
sql: string,
callback?:
| ((err: QueryError | null, result: T, fields: FieldPacket[]) => any)
| undefined
): Query;
query<
T_1 extends
T extends
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
| ProcedureCallPacket
>(
sql: string,
values: any,
callback?:
| ((err: QueryError | null, result: T_1, fields: FieldPacket[]) => any)
| ((err: QueryError | null, result: T, fields: FieldPacket[]) => any)
| undefined
): Query;
query<
T_2 extends
T extends
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
| ProcedureCallPacket
>(
options: QueryOptions,
callback?:
| ((err: QueryError | null, result: T_2, fields?: FieldPacket[]) => any)
| ((err: QueryError | null, result: T, fields?: FieldPacket[]) => any)
| undefined
): Query;
query<
T_3 extends
T extends
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
| ProcedureCallPacket
>(
options: QueryOptions,
values: any,
callback?:
| ((err: QueryError | null, result: T_3, fields: FieldPacket[]) => any)
| ((err: QueryError | null, result: T, fields: FieldPacket[]) => any)
| undefined
): Query;
};
Expand Down

0 comments on commit 352c3bc

Please sign in to comment.