In the
Database console:
In the Table Editor:
Use this page to view and edit the settings related to working with databases. The settings include those for the Database console, the Table Editor and the Database tool window.
Data view
Specify how table data should be shown in the Database console, Table Editor and quick documentation preview.
Console
The settings in this section relate to showing query results and error notifications in the Database console.
Item | Description |
---|---|
Show query results in new tab |
You can select to view query results on individual tabs, or
on one and the same tab.
If the check box is selected, a new tab with the query result will open each time
you run a query ( If this check box is not selected, the same tab is used to show your query results. When you run a query, the information on the tab is updated to show the result, and a new tab doesn't open.
In this case, when you get the result that you want to keep,
you can pin the tab to the tool window
( |
Show error notifications in editor |
If this check box is not selected,
the information about the errors is shown only in the output pane.
If, in addition, you want the error notification bar to appear in the input pane, select the check box.
The error notification bar may be particularly useful when running sequences of SQL statements. If an error occurs in such cases, the error notification bar lets you select how to react. For more information, see Using the error notification bar. |
Custom SQL parameters
Generally, only the question mark (?
) is treated as a parameter in SQL statements.
In this section, you can specify which other characters and their sequences should be treated as parameters,
and in which places.
The pattens for custom SQL parameters are specified by means of regular expressions.
Item | Description |
---|---|
Use in database console and SQL files | If the check box is selected, the parameter patterns are applied to SQL (in SQL files and the database console). |
Use in other language string literals | If the check box is selected, the parameter patterns are applied to string literals in the languages other than SQL. |
Parameter patterns |
The parameter patterns are specified using regular expressions.
The patterns available initially have the following meanings:
Use the links to the right of the patterns to limit their usage scope (see Everywhere).
Use
|
Everywhere |
If the Use in other language string literals option is on,
an Everywhere link indicates that a pattern is used everywhere where SQL is injected into a string literal
(see Using Language Injections).
To limit the pattern usage scope, click the link and select the language or languages in which the corresponding pattern should be used. As a result, the link text will change to show the list of the selected languages. To bring the pattern usage scope back to its "everywhere state", click the link and deselect all the selected items. |
Data Extractors
Use this section to manage data extractors and their settings.
A data extractor is a named set of settings that define how to convert table data into CSV, TSV and other formats.
Data extractors are applied when table data are copied to the clipboard or saved in a file.
Note that for certain formats (CSV, TSV, HTML and custom formats), it may be useful to define more than one data extractor - each with different settings.
When you select an extractor in the list, you can view and edit the extractor settings in the area to the right.
Use
(Alt+Insert),
(Alt+Delete),
(Alt+Up) and
(Alt+Down)
to create, delete, and reorder the extractors.
Item | Description |
---|---|
List of data extractors and examples | |
See an example for: |
Initially, each item in the list corresponds to a different target format.
Format names are self-explanatory.
Below, each of the formats is illustrated with an example.
To generate the examples, the following table was used as a source.
Where appropriate, the Include columns names option was on, while the Include row numbers option was off. |
Comma-separated Values (CSV) |
id,name 1,George 2,Gordon |
Tab-separated Values (TSV) |
id name 1 George 2 Gordon |
HTML Table |
<!DOCTYPE html> <html> <head> <title></title> </head> <body> <table border="1" style="border-collapse:collapse"> <tr><th>id</th><th>name</th></tr> <tr><td>1</td><td>George</td></tr> <tr><td>2</td><td>Gordon</td></tr></table> </body> </html> |
SQL Insert Statements |
INSERT INTO test.byron_names (id, name) VALUES (1, 'George'); INSERT INTO test.byron_names (id, name) VALUES (2, 'Gordon'); |
SQL Update Statements |
UPDATE test.byron_names SET id = 1, name = 'George' WHERE id = 1; UPDATE test.byron_names SET id = 2, name = 'Gordon' WHERE id = 2; |
XML |
<?xml version="1.0" encoding="UTF-8"?> <data> <row> <id>1</id> <name>George</name> </row> <row> <id>2</id> <name>Gordon</name> </row> </data> |
JSON |
[, { "id": 1, "name": "George" }, { "id": 2, "name": "Gordon" } ] |
Custom-separated Values |
|| id | name || || 1 | George || || 2 | Gordon ||
When generating this example the following settings were used
(
Value separator:
Line prefix:
Value quotation: Value quotation policy: As needed
Initially, there are no custom formats.
To add one, click |
Extractor settings | |
Title | The name of the extractor. Corresponds to the name of the option in corresponding menus. |
Include column names | Select this check box if you want the column names to be included. |
Include row numbers | Select this check box if you want the row numbers to be included. |
Allow transposition |
For CSV, TSV, HTML and custom formats:
this setting defines how selected range of cells is copied to the clipboard.
If a table is shown transposed, and you copy a range of cells to the clipboard (Ctrl+C or Ctrl+Insert), the range is copied transposed (as shown) if the check box is selected, and non-transposed (as in the original table) otherwise. |
Value / line separator | For custom formats: a character or characters to be inserted between the values and at the end of a line (a table row). |
Line prefix / suffix | For custom formats: a character or characters to be added at the beginning and the end of a line (a table row). The suffix is inserted before the line separator. |
Value quotation | For custom formats: a character or characters to be added before and after a value. |
Value quotation policy |
For custom formats: specify conditions for value quotation:
|
See Also
Reference:
- Database Console
- Hibernate Console Tool Window
- JPA Console Tool Window
- Table Editor
- Database Tool Window
Web Resources: