New schema management
Now the schema selection UI is a tree with the ability to choose if you want to introspect the current schema/database or, all schemas/databases. ‘Schemas...’ node in the database view will also show this tree.
The Schemas tab comes back to the data source properties dialog. We added the Pattern field where you can describe what you want to be introspected. The Ctrl+Q shortcut will give you information about the syntax.
SQL resolution scopes
As you know, DataGrip resolves objects from SQL code to your database. It means that the IDE understands which particular object you use in your script, and provides navigation, code completion and everything else that we are proud of. But previously this process incurred some difficulties if objects in code were unqualified. For instance, if your script contained just table names without schemas or databases, and there were two identical data sources, test and production, then the situation would become confusing.
Now, you can simply map any file or folder to any datasource in Settings → Database → SQL resolution scopes. This means that all unqualified objects will be resolved to the selected datasource/database/schema. The project level mappings are the same as Options → Resolved unqualified references in previous versions. All your settings set there will transit here, so you won’t lose them.
Create database/schema UI
Many of you asked us to implement some simple UI for creating schemas and databases. Voila!
Decide if you want these new schemas and databases to be introspected immediately. This also applies to creating and deleting schemas/databases from the query console.
NB! As we still do not support several databases for PostgreSQL, any database created in this UI will not appear in the database tree, even if this option is enabled. Please create another data source to manage your new database.
Column mappings and DDL preview
We’ve been asked to make the import process more flexible. It frequently happens that the number
of columns in a
.csv file is not the same as in the target table. Or you just want to import several
columns from a file but not all of them. Now it’s possible to map every column of the file being imported to
a table column in your database, which can be either an existing table or a new one created during
the import process. Of course, completion works for column names.
Another new thing in this window is a DDL preview tab, showing you the code to be executed for creating or changing the table.
Now there is an easy way to export tables and their data from one database/schema to another. It works even if the tables are in different databases from different vendors. For example, if you need to copy a table from a PostgreSQL database to a SQL Server database, just drag-n-drop it. Check if all is OK in the Import table window and go ahead!
The same for result-set! We added a button Export to database. Choose any schema in the list and go ahead: the new table is created, the data is inserted.
Respect the default search path
The most important for PostgreSQL users: now DataGrip respects the default search path. Before, we set the search path according to the context of the console opening. At some point we discovered it wasn’t very convenient for many of you. Now the default search path is set for any console. Change it in any moment or go back to the default one.
Better trigger support
Smart SQL keys
We’ve added an SQL section to Settings → Editor → Smart Keys.
Jump to colors and fonts
A small helpful action for those who don’t want to wade through colors and fonts settings to find a single thing they need. For now it is only available in the Find Action menu (Ctrl+Shift+A), but as usual, you can assign any shortcut to it.
This action will navigate you to the settings which are relevant to the context under the caret. If there are several of them, just choose one.
More information in result-set status bar
Some information was added to the status bar of the data editor. It is query time and selected column/row numbers under the cursor.
Text occurrences in Find Usages
- Windows authentification for SQL Server in jTDS driver.
- Correct line endings are sent to the database in SQL Server.
- Support of
CREATE/ALTERconstruction from SQL Server 2016.
- TNS names are correctly parsed from tnsnames.ora file in Oracle.
- It’s possible to use routine parameters in
- Commit triggers synchronization in PostgreSQL.
- Single quotation mark is now escaped in DDL.
- Read-only preview is available for large file.
- Warnings are added on the Output tab as soon as they’re raised.
- Zero-latency typing is now enabled by default.
- Icons for synonyms are seen in structure view and completion.