What's New in DataGrip 2018.1

    Hello! In this release cycle, some improvements have appeared in minor updates. But, since we do not write about them on Habré, I will tell in this post about everything new from the moment of the previous release.

    image


    Data editor


    We have added a query log that the data editor sends to the database. ProgerMan requested a couple of releases back in the comments :)

    image

    Running queries


    Read-only mode


    We have a “Read-only” flag in the properties of the data source. He turned on this mode at the jdbc driver level. But read-only is implemented in different drivers with reservations:

    - In SQLite, you cannot switch it for an already created connection.
    - In MySQL, it does not allow you to run queries that start not with the “S” character.
    - It does not work at all in Oracle, SQL Server and some other databases :)

    image

    Therefore, we made our own read-only mode. It is included with what is implemented at the driver level. For MySQL and SQLite , we do not enable driver-level mode.

    Here is what our read-only does:

    It highlights DDL and DML requests, warning about their insecurity.

    image

    If you still run this query, a warning appears. For the most persistent, we show the Execute button on the right side of the warning.

    image

    We are also building a tree of calls to functions and procedures, and at whatever level of nesting your function leads to modifications, we will warn about this.

    image

    In combination with the coloring of data sources, it is now difficult to mix up the test database with the live one :) Since 2018.1, the files associated with it are also colored in the color of the data source.

    image

    Running scripts


    A small pleasant improvement: the data source on which the script was run from the context menu is remembered and set by default for subsequent launches of other scripts.

    image

    General improvements


    Circuit switching


    Specify how DataGrip will switch circuits.

    image

    - Automatic . The environment itself will switch circuits, if necessary, to determine the correct context. Say, if you rename an object not in the current scheme, we will switch the scheme for the internal operation.
    - Manual . Schemes are switched only by the user in the upper right corner of the console.
    - Disabled . The switch at the top will not work. It will be useful for extra protection when using pg_bouncer.

    Rename objects


    With this release, we officially support the renaming of all objects that we introspect. Rename triggers in PostgreSQL, events in MySQL, sequences in Oracle and many other objects by clicking on them Sift + F6 in a tree or in an SQL script.

    image

    Navigation


    A new setting has appeared: Prefer data editor over DDL editor. It affects:

    - Navigation to the table or view by Ctrl + N / Сmd + O
    - Navigation to the column by Shift + Ctrl + Alt + N / Shift + Cmd + Alt + O
    - Double-click on the table or column in the database tree.
    If the checkbox is checked, in these cases you will see the data editor. If not, the source code of the object.

    image

    Navigate references to DDL editor is renamed to Prefer database view instead of DDL editor. This option affects the Navigate to declaration action ( Ctrl + B or Ctrl + Click ) from SQL.

    If the checkbox is checked, the object is highlighted in the database tree. If not, the source code of the object will open.

    We combined two actions - Go to table and Go to class ( Ctrl + N / Сmd + O ).

    image

    - In DataGrip, you can specify the class name if you use other supported languages.
    - In other IntelliJ database-enabled IDEs , you can specify the name of the database object and go to it.

    Documentation for files


    This is surprising, but before, our IDEs could not quickly find out the file size. Therefore, we added the basic file attributes to the documentation - call it by Ctrl + Q or F1 .

    image

    Images in the background


    For images in the background ( Preferences / Settings → Appearance → Background images ) added alignment and stretch settings.

    image

    Database tree


    Supported by MariaDB .

    image

    Added events for MySQL.

    image

    Supported external circuits in Redshift and virtual circuits in Exasol .

    image

    For PostgreSQL 10, partitioned tables were supported.

    image

    SQL editor


    Go to the next and previous use of the object in the script by Alt + Mouse Wheel . Or type 'highlighted element usage' in the Find Action ( Ctrl + Shift + A ).

    image

    Another new action: Move element left or right . It works in different lists, for example, fields in INSERT or columns in SELECT. Even if you like the columns to be written one after another, this thing will come in handy because there will be no comma problems. And if you use Move Line - they will.

    image

    For Oracle and Exasol , autocompletion now works for file names.

    image

    Supported CTE in MySQL.

    image

    The rolled-up code is now highlighted: for example, if it contains errors or text search results.

    image

    And this fix is inspired by the comment on Habré : the little-known action Duplicate Entire Lines now works at the end of the file.

    image

    Every


    - SQLite commands no longer spoil code highlighting.
    - Supported the following types in PostgreSQL: point, polygon, line, lseg, box, path, circle, pg_lsn, tsquery, tsvector .
    - Code formatting does not change the default case of keywords.
    - Built-in SSH-executable supports cryptographic algorithms.
    - DataGrip, like our other IDEs, is now available as a snap package.
    - In the dialogue Replace in Path supported the preview of the results of regular expressions.
    - The REST client plugin is available for installation.

    All! And as always: download here , report bugs here , and we also respond toforum , on Twitter and here in the comments.

    Thanks!

    Team DataGrip and JetBrains.

    Also popular now: