Skip to content

Commit b5a8c7e

Browse files
committed
Config to disable scrolling result sets
1 parent cb17fb7 commit b5a8c7e

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,18 @@
5151
"properties": {
5252
"vscode-db2i.validator": {
5353
"type": "boolean",
54-
"description": "Enable/disable the SQL validator",
54+
"description": "Enable the SQL validator",
5555
"default": false
5656
},
57+
"vscode-db2i.scrollingResultSet": {
58+
"type": "boolean",
59+
"description": "Enable scrolling result sets for basic SELECT statements.",
60+
"default": true
61+
},
5762
"vscode-db2i.pageSize": {
5863
"type": "number",
5964
"description": "Page size for Schema browser",
60-
"default": 100
65+
"default": 500
6166
}
6267
}
6368
},

src/language/results/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const vscode = require(`vscode`);
33
const csv = require(`csv/sync`);
44

55
const getInstance = require(`../../base`);
6+
const Configuration = require("../../configuration");
67
const html = require(`./html`);
78

89
class ResultSetPanelProvider {
@@ -157,7 +158,8 @@ exports.initialise = (context) => {
157158
});
158159

159160
} else {
160-
if (statement.type === `statement` && this.isBasicStatement(statement.content)) {
161+
const scrollingEnabled = Configuration.get(`scrollingResultSet`);
162+
if (scrollingEnabled && statement.type === `statement` && this.isBasicStatement(statement.content)) {
161163
// If it's a basic statement, we can let it scroll!
162164
resultSetProvider.setScrolling(statement.content);
163165

0 commit comments

Comments
 (0)