Fixed an issue where EXPLAIN should run on query under cursor if no text is selected. #9297
parent
39c2f397f7
commit
d6b2379fbe
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in New Issue