mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2026-08-17 16:34:44 -05:00
Fixed an issue where EXPLAIN should run on query under cursor if no text is selected. #9297
This commit is contained in:
@@ -275,6 +275,8 @@ the drop down on the right side of *Explain Analyze* button in the toolbar.
|
||||
|
||||
Please note that pgAdmin generates the *Explain [Analyze]* plan in JSON format.
|
||||
|
||||
**Note**: If multiple queries are present and none is selected, *Explain [Analyze]* runs the query located at the cursor position.
|
||||
|
||||
On successful generation of *Explain* plan, it will create three tabs/panels
|
||||
under the Explain panel.
|
||||
|
||||
|
||||
@@ -146,8 +146,8 @@ export default function Query({onTextSelect, setQtStatePartial}) {
|
||||
const regex = /\$SELECTION\$/gi;
|
||||
query = macroSQL.replace(regex, query);
|
||||
external = true;
|
||||
} else if(executeCursor) {
|
||||
/* Execute query at cursor position */
|
||||
} else if(executeCursor || explainObject) {
|
||||
/* Execute query at cursor position or explain query at cursor position */
|
||||
query = query || editor.current?.getQueryAt(editor.current?.state.selection.head).value || '';
|
||||
} else {
|
||||
/* Normal execution */
|
||||
|
||||
Reference in New Issue
Block a user