mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-24 03:45:59 +00:00
Execute Current, Execute Current Line Not Current Query #1209
This commit is contained in:
@@ -130,6 +130,7 @@
|
|||||||
currentEditorTheme,
|
currentEditorTheme,
|
||||||
currentThemeDefinition,
|
currentThemeDefinition,
|
||||||
currentEditorKeybindigMode,
|
currentEditorKeybindigMode,
|
||||||
|
getCurrentSettings
|
||||||
} from '../stores';
|
} from '../stores';
|
||||||
import _ from 'lodash';
|
import _ from 'lodash';
|
||||||
import { handleCommandKeyDown } from '../commands/CommandListener.svelte';
|
import { handleCommandKeyDown } from '../commands/CommandListener.svelte';
|
||||||
@@ -212,11 +213,18 @@
|
|||||||
line: editor.getSelectionRange().start.row,
|
line: editor.getSelectionRange().start.row,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const line = editor.getSelectionRange().start.row;
|
if (!getCurrentSettings()['sqlEditor.disableExecuteCurrentLine']){
|
||||||
|
const line = editor.getSelectionRange().start.row;
|
||||||
|
return {
|
||||||
|
text: editor.session.getLine(line),
|
||||||
|
line,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
text: editor.session.getLine(line),
|
text: editor.getValue(),
|
||||||
line,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCodeCompletionCommandText() {
|
export function getCodeCompletionCommandText() {
|
||||||
|
|||||||
@@ -258,6 +258,12 @@ ORDER BY
|
|||||||
label="Disable split by empty line"
|
label="Disable split by empty line"
|
||||||
defaultValue={false}
|
defaultValue={false}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<FormCheckboxField
|
||||||
|
name="sqlEditor.disableExecuteCurrentLine"
|
||||||
|
label="Disable current line execution (Execute current)"
|
||||||
|
defaultValue={false}
|
||||||
|
/>
|
||||||
</svelte:fragment>
|
</svelte:fragment>
|
||||||
<svelte:fragment slot="2">
|
<svelte:fragment slot="2">
|
||||||
<div class="heading">Connection</div>
|
<div class="heading">Connection</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user