Hot, summer DataGrip 2018.2

    Hello! This post is about what's new in DataGrip 2018.2 . From this version, database support is available in CLion and AppCode . In WebStorm, you can enable it if you are using DataGrip in parallel.

    image

    - Log of all requests
    - New code formatter
    - Running stored procedures
    - Migrating source codes
    - Query plan in chart form
    - Editing SQL
    - Data editor
    - Improvements in user interface


    Log all requests


    All queries that DataGrip launches are now displayed in the Output panel of each console. Both user requests and internal ones are included here.

    image

    Everything that runs in DataGrip gets into a separate log file.

    image

    To open it, use Help -> Show SQL log .

    image

    New code formatter


    Thanks to everyone who shared ideas about styles in SQL, we tried to accommodate your wishes. We have a lot to add, so we will be happy if you share styles that we have not covered.

    image

    You can create multiple code styles in DataGrip.

    image

    Now you can attach a style to each data source.

    image

    Run stored procedures


    This thing has been waiting for hardcore enterprises with procedures for three hundred arguments :) Now it works for Oracle, PostgreSQL and for SQL Server only in DataGrip, but in version 2018.2.1 other IDEs will catch up.
    To run the procedure, select Execute from the context menu.

    image

    Paste the values ​​of the desired parameters into the generated code.

    image

    In this example, for Oracle, we display the output through the jbdc driver. Therefore, we need this code with questions.
    In the more classic case there is no output, then often simple code is enough. This is an example for PostgreSQL.

    image

    The procedure can still be started by clicking on the green arrow in the toolbar of the source editor.

    Source migration


    Do not think about CREATE OR REPLACE and so on, just change in the source code what you need. On the left panel shows the changes, you can see the difference with the server version. To submit changes to the database, click Submit.

    image

    A code will be generated. Click OK to execute it.

    image

    Query Plan as Chart


    Someone is more comfortable than a tree. We did :)

    image

    To open a chart, locate the button on the toolbar Show Visualization , after being launched Explain Tool Plan .

    image

    SQL editing


    Context information


    When dealing with the source of a large procedure, it is useful to remind yourself of the context - inside what the cursor is: which procedure or which package. Use Alt + Q ( Shift + Ctrl + Q for OSX ) for this, the context will be displayed above.

    image

    Jump over parentheses or quotes by pressing Tab.


    This came from other IDEs: when you enter function parameters, pressing Tab sends the cursor by quotation marks or parentheses.

    image

    Turn it on here: Settings / Preferences | Editor | General | Smart keys | Select Jump outside closing brackets / quote with Tab.

    image

    Data editor


    Comments on tips columns


    There is nothing to explain here :)

    image

    Number of selected lines


    Previously, only the number of selected fields was displayed below. Added lines.

    image

    Interface improvements


    Touchpad support


    If you own a Mac Book Pro with a touchpad, the Execute button will appear on it.

    image

    But you can add any action. To do this, go to Preferences → Appearance & Behavior → Menus and Toolbars → Touch Bar .

    image

    Driver-based data source


    Such sources have become easier to create: there is a Driver and Data Source item in the drop-down list for creating a source.

    image

    Finding the shortcut from Find Action


    This thing is a long time, but it did not work for some layouts and schemes hot. Now it works everywhere :) So, on any action, you can press Alt + Enter and assign a keyboard shortcut.

    image

    Run the script on the diagram


    Previously, it was necessary to do this: find the script file and run it on the necessary base. Now you can do the opposite: the Run SQL script item appeared in the context menu of the schema .

    image

    Dialect and attached console in the toolbar


    It became easier to work with files: select the desired dialect from the toolbar and attach the console.

    image

    Dark hats windows


    To do this for macOS, enable Preferences | Appearance & Behavior | Appearance | Use dark window headers .

    image

    We will be glad to questions in the comments and do not forget to look at the Features , suddenly did not know something?

    DataGrip command.

    Also popular now: