Skip to content

Commit 4f85109

Browse files
committed
Small refactory on Batch Type Definition
to reflect the possibility of using a array with a single item (sql query) as an item of the batch, like: ['QUERY'] The previous declaration will force something like ['QUERY', undefined]
1 parent 16082e4 commit 4f85109

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ interface QueryResult {
3838
* If a single query must be executed many times with different arguments, its preferred
3939
* to declare it a single time, and use an array of array parameters.
4040
*/
41-
type SQLBatchParams = [string, Array<any> | Array<Array<any>> | undefined];
41+
type SQLBatchParams = [string] | [string, Array<any> | Array<Array<any>>];
4242

4343
/**
4444
* status: 0 or undefined for correct execution, 1 for error

0 commit comments

Comments
 (0)