Text-to-SQL In-Editor Diff, AI Assistant Actions for Handling SQL Errors, Grid UI Improvements, and More!
We have implemented a couple of useful actions for handling SQL query execution errors with AI Assistant. Now, for each error message, DataGrip shows two actions on the far right-hand side of the error message: Explain with AI and Fix with AI.
Explain with AI opens the AI chat, sends an automatic prompt, and gives you AI Assistant’s explanation of the error.
Fix with AI generates a fix for the query execution error in the editor.
We have improved the experience of working with AI Assistant in the editor.
Now, when you ask AI Assistant to do something with a chunk of code, the editor contains a diff with both the original and the generated code. AI Assistant’s suggestions are highlighted with a different color and marked with the Revert button in the gutter.
You can also edit the resulting query yourself in the diff. Your changes are highlighted the same way.
For example, you can ask AI Assistant to retrieve more data with a query and then add an ORDER BY
clause to the generated result.
These two new actions work similarly to the Fix SQL Problem Under Caret and Explain SQL Problem Under Caret intention actions.
This feature requires attaching the database schema to suggest proper explanations and fixes.
To make grid paging more noticeable in the data editor, we have moved the control from the toolbar to the bottom center of the data editor.
To move this control back to the toolbar, open the IDE settings, go to Database | Data Editor and Viewer, scroll to Position of the grid pagination control, and select Data editor toolbar.
Previously, the width of the in-editor results grid was limited. Now the grid automatically adjusts to the full width of your editor, allowing you to view more data.
By default, DataGrip will now automatically highlight all instances of the text you select within a file. This makes it easier to track where your selected text appears throughout your code.
JOIN
clauses
In certain cases, running a query that contains an excessive number of
JOIN
clauses is not recommended due to performance degradation.
The editor can now identify and highlight such queries.
You can enable this inspection in the IDE settings. To do so, navigate to Editor | Inspections, expand the SQL section, and select Excessive JOIN count.
We have improved support for BigQuery table-valued functions (TVFs). Now DataGrip properly detects both the TVFs and their return columns.
DataGrip now supports fragment introspection.
Previously, the introspector could perform only a full introspection of schemas in the MySQL or MariaDB databases but not refresh the metadata of a single object. Every time a DDL statement was executed in the console and that execution could modify an object in the database schema, the IDE would start a full introspection of the entire schema. This was time-consuming and often disrupted the workflow.
Now, DataGrip can analyze a DDL statement, determine which objects could have been affected by it, and refresh only those objects.
If you select a single item in the database explorer and call the Refresh action, only that specific object will be refreshed, instead of the entire schema as before.
ST_SRID
function is now supported.
GRANT
statements are now supported.
block_encryption_mode
system variable is now supported.
SET ROLE
and SET DEFAULT ROLE
statements are
now supported.
OPTION
keyword in CURSOR
declarations is now
supported.
USING
has been added.
NATURAL JOIN
has been added.
PARTITION
clauses works as expected.
BEGIN
is now supported.
ON COMMIT PRESERVE DEFINITION
is now supported.
CURSOR
declared in package headers works as intended.