mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Ensure images in the docs have alt tags for screen readers. Fixes #2903
This commit is contained in:
committed by
Dave Page
parent
8b3aecd137
commit
b78b97d89b
@@ -1,31 +1,33 @@
|
||||
.. _query_tool:
|
||||
|
||||
**************
|
||||
The Query tool
|
||||
The Query tool
|
||||
**************
|
||||
|
||||
The Query tool is a powerful, feature-rich environment that allows you to execute arbitrary SQL commands and review the result set. You can access the Query tool via the *Query Tool* menu option on the *Tools* menu, or through the context menu of select nodes of the Browser tree control. The Query Tool allows you to:
|
||||
|
||||
* Issue ad-hoc SQL queries.
|
||||
* Issue ad-hoc SQL queries.
|
||||
* Execute arbitrary SQL commands.
|
||||
* Save the data displayed in the output panel to a CSV file.
|
||||
* Save the data displayed in the output panel to a CSV file.
|
||||
* Review the execution plan of a SQL statement in either a text or a graphical format.
|
||||
* View analytical information about a SQL statement.
|
||||
|
||||
.. image:: images/query_tool.png
|
||||
:alt: Query tool window
|
||||
|
||||
You can open multiple copies of the Query tool in individual tabs simultaneously. To close a copy of the Query tool, click the *X* in the upper-right hand corner of the tab bar.
|
||||
|
||||
The Query Tool features two panels:
|
||||
The Query Tool features two panels:
|
||||
|
||||
* The upper panel displays the *SQL Editor*. You can use the panel to enter, edit, or execute a query.
|
||||
* The upper panel displays the *SQL Editor*. You can use the panel to enter, edit, or execute a query.
|
||||
* The lower panel displays the *Data Output* panel. The tabbed panel displays the result set returned by a query, information about a query's execution plan, server messages related to the query's execution, and a history of the queries invoked in the SQL Editor.
|
||||
|
||||
**The Query Tool Toolbar**
|
||||
|
||||
The *Query Tool* toolbar uses context-sensitive icons that provide shortcuts to frequently performed tasks. If an icon is highlighted, the option is enabled; if the icon is grayed-out, the task is disabled. Please note that disabled icons may support functionality accessed via the :ref:`data editor <editgrid>`.
|
||||
|
||||
.. image:: images/query_toolbar.png
|
||||
.. image:: images/query_toolbar.png
|
||||
:alt: Query tool toolbar
|
||||
|
||||
Hover over an icon to display a tooltip that describes the icon's functionality:
|
||||
|
||||
@@ -129,18 +131,22 @@ Hover over an icon to display a tooltip that describes the icon's functionality:
|
||||
The *SQL editor* panel is a workspace where you can manually provide a query, copy a query from another source, or read a query from a file. The SQL editor features syntax coloring and autocompletion.
|
||||
|
||||
.. image:: images/query_sql_editor.png
|
||||
:alt: Query tool editor
|
||||
|
||||
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\* " (without quotes, but with a trailing space), and then press the Control+Space key combination to select from a popup menu of autocomplete options.
|
||||
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\* " (without quotes, but with a trailing space), and then press the Control+Space key combination to select from a popup menu of autocomplete options.
|
||||
|
||||
.. image:: images/query_autocomplete.png
|
||||
:alt: Query tool autocomplete feature
|
||||
|
||||
After entering a query, select the *Execute/Refresh* icon from the toolbar. The complete contents of the SQL editor panel will be sent to the database server for execution. To execute only a section of the code that is displayed in the SQL editor, highlight the text that you want the server to execute, and click the *Execute/Refresh* icon.
|
||||
After entering a query, select the *Execute/Refresh* icon from the toolbar. The complete contents of the SQL editor panel will be sent to the database server for execution. To execute only a section of the code that is displayed in the SQL editor, highlight the text that you want the server to execute, and click the *Execute/Refresh* icon.
|
||||
|
||||
.. image:: images/query_execute_section.png
|
||||
:alt: Query tool execute query section
|
||||
|
||||
The message returned by the server when a command executes is displayed on the *Messages* tab. If the command is successful, the *Messages* tab displays execution details.
|
||||
|
||||
.. image:: images/query_tool_message.png
|
||||
:alt: Query tool message panel
|
||||
|
||||
Options on the *Edit* menu offer functionality that helps with code formatting and commenting:
|
||||
|
||||
@@ -151,9 +157,10 @@ Options on the *Edit* menu offer functionality that helps with code formatting a
|
||||
|
||||
**The Data Output Panel**
|
||||
|
||||
The *Data Output* panel displays data and statistics generated by the most recently executed query.
|
||||
The *Data Output* panel displays data and statistics generated by the most recently executed query.
|
||||
|
||||
.. image:: images/query_output_data.png
|
||||
:alt: Query tool output panel
|
||||
|
||||
The *Data Output* tab displays the result set of the query in a table format. You can:
|
||||
|
||||
@@ -163,29 +170,34 @@ The *Data Output* tab displays the result set of the query in a table format. Yo
|
||||
|
||||
All rowsets from previous queries or commands that are displayed in the *Data Output* panel will be discarded when you invoke another query; open another query tool browser tab to keep your previous results available.
|
||||
|
||||
Use the *Explain* tab to view a graphical representation of a query:
|
||||
Use the *Explain* tab to view a graphical representation of a query:
|
||||
|
||||
.. image:: images/query_output_explain.png
|
||||
:alt: Query tool explain panel
|
||||
|
||||
To generate a graphical explain diagram, open the *Explain* tab, and select *Explain*, *Explain Analyze*, or one or more options from the *Explain options* menu on the *Execute/Refresh* drop-down. Please note that *EXPLAIN VERBOSE* cannot be displayed graphically. Hover over an icon on the *Explain* tab to review information about that item; a popup window will display information about the selected object:
|
||||
To generate a graphical explain diagram, open the *Explain* tab, and select *Explain*, *Explain Analyze*, or one or more options from the *Explain options* menu on the *Execute/Refresh* drop-down. Please note that *EXPLAIN VERBOSE* cannot be displayed graphically. Hover over an icon on the *Explain* tab to review information about that item; a popup window will display information about the selected object:
|
||||
|
||||
.. image:: images/query_output_explain_details.png
|
||||
:alt: Query tool graphical explain plan
|
||||
|
||||
Note that the query plan that accompanies the *Explain analyze* is available on the *Data Output* tab.
|
||||
Note that the query plan that accompanies the *Explain analyze* is available on the *Data Output* tab.
|
||||
|
||||
Use the *Messages* tab to view information about the most recently executed query:
|
||||
|
||||
.. image:: images/query_output_error.png
|
||||
:alt: Query tool output messages
|
||||
|
||||
If the server returns an error, the error message will be displayed on the *Messages* tab, and the syntax that caused the error will be underlined in the SQL editor. If a query succeeds, the *Messages* tab displays how long the query took to complete and how many rows were retrieved:
|
||||
If the server returns an error, the error message will be displayed on the *Messages* tab, and the syntax that caused the error will be underlined in the SQL editor. If a query succeeds, the *Messages* tab displays how long the query took to complete and how many rows were retrieved:
|
||||
|
||||
.. image:: images/query_output_messages.png
|
||||
:alt: Query tool output information
|
||||
|
||||
Use the *Query History* tab to review activity for the current session:
|
||||
|
||||
.. image:: images/query_output_history.png
|
||||
:alt: Query tool history panel
|
||||
|
||||
The Query History tab displays information about recent commands:
|
||||
The Query History tab displays information about recent commands:
|
||||
|
||||
* The date and time that a query was invoked.
|
||||
* The text of the query.
|
||||
|
||||
Reference in New Issue
Block a user