Source Code Storage
Find usages inside views/procedures
Now DataGrip 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.
To make this storage work, please re-synchronize your data source. Select Forget Schemas, and then click the Synс/Refresh button.
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 a preview of the objects, i.e. the source code of the objects where your table is used.
We've fixed many bugs related to source code. Now DataGrip shows them for triggers in all popular management systems: MySQL, PostgreSQL, SQL Server, Oracle and Sybase. We've also added the Drop action to the context menu.
Open DDL in console
In addition to Copy DDL, there is now a new action in the context menu: Open DDL in Сonsole.
We didn't forget about materialized views in PostgreSQL: source code is now available and materialized views can be refreshed from the UI.
Changing source code
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.
Tracking database changes
If there are lots of changes in many places, you can see all of them from the Database Changes window. Important! This window is available only in DataGrip, but not in other IntelliJ-based IDE's.
Diff viewer for changes
Any individual change can be clicked to display the diff viewer as well.
Loading source code options
Remember that you can manage which sources will be loaded (or none at all) in the Options tab of datasouce properties, or from the context menu for many datasources at once.
Views can be renamed by pressing Ctrl+F6. Now this refactoring affects only open scripts and the view itself, but not the referencing objects.
Many new features in this version arу related to the data editor. 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 with Ctrl+Enter. As usual, Ctrl+Z is for canceling, but works in a tricky way — only selected changes are canceled. If you wish to cancel all of them, select all cells with Ctrl+A 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've added data conversion. Copy & paste your data even if the fields have different types of data, and even if the tables are in different databases from different vendors! Since multiple cells editing is also available, this will work with the whole column of data as well. Date to string, bool to integer — not a problem.
Select next occurrence
Select next occurrence(Alt+J), a text editor action you may be familiar with, now works in the data editor. Even if several cells are selected. Shift+Alt+J is for Unselect previous occurrence.
Another familiar action, Expand selection(Ctrl+W) 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.
Default fields excluding
The INSERT statement completion offers you not only the list of all fields but also the list of fields which have no default value.
Unused parameters inspection
The IDE will warn you about an unused variable or parameter in a function.
Set operators inspection
Another inspection will let you know if there is a mismatching number of columns in queries used in set operators (UNION, INTERSECT and EXCEPT).
Introspect missing schemas
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 by
Find Usages now handles positional parameters references: $1 will be treated as the first parameter's usage and so on.
Navigation by statements
Navigate to the next method, familiar to many of you from our other IDE's now works in DataGrip. It's called Navigate to the next statement and is invoked with Alt+Up/Down.
Operator signature in PostgreSQL is shown in the database view.
Comments in creating procedures/functions DDL are now saved in the database.
If you run large script files from the context menu, please know that now they are executed much faster.
Now DataGrip detects if an old driver is in use and offers you to update it.
XML extractor comes back
- SQL Server 2016 grammar support
- PostgreSQL 9.6 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
- External tables parsing in Oracle
- The FiraCode font is bundled
- Auto-inc support in SQLite
- Expression index support in SQLite