What's New in DataGrip 2020.3

SQL for MongoDB

You can now use SQL to query MongoDB databases! We've created our own JS-SQL translator that makes this possible.

Only SELECT queries work, and the working сlauses are JOIN, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET. The complete post on what is supported is here.

There are two options in the context menu for each SQL query in Mongo: Copy JS script to clipboard and Show JS Script. In the JS Script Preview window, you can edit the query and run it.

Connectivity

Couchbase support

Couchbase support

We’re always happy to welcome a new database into the family, and our newest member is Couchbase! It’s important to mention that DataGrip supports the Couchbase Query service, not the Couchbase Analytics service.

Azure AD authentication

Azure AD authentication

The DataGrip community has been asking for this for a while! You can now use Azure AD to log in to your database.

Working directory

Working directory

You can now specify the working directory for the process that handles working with data sources. Also, all relative paths will be resolved in this directory, for instance in driver properties.

Data editor

Separate editor for cell values

We’ve improved the cell values editor that we first introduced in 2020.2.

Formatted value

Formatted value

It can now display the formatted value even if the value is stored as one line. Moreover, you can edit the value in the formatted view and update it with the original formatting. This works with single-line XMLs and JSONs.

Bottom position

Bottom position

If the width of the screen is crucial to your flow, you can move the cell value editor out of the way to the bottom of the data editor.

Images

Images

This panel can now also display images!

Opening transposed tables

Opening transposed tables

We’ve added the ability to open tables and views in the transposed view by default. This can be useful if the average table in your database has an enormous number of columns.

Shrinking selection

Shrinking selection

For a long time now, it has been possible to use the expand selection action in tables. It can be invoked using Ctrl+W in Windows and Linux and Opt+Up in macOS. Now we have added the opposite action: shrink selection. The shortcut is Ctrl+Shift+W on Windows and Linux and Opt+Down on macOS.

Import/Export

New extractors

New extractors

Introducing two new extractors: One-row and SQL-Insert-Multirow!

One-Row will help you copy a column to a comma-separated string. This can be extremely useful for pasting a set of values in an IN clause!

SQL-Insert-Multirow will generate a single INSERT statement with the multiple new rows that will be inserted.

Never quote values

Never quote values

There is a new option in CSV format configuration: never quote values.

Introspection

Collect introspection diagnostic information

Collect introspection diagnostic information

Introspection is the process by which DataGrip retrieves information about a database. This information is used to show the objects in the database explorer, display their DDLs, provide code completion suggestions, and so on.

Sometimes introspection runs into problems. Now, when things go wrong, you can collect useful data that you can pass on to our support team or include in a ticket in our issue tracker, so you can get the best help possible.

Diagnostic refresh will refresh the database and collect all the queries into one single file that will then be shown in the Explorer/Finder. You can inspect this file on your own if you wish, but it’s main purpose is for you to send it to us for when introspection is too slow.

Prepare introspector diagnostic will create three files and show the folder we need you to send us if introspection works incorrectly, that is, if it shows something outdated or doesn’t show new objects.

Grants

Grants

DataGrip now knows about object grants and displays them in an object’s DDL.

Changes in the database tree

Changes in the database tree

If you’ve changed the DDL of some objects but haven’t submitted them yet, the objects waiting to be submitted are highlighted in the database tree. Previously you could only see them in the Database Changes tool window.

More properties for tables

More properties for tables PostgreSQL

DataGrip now generates DDLs with TABLESPACE and INDEX ACCESS METHOD.

New objects

New objects Greenplum

Now DataGrip shows more objects in the database tree. The new objects are collation, materialized view, foreign table, foreign data wrapper, foreign server, and user mapping.

Correct display of overloaded procedures

Correct display of overloaded procedures Oracle

The overloaded procedures in one package used to be displayed as one item. That’s no longer the case. The number in square brackets is the native index of the procedure in the database.

Coding assistance

Formatter for Generic dialect

Formatter for Generic dialect

Enjoy the benefits of our SQL formatter when working with unsupported databases!

Rename options

Rename options

Inline renaming will now offer you the option to work with comments, strings, or text occurrences.

Fixing typos

Fixing typos

Alt+Enter on Windows and Linux and Opt+Enter on macOS will offer you options to fix typos without needing to open a nested menu.

Inspection for a conflict call

Inspection for a conflict call Oracle

We’ve introduced a new inspection for Oracle: if there is a call conflict when using an overloaded function, DataGrip will warn you about it:

New options for casing in the formatter

New options for casing in the formatter

Now you can define the separate casing settings for built-in types, custom types (instead of just types) and functions.

Running queries

Run configurations

We’ve introduced new usability features to help you run scripts.

Schema switching

Schema switching

DataGrip will warn you if a script contains schema switching.

Displaying the default schema

Displaying the default schema

If you choose just a data source as a target, DataGrip will display the particular schema in which the script will be run.

History targets

History targets

We have also made it possible to choose a target from the history: just click the small clock button.

Console output in a separate tab

Console output in a separate tab

For those who are missing the good old times before the Services panel, and for those who want to use all their screen width, we've introduced the Open new services tab for sessions option in Settings/Preferences | Database | General. When it's turned on, a separate tab is created for each new database session, so you won't see the Services tree. Just the grid or the output!

Tab names

Tab names SQL Server

The ability to name result tabs has become a favorite among many users, but it previously did not work in SQL Server if you ran several statements at once. We’ve fixed that now, so you can enjoy naming your result tabs!

Hints for indexes in ‘Explain plan’

Hints for indexes in ‘Explain plan’ SQL Server

In the Explain plan tool window, DataGrip will offer to create indexes for you if the database thinks it could help with the performance of the query.

DDL editing

Warning for outdated table structures

Warning for outdated table structures

If you open a view, a routine, or a function for editing, but in fact that object has been changed in the database and you're editing the outdated version, DataGrip will warn you about it.

From 2020.3, this is also true for tables!

Warning if the object was deleted

Warning if the object was deleted

Another enhancement to help you keep on top of things: if an object was deleted completely, you will get a dedicated warning about it.

Imagine that you opened the DDL of the routine inventory_in_stock, made some changes, but at that exact moment somebody dropped it!

DataGrip offers three options:

  • Revert local changes: use this when you don't want to edit the procedure anymore and you're ok with the fact that it was deleted. The DDL editor will be closed.
  • Keep local changes: use this when you want to continue editing the procedure, though in fact, when you press Submit, you will recreate it. The changes are no longer highlighted, because a server version is no longer available.
  • Restore in the database: use this when you want DataGrip to restore the procedure based on the cached version from the moment of the last refresh. Your changes will continue to be highlighted, because the server version is now available again.
Migration actions are available everywhere

Migration actions are available everywhere

The Submit, Rollback, and Show Changes actions are now available everywhere in the context of the object. They are also in the object’s context menu. For instance, if you want to roll back several routines and cancel your local changes, just select them in the database explorer and use the Rollback action from the Database Tools menu section.

General

Drag and drop tabs

Drag and drop tabs

You can now drag and drop tabs to split the editor either horizontally or vertically. If you would like to pin your results to the tab in split mode, use In-Editor Results for each of them.

The Welcome screen

The Welcome screen

Unlike other JetBrains IDEs, DataGrip has never had a Welcome screen. When you open DataGrip 2020.3 it will still take you straight to the last opened (or the default) project. But when you close all of your projects, a Welcome screen will appear. Here you can access all of your projects, manage plugins, and customize the IDE.

Per-Project plugins

Per-Project plugins

Settings | Plugins now has the option to only enable or disable a plugin for the current project. A plugin will be loaded automatically when the first project requiring that plugin is opened, and it will be unloaded automatically when the last such project is closed.

Syncing current theme with OS settings

Syncing current theme with OS settings

If the user selects Sync with OS in Settings/Preferences | Appearance & Behavior | Appearance | Theme, the IDE will automatically switch to the light or dark theme when the OS UI makes the same change.

macOS shortcuts as words

macOS shortcuts as words

If you are struggling to read the macOS shortcuts, try toggling the ide.macos.disable.native.shortcut.symbols key in the registry. The registry can be invoked by using Find Action (Cmd+Shift+A) and typing ‘Registry’ there.

Preview tab

Preview tab

Now you can open a file in a preview tab with a single click. To enable this feature, click the gear icon in the Files tool window view and select Enable Preview Tab. If you start editing a file that was opened in this way, it will cease to be a preview and will become an ordinary file.

Simple calculator

Simple calculator

Now you can enter simple mathematical formulas in the search bar of the Search Everywhere dialog and you will see the calculated result right away.

File associations

File associations

Starting with 2020.3, you can make DataGrip the default application for opening specified types of files. Go to Settings/Preferences | Settings | Editor | File Types and click the Associate file types with DataGrip button.

By the way, this doesn’t just work with database-related files! DataGrip is also a good editor for JSON, HTML, and MarkDown* files!

*with a plugin

Expand all

Expand all

Collapse All is now accompanied by the Expand All button in the Database and Files tool windows. Select it from the Project view or press Cmd+plus sign on macOS or Ctrl+Numpad+plus sign on Windows or Linux.

Important fixes

  • When speed search is invoked, the Copy action copies the listed item text, not the speed search text: IDEA-238064.
  • Fixed Test Connection problem for MongoDB. It previously would always succeed even if the connection was not established.
  • MySQL BLOB Fields are editable again: DBE-11311.
  • Custom page size is reset in data editors after the Limit page size setting is changed: DBE-11510.
  • MySQL The USE statement in a script doesn't reset after the first query: DBE-9145.