16.5.7.4. Main Tabsheets

The main tabsheets area contains several tabs:

  • Live Schema Overview Tabsheet

  • Output Tabsheet

  • History Tabsheet

  • Results Tabsheets

  • Live Editing Tabsheet

Figure 16.30. SQL Editor - Main Tabsheets

SQL Editor - Main Tabsheets

Each of these is described in more detail in the following sections.

16.5.7.4.1. Live Schema Overview Tabsheet

This tabsheet provides an overview of the schema. The schema objects Tables, Views and Routines are displayed for the current schema.

16.5.7.4.2. Output Tabsheet

The Output tabsheet displays a summary of the communication between the script and the server. The messages displayed can be information or errors. Each message displays the time, the action that was carried out, and the response from the server. This is useful for troubleshooting scripts.

16.5.7.4.3. History Tabsheet

The History tabsheet provides a history of SQL operations carried out. Both the time of the SQL operation and the SQL code itself is recorded. To view the SQL executed, click the time, and the SQL code executed will be displayed in the SQL column.

16.5.7.4.4. Snippets Tabsheet

When you enter SQL code into the SQL Query area, you can use the Save SQL to Snippets List toolbar button to save your SQL code. At the time of saving you will be asked to specify a name. These named snippets can be viewed from the SQL Snippets Tab. You can load any SQL snippet into the SQL Query area by double-clicking the desired snippet in the Snippets Palette.

Figure 16.31. SQL Editor - Snippets Palette

SQL Editor - Snippets Palette
16.5.7.4.5. Results Tabsheets

The results area of the screen shows the results from any queries that have been executed. If the script contains multiple queries then multiple result tabs will be generated, one for each query that returns results.

Figure 16.32. SQL Editor - Results Tabsheets

SQL Editor - Results Tabsheets

Controls are provided to allow you to easily move over the results. These are shown in the following screenshot:

Figure 16.33. SQL Editor - Results Tabsheets Navigation Controls

SQL Editor - Results Tabsheets
              Navigation Controls

There are a number of controls available. The controls from left to right are:

  1. Move to first row: Highlights the first record in the current result set.

  2. Move to previous row: Highlights the previous record.

  3. Move to next row: Highlights the next record.

  4. Move to last row: Highlights the last record in the current result set.

  5. Toggle wrapping of cell contents: The data in the cell can either be truncated or wrapped. This button enables you to toggle between these options.

  6. Sort Ascending: Sorts selected column in ascending order.

  7. Sort Descending: Sorts column in descending order.

  8. Export record set to an external file: Outputs record set to a CSV, HTML, or XML file as required.

  9. Refresh Data from Data Source: Refreshes the current result set from the data source.

  10. Search for substring within data: Search data for the string entered in the search box.

16.5.7.4.6. Live Editing Tabsheets

It is possible to edit data in real time using the Live Editing tabsheets. In the Overview tab, if a table is double-clicked, a live editing tab will be launched, allowing you to edit the data maintained in that table. Field data can be edited by clicking a field and entering the required data, or editing existing data. In addition to the controls offered by the Results tabsheet, the Live Editor tab features some additional controls. These controls are highlighted in the following screenshot:

Figure 16.34. SQL Editor - Live Editing Tabsheet Navigation Controls

SQL Editor - Live Editing Tabsheet
              Navigation Controls

From left to right the highlighted controls are:

  1. Edit current row: Enters edit mode for the currently selected record.

  2. Insert new row: Inserts a new row and enables you to enter data. Your changes will not be reflected on the live server until you click Apply changes to data.

  3. Delete selected rows: Removes the selected rows. Your changes will not be reflected on the live server until you click Apply changes to data.

  4. Apply changes to data: Applies any changes that may have been made to the data fields to the live server.

  5. Discard changes to data: Discards any changes that may have been made to the data fields, and does not apply them to the live server.

These additional controls allow you to apply or discard any changes you may have made to the field data. If changes are applied, the data will then be synchronized with the live server. If changes are discarded the live server will not be affected.

Note

It is possible to enter a function, or other expression, into a field. If doing so, the prefix \func should be used, to prevent MySQL Workbench from escaping quotation marks. For example, if entering the expression md5('fred') MySQL Workbench would generate the code md5(\'fred\'). To prevent this enter the expression as \func md5('fred'). This will ensure that the quoting is not escaped.

See also Section 16.6.7.1.3.9, “The Inserts Tab”.

Copyright © 2010-2020 Platon Technologies, s.r.o.           Home | Man pages | tLDP | Documents | Utilities | About
Design by styleshout