Skip to content

Commit

Permalink
Fix to sql URI handler
Browse files Browse the repository at this point in the history
Signed-off-by: worksofliam <[email protected]>
  • Loading branch information
worksofliam committed Sep 11, 2024
1 parent 6b04ac9 commit b4274ed
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/uriHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,12 @@ export class Db2iUriHandler implements UriHandler {
if (isValid) {
const run = queryData.run === `true`;

if (run) {
if (remoteAssistIsEnabled()) {
commands.executeCommand(`vscode-db2i.runEditorStatement`, {
content,
qualifier: `statement`,
open: true,
});
} else {
window.showErrorMessage(`You must be connected to a system to run a statement.`);
}
if (run && remoteAssistIsEnabled()) {
commands.executeCommand(`vscode-db2i.runEditorStatement`, {
content,
qualifier: `statement`,
open: true,
});
} else {
workspace.openTextDocument({ language: `sql`, content }).then(textDoc => {
window.showTextDocument(textDoc);
Expand Down

0 comments on commit b4274ed

Please sign in to comment.