Hello! Discussion DataGrip
began in the comments to the announcement of the new IntelliJ IDEA, let's continue here. Iβll tell you what's new in
DataGrip 2017.1 .

There will be a lot of text and pictures. In short, here is what we added:
Database tree')
- New schema management
- Linking files to data sources
- Interface for creating databases and schemes
- Color settings for the editor and query results
Import and export data- Export tables from one database to another
- Mapping file and table columns
Query console- Save the default search path in PostgreSQL
- Template for trigger generation
- Settings for disabling automatic concatenation of multi-line literals and for automatic qualification of objects
Rest- Query execution time and column and row numbers of the selected field in the status panel
- Search for the name of tables and other objects in the comments and lines
- Windows authentication in SQL Server for jTDS driver
- Warning about changing the source code of the submission, procedures, etc.
Database tree
Schema managementOnce again, we reworked the interface for selecting schemas in the database tree. Hopefully now it's a long time :)
The selection tree is opened by double clicking on
Schemas .... Choose at once all schemes, current or only those that you want to see.

We returned the
Schemas tab to the properties of the data source - now there is the same selection tree. You can specify the displayed schemes in the text template, the language of which is described in the information window (
Ctrl + Q or
F1 for OSX ).
Match files and data sourcesPreviously, especially in other IDEs with built-in database support, there was confusion about which data source is associated with the file. If queries from, say, a java-class used unqualified objects, IntelliJ IDEA itself tried to guess in which database they were executed. The environment could be helped in the
Resolve Unqualified References tab. But if in the data source there were objects with the same names in different schemes, this problem could not be solved.

It became easier: any file or folder can be explicitly linked to one or several data sources or even to individual schemes. This is done in
Settings β Database β SQL resolution scopes . As a result, unqualified database objects from your queries will be treated as objects from the specified source. That is, auto-completion and navigation will work.
UI to create databases and chartsLast time we
were asked to do it - done! In a new window, simple SQL is generated.

Indicate whether you want to see the created schemes and bases in the tree immediately. This option also works to create diagrams and databases directly from the console.
NB! DataGrip still does
not support multiple PostgreSQL databases for a single data source. Therefore, the created new databases will not appear in the tree - to work with them, create a separate data source. But we started work on it.
Color settingsColor settings in the context menu of the data source were previously (know about them? :), but now you can apply the color to the background of the console and to the table of query results. We hope this helps not to run test scripts on a live base.

Import and export data
Export tables and resultsNow you can drag a table from one base to another. Moreover, even if it is a database from different DBMS. The structure of the table and the data itself are copied.

You can create a new table in another database from the query results: add the
Export to database button.
Improvements in the import dialogThere were many
suggestions on how to make imports more flexible.
Specify which table you are importing data into, and edit the script to create it. Matching the columns will help you understand where the data is going. Auto-completion works for column names.

Query console
PostgreSQL search pathThe most
important thing for PostgreSQL users: now we donβt forget about the default search path. As before, it is configured in the upper right corner.
TriggersAdded a template for generating triggers by
Ctrl + N (
Cmd + O for
OSX ).

Supported
NEW / OLD and
INSERTED / UPDATED for trigger sources.
Code writingFamiliar with other IDEs, the
Settings β Editor β Appearance β Show parameter name hints option also works in DataGrip: shows the column names for
INSERT sentences.

New settings appeared in
Settings β Editor β General β Smart Keys .
Insert string concatenation on Enter is responsible for whether the strings will be automatically concatenated during the transfer. Previously, it worked by default and looked like this:

Some bases use multi-line literals, and this behavior
was inconvenient . If you uncheck the check, the line break will not insert anything:

The
option Qualify object in the completion was also
requested . It is convenient for someone that objects always qualify, it annoys someone even in case of collisions - the same scripts will be run on different bases, and people do not want to change anything in them. Let's say we have two schemes -
max and
public , with such tables:

This is how the IDE will behave when setting
Qualify on collisions :

Named parameters are supplemented by the second pressing of
Ctrl + Space . In general, in all of our IDEs, this leads to interesting results, try.

Addition on
Ctrl + Space after simple
SELECT inserts an alias. In
Settings β Editor β Code style β SQL, you can now configure it β use uppercase or lowercase letters for it.

Another setting from the platform works for DataGrip.
Settings β Editor β Appearance β Show method separator will draw lines between requests.

MySQL has grammar bugs when using
UNION . We added a fun inspection that will warn you about this.
Navigating to color and font settingsAnd users of any IDE on the IntelliJ platform will need this - do not look for where to change color or font in the wilds of settings. The
Jump to colors and fonts command in the omnipresent menu, using
Ctrl + Shift + A (
Cmd + Shift + A for
OSX ) will send you to the color setting of the context in which the cursor is located.

If there are several contexts, select the one you need. Here it is proposed to adjust the color and display for the launch query (purple frame) and the color of the lowercase literal (green). Suppose we care about a lowercase literal.

Done! You can change the color.

miscellanea
We added the query execution time and the column and row numbers of the selected record to the status bar of the queries.

In the
Modify table window, the details of a column are opened by double-clicking, and not by a single click.

The source editor detects that the object has changed from DataGrip, and warns about this.

Added a link to the documentation in the information window for system tables in PostgreSQL.

In the search for the use of objects, you can exclude textual entries - comments, dynamic SQL.

And also in the new version:
- Preview for large files in read-only mode.
- Windows authentication in SQL Server for jTDS-driver.
- Support for
CREATE / ALTER query in SQL Server 2016.
- TNS names are correctly read from the tnsnames.ora file in Oracle.
- Commit
starts synchronization in PostgreSQL.
- Introspect
more objects in SQLite.
- Warnings
appear in the Output tab immediately.
-
Zero-latency typing (dialing without delay) is enabled by default.
- Color settings for regular expressions.
You probably know all about it, but nonetheless:
- Download free trial version
here .
- We have
Twitter and a
forum .
- Report bugs to the
tracker .
That's all. As always, continue in the comments.