DataGrip 2016.3 Released!

Posted on by

Hello, everybody!

This release cycle was really important for DataGrip — triggers support, find usages inside views/procedures, bulk submitting of changes: all these features were long-awaited and we thank everybody who helped us provide them in the right way during our EAP program. We are excited to release DataGrip 2016.3!

As usual, everything described here is also available in 2016.3 version of IntelliJ IDEA, PyCharm, RubyMine and PHPStorm, except one small feature we will tell you about.

Here we go!

Source code storage

Now DataGrip shows triggers, views, and materialized views source code. Also, IDE lets you find usages of tables/views inside other views, stored procedures, and functions.

How does that work? The IDE loads the source code of major types of objects and puts them into the local storage. This opens up many new possibilities, so let’s briefly go over them.

To make this storage work, please re-synchronize your data source. Select Forget Schemas, and then click the Synс/Refresh button.

You’re ready. Most importantly, now you can find usages of objects inside the source code of other objects. For instance, you can learn in which stored procedures, functions or views your table is used. As usual, press Alt+F7 on the table name or call it from the context menu. In the Usages window you can see the preview of objects, i.e. the source code of the objects where your table is used.

What else? We’ve fixed many bugs related to source code. Now DataGrip shows it for triggers in all popular management systems: MySQL, PostgreSQL, SQL Server, Oracle, and Sybase. We also added the Drop action to the context menu.

View source code is also shown correctly in all places. In addition to Copy DDL, there is a new action in the context menu now: Open DDL in Сonsole.

We didn’t forget about materialized views in PostgreSQL: their source code is now available, and materialized views can be refreshed from the UI.

When you edit the source code of any object, DataGrip tracks your changes and highlights edited rows in the left editor panel. If you click on a highlighted row, a small toolbar is displayed with a Show Diff link. Click it to see the difference between the row you’ve changed and the one from the source code.

Important! Everything you’ll write in this editor will be saved as the local version of the object’s source code. It means that you will see all queries you entered here every time you open the editor, until you press Revert.

If there are lots of changes in many places, you can see all of them in the Database Changes window. Please note that this window is available only in DataGrip, not other IntelliJ-based IDE’s.

Any individual change can be clicked to display the diff viewer as well.

Remember that you can manage which sources will be loaded (or none at all) using the Options tab of data source properties, or from the context menu for several data sources at once.

Other enhancements connected to database objects support are:

Views can be renamed using Ctrl+F6 (Cmd+F6 for OSX).

Operator’s signature in PostgreSQL is shown in the database view.

Comments in creating procedures/functions DDL are now saved to the database.

Data editor

A lot of new features of this version are related to the data editor. The first and the most important: now all your changes are stored locally and can be submitted at once. Local changes are colored, so you can see which changes you are going to save, be it updating, inserting or deleting rows.

Submit changes by Ctrl+Enter (Cmd+Enter for OSX). As usual, Ctrl+Z (Cmd+Z for OSX) is for canceling, but works in a tricky way — only the selected changes are canceled. If you wish to cancel all of them, select all cells by Ctrl+A (Cmd+A for OSX) before reverting.

Several fields can be edited at once: just select them and begin to type. Of course, it works only if the columns you are editing are not unique and have the same type.

We added data conversion. Copy-paste your data even if the fields have different types of data, and moreover, even if the tables are in different databases from different vendors!

Since multiple cells edit is also available, this will work with the whole column of data as well. Date to string, bool to integer — not a problem.

The familiar editor’s action called Select next occurrence by Alt+J (Ctrl+G for OSX) works here now, even if several cells are selected.

Another familiar Expand selection action by Ctrl+W (Alt+Up for OSX) works in the data editor like this: first, a field is selected, then the column of the active field, then the row of the active field, and finally, the whole grid.

Code insight

The INSERT statement completion offers you not only the list of all fields but also the list of fields which have no default value.

The IDE will warn you about an unused variable or parameter in the function.

Another inspection will let you know if there is a different number of columns in queries used in set operators (UNION, INTERSECT and EXCEPT).

The new intention action offers you to introspect the schema or databases right from the editor if DataGrip has no metadata on them yet.

Some specific features for PostgreSQL users: when you use JOIN USING, DataGrip offers you only the field names common for both tables.

Find Usages now handles positional parameters references: $1 will be treated as the first parameter’s usage and so on.

Navigate to the next method, familiar to many of you from our other IDE’s, now works in DataGrip and is called Navigate to the next statement. Invoke it by Alt+Up and Alt+Down (Ctrl+Down and Ctrl+Up for OSX).

Data Dump

We integrated DataGrip with mysqldump and pg_dump. To dump the objects, use the Dump with… option from the context menu.

This is what the dialogue window for MySQL looks like:

And here is the one for PostgreSQL. Note that in both cases you can use completion for the console parameters.

XML extractor comes back

Back in 0xDBE times (remember those?) we had an XML-extractor. Some of you asked to bring it back, and we’ve obliged.

Here what the extractor’s result looks like:

Other features

When large script files are run from the context menu, now they are executed much faster.

Now DataGrip detects if an old driver is in use and offers you to update it.

You might have noticed the new icons! We hope you’ll like them.

Other fixes and enhancements in this release include:

SQL Server 2016 grammar support

grammar support PostgreSQL 9.6 grammar support

grammar support Many minor objects can now be dropped from the UI

Many minor objects are now resolved in the SQL code

Rules support in PostgreSQL

support in PostgreSQL External tables parsing in Oracle

The FiraCode font is bundled

Auto-inc support in SQLite

Expression index support in SQLite

That’s it! Get your 30-day trial of DataGrip today if you haven’t yet, or just enjoy the new features of DataGrip if you’re our user already. Your feedback is welcome in our twitter, forum, and the issue tracker. Let us know what you think!

Your DataGrip Team

_

JetBrains

The Drive to Develop