DataGrip 2018.1.4

Hello!

This update fixes just one but an important bug: DBE-6451. User parameters work well again.

Posted in Uncategorized | 2 Comments

Copy and share data sources in IntelliJ-based IDEs

800x418_Twitter_DG_DataCopy2

Hello! In this tutorial we’re going to look at three popular use-cases:

— Duplicate a data source within one project.
— Share data sources between projects inside one IDE.
— Copy a data source from one IDE to another IDE, to another computer.

Duplicate a data source within one project

A trivial problem with a trivial solution: in the context menu of the selected data source click Duplicate or press Ctrl/Cmd+D.

Duplicate

A new data source will be created with the same properties, including the password.

Share data sources between projects inside one IDE

In IntelliJ-based IDEs a data source can be global. It means that it becomes visible from all projects you run from a particular IDE. By default, data sources are local. To make a data source global click the corresponding button in the toolbar (or the context menu).

MakeGlobal

If you want to make it local again, click the button again.

MoveToProject

Global data sources are visible in all projects you open from the same version of the same IDE. Say, if you use DataGrip 2018.1, global data sources will not be attached to projects you open in other versions of DataGrip or in IntelliJ IDEA.

Copy a data source from one IDE to another IDE, or to another computer

Global data sources can be copied via Export Settings. But what if you don’t want to export all settings? And what if you don’t use global data sources?

The first and the most convenient way to copy data sources to another IDE: select the ones you need and in the context menu choose Database tools → Copy data source to clipboard.

CopyToClipboard

In fact, an XML is copied to the clipboard like in the following example:

XML

You can send this snippet to your colleague via a messenger, or just import it to another IDE on your machine. To do this, click Add data source (+) → Import from clipboard.

ImportFromClipboard

The datasource is copied without a password, so you’ll need to input it manually. DataGrip stores passwords in the KeePass storage on Windows and in native keychains on Linux and MacOS. You can configure the IDE to store passwords in KeePass on any OS: to do this go to Settings/Preferences → Appearance and behaviour → System settings → Passwords.

Passwords

If for some reason that flow doesn’t meet your needs, here comes something for advanced users.

DataGrip, as any other IDE from JetBrains, works in the context of a project. The entity of the project is not a thing which database developers are used to, that’s why DataGrip creates a default project once you run the IDE. And you continue using this default project unless you create a new one.

The information on all data sources you have in a project is stored inside dataSources.xml file inside this project.

Where is this default project is located?

Windows
<SYSTEM DRIVE>\Users\<USER ACCOUNT NAME>\.<PRODUCT><VERSION>\config\projects\default

Linux
~/.config/projects/default
~ is an alias for the home directory, for example, /home/john.

MacOS
~/Library/Preferences/projects

If you created other projects than default, we assume you know where they are located. Anyway, if you go to File → Open Recent → Manage projects you’ll see all projects with their paths except the opened one.

So, if you open a project from another IDE, it will contain all data sources without passwords. They are stored in \.idea\dataSources.xml

dataSourcesXML

If you make any changes to this file, it will affect the data sources you use. It can be even placed under VCS to synchronize the data sources list between several users.

You might also notice the dataSources.local.xml file where DataGrip stores schema visibility settings and some other information that can vary from user to user. If a data source becomes global, the information about it is stored in the options folder which is located at the same level as the projects folder.

That’s it! Please, comment if you have questions.

Posted in Uncategorized | Leave a comment

DataGrip 2018.1.3

Hello! This is another minor update for 2018.1. Here is the list of important bug-fixes:

Oracle
DBE-3195 — Auto-completion for object types
DBE-5340 — Compiling PL/SQL code works OK
Support for:
DBE-2581 — Conditional compilation flags
DBE-6027 — SET statements with multiple clauses
DBE-6196 — INSERT ALL
DBE-6378 — JSON keyword

PostgreSQL
DBE-6301 — The bug with creating foreign keys between tables is fixed
DBE-6391 — Fields are resolved in LOOP cycle

Redshift
DBE-6336 — MAXFILESIZE support for UNLOAD

Sql Server
DBE-6325, DBE-6370 — Columns for OUTPUT are resolved
DBE-6354 — Support for ORDER BY in subqueries

H2
DBE-6367 — CTE support
DBE-6368 — DROP CASCADE support

DataGrip team

Posted in Uncategorized | 7 Comments

DataGrip 2018.1.2

Hello! This is the second minor update for 2018.1.

And here is a list of important improvements.

— Access methods support in PostgreSQL.

screen_shot_2018-04-27_at_14.34.51

Run SQL script menu option for the schema.

Screenshot-2018-04-27-15.18.22

— In the Power Save mode DataGrip shows icons.

We encourage you to use free ToolBox application to install updates. It makes it seamless!

Posted in Uncategorized | Leave a comment

DataGrip 2018.1.1 is Released!

Hello! This is the first minor update for 2018.1.

Use the Check for updates action to receive the latest update if you are working with IntelliJ DataGrip 2018.1.

If you don’t get a notification about new updates please check the Updates page in the Settings / Preferences dialog. Make sure that the Automatically check updates for option is enabled.

Another crucial fix: the scrolling in 2018.1 became laggy. No more!

And here is a list of the other improvements included in 2018.1.1

— A new action is introduced: Context menu of the object → Database tools → Modify Comment.
DBE-5479: Explain Plan works in Redshift.
DBE-5987: Now it’s possible to use \N as null text in data import.
IDEA-186636: The keystrokes aren’t lost during freezing anymore.
IDEA-188229: Clicking the Replace all option from the Replace in path dialog doesn’t cause the IDE to freeze.

Posted in Uncategorized | Leave a comment

DataGrip 2018.1

Hello,

Please give a warm welcome to our new release, DataGrip 2018.1!

Splash

We thank all of the EAPers who have helped test all the new features added in this release. Let’s take a closer look at those.

Data editor
— SQL log
IDE general enhancements
— Rename everything
— Schema switch mode
— Enhancements in Navigation
— Target is remembered when running scripts
— Quick documentation for Files
Database view
— MariaDB support
— External schemas in Redshift
— Virtual schemas in Exasol
— Events in MySQL
— Partitioned tables in PostgreSQL 10
— Datasource color affects associated files
SQL editing
— Navigate to next/previous occurrence
— Move element left or right
— Completion for file references
— CTEs in MySQL
— Folded code highlighting

Data editor SQL log

Now, while updating data you can see which particular queries DataGrip is running. We have nothing to hide!

SQLLog

IDE general enhancements

Rename everything

Starting with this version, we have challenged ourselves to be able to rename all the objects we support. Sequences in Oracle, events in MySQL, triggers in PostgreSQL, and many other objects can now be renamed by pressing Shift+F6. This works both in the database tree and in an SQL script. Remember that usages of the object in other scripts will also be renamed.

Triggers

Schema switch mode

Now you can tell DataGrip how to switch schemas.

SwitchSchema

Automatic: DataGrip can switch schemas during internal operations when defining the context. This is the default behavior for all databases except PostgreSQL.
Manual: DataGrip cannot switch schemas during internal operations when defining the context. However, you can switch them manually via the switcher in the top-right corner. This is the default behavior for PostgreSQL.
Disabled: If you work with pg_bouncer, no more wildcat switches!

Navigation
We added an option called Prefer data editor over DDL editor.

Navigation

This option affects:
— Navigation to the table/view by Ctrl+N/Cmd+O.
— Navigation to the column by Shift+Ctrl/Cmd+Alt+N.
— Double-clicking on the table/view or column in the database tree view.
‘Navigate references to DDL editor’ is now called Prefer database view instead of DDL editor. As you probably know, it defines where you’ll be taken when you click Navigate to declaration (Ctrl/Cmd+B or Ctrl+Click) from the SQL.
We’ve merged two navigation actions: Go to class and Go to table.

EnterCalssName

In DataGrip, you can now navigate to classes if you use any of the other supported languages.
In other JetBrains IDEs, you can finally see database objects here like tables, stored procedures, etc. Remember that there’s a filter by language.
Running scripts

Now when you run the file against a data source, your choice is remembered for further runs.

Execute

Quick documentation for files

FileQuickDoc
We added quick docs for files. For example, now it’s much easier to know the file size. But that’s not all!

Database view

We’ve added MariaDB to the list of supported databases.

MariaDB

DataGrip now supports external schemas in Redshift and virtual schemas in Exasol.

ExtrenalObjects

Events in MySQL are shown in the database tree. Source code generation is also available.

Events

DataGrip now supports partitioned tables in PostgreSQL 10.

Partitions

Data source color affects console files in the Files pane.

Consoles

SQL editing

Now DataGrip lets you navigate to the next or previous identifier occurrence by using two shortcuts, Alt + Wheel down and Alt + Wheel up. (Or, enter ‘highlighted element usage’ in Find Action.) Before, you could only navigate to the next text occurrence. It should be noted that text occurrence and reference are not always the same.

GoToUsage

Another new action in DataGrip is Move element left or right. This works for different kinds of lists including parameters inside functions, fields in INSERT statement, and the column list. Note that it doesn’t spoil the comma while working with the column list, while Move Line would.

MoveElements

SQLite commands used to spoil highlighting. No more.

SQLiteCommands

Completion for file references now works for Oracle and Exasol.

FileCompletion

Common table expressions are supported in MySQL.

CTE

The Duplicate entire lines action now works at the end of the file as well. If you weren’t aware of what this action does, it duplicates all selected lines adding a line break before each one. In many cases, it’s much handier than just using Duplicate (Ctrl+Cmd/D).

Duel

The IDE now highlights the folded code regions that contain errors or warnings, and colors such blocks according to their validation status. The folded code also will be highlighted if it contains matching occurrences for the search results.

FoldingHighlights

Other

Features
— In the Replace in Path window, the IDE now lets you preview a regex replacement.
— When you search through the current file, the IDE now highlights folded code regions if they contain the matching occurrences.
— The REST client plugin is now available.
— Code formatter doesn’t change keywords casing by default.

Fixes
DBE-397: We don’t use driver-level read-only mode anymore. This will let you run safe statements that don’t begin with “s”.
DBE-5969: No error is raised when inserting a row with all default values.
DBE-5999: The ability to sort items in structure pane is added.
DBE-2102: Several fixes are delivered concerning default constraints in SQL Server. Now it’s possible to alter and delete them.
DBE-5968: Sybase shows the correct lengths for nchar, nvarchar, unichar, and univarchar types.
DBE-4962: Cascade rules of foreign keys are now correctly displayed for SQL Server.
DBE-6028: Code folding works with CTEs.
IDEA-124160: Now, the Search Everywhere pop-up receives focus.

To try these goodies out, get your 30-day trial of DataGrip today!
We’re always listening to your feedback on twitter, in our forum, and in the issue tracker. Rant, rave, and give us your improvement suggestions!
Your DataGrip Team
_
JetBrains
The Drive to Develop

Posted in Uncategorized | 8 Comments

DataGrip 2018.1 Release candidate

Hello! Here is our Release Candidate for 2018.1!

DataGrip_splash_2018_1_RC_preview

A few more fixes in this build:

DBE-6115: Scroll from editor works if horizontal split is used.
DBE-3548: The sequence start number is correct in PostgreSQL.
DBE-6104: Drop multiple columns works in H2.
DBE-5081: The REST client plugin is now available.
DBE-3260: Default values are added in the SSH configuration for data sources.

The release is coming next week!

DataGrip team.

Posted in Uncategorized | Leave a comment

DataGrip 2018.1 EAP 3

DataGrip 2018.1 EAP 3

Hello! Here is the new EAP build for DataGrip 2018.1.

Rename everything

From this version, we have challenged ourselves to be able to rename all the objects we support. Sequences in Oracle, events in MySQL, triggers in PostgreSQL and many other objects now can be renamed by pressing Shift+F6, regardless of whether it is done in the database tree or in the SQL script. Remember, that usages of the object in other scripts will also be renamed.

Triggers

Enhancements in Navigation

We added an option called Prefer data editor over DDL editor.

Navigation

This option affects:
— Navigation to the table/view by Ctrl+Т/Cmd+O.
— Navigation to the column by Shift+Ctrl/Cmd+Alt+N.
— Double-clicking on the table/view or column in the database tree view.

Navigate references to DDL editor is now called Prefer database view instead of DDL editor. As you know, it defines where you’ll be taken to when you click Navigate to declaration (Ctrl/Cmd+B or Ctrl+Click) from the SQL.

Important fixes:

DBE-397: We don’t use driver-level read-only mode anymore. It will let you run safe statements that don’t begin with “s” symbol.
DBE-6042: Support for partitioned tables in PostgreSQL.

That’s about it! Thank you in advance for trying our EAP builds.

Your DataGrip Team.

Posted in Uncategorized | Leave a comment

DataGrip 2018.1 EAP 2

DataGrip 2018.1 EAP 2

It’s time for a new EAP build for DataGrip 2018.1. Let’s have a look at what it brings.

Now when you run the file against a data source, your choice is remembered for further runnings.

Execute

Data source color affects console files in the Files pane.

Consoles

Also, there are several important bug-fixes:

DBE-5960: Window functions are supported for MySQL.
DBE-5969: No more error when inserting a row with all default values.
DBE-5999: The ability to sort items in structure pane is added.
DBE-2102: Several fixes are delivered connected with default constraints in SQL Server. Now it’s possible to alter and delete them.
DBE-5968: Sybase shows correct length for nchar, nvarchar, unichar and univarchar types.
DBE-4962: Cascade rules of foreign keys are now correctly displayed for SQL Server.
DBE-6028: Code folding works with CTEs.

That’s about it! Thank you in advance for trying our EAP builds.
Your DataGrip Team.

Posted in Uncategorized | Leave a comment

DataGrip 2017.3.7

Hi! Another minor update for 2017.3:

DBE-5904: The names of folders with console files don’t contain GUIDs anymore.
— Fixed additional issues with scrolling diagrams.
— Built-in SSH executable now supports strong cryptographic algorithms.

Your DataGrip Team
JetBrains
The Drive to Develop

Posted in Uncategorized | Leave a comment