Hello! In this release cycle, some improvements appeared in minor updates. But, since we don’t write about them in Habré, I’ll tell you in this post about everything new since the previous release.
Data editor
We added a log of queries that the data editor sends to the database. ProgerMan
asked in the comments a couple of releases back :)

')
Run queries
Read Only Mode
We have the “Read-only” checkbox in the properties of the data source. He included this mode at the level of the jdbc driver. But read-only is implemented in different drivers with reservations:
- In
SQLite, it cannot be switched for an already created connection.
- In
MySQL, it does not allow you to run queries that do not begin with the character "S".
- In
Oracle, SQL Server and some other databases, it does not work at all :)

Therefore, we made our own read-only mode. It is included with the fact that it is implemented at the driver level. For
MySQL and
SQLite , we do not enable the driver-level mode.
This is what our read-only does:
It highlights DDL and DML requests, warning of their insecurity.

If you still run this query, a warning will appear. For especially persistent, we show the Execute button on the right side of the warning.

We also build a tree of calls to functions and procedures, and at whatever level of nesting your function leads to modifications, let us warn you about this.

In combination with the coloring of data sources, it is now difficult to confuse the test database with live :) From 2018.1, the files associated with it are also painted in the color of the data source.

Running scripts
A small nice improvement: the data source on which the script was launched from the context menu is remembered and installed by default for subsequent launches of other scripts.

General improvements
Circuit switching
Specify how the DataGrip will switch the schemas.

-
Automatic . The environment itself will switch circuits if necessary to determine the correct context. Say, if you rename an object not in the current schema, we will switch the schema for internal operation.
-
Manual . Schemes switches only the user in the upper right corner of the console.
-
Disabled . The switch at the top will not work. It will be useful for additional protection when using pg_bouncer.
Rename objects
With this release, we officially support renaming all objects that we introspect. Rename triggers in PostgreSQL, events in MySQL, sequences in Oracle and many other objects by clicking on them Sift + F6 in a tree or in a SQL script.

Navigation
A new setting has appeared:
Prefer data editor over the DDL editor. It affects:
- Navigation to a table or view by
Ctrl + N / Cmd + O- Navigation to the column by
Shift + Ctrl + Alt + N / Shift + Cmd + Alt + O- Double click on the table or column in the database tree.
If the box is checked, in these cases you will see a data editor. If not, the source code of the object.
Navigate references to DDL editor renamed to
Prefer database view instead of DDL editor. This option affects the
Navigate to declaration action (
Ctrl + B or Ctrl + Click ) from SQL.
If checked, the object will be highlighted in the database tree. If not, the source code of the object will open.
We combined two actions -
Go to table and
Go to class (
Ctrl + N / Cmd + O ).

- In
DataGrip, you can specify the name of the class if you use other supported languages.
- In
other IDEs on the IntelliJ platform with database support, you can specify the name of the database object and navigate to it.
Documentation for files
This is surprising, but before our IDE could not quickly find out the file size. Therefore, we have added the basic file attributes to the documentation - call it with
Ctrl + Q or
F1 .

Images in background
For the images in the background (
Preferences / Settings → Appearance → Background images ) added alignment and stretch settings.

Database tree
Supported by
MariaDB .

Added events for MySQL.

Supported external circuits in
Redshift and virtual circuits in
Exasol .

For
PostgreSQL 10, partitioned tables were supported.

SQL editor
Go to the next and previous use of the object in the script by
Alt + Mouse wheel . Or enter
'highlighted element usage' in
Find Action (
Ctrl + Shift + A ).

Another new action:
Move element left or right . Works in different lists, for example, fields in INSERT or columns in SELECT. Even if you like when the columns are written one by one, this thing will come in handy, because there will be no problems with a comma. And if you use the
Move Line - will be.

For
Oracle and
Exasol , autocompletion now works for file names.

Supported CTE in MySQL.

Collapsed code is now highlighted: for example, if it contains errors or text search results.

And this fix is
inspired by a comment on Habré : the little-known
Duplicate Entire Lines action now works at the end of the file.

Any
-
SQLite commands now do not spoil the highlighting of the code.
- Supported the following types in PostgreSQL:
point, polygon, line, lseg, box, path, circle, pg_lsn, tsquery, tsvector .
- Code formatting does not change the case of keywords by default.
- Built-in SSH-executable supports cryptographic algorithms.
- DataGrip, like our other IDEs, is now available as a snap package.
- In the dialogue
Replace in Path supported the preview of the results of regular expressions.
-
The REST client plugin is available for installation.
Everything! And as always: download
here , report bugs
here , and we also answer on the
forum , on
Twitter and here in the comments.
Thank!
Team DataGrip and JetBrains.