Skip to content

Commit

Permalink
Merge pull request #275 from codefori/fix/no_history_for_non_open
Browse files Browse the repository at this point in the history
Stop appending to history for statements run just for results
  • Loading branch information
worksofliam authored Sep 16, 2024
2 parents 021fa35 + 1c2e945 commit ca152ab
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/views/results/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,11 @@ async function runHandler(options?: StatementInfo) {
}
}

// If we the API is called with no open, then don't add it to history
if (statementDetail.open === false) {
statementDetail.history = false;
}

if ((statementDetail.qualifier === `statement` || statementDetail.qualifier === `explain`) && statementDetail.history !== false) {
vscode.commands.executeCommand(`vscode-db2i.queryHistory.prepend`, statementDetail.content);
}
Expand Down

0 comments on commit ca152ab

Please sign in to comment.