Hello! We talk about what we did in
DataGrip in four months. If you use database support in our other IDEs, this post is for you too.

Services Toolbox
The IntelliJ platform IDE has a new tool window: Services. In DataGrip, connections are displayed here.

')
Each tree node, whether it is a service, data source, connection, can be opened in a separate tab: click
Show in New Tab on the toolbar. Or use drag-and-drop. If a green circle is lit on the connection, it means that it is active. You can close the connection from the context menu.
Query results are attached to the corresponding connections. If you want to return the view “as before”, turn off the services tree in the display settings by clicking on the gear icon.

Request Timer
In the
Services window, they added the ability to see how long the request takes: the clock is ticking to the right of the console from which it is running.
Docker
Another service that may appear in this window is Docker, if you use the appropriate plugin.

The keyboard shortcut for showing / hiding the Services window is
Alt / Cmd + 8 .
Data Search
Look for data, even if you don’t remember where it is stored. Select a data source, a group of sources, or, conversely, only individual tables, and press
Ctrl / Cmd + Alt + Shift + F. Or select
Full-text search from the context menu.

In the dialog box, enter what to search. On the left is a list of data sources. The bottom of the window shows the queries that DataGrip will execute for the search.

The results look like this:

By clicking on the result, the data editor will open, in which a filter will be applied to show only the found lines. If there are too many columns and it is not clear where what you found is, use the text search:
Ctrl / Cmd + F.
Details:
- In
PostgreSQL ,
MySQL and
MariaDB, you can only search by indexed columns. To do this, select '
Only columns with full-text search indexes ' in the
'Search in' list.
PostgreSQL will have this query:
where col @@ plainto_tsquery('query')
In MySQL and MariaDB, this is:
where match(col) against ('query' in natural language mode)
- In
Oracle , DataGrip will use the
context, ctxrule, ctxcat indexes, if any.
- In SQL Server, if full-text indexes are built, DataGrip generates a query with the clause `
WHERE CONTAINS (col, N'text ') `.
- Search searches in columns for which
LIKE is not supported. For example,
JSON columns will be pre-converted to a string.
- For
Cassandra, DataGrip runs multiple queries for the same table because the
OR statement is not supported.
Data editor
Quick Resize
Change the page size in the data editor without going to the settings.

Tab Names
Now you yourself can name the tabs for the results: write a name in the comments before the request.

If you do not like that any previous comment becomes a name, indicate the word after which there will be a line for the heading. This is done in the appropriate settings.

Database explorer
Fast backup tables
You can copy tables using drag-and-drop for a long time, but before this did not work if you drag it into the same scheme. It works now! It is convenient if you backup data before an important operation.

Quick group creation
Create groups of data sources by dragging one source to another. If you need to move the data source to an existing group, this is also done with the mouse. We remind keyboard lovers that there is an
F6 key for this.

Forced update
The new
Force Refresh action will load information about all the objects in the database, having previously cleared the cache. It may be useful if something is “stuck” in your memory and you do not see the actual picture.

Active compounds
From this version, a small green circle on the icon of the data source means that the connection to it is active.

Comments on tables
After turning on
View | Appearance |
Descriptions in Tree Views table comments are displayed in Explorer.

Data Source Filtering
If you have many similar databases, it was inconvenient to search for objects: for example, if you are looking for a table, and you have ten such tables, they all showed up in the output.
Now you can specify where to look: select a specific data source or group of sources.

The same thing works when searching for code in
Find In Path .

Help writing code
System objects
Databases have system directories - metadata is stored there: information about tables, procedures, built-in functions.
Objects from these directories are often used in queries, so they need to be shown in auto-completion and correctly highlighted: the IDE should not think that these are some unknown objects.
Previously, for this to work, system circuits had to be added to the explorer, because DataGrip only knew about those objects that were introspected. But system circuits do not change, it does not make sense to receive information about them every time. In addition, they are not always needed in the conductor and interfere with work schemes there.
The lightning bolt in front of the diagram means that DataGrip always has information about its objects, even if you have not added it to the explorer.

Here are some examples of system diagrams:
PostgreSQL :
pg_catalog, information_schemaSQL Server :
INFORMATION_SCHEMAOracle :
SYS, SYSTEMMySQL :
information_schemaDB2 :
SYSCAT, SYSFUN, SYSIBM, SYSIBMADM, SYSPROC, SYSPUBLIC, SYSSTAT, SYSTOOLSWarnings and Corrections
Now, from the warning window, you can immediately solve the problem that you were informed about. For example, in a typo window, DataGrip offers to fix it, and if the IDE warns that there is no alias, you are prompted to enter it. To do this, click on the action in the lower left or press
Alt + Shift + Enter .
Alt + Enter still works and shows a list of all the possible actions in this context.
We also added some new inspections.
Optional CASEIf the CASE statement can be removed and the code readable, DataGrip will offer to do this.
Using
IF :

Using
COALESCE :
Possible line croppingThe IDE will warn if the value being written is longer than the expected value.
Convert GROUP BY to DISTINCTNow you can convert
GROUP BY to
DISTINCT, if all the columns in the
SELECT clause are also in
GROUP BY .

Code editor
New settings for carriage movement
We changed the default carriage movement behavior. DataGrip now moves the carriage to the end of the current word if you are jumping over words. This behavior is configured in the settings
: Editor | General
Typically, this action is performed by arrows when
Ctrl is pressed for Windows / Linux and
Opt is pressed for MacOS. The default behavior in different operating systems is different: now in our IDE it works “like on a Mac”.
Earlier:

Now:

Query Highlight
Added a new action:
Select current statement. It can be found using
Find Action (Ctrl / Cmd + Shift + A). If you use an action frequently, assign a keyboard shortcut.

Folding numbers
Larger numbers can be collapsed using
Ctrl / Cmd + Minus.
Still
- DataGrip 2019.2 uses JetBrains Runtime 11, uncertified fork of OpenJDK 11.
- [Cassandra] Now you can edit columns of the following types: set, list, map, tuple, udt, inet, uuid , timeuuid.
- New items in the IS NULL and IS NOT NULL auto-completion list. Before comparisons with NULL it was necessary to type separately.
- Jump outside closing bracket / quote with Tab is enabled by default. By pressing the Tab key, the cursor moves outward from the block of quotation marks and parentheses.
- Surround a selection with a quote or brace is enabled by default. If you type a quotation mark or bracket with a selected code fragment, the fragment will appear inside quotation marks or brackets.
- The Introduce alias action has become part of the Refactoring menu.
- Set up work with PostgreSQL 12. More information here: DBE-8384 .
- Added logic to read - only mode. Previously, this setting included two modes at once: at the IDE level (DataGrip analyzes which requests modify the data) and at the driver level (if implemented). In the IDE, we added the ability to execute a request after a warning, if necessary. But before, the read - only mode still blocked such requests at the driver level: DBE-8145 . Now does not block.
That's all!
DataGrip Team