Skip to content

Commit d0f14fe

Browse files
committed
fix: mysql driver logic for multiple query rendering
1 parent 6ca9b19 commit d0f14fe

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"repository": {
88
"url": "https://github.com/cmoog/vscode-sql-notebook"
99
},
10-
"version": "0.5.0",
10+
"version": "0.5.1",
1111
"preview": false,
1212
"engines": {
1313
"vscode": "^1.59.0"

src/driver.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,9 @@ function mysqlConn(conn: mysql.PoolConnection, queryTimeout: number): Conn {
112112
return [[result]];
113113
}
114114

115-
// this reliably indicates whether there are results for multiple distinct queries
116-
const hasMultipleResults = ok.length > 1;
115+
// this indicates whether there are results for multiple distinct queries
116+
const hasMultipleResults =
117+
ok.length > 1 && ok.some((a: any) => a?.length);
117118
if (hasMultipleResults) {
118119
// when we have `ResultSetHeader`, which is the result of an exec request,
119120
// we want to nest that into an array so that is display as a single row table

0 commit comments

Comments
 (0)