What's New in DataGrip 2018.2

Full SQL log

First, now you’ll see every query that DataGrip runs in the console output. Whether it’s your SQL or something DataGrip needs to run internally, check the Output tab to understand what’s going on.

SQL log file

Second, literally all queries from the IDE are now logged in a text file.

To open this file, go to Help | Show SQL log.

New SQL formatter

Thanks for sharing your ideas about SQL styles with us! We hope that now DataGrip will be able to accommodate many more different code styles.

The new SQL formatter is a feature we strongly need feedback on, so please try it out and if your specific cases are not covered, do let us know. We are still working on new clauses to add.

As you may already know, you can create custom Code Style schemes.

Now any of them can be used specifically for each data source. To do this, go to the Options tab of the data source properties.

Running stored procedures

This long-awaited feature has been implemented for Oracle and PostgreSQL! Support for SQL Server procedures is only available in DataGrip for now, but will soon appear in the 2018.2.1 updates of other JetBrains IDEs.

Select Executefrom the context menu of the procedure.

The SQL code will be generated. Put in the values of the parameters you need and click OK. As you can see, we retrieve the output of this Oracleprocedure because we have SQL code which fetches the result-set from the JDBC driver.

For situations when you run just a simple procedure with no output, DataGrip will generate SQL code by just running this procedure. Here’s a PostgreSQL example.

Note that you can run the procedure by clicking the Run button in the toolbar when opening the source code.

Source code migrations

Now, to update the source code of any other objects, just double-click them and make the needed changes. The gutter (the vertical bar to the left of the text editor) will highlight the changes you’ve made. Note also the new Submit button on the toolbar.

After you click Submit, the migration dialog will show the generated SQL code to update the source code.

Query plan diagram

A diagram-based view is now available for the query plan. To view it, click the Show Visualization button on the toolbar after you invoke Explain Plan.

SQL editing

Context info

When editing a huge procedure in a package, it is sometimes useful to refresh your memory on its context, i.e. what particular procedure or package is now being edited. To do this, press Alt+Q to see the context information.

Jump outside closing bracket/quote

Starting with this version, you can navigate outside the closing brackets, or closing quotes, by pressing Tab. Note this works only when inputting parameters or values for the first time.

To customize this behavior of Tab, go to Preferences | Editor | General | Smart keys and select Jump outside closing brackets/quote with Tab.


Assign a shortcut from Find Action

Previously, it was impossible assign a shortcut from the Find Action if using the Default keymap. We've fixed this bug and now it works in any keymap and any layout. A good reason to remind you that it’s possible!

Data Editor

Column comments in tooltips

Pretty self-explanatory :)

Number of selected rows

Now DataGrip shows the number of rows selected in the data editor. Look for this in the status bar.

UI upgrades

Run SQL on a schema

Before, the only way to run the script was by executing it from the context menu of the corresponding SQL file. Now you can use a more intuitive way: choose the datasource or the database you need and select Run SQL script from the context menu.

Dark window headers

Now you can make the Darcula theme even darker. If you are on a macOS, to darken the title bars, just go to Preferences | Appearance & Behavior | Appearance and select Use dark window headers.

Touch bar support

We added support for the MacBook Touch Bar. It has only Execute button by default . To add actions go to Preferences | Appearance & Behaviour | Menus and Toolbars | Touch Bar.

Important bug fixes

  • DBE-6681: MySQL comments are being formatted properly.
  • DBE-5204: DDL for a table opens in a right place.
  • DBE-1858: Deleting the criteria from the Filter field shows all rows in the data editor.
  • DBE-6436: Backspace doesn't break quick search in Structure View.
  • DBE-6362: Views with no schema binding in Redshift are shown in the database tree.
  • DBE-6469: Record count in data editor works if sorting applied.
  • IDEA-189650: IDE opens empty files after restart.