You can now use SQL to query MongoDB databases! We've created our own JS-SQL translator that makes this possible.
Only SELECT queries work, and the working сlauses are JOIN, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT, OFFSET. The complete post on what is supported is here.
There are two options in the context menu for each SQL query in Mongo: Copy JS script to clipboard and Show JS Script. In the JS Script Preview window, you can edit the query and run it.
We’re always happy to welcome a new database into the family, and our newest member is Couchbase! It’s important to mention that DataGrip supports the Couchbase Query service, not the Couchbase Analytics service.
The DataGrip community has been asking for this for a while! You can now use Azure AD to log in to your database.
You can now specify the working directory for the process that handles working with data sources. Also, all relative paths will be resolved in this directory, for instance in driver properties.
We’ve improved the cell values editor that we first introduced in 2020.2.
It can now display the formatted value even if the value is stored as one line. Moreover, you can edit the value in the formatted view and update it with the original formatting. This works with single-line XMLs and JSONs.
If the width of the screen is crucial to your flow, you can move the cell value editor out of the way to the bottom of the data editor.
This panel can now also display images!
We’ve added the ability to open tables and views in the transposed view by default. This can be useful if the average table in your database has an enormous number of columns.
For a long time now, it has been possible to use the expand selection action in tables. It can be invoked using Ctrl+W in Windows and Linux and Opt+Up in macOS. Now we have added the opposite action: shrink selection. The shortcut is Ctrl+Shift+W on Windows and Linux and Opt+Down on macOS.
Introducing two new extractors: One-row and SQL-Insert-Multirow!
One-Row will help you copy a column to a comma-separated string. This can be extremely useful for pasting a set of values in an IN clause!
SQL-Insert-Multirow will generate a single INSERT statement with the multiple new rows that will be inserted.
There is a new option in CSV format configuration: never quote values.
Introspection is the process by which DataGrip retrieves information about a database. This information is used to show the objects in the database explorer, display their DDLs, provide code completion suggestions, and so on.
Sometimes introspection runs into problems. Now, when things go wrong, you can collect useful data that you can pass on to our support team or include in a ticket in our issue tracker, so you can get the best help possible.
Diagnostic refresh will refresh the database and collect all the queries into one single file that will then be shown in the Explorer/Finder. You can inspect this file on your own if you wish, but it’s main purpose is for you to send it to us for when introspection is too slow.
Prepare introspector diagnostic will create three files and show the folder we need you to send us if introspection works incorrectly, that is, if it shows something outdated or doesn’t show new objects.
DataGrip now knows about object grants and displays them in an object’s DDL.
If you’ve changed the DDL of some objects but haven’t submitted them yet, the objects waiting to be submitted are highlighted in the database tree. Previously you could only see them in the Database Changes tool window.
DataGrip now generates DDLs with TABLESPACE and INDEX ACCESS METHOD.
Now DataGrip shows more objects in the database tree. The new objects are collation, materialized view, foreign table, foreign data wrapper, foreign server, and user mapping.
The overloaded procedures in one package used to be displayed as one item. That’s no longer the case. The number in square brackets is the native index of the procedure in the database.
Enjoy the benefits of our SQL formatter when working with unsupported databases!
Inline renaming will now offer you the option to work with comments, strings, or text occurrences.
Alt+Enter on Windows and Linux and Opt+Enter on Mac will offer you options to fix typos without needing to open a nested menu.
We’ve introduced a new inspection for Oracle: if there is a call conflict when using an overloaded function, DataGrip will warn you about it:
Now you can define the separate casing settings for built-in types, custom types (instead of just types) and functions.
We’ve introduced new usability features to help you run scripts.
DataGrip will warn you if a script contains schema switching.
If you choose just a data source as a target, DataGrip will display the particular schema in which the script will be run.
We have also made it possible to choose a target from the history: just click the small clock button.
For those who are missing the good old times before the Services panel, and for those who want to use all their screen width, we've introduced the Open new services tab for sessions option in Settings/Preferences | Database | General. When it's turned on, a separate tab is created for each new database session, so you won't see the Services tree. Just the grid or the output!
The ability to name result tabs has become a favorite among many users, but it previously did not work in SQL Server if you ran several statements at once. We’ve fixed that now, so you can enjoy naming your result tabs!
In the Explain plan tool window, DataGrip will offer to create indexes for you if the database thinks it could help with the performance of the query.
If you open a view, a routine, or a function for editing, but in fact that object has been changed in the database and you're editing the outdated version, DataGrip will warn you about it.
From 2020.3, this is also true for tables!
Another enhancement to help you keep on top of things: if an object was deleted completely, you will get a dedicated warning about it.
Imagine that you opened the DDL of the routine inventory_in_stock, made some changes, but at that exact moment somebody dropped it!
DataGrip offers three options:
The Submit, Rollback, and Show Changes actions are now available everywhere in the context of the object. They are also in the object’s context menu. For instance, if you want to roll back several routines and cancel your local changes, just select them in the database explorer and use the Rollback action from the Database Tools menu section.
You can now drag and drop tabs to split the editor either horizontally or vertically. If you would like to pin your results to the tab in split mode, use In-Editor Results for each of them.
Unlike other JetBrains IDEs, DataGrip has never had a Welcome screen. When you open DataGrip 2020.3 it will still take you straight to the last opened (or the default) project. But when you close all of your projects, a Welcome screen will appear. Here you can access all of your projects, manage plugins, and customize the IDE.
Settings | Plugins now has the option to only enable or disable a plugin for the current project. A plugin will be loaded automatically when the first project requiring that plugin is opened, and it will be unloaded automatically when the last such project is closed.
If the user selects Sync with OS in Settings/Preferences | Appearance & Behavior | Appearance | Theme, the IDE will automatically switch to the light or dark theme when the OS UI makes the same change.
If you are struggling to read the macOS shortcuts, try toggling the ide.macos.disable.native.shortcut.symbols key in the registry. The registry can be invoked by using Find Action (Cmd+Shift+A) and typing ‘Registry’ there.
Now you can open a file in a preview tab with a single click. To enable this feature, click the gear icon in the Files tool window view and select Enable Preview Tab. If you start editing a file that was opened in this way, it will cease to be a preview and will become an ordinary file.
Now you can enter simple mathematical formulas in the search bar of the Search Everywhere dialog and you will see the calculated result right away.
Starting with 2020.3, you can make DataGrip the default application for opening specified types of files. Go to Settings/Preferences | Settings | Editor | File Types and click the Associate file types with DataGrip button.
By the way, this doesn’t just work with database-related files! DataGrip is also a good editor for JSON, HTML, and MarkDown* files!
*with a plugin
Collapse All is now accompanied by the Expand All button in the Database and Files tool windows. Select it from the Project view or press Cmd+plus sign on Mac or Ctrl+Numpad+plus sign on Windows or Linux.