diff --git a/docs/en_US/images/query_autocomplete.png b/docs/en_US/images/query_autocomplete.png old mode 100755 new mode 100644 index d61e1b3e4..c5161c896 Binary files a/docs/en_US/images/query_autocomplete.png and b/docs/en_US/images/query_autocomplete.png differ diff --git a/docs/en_US/images/query_execute_section.png b/docs/en_US/images/query_execute_section.png old mode 100755 new mode 100644 index abd869fde..1f8467675 Binary files a/docs/en_US/images/query_execute_section.png and b/docs/en_US/images/query_execute_section.png differ diff --git a/docs/en_US/images/query_explain_analyze_statistics.png b/docs/en_US/images/query_explain_analyze_statistics.png index eb7fce4a0..a659cdd12 100644 Binary files a/docs/en_US/images/query_explain_analyze_statistics.png and b/docs/en_US/images/query_explain_analyze_statistics.png differ diff --git a/docs/en_US/images/query_explain_analyze_table.png b/docs/en_US/images/query_explain_analyze_table.png index fabbc582b..dfedb703b 100644 Binary files a/docs/en_US/images/query_explain_analyze_table.png and b/docs/en_US/images/query_explain_analyze_table.png differ diff --git a/docs/en_US/images/query_output_data.png b/docs/en_US/images/query_output_data.png index 8bd89a6c9..1f8467675 100644 Binary files a/docs/en_US/images/query_output_data.png and b/docs/en_US/images/query_output_data.png differ diff --git a/docs/en_US/images/query_output_error.png b/docs/en_US/images/query_output_error.png old mode 100755 new mode 100644 index b02b26269..e67007259 Binary files a/docs/en_US/images/query_output_error.png and b/docs/en_US/images/query_output_error.png differ diff --git a/docs/en_US/images/query_output_explain_details.png b/docs/en_US/images/query_output_explain_details.png index d93954113..8b655ee6f 100644 Binary files a/docs/en_US/images/query_output_explain_details.png and b/docs/en_US/images/query_output_explain_details.png differ diff --git a/docs/en_US/images/query_output_history.png b/docs/en_US/images/query_output_history.png index 75acd62fc..8f7f3c499 100644 Binary files a/docs/en_US/images/query_output_history.png and b/docs/en_US/images/query_output_history.png differ diff --git a/docs/en_US/images/query_output_messages.png b/docs/en_US/images/query_output_messages.png old mode 100755 new mode 100644 index f08cceabf..7271bdf46 Binary files a/docs/en_US/images/query_output_messages.png and b/docs/en_US/images/query_output_messages.png differ diff --git a/docs/en_US/images/query_sql_editor.png b/docs/en_US/images/query_sql_editor.png old mode 100755 new mode 100644 index 9101b7916..dd8dc33fa Binary files a/docs/en_US/images/query_sql_editor.png and b/docs/en_US/images/query_sql_editor.png differ diff --git a/docs/en_US/images/query_tool.png b/docs/en_US/images/query_tool.png index 410bf4011..27c298ad9 100644 Binary files a/docs/en_US/images/query_tool.png and b/docs/en_US/images/query_tool.png differ diff --git a/docs/en_US/images/query_tool_editable_columns.png b/docs/en_US/images/query_tool_editable_columns.png index 305511b4a..bfb701579 100644 Binary files a/docs/en_US/images/query_tool_editable_columns.png and b/docs/en_US/images/query_tool_editable_columns.png differ diff --git a/docs/en_US/images/query_tool_macros_clear_confirmation.png b/docs/en_US/images/query_tool_macros_clear_confirmation.png new file mode 100644 index 000000000..c5f40945b Binary files /dev/null and b/docs/en_US/images/query_tool_macros_clear_confirmation.png differ diff --git a/docs/en_US/images/query_tool_macros_clear_row.png b/docs/en_US/images/query_tool_macros_clear_row.png new file mode 100644 index 000000000..62ab6b047 Binary files /dev/null and b/docs/en_US/images/query_tool_macros_clear_row.png differ diff --git a/docs/en_US/images/query_tool_macros_execution.png b/docs/en_US/images/query_tool_macros_execution.png new file mode 100644 index 000000000..34465f5d3 Binary files /dev/null and b/docs/en_US/images/query_tool_macros_execution.png differ diff --git a/docs/en_US/images/query_tool_manage_macros_dialog.png b/docs/en_US/images/query_tool_manage_macros_dialog.png new file mode 100644 index 000000000..a06186d6b Binary files /dev/null and b/docs/en_US/images/query_tool_manage_macros_dialog.png differ diff --git a/docs/en_US/images/query_tool_message.png b/docs/en_US/images/query_tool_message.png old mode 100755 new mode 100644 index 5d521dd72..c578638ee Binary files a/docs/en_US/images/query_tool_message.png and b/docs/en_US/images/query_tool_message.png differ diff --git a/docs/en_US/images/query_toolbar.png b/docs/en_US/images/query_toolbar.png index a7dfe794d..35e183ca6 100644 Binary files a/docs/en_US/images/query_toolbar.png and b/docs/en_US/images/query_toolbar.png differ diff --git a/docs/en_US/images/query_toolbar_explain.png b/docs/en_US/images/query_toolbar_explain.png index ef9072a93..667c656e2 100644 Binary files a/docs/en_US/images/query_toolbar_explain.png and b/docs/en_US/images/query_toolbar_explain.png differ diff --git a/docs/en_US/query_tool.rst b/docs/en_US/query_tool.rst index 80f27a5dc..82e6a4a99 100644 --- a/docs/en_US/query_tool.rst +++ b/docs/en_US/query_tool.rst @@ -65,7 +65,7 @@ features syntax coloring and autocompletion. To use autocomplete, begin typing your query; when you would like the Query editor to suggest object names or commands that might be next in your query, -press the Control+Space key combination. For example, type "\*SELECT \* FROM\* " +press the Control+Space key combination. For example, type "*SELECT \* FROM*" (without quotes, but with a trailing space), and then press the Control+Space key combination to select from a popup menu of autocomplete options. @@ -321,3 +321,32 @@ User can connect to another server or database from existing open session of que * A newly created connection will now get listed in the options. * To connect, select the newly created connection from the dropdown list. + +Macros +****** + +Query Tool Macros enable you to execute pre-defined SQL queries with single key press. Pre-defined queries can contain the placeholder $SELECTION$. Upon macro execution, the placeholder will be replaced with the currently selected text in the Query Editor pane of the Query Tool. + +To create a macro, select the *Manage Macros* option from the *Macros* menu on the *Query Tool*. Select the key you wish to use, enter the name of the macro, and the query, optionally including the selection placeholder, and then click the Save button to store the macro. + +.. image:: images/query_tool_manage_macros_dialog.png + :alt: Query Tool Manage Macros dialogue + :align: center + +To clear a macro, select the macro on the Manage Macros dialogue, and then click the Clear button. + +.. image:: images/query_tool_macros_clear_row.png + :alt: Query Tool Manage Macros clear the row + :align: center + +It asks for the confirmation to clear a macro. + +.. image:: images/query_tool_macros_clear_confirmation.png + :alt: Query Tool Manage Macros Clear row confirmation + :align: center + +To execute a macro, simply press the appropriate shortcut keys, or select it from the Macros menu. + +.. image:: images/query_tool_macros_execution.png + :alt: Query Tool Macros Execution + :align: center diff --git a/docs/en_US/query_tool_toolbar.rst b/docs/en_US/query_tool_toolbar.rst index 63cbd3a6f..ba85603d6 100644 --- a/docs/en_US/query_tool_toolbar.rst +++ b/docs/en_US/query_tool_toolbar.rst @@ -184,3 +184,6 @@ Query Execution | | You can specify the CSV/TXT settings through *Preferences -> SQL Editor -> CSV/TXT output* | | | | dialogue. | | +----------------------+---------------------------------------------------------------------------------------------------+----------------+ + | *Macros* | Click the *Macros* icon to manage the macros. You can create, edit or clear the macros through | | + | | *Manage Macros* option. | | + +----------------------+---------------------------------------------------------------------------------------------------+----------------+ diff --git a/docs/en_US/release_notes_4_27.rst b/docs/en_US/release_notes_4_27.rst index b9593fd2f..b839d6038 100644 --- a/docs/en_US/release_notes_4_27.rst +++ b/docs/en_US/release_notes_4_27.rst @@ -11,7 +11,8 @@ New features | `Issue #1402 `_ - Added Macro support. | `Issue #3794 `_ - Allow user to change the database connection from an open query tool tab. -| `Issue #5200 `_ - Added support to ignore the owner while comparing objects in the Schema Diff tool +| `Issue #5200 `_ - Added support to ignore the owner while comparing objects in the Schema Diff tool. +| `Issue #5857 `_ - Added documentation for Macro support. Housekeeping ************