- DataGrip
- Информация
- Описание
- DataGrip Quick Start Guide
- Datagrip для mac os
- Intelligent query console
- Efficient schema navigation
- Explain plan
- Smart code completion
- On-the-fly analysis and quick-fixes
- Refactorings that work in SQL files and schemas
- Version control integration
- Join Our Customers
- What’s New in DataGrip 2021.2
- DDL data source
- Creating objects
- Diagrams
- Quality improvements:
- Code editor
- Search in Local History
- Local History for sources
- Long tab names are back
- Maximize Editor / Normalize Splits action
- Code completion
- Completion scope
- Completion of fields and operators MongoDB
- Completion for cross-database synonyms SQL Server
- INSERT completion and computed columns
- Quality improvements
- Code highlighting
- Support for recursive CTE Redshift
- Better CTE support ClickHouse
- Quality improvements
- Database explorer
- Separate folders for functions and procedures
- Separate nodes for triggers, keys, and indices
- Natural sort order for database objects
- Introspection
- Native introspection CockroachDB
- Virtual foreign keys for pg_catalog PostgreSQL
- Tablespaces Oracle
- Linked Servers SQL Server
- Data editor
- Context live templates from the data editor
- Option for additive sorting
- Add/delete column MongoDB
- Adding/renaming columns in CSV files
- Copy query to console
- No more First row option in navigation by foreign keys
- Qualification in navigation by foreign keys
- Quality improvements
- Import/Export
- Table link after import
- Quality improvements
- Navigation
- Behavior of the Enter key in the navigation bar
- Signatures in the Go To popup
- General
- Localized UI
- New location for projects
- Settings
- Back and forward buttons
- Advanced Settings
- Show scratch files action
- Managing the Services tool window popups
- Quality improvements
DataGrip
Информация
Описание
JetBrains DataGrip – инструмент, созданный специально для SQL-разработчиков, позволяющий удобно работать с различными базами данных. Решение предлагает все необходимые инструменты, такие как навигация, автозаполнение и анализ кода, рефакторинг, контроль версий и многое другое.
Умная консоль запросов
Запуск запросов в разных режимах: обычном или «только для чтения». Консоль хранит историю запросов, клавиатурного ввода и сохраняется автоматически.
Навигация по базе
Нахождение любых объектов, набирая имя в окне поиска. Переход из SQL-скрипта к исходному коду объекта или к данным.
Выбор удобного планировщика: древовидного или графического. Анализ эффективности своих запросов.
Умное автодополнение кода
Автодополнение понимает контекст: предлагает ключевые слова или объекты в зависимости от того, что подходит в конкретном месте кода. Оно учитывает внешние ключи, структуру объектов и даже объекты, созданные в этом же скрипте.
Анализ кода и подсказки
DataGrip находит проблемы в запросах и предлагает исправить их автоматически.
DataGrip понимает, какие объекты задействованы в скрипте. Когда пользователь переименовывает псевдоним или переменную, они будут переименованы во всех местах, где используются. По желанию имена объектов изменятся и в самой базе, если они переименованы в запросе. Будет наглядно понятно, в каких процедурах или функциях они используются. В этом случае исходный код этих процедур тоже изменится.
Поддержка систем контроля версий
DataGrip поддерживает работу с Git, SVN, Mercurial и другими системами контроля версий.
Источник
DataGrip Quick Start Guide
Hello, and thank you for giving DataGrip a try! Let’s go on a little journey that will see you through to your first query result.
After you have installed the product and launched it for the first time, you’ll be asked to choose the color scheme for DataGrip, which can be either light or dark.
In the next window of the wizard, choose the default dialect and scripts directory.
First, choose the main dialect for your files. For example, if you choose SQL Server, the *.sql files will be highlighted as SQL Server files by default. You will then be able to choose any dialect for any file or folder.
Next, select the directory where you are going to keep your scripts. Or just point to the directory where the SQL files you’ll be working with are. This directory will become attached and its content will be shown in the Files tool window of the IDE.
Here’s how DataGrip will look after the first start:
In this notification popup, DataGrip will suggest that you connect to the database and attach the folder for scripts if you haven’t already done so from the startup wizard. Anyway, if this popup never appeared or has already disappeared, it might still be useful for us to go through and look at how to connect to the database.
Open the Database view by pressing Ctrl+1 . The panel on the left displays all the data sources. We have none yet, so let’s make our first data source. Click +, and then choose the database type you are going to work with.
Then you’ll see the connection window.
Important! DataGrip does not ship Java drivers, which are needed for connectivity. Click the Download button in order to get the drivers you need and be able to connect.
Now, enter the appropriate values into the fields: host, instance, database, port, user, and password. For more details about the specific databases and how to connect to them, please refer to the corresponding articles from our documentation:
If you are going to use DataGrip with a database we do not officially support (such as Teradata, Snowflake, or Firebird), connect to it with the help of a JDBC driver. See this article for detailed instructions.
Finally, click the Test Connection button. A green Successful note will tell you that you’ve passed the most important stage.
On the Options tab, choose which databases or schemas will be visible in the database tree.
Click OK. Your data source will appear in the left-hand pane (which we usually call the Database view), and the default query console will display. The console is an SQL file attached to your data source where you write SQL queries.
In the top right-hand corner of the console, there is a drop-down where you can choose the context: database, schemas, or, in the case of PostgreSQL, the search path for this console.
You can also create several query consoles. To do that, use the context menu.
The last step is to write an SQL query in the query console. Then press Ctrl+Enter and get the result!
For additional information and to stay in touch with DataGrip, use these resources:
Источник
Datagrip для mac os
Meet DataGrip, our new database IDE that is tailored to suit the specific needs of professional SQL developers.
Intelligent query console
Allows you to execute queries in different modes and provides a local history that keeps track of all your activity and protects you from losing your work.
Efficient schema navigation
Lets you jump to any table, view, or procedure by its name via the corresponding action, or directly from its usages in the SQL code.
Explain plan
Gives you an extended insight into how your queries work and into the database engine behavior, so you can make your queries more efficient.
Smart code completion
DataGrip provides context-sensitive code completion, helping you to write SQL code faster. Completion is aware of the tables structure, foreign keys, and even database objects created in code you’re editing.
On-the-fly analysis and quick-fixes
DataGrip detects probable bugs in your code and suggests the best options to fix them on the fly. It will immediately let you know about unresolved objects, using keywords as identifiers and always offers a way to fix the problems.
Refactorings that work in SQL files and schemas
DataGrip correctly resolves all references in your SQL code and helps you refactor them. When you rename a variable or an alias, it will update their usages throughout the entire file. The actual table names in the database are updated when you rename references to them from your queries. There is even a preview of usages of tables/views inside other views, stored procedures and functions.
Version control integration
We provide unified support for all major version control systems: Git, SVN, Mercurial and many others.
Join Our Customers
Companies all over the world use DataGrip. Join them and get the best development experience.
Источник
What’s New in DataGrip 2021.2
DataGrip 2021.2 is here! This is the second major update of 2021, and it’s packed with various enhancements. Let’s take a look at what it has to offer!
DDL data source
DDL data source generation is another step in our long-term development of seamless database versioning. With this feature, 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.
Let’s take a look at how this works.
We’ve added a new menu item, Dump to DDL data source, to the SQL Scripts context menu.
When the dialog opens, you need to specify the folder where the newly created files will be stored.
On the Generation tab, specify how these DDL files should be generated.
Finally, click OK to create the DDL data source.
The folder with the new files is automatically attached to your project.
Creating objects
In v2021.2, you can 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 displayed on the diagram
- You can turn off edge merges
Quality improvements:
DBE-13057: We have improved the algorithm that draws diagrams, so the names of the objects no longer overlap with relation lines.
DBE-13264: The notes are no longer lost on save.
Code editor
Search in Local History
If you are looking for a particular revision in Local History, you can 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, we introduced the option to change them back. If you prefer long tab names, uncheck the Shorten Tab Titles option.
Maximize Editor / Normalize Splits action
For a long time we had the Hide All Tool Windows action, which could be called by double clicking on a tab or pressing Shift+Ctrl+F12 . Many users treated it as a Maximize Editor action and it worked as such!
After we introduced the split mechanism, the situation became more complicated. Should this action hide the split tabs or not? So we did the following:
- 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
Now it’s 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.
- 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: as described above.
- 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. Read this post for more details.
Completion for cross-database synonyms SQL Server
Code completion for cross-database synonyms is now available.
INSERT completion and computed columns
Computed columns are taken into account when completing INSERT statements – they are not included in the suggested item.
Quality improvements
DBE-10515, DBE-2212: Objects from the schema of the current context have higher priority in the code completion list.
DBE-7781, DBE-10650: The automatic alias appears only when needed.
DBE-12018: Table qualification in JOIN completion works as expected.
DBE-12479: The priority of ASC/DESC inside an ORDER BY clause has been increased.
DBE-13341: PostgreSQL Completion in GRANT/REVOKE statements 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
DBE-3759, DBE-13364, DBE-13365: Inspections for aggregates work more precisely.
DBE-10782: ClickHouse No more false-positive alerts from the inspection that reports not-null arguments in COALESCE .
DBE-13188: Oracle PL/SQL record type fields are resolved correctly.
DBE-10550: DB2 Table aliases are 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 immediately take effect.
For SQL Server there are dedicated nodes for scalar and table functions. For PostgreSQL there is a node for trigger functions.
Separate nodes for triggers, keys, and indices
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.
Why is this useful?
- You can find an object inside one schema by using quick search.
- You can see the columns just under the table node. To do this, make sure the Show Empty Groups option is turned off.
Natural sort order for database objects
If you turn off the Sort Alphabetically option in the database explorer settings, natural sorting for objects will be applied.
Here’s what it looks like when Sort Alphabetically is off:
Here’s what it looks like when Sort Alphabetically is off:
. and when Sort Alphabetically is on:
Introspection
Native introspection CockroachDB
CockroachDB will 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. Also, role, deftype, and check constraint could not be introspected at all in the previous version. The full list of objects that are now introspected includes database, role, privilege, schema, sequence, deftype, table, view, mat view, index, column, and constraints. That partitions are not introspected yet is a known issue.
Virtual foreign keys for pg_catalog PostgreSQL
Some time ago, we announced a mechanism for creating virtual foreign keys. Now we’ve used this mechanism to cover pg_catalog with virtual foreign keys. This brings a couple of improvements.
First, JOIN completion helps you when querying system tables:
Second, you can navigate by data in system tables:
Tablespaces Oracle
We added support for tablespaces, data files, and temporary files. They are now introspected:
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 shown in the database explorer, and the DDL for their creation can 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
We recently introduced Alt+Click for additive sorting. But if you prefer using Click, you can 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, use a new action, Copy Query to Console, 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, we’ve removed the First row option. 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
DBE-12545: The size of the ORDER BY field is saved.
DBE-13055: The time zone is always shown for values with a time zone.
DBE-9814: Oracle DATE type values don’t display time if no time is set.
DBE-12679: Oracle Filtering by the DATE field is possible.
DBE-12716: DB2 Filtering by binary, blob, char for bit data, and varchar for bit data fields is possible.
Import/Export
Table link after import
When you finish an import, a link to the new table appears in the notifications.
Quality improvements
DBE-13259: Export of numeric fields no longer fails if there are non-numeric values.
DBE-11370, DBE-13139, DBE-12536: Importing became 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 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
Now when you are searching for a function, procedure, or operator, DataGrip 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. More than 1.5 mln users started using the partially localized EAP version of our language packs. Now you can enjoy the full localization experience!
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 – in the user’s home folder, inside the DataGripProjects subfolder.
Your project in DataGrip is a complex of your data sources, console and scratch files, and attached folders. They were previously stored in the configuration folder, meaning that each time you updated your IDE, the projects were copied, along with IDE settings.
This sometimes caused the data source list to become empty. This problem has been solved, and now DataGrip behaves consistently with other IDEs.
Because of errors in project migration, those who used the first EAP build might have lost their Favorites, Bookmarks, Run Configurations, or data about virtual foreign keys. To restore them, please migrate from the previous version again. The details are described here: DBE-13410.
Settings
Back and forward buttons
These buttons make it easier to navigate in the Settings window and not get lost there.
Advanced Settings
We’ve 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
A new Show Scratch Files action (found via Find Action: Cmd+Shift+A ) 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. Now you can define which operations make the Services tool window appear on your own.
Quality improvements
DBE-12079: PostgreSQL We’ve reworked the introspector. For you, the main effect of the new introspector is – no more object duplicates!
DBE-13164: No more freezing when typing JOIN statements along with using virtual foreign keys.
DBE-194931: Empty scratch files are now automatically removed.
Источник