DataGrip 2021.2

添加 DDL 資料源生成以及改進的代碼突出顯示。
7月 29, 2021 - 15:10
新版本

功能

  • DDL data source
    • DDL data source generation - With DLL data source generation you can keep your DDL files under a VCS system and regenerate them every time your database structure is updated.
      • It is now possible to generate a DDL data source based on a real one. The DDL files are created locally and the new data source is based on them. This way you’ll always be able to regenerate these files and refresh the DDL data source.
    • Creating objects - In this release, you can now create objects in a DDL data source via the UI. The corresponding files will be created locally.
  • Diagrams
    • The following important features have been added to diagrams:
      • Table comments are now visible.
      • Table colors are now displayed on the diagram.
      • You can now turn off edge merges.
    • Quality improvements:
      • Improved the algorithm that draws diagrams, so the names of the objects no longer overlap with relation lines.
      • The notes are no longer lost when saving.
  • Code editor
    • Search in Local History - If you are looking for a particular revision in Local History, you can now use text search for help.
    • Local History for sources:
      • DataGrip now tracks local changes for object source codes. It can be especially useful when working with procedures and functions.
      • Since every object's sources are stored in a file, all external changes are also considered as local changes.
      • When you introspect your database, this file is refreshed. You can use the Local History popup to keep track of any changes to a function or procedure.
      • Note that all external changes are considered as one change if they happened within two runs of the introspection.
    • Long tab names are back - After receiving some feedback from users who didn’t like the shortened tab names, The option to change them back has been added. If you prefer long tab names, uncheck the Shorten Tab Titles option.
    • Maximize Editor/Normalize Splits action - After the split mechanism was introduced, the situation became more complicated. The following has been implemented:
      • The Hide All Tool Windows action no longer hides the split tabs.
      • The new Maximize Editor/Normalize Splits action maximizes the current tab, but doesn’t hide the tool windows.
  • Code completion
    • Completion scope - It is now possible to define which objects should be presented in the code completion list: objects only from the schema switcher (or the search path), from the current scope or from all schemas:
      • This includes:
        • Suggest only search path objects: only objects from the schemas chosen in the schema switcher are suggested.
        • Suggest objects from current scope (default setting): the list will be populated with the objects DataGrip can correctly resolve without qualification - the set of objects from the schema switcher, USE statements, and the default schema.
        • Suggest objects from all available schemas: the list will contain all objects from all available schemas.
      • This can be also managed by smart completion. Smart completion is invoked when you press the completion hotkey (usually Ctrl+Space) several times.
        • Pressed once or invoked automatically.
        • Pressed twice: all schemas except those turned off for the introspection.
        • Pressed three times: objects from all available schemas and databases.
    • Completion of fields and operators (MongoDB) - Fields and operators are now available in code completion for MongoDB.
    • Completion for cross-database synonyms (Microsoft SQL Server) - Code completion for cross-database synonyms is now available.
    • INSERT completion and computed columns - Computed columns are now taken into account when completing INSERT statements - they are not included in the suggested item.
    • Quality improvements:
      • Objects from the schema of the current context now have higher priority in the code completion list.
      • The automatic alias now appears only when needed.
      • Table qualification in JOIN completion now works as expected.
      • The priority of ASC/DESC inside an ORDER BY clause has been increased.
      • (PostgreSQL) Completion in GRANT/REVOKE statements now works as expected.
  • Code highlighting
    • Support for recursive CTE (Redshift) - Queries that use recursive common table expressions are now properly highlighted and can be run without being selected.
    • Better CTE support (ClickHouse) - The common table expressions syntax, when the CTE name goes before the AS keyword, is now supported.
    • Quality improvements:
      • Inspections for aggregates now work more precisely.
      • (ClickHouse) No more false-positive alerts from the inspection that reports not-null arguments in COALESCE.
      • (Oracle) PL/SQL record type fields are now resolved correctly.
      • (DB2) Table aliases are now resolved correctly.
  • Database explorer
    • Separate folders for functions and procedures - If you turn on the Separate Procedures and Function option in the database explorer settings (the gear icon), it will now immediately take effect. For SQL Server there are dedicated nodes for scalar and table functions and for PostgreSQL there is a node for trigger functions.
    • Separate nodes for triggers, keys, and indices - Added a new database tree option, Show Constraints and Triggers in the Schema, assigns triggers, keys and indices their own individual nodes in the database explorer. This is useful because:
      • You can find an object inside one schema by using quick search.
      • You can see the columns just under the table node.
    • Natural sort order for database objects - If you turn off the Sort Alphabetically option in the database explorer settings, natural sorting for objects will now be applied.
  • Introspection
    • Native introspection (CockroachDB) - CockroachDB will now be fully supported in this release. DataGrip will no longer rely on JDBC-based introspection, but use the native one instead. This is much faster than JDBC-based introspection. The full list of objects that are now introspected includes:
      • Database.
      • Role.
      • Privilege.
      • Schema.
      • Sequence.
      • Deftype.
      • Table.
      • View.
      • Mat view.
      • Index.
      • Column.
      • Constraints.
    • Virtual foreign keys for pg_catalog (PostgreSQL) - You can now use the mechanism for creating virtual foreign keys to cover pg_catalog with virtual foreign keys. This brings a couple of improvements:
      • JOIN completion helps you when querying system tables.
      • You can now navigate by data in system tables.
    • Tablespaces (Oracle) - Added support for tablespaces, data files and temporary files. They are now introspected and they are also included in DDL generation.
    • Linked Servers (SQL Server) - This isn’t full support yet, because metadata is not available for objects in linked servers. Linked servers are now shown in the database explorer and the DDL for their creation can now be generated.
  • Data editor
    • Context live templates from the data editor - Introduced in the previous release, context live templates now work from the data editor. If you’re working with a table and you wish to query it, you can easily do so with the help of the SQL Scripts action.
    • Option for additive sorting - Using Alt+Click for additive sorting was introduced recently. But if you prefer using Click, you can now customize this behavior.
    • Add/delete column (MongoDB) - You can now add columns to MongoDB collections. This action lets you add a new field to any document of a collection. Delete column will delete data not only on the page that is being displayed, but also throughout the whole collection.
    • Adding/renaming columns in CSV files - With the help of the UI data editor, you can now add and remove columns in CSV files.
    • Copy query to console - When working in a data editor, you might sometimes use complicated clauses in WHERE and ORDER BY fields. If you want to continue working with the resulting query, you can use a new action, Copy the Query to Console, it will appear under the gear icon. It opens the query in the default console.
    • No more First row option in navigation by foreign keys - To make the navigation faster, the First row option has been removed. No popup will be displayed and you will be navigated to the table that shows all referencing or referenced rows.
    • Qualification in navigation by foreign keys - If you have foreign keys pointing to objects in another schema and these objects have the same names, they will be displayed as qualified in the foreign keys navigation UI.
    • Quality improvements:
      • The size of the ORDER BY field is now saved.
      • The time zone is now always shown for values with a time zone.
      • (Oracle) DATE type values don’t display time if no time is set.
      • (Oracle) Filtering by the DATE field is now possible.
      • (DB2) Filtering by binary, blob, char for bit data and varchar for bit data fields is now possible.
  • Import/Export
    • Table link after import - When you finish an import, a link to the new table now appears in the notifications.
    • Quality improvements:
      • Export of numeric fields no longer fails if there are non-numeric values.
      • Importing is now faster for PostgreSQL, Redshift, Exasol, Hive, Clickhouse, DB2 and HSQL.
  • Navigation
    • Behavior of the Enter key in the navigation bar - The behavior of the navigation bar is now more straightforward – the Enter key now always expands the node. Before, the Enter key opened data for tables and opened consoles for data sources. If you want to navigate from the object in the navigation bar rather than opening its node, you can use these navigation shortcuts:
      • Open DDL: Ctrl+B.
      • Open data: F4.
      • Select in the database tree: Alt+Shift+B.
    • Signatures in the Go To popup - When you are searching for a function, procedure or operator, DataGrip now shows the signature in the Go To window. This helps when you use overloading heavily.
  • General
    • Localized UI - Starting from this version, you can enjoy the fully localized UI of DataGrip in Chinese, Korean and Japanese. Localization is available as non-bundled language pack plugins, which can be easily installed to DataGrip.
    • New location for projects - In DataGrip, projects are now located by default in the same place as they are in all other IntelliJ-based IDEs.
    • Settings:
      • Back and forward buttons - These buttons make it easier to navigate in the Settings window and not get lost there.
      • Advanced Settings - Added Advanced Settings as a new node in Preferences/Settings. It contains some use-case-specific options conveniently grouped by IDE tool. Most of the settings have been transferred from the Registry, though some of them are new. A couple of notable settings:
        • Left-hand margin in Distraction-free mode.
        • Ability to set the caret to move down after you use the Comment with Line Comment action.
        • Customizing the behavior of double-clicking on a tab.
    • Show scratch files action - Added a new Show Scratch Files action (found via Find Action: Cmd+Shift+A) which shows a list of scratches with snippets in a popup. It has the same UI as the Recent Locations popup with speed-search and deletion.
    • Managing the Services tool window popups - When a query returns no data, there’s no need for the Services tool window to appear if it was hidden already. You can now define which operations make the Services tool window appear on your own.
    • Quality improvements:
      • (PostgreSQL) Reworked the introspector. For you, the main effect of the new introspector is no more object duplicates.
      • No more freezing when typing JOIN statements along with using virtual foreign keys.
      • Empty scratch files are now automatically removed.
DDL data source

DataGrip

為適應專業SQL 開發人員和DBA的特定需要定制的資料庫 IDE。

有任何疑問嗎?

Live Chat現在與我們的JetBrains 專家即時聊天詢問。