DataGrip 2019.3.2: Virtual foreign keys and more!
Hello! This is the second bugfix update for DataGrip 2019.3. Here’s what it has inside:
Virtual foreign keys
We’ve introduced the concept of virtual foreign keys. You can use this concept in the event that you need to use a relationship that exists but is not located in your database.!
Doing so will help you:
– Have the proper completion when writing JOIN clauses.
– See the relations in diagrams.
By default, DataGrip tries to guess if you have relations between columns whose names contain id. It looks like this:
These relations are also displayed in the diagram. If you don’t want them to be there, just click on the corresponding icon on the toolbar.
You can also create a custom rule under Settings | Preferences for guessing whether there are relations: :
As you can see, DataGrip 2019.3 only includes one pre-built pattern, which was particularly designed to handle the examples above. You can add your own with the help of the regular expressions. To learn more about this feature, you can visit our help page.
When you write code, any relation from the JOIN clause can be stored as a virtual foreign key. Press Alt+Enter and choose Store table relation.
DataGrip will ask you to identify a file where these virtual relations will be stored.
The resulting XML file will look like this, and you can then edit it directly:
Stored procedure runner for MySQL
Finally, after adding the option to execute stored procedures in PostgreSQL, MS SQL and Oracle, we’ve now made it possible to do so in MySQL.
DBE-9829 Aliases are no longer used when completing table names in DDL.
DBE-9800 Only trigger functions are offered in the corresponding completion list.
DBE-9803 The wildcard is now resolved inside row constructors.
Subscribe to Blog updates
Thanks, we've got you!