DataGrip 2022.2 is here! This is the second major update of 2022, and it’s packed with various enhancements. Let’s take a look at what’s inside!
We’ve enhanced the file importing process by implementing the ability to select several CSV files and import them at once!
In order to resolve database objects in SQL scripts, DataGrip needs to understand what the objects mean. This is necessary for the IDE to provide you with correct code completion and treat the usages of objects as links.
In general, the resolve context should match the running context, but that is not a trivial task for DataGrip to handle. This is why there were, until recently, several resolve-related problems. Here’s what would sometimes happen:
The cause of these issues was that, for each console or local file, DataGrip resolved their objects to the context selected in the top right-hand drop-down menu and the default database or schema (or the entry from the SQL Resolution scopes setting).
This was fine for working with scripts containing
SET SEARCH PATH statements, which switch the context. However, the
IDE needs to know where to resolve to at the beginning of the file, too. So, it
treated the default database or schema (or the entry from the
SQL Resolution scopes setting) as the most appropriate context for the
beginning of the file.
In other words, if there are no
SET SEARCH PATH
statements in your file, then DataGrip shouldn’t try to resolve the beginning of
the file to somewhere out of context. To address this situation, we created a
way for DataGrip to know which approach to follow by introducing two resolve
modes: Playground and Script.
In Playground mode, DataGrip resolves all objects to the context, which is the value in the schema chooser, resolution scope, or default database. It works best if your file is just a set of unconnected queries, independent of each other and in no particular sequence. Playground mode is now the default for query consoles.
In Script mode, the beginning of the file is resolved to the context, but
USE statements in the script change the context for the resolve
because they are part of the script’s sequential logic. This is a good choice for
when your queries have sequential logic and should be run as a single script.
Script mode is now the default for local files.
Switching between the modes is easy. Just use the drop-down menu on the toolbar, as in the screenshot.
The new Modify UI, a basic version of which was introduced in the 2022.1 release, has become the default option. Starting with DataGrip 2022.2, all of a table’s child objects can be added and edited using this new UI.
The old UI will remain available through this release cycle via the context menu.
Collations and charsets are now generated with the table’s DDL.
Previously, all of the actions related to database functionality were stored in four different places in the keymap. This structure, which has very little logic, was a historical consequence of the IDE’s development.
To help you see all of the available actions, we’ve re-arranged the structure and placed all of the actions in groups under the Database parent group.
For macOS users, we’ve introduced the ability to merge all open project windows into one, turning them into tabs. This action is available from the Window menu.
Oracle and Vertica databases can provide warnings if the password is going to expire. DataGrip now retrieves this information and displays it after Test Connection is activated.
We’ve added 3 new databases to the basic support list: DuckDB, Mimer SQL, and Apache Ignite.
SET ROWCOUNTis executed before Azure queries to limit page size.
MODIFY ORDER BYis supported for
CHANGETABLEis now supported.
END CONVERSATIONis now supported.
PRAGMA_TABLE_XINFOtables are resolved correctly.