Skip to content

Commit

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

Expand All @@ -17,40 +18,68 @@ export declare function QueryableBase<T extends QueryableConstructor>(
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
| ProcedureCallPacket<
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
>
>(
sql: string
): Promise<[T, FieldPacket[]]>;
query<
T_1 extends
T extends
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
| ProcedureCallPacket<
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
>
>(
sql: string,
values: any
): Promise<[T_1, FieldPacket[]]>;
): Promise<[T, FieldPacket[]]>;
query<
T_2 extends
T extends
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
| ProcedureCallPacket<
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
>
>(
options: QueryOptions
): Promise<[T_2, FieldPacket[]]>;
): Promise<[T, FieldPacket[]]>;
query<
T_3 extends
T extends
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
| ProcedureCallPacket<
| OkPacket
| ResultSetHeader
| RowDataPacket[]
| RowDataPacket[][]
| OkPacket[]
>
>(
options: QueryOptions,
values: any
): Promise<[T_3, FieldPacket[]]>;
): Promise<[T, FieldPacket[]]>;
};
} & T;

0 comments on commit 0f31a41

Please sign in to comment.