Skip to content

Commit

Permalink
Config to disable scrolling result sets
Browse files Browse the repository at this point in the history
  • Loading branch information
worksofliam committed Jul 7, 2022
1 parent cb17fb7 commit b5a8c7e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
9 changes: 7 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,18 @@
"properties": {
"vscode-db2i.validator": {
"type": "boolean",
"description": "Enable/disable the SQL validator",
"description": "Enable the SQL validator",
"default": false
},
"vscode-db2i.scrollingResultSet": {
"type": "boolean",
"description": "Enable scrolling result sets for basic SELECT statements.",
"default": true
},
"vscode-db2i.pageSize": {
"type": "number",
"description": "Page size for Schema browser",
"default": 100
"default": 500
}
}
},
Expand Down
4 changes: 3 additions & 1 deletion src/language/results/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const vscode = require(`vscode`);
const csv = require(`csv/sync`);

const getInstance = require(`../../base`);
const Configuration = require("../../configuration");
const html = require(`./html`);

class ResultSetPanelProvider {
Expand Down Expand Up @@ -157,7 +158,8 @@ exports.initialise = (context) => {
});

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

Expand Down

0 comments on commit b5a8c7e

Please sign in to comment.