What's New in DataGrip 2020.2

Data editor

Separate editor for cell values

Separate editor for cell values

Now if you have a huge value in your cell, it can be viewed or edited in a separate panel. You can also toggle soft wrap mode using the right-hand toolbar. Use all the power of our code editor for your data!

DML preview in the data editor

DML preview in the data editor

Starting with this version, you can review the query that represents your changes in the data editor. There is now a DML button that is active if there are pending changes:

DML preview in the data editor

And you will see a dialog with the DML preview. This query is not the exact SQL that will be run to modify your data, because DataGrip uses a JDBC driver to update tables, but most of the time it will be the same.

A new UI for boolean values

A new UI for boolean values

Well, this is quite a welcome development! There’s now a more user-friendly way to view and edit boolean values. True values are now marked with a bullet point to distinguish them from all the others.

Editing:

  • The space key toggles values like it used to.
  • Typing f, t, d, n, g, or c will input the corresponding values: false, true, default, null, generated, and computed. We’re lucky that all these values begin with different letters!
  • Typing anything else will open the drop-down with all possible values.
A new UI for cropped data

A new UI for cropped data

Sometimes DataGrip cannot load all the data for a given cell. This happens if the size of the data in the cell is larger than allowed by the Database | Data views | Max LOB length setting. In these cases, we used to add a small piece of text, like “10 KB of 50 KB loaded”, to the value. Now we just show a hint instead of altering the value.

Export to clipboard in the data editor context menu

Export to clipboard in the data editor context menu

After we introduced a dialog window for exporting data, one tiny scenario became more complicated – exporting the whole result or table to the clipboard. So we added the following item to the context menu:

Note that Copy copies the selection, while Export to Clipboard copies the whole data set.

Better filtering for MongoDB

Better filtering for MongoDB

In addition to ObjectId and ISODate, filtering now supports UUID, NumberDecimal, NumberLong, and BinData. Also, if you have a valid UUID/ObjectId/ISODate in your clipboard, you will see this value in the list of suggested filters.

Better filtering for MongoDB

We’ve also added regular expressions to filtering, in case you’re missing the LIKE filter from MongoDB.

SQL editor

New inspections widget

New inspections widget

The new inspections widget makes it easier for you to view all the problems in your script and to navigate between them. It provides detailed information about the number of warnings, errors, and other issues in the current file. You can use the arrow icons to navigate through errors in the files, and of course it’s still possible to navigate through errors using the F2 shortcut.

In-place rename

Suggested rename

If you change the name of an object in the code, this tiny button on the toolbar will let you do a refactoring! For example, this is how it works for aliases:

Even better JOIN completion

Even better JOIN completion

One less step to complete JOIN clauses: now we offer the whole clause when you start typing ‘JOIN’:

Even better JOIN completion

Also, completion offers a way to join by two columns, if applicable:

Refresh database quick-fix

Refresh database quick-fix

Sometimes you have unresolved objects in your script. When you do, DataGrip doesn’t understand where these objects are located and suspects that they don’t exist at all. While in many cases this is true, sometimes the objects are unresolved because you just need to tweak the context you are working on.

We’ve added the Refresh database quick-fix, which will help you if an object has been added to the database from somewhere else since the last time you refreshed your database.

Introduce variable

Introduce variable

This refactoring is now supported in more dialects: SQL Server, Db2, Exasol, HSQL, Redshift, and Sybase. You can introduce variables from any expression that has a simple type.

Google BigQuery dialect

Google BigQuery dialect

We’ve added a new SQL dialect: Google BigQuery. Full support for BigQuery is not here yet, but all things must begin somewhere. So far, DataGrip can correctly highlight and provide coding assistance for your queries if you use Google BigQuery.

TextMate bundles

TextMate bundles

TextMate, a text editor for Mac, offers syntax highlighting bundles for many languages. We can import and use them in DataGrip. Starting with this release, the IDE will provide syntax highlighting for the file types registered with the bundle.

Now your Python, JavaScript, Shell, and many other types of files will have syntax highlighting by default. To see all the applicable file types, go to Settings/Preferences | Editor | TextMate bundles.

SQL 2016 for Generic dialect

SQL 2016 for Generic dialect

Now files and consoles that are highlighted with the Generic dialect are highlighted with SQL 2016. Previously, SQL 92 was used. The main improvement from this change is the ability to run common table expressions without selecting any code.

Original casing of objects for SQL formatter

Original casing of objects for SQL formatter

Previously, the SQL formatter had three options for modifying object names in your code: to upper case, to lower case or don't change. But it turned out that this was not enough – some people need the object names to be changed according to the casing which was used in the declaration. Now we provide that option.

Original casing of objects for SQL formatter

This is how it works: the table Actor was declared with the first letter capitalized and the formatter leaves it unchanged.

A tip: if the declaration is in another sql file, create a DDL data source based on your sql file so that the formatter will use the correct casing.

Multiple carets for each line of the selection

Multiple carets for each line of the selection

This new action is another handy way to place multiple carets! Just select the code and invoke multiple carets via Find Action or the dedicated shortcut: Shift+Alt+G

Database tree view

All databases and schemas in the database tree

All databases and schemas in the database tree

DataGrip will only show the databases and schemas you have chosen to be displayed. While this can be useful if you have many databases and schemas, it also defines which schemas need to be introspected, as DataGrip loads the metadata from the database and makes use of it later.

However, some people are more used to tools that always display all the available databases and schemas. They also prefer that externally added schemas appear in the database explorer after a refresh.

This is why we’ve added a new option to the database explorer: Show All Namespaces. In this mode, databases and schemas that are not introspected are grayed out.

UI for creating views

UI for creating views

While we are always encouraging people to use the Generate functionality (Alt+Ins in the SQL editor) if they want to create a view, many are more comfortable using the UI. We heard you, and we’ve added a UI option for that.

Basic support for Oracle DB links

Basic support for Oracle DB links

Oracle DB links are now shown in the database explorer, and the code that uses them is correctly highlighted.

General

Long tabs no more!

Long tabs no more!

Another usability issue that won’t annoy you in 2020.2: long tabs.

How it works now:

  • The Database | General | Always show qualified names for database objects option is now turned off by default. Objects will be qualified in the tab names only if there are two objects with the same name open. For example, if you open two actor tables from different schemas, the schema name will be displayed in the tab name. Otherwise, it won’t be.
  • If the data source name is longer than 20 characters, it will be truncated.
  • If you have only one data source, DataGrip won’t display it in the tab name.
  • If a qualified object name has more than 36 characters, it will be truncated.
Native libraries in the driver settings

Native libraries in the driver settings

Now you can specify the path to any native library for the driver. Here are just a few situations where this can be useful:

  • In SQL Server, you can specify the mssql-jdbc_auth-‹version›-‹arch›.dll for SSO authentication if you manually set up the driver. By default, SSO authentication works out of the box.
  • In an Oracle database, you can specify the ocijdbc library to use the OCI driver.
  • In SQLite, you can specify the runtime loadable extensions to make it easier to use them from the query console. There is no need to specify the full path.
Run configurations for *.js files

Run configurations for *.js files

If you have MongoDB scripts, you can create Run configurations from them.

Git and Github plugins bundled

Git and Github plugins bundled

And last but not least: Git and Github plugins now work out of the box in DataGrip, so you don't need to install them from the Plugin Marketplace.