Added documentation for Macro support. Fixes #5857

This commit is contained in:
Nidhi Bhammar 2020-10-06 17:35:04 +05:30 committed by Akshay Joshi
parent 82e912ffad
commit 609904cfb3
22 changed files with 35 additions and 2 deletions

BIN
docs/en_US/images/query_autocomplete.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 63 KiB

BIN
docs/en_US/images/query_execute_section.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 KiB

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 104 KiB

BIN
docs/en_US/images/query_output_error.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 142 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 120 KiB

After

Width:  |  Height:  |  Size: 165 KiB

BIN
docs/en_US/images/query_output_messages.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
docs/en_US/images/query_sql_editor.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 163 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 95 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
docs/en_US/images/query_tool_message.png Executable file → Normal file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 170 KiB

View File

@ -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

View File

@ -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. | |
+----------------------+---------------------------------------------------------------------------------------------------+----------------+

View File

@ -11,7 +11,8 @@ New features
| `Issue #1402 <https://redmine.postgresql.org/issues/1402>`_ - Added Macro support.
| `Issue #3794 <https://redmine.postgresql.org/issues/3794>`_ - Allow user to change the database connection from an open query tool tab.
| `Issue #5200 <https://redmine.postgresql.org/issues/5200>`_ - Added support to ignore the owner while comparing objects in the Schema Diff tool
| `Issue #5200 <https://redmine.postgresql.org/issues/5200>`_ - Added support to ignore the owner while comparing objects in the Schema Diff tool.
| `Issue #5857 <https://redmine.postgresql.org/issues/5857>`_ - Added documentation for Macro support.
Housekeeping
************