DataGrip 2018.2

Hello! Please give a warm welcome to our new major release, DataGrip 2018.2!


Starting with this version, the database functionality of IntelliJ-based IDEs is available in CLion and AppCode. So if use one of these IDEs welcome to our blog :) Also, those who use WebStorm and DataGrip simultaneously can now install a database plugin inside WebStorm.

We thank all of the EAP contributors who have helped us by testing all the new features added in this release. Let’s have a look at what’s in there.

SQL log
New SQL formatter
Running stored procedures
Source code migrations
Query plan diagram
SQL editing
Data editor
UI upgrades


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.


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 Execute from 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 Oracle procedure 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. Again, you’ll need to add the values to the parameters. 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 Commit, 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. As a reminder, it’s also available in the context menu for queries in the SQL console.


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 (Shift+Ctrl+Q for OSX) to see the context information:


Jump outside closing bracket/quote with Tab

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.


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

Touch Bar support

We’ve added support for the MacBook Touch Bar. It only has an Execute button by default.


To add actions, go to Preferences → Appearance & Behavior → Menus and Toolbars → Touch Bar.


Assign a shortcut from Find Action

Previously, it was impossible to 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!


Custom data source

Now you can add custom data sources based on jdbc-driver. Click the + button on the toolbar and select the appropriate item from the drop-down.


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.


Dialect and console choosers

Now you can choose the dialect of the SQL file and attach any console to it just from the toolbar.


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.


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.

The only thing left to do now is to grab your 30-day trial of DataGrip.
Don’t forget about twitter, forum, and the issue tracker.
Your DataGrip Team
The Drive to Develop

image description

Discover more