DataGrip 2022.1, our first major update of 2022, is here. It’s packed with various enhancements and improvements for a better usability. Let’s take a look at what’s inside.
This is undoubtedly the highlight of this release. You can now select multiple tables and copy them to another schema.
Select the tables you want to copy and press F5 to open the export dialog.
Like with exporting a single table, you can map the columns, as well as view and change the DDL of the new table.
As you may know, DataGrip supports cross-DBMS export, which means that the target schema can belong to any database in your project. Copying all tables from your PostgreSQL database to SQL Server is easy as pie.
You can also specify an existing table, instead of a new one, as the target. If you do that, the data from the source table will be added into the target table.
We’ve added a new setting, Automatically detect binary values, with two options: UUID and Text. UUID detection can now be disabled.
You can now edit the results of queries to MongoDB collections right from a console. This will work even if .find() is followed by methods like sort() or limit().
When multiple statements are run concurrently in Transact SQL, they are executed in batch mode. Previously, this made it difficult to show in-editor results for each query, but now DataGrip handles this situation well.
In addition, DataGrip now removes all SQLCMD statements when running queries in batch mode (see DBE-14920 for details).
DEFAULT
values is now generated
correctly.
Sometimes introspection requires special permissions, which are granted to special users. It’s now possible to use dedicated credentials for introspection. To do this, first create a dedicated session template in the Options tab.
Then, use this template for the introspection by selecting its name in the Use session template field in the Introspection section.
You can now refresh an object independently of all other objects in the database.
This can be especially useful if you are using our new Introspection levels feature. If you need to view the source code of just a single object, you can easily do so by clicking on the Refresh Object button in the database explorer.
Also, when you open the object’s source editor, DataGrip will offer you the option to introspect the selected object.
We've added support for H2 version 2.x. Here's the list of changes:
ARRAY
and ROW
.
We’re now shipping the JDBC-driver for YugabyteDB, and you can create a YugabyteDB data source with just a single click.
We are slightly reworking the Modify Table window. The new version will have a fully generated UI based on introspective properties, which will allow it to have a variety of database-specific parameters.
For now we are releasing only a small portion of the update, but it can already be uniquely useful. The new Modify Table window lets you add and edit column check constraints, which was previously impossible! Also, you can now edit all the properties of tables and columns that are introspected by DataGrip.
We think you will particularly appreciate the new UI for columns because there is no collapsing or expanding, which many users found frustrating.
AUTO_INCREMENT
attribute.
We've introduced a button that lets you swap the source and the target when comparing objects or schemas.
We’re constantly improving the quality of our recently introduced database diff viewer window. Some fixes were released in version 2021.3, but some are new in 2022.1, including:
We’ve introduced a handy new intention, Convert To Subquery. You no longer need to use Surround Live Template to convert subqueries. In fact, you don’t even need to bother selecting a query. Simply press Alt+Enter | Convert To Subquery.
Multi-range types were introduced in PostgreSQL 14 – we’ve added support for the built-in ones.
Custom multi-range types will be supported in the future.
ROWS FROM
syntax.
JSONB
syntax.
BEGIN ATOMIC
.
ALTER MATERIALIZED VIEW
.
USING INDEX ENABLE
syntax.
CREATE MATERIALIZED VIEW LOG
statements.
WITH TAG
option in the
CREATE STAGE
statement.
EXECUTE
statement.
JSON
is now correctly highlighted inside statements.
QUALIFY
is now supported.
UNNEST
column is now supported.
UNION DISTINCT
is now supported.
Previously, when you clicked the Cancel statement button several times, it looked like the query was terminated, but in fact the request continued to be executed in the database.
There was some tricky logic behind this behavior. On the first click, DataGrip sent a cancellation request to the database, while on the second click it canceled the JDBC Driver process to terminate all connections to the data source (we’ll refer to this as data source deactivation). As a result, DataGrip received an error for the second cancellation request because the connection was lost, not because the cancellation was actually completed.
We’ve now made the cancellation logic more straightforward. Hopefully, it’s now clearer that it’s the request that is being canceled:
We no longer deactivate data sources without a warning, as that can be potentially dangerous for some processes happening simultaneously. So, if you click on the Cancel icon a second time, DataGrip will ask you whether you really want to kill the remote process or whether you’d like to keep waiting. If you choose to deactivate the data source, the query will be stopped for DataGrip, but it will continue to be executed in the database.
After 10 seconds of idle canceling, you’ll be offered the option to deactivate the data source anyway.
After the query is canceled, a gutter icon that resembles the ‘No’ symbol will appear to the left of it.
Previously, when you attempted to abort a request while creating a connection, the data source was deactivated.
Now you can interrupt not only the execution of a request, but also the creation of a connection. This is especially relevant for the very first query in the console, which also creates a connection.
You can now stop the process of creating a connection without deactivating the data source: if you click the Cancel button while the connection is being created, it will be stopped and a Connection canceled message will be displayed.
This is relevant for more than just queries from the query console. For example, if you create a connection before starting an introspection, interrupting the introspection will cancel the creation of the connection without deactivating the data source.
The structure of the Preferences settings for the Database section hasn’t changed since the first version of DataGrip. We decided it was time to improve the section’s usability by updating the structure. Here’s what we’ve come up with:
The Track databases/schemas creation and deletion setting has been moved from the General section to Data Source Properties | Options and now refers to a specific data source. This setting identifies whether the schema list needs to be updated after you create or delete schemas in the query console.
Other settings are still global but are now included in more appropriate sections.
Please note that as part of this update, these settings will be reset to their default values:
You can now distribute the working space among editor tabs so that they are the same width. To set this up, go to Settings / Preferences | Advanced Settings | Editor Tabs | Equalize proportions in nested splits.
It is now possible to export diagrams as yEd .graphml, JGraph .drawio, Graphviz .dot, Graphviz .dot with positions, Mermaid .md, Plantuml, and IDEA .uml files, which makes them compatible with third-party tools.