We open EAP for DataGrip 2016.3

Hello! As you know, there is a good tradition to let you try new product features before the official release, so today meet DataGrip 2106.3 Early Access Program.

intro

This version features integration with dump tools, several new inspections, the possibility to edit several fields at the same time, new completions, and many other enhancements. Let’s take a closer look at them:

Drivers

Now DataGrip detects if an old driver is in use and offers you to update it:

updatedrivers

Table Editor

Now you can edit several fields at once — just select them and begin to type. Of course, it works only if the columns you are editing are not unique and have the same type.

mordor-1

The familiar expand selection action by Ctrl+W (Alt+Up for OSX) now works in the data grid as well: first, a field is selected, then the column of the active field, then the row of the active field and finally, the whole grid.

dataselection

External dump tools integration

We integrated DataGrip with mysqldump and pg_dump. To dump the objects, use the Dump with… option from the context menu.

dumpcontext

This is what the dialogue window for MySQL looks like:

dumpmysql

And here is the one for PostgreSQL. Note that in both cases you can use completion for the console parameters.

dumppg

Code completion

Now if you use JOIN USING, DataGrip offers you only the field names common for both tables.

usingcompletion

The INSERT statement completion offers you not only the list of all fields but also the list of fields which have no default value.

insertnotdefault

Inspections

The IDE will warn you about the unused variable or parameter in the function.

unusedvar

Another inspection will let you know if there is a different number of columns in queries used in set operators (UNION, INTERSECT and EXCEPT).

unioninspection

Introspect missing schemas and databases

The new intention action offers you to introspect the schema or databases right from the editor if DataGrip has no metadata on them yet.

instrospectmissing

Find usages in PostgreSQL

Find Usages now handles positional parameters references in PostgreSQL: $1 will be treated as the first parameter’s usage and so on.

usagesofbucks

FiraCode font

All IntelliJ-based products bundle FiraCode font so you can use it to have ligatures in your code.

firacode

Other enhancements

  • SQL Server 2016 grammar support
  • External tables parsing in Oracle
  • Better operators parsing in PostgreSQL
  • SELF resolving in Oracle

That’s it! Your feedback is welcome in our twitter, forum and the issue tracker. Let us know what you think about 2016.3!

Your DataGrip Team
_
JetBrains
The Drive to Develop

Posted in Uncategorized | 2 Comments

DataGrip 2016.2.3: “Redshift shows all objects now” and other fixes.

Hello! We are thankful to the Amazon Redshift users for reporting the issue with DataGrip not showing the objects contained in schemas in the Database view – the problem has been fixed and we are delivering the new minor update as soon as we can.

redshift

Other important fixes of this update are:

Now DataGrip shows the correct number of rows if the PageSize parameter is set to 0.
DBE-3076

Exporting the result-set affects the whole set, not only one page.
DBE-3091

Fixed bug in comparing schemas with different names.
DBE-2328

The Flip intention action (did you know about it, by the way?) in functions has been fixed.
DBE-3105

flip

Update your version of DataGrip using the Check For Updates… menu or just download a new version from our web-site. Please, keep reporting problems to us if there are any.

Your DataGrip Team
JetBrains
The Drive to Develop

Posted in Minor updates | Leave a comment

DataGrip 2016.2.2 is Out

Hello! Another  minor update for 2016.2 release. Users experienced some problems with database synchronizing, we’ve fixed several bugs with this, but not only. The most important issues are:

We have fixed the bugs with freezing during the introspection.
DBE-2921DBE-2867

There was an error with incorrect results on the other pages of the result-set, we’ve fixed them.
DBE-3012DBE-3032

DataGrip doesn’t retry failed command  after detecting connection problems.
DBE-569

Schema comparing tool now understands if it needs to create the table or alter it.
DBE-2794

Fixed bug with Snowflake database introspection.
DBE-2935

Please update your version of DataGrip from Check For Updates… menu or just download a new version from our web-site. Please, keep reporting problems to us if there are any.

Your DataGrip Team
JetBrains
The Drive to Develop

Posted in Minor updates | 2 Comments

The first minor update for DataGrip 2016.2

Hi! Thank you for your feedback about our 2016.2 release. In this minor update several important bugs are fixed:

DBE-2956: Columns became not visible at attempt to edit them
DBE-2612: Query results font is not increased in Presentation Mode 
DBE-2941: Cannot export query results to CSV or copy them to clipboard
DBE-2903: Release upgrade asks for the license

DBE-2917: Don’t replace types in PostgreSQL to equal ones
DBE-2909: Cannot handle PostgreSQL functions with default variadic parameters
DBE-2912DataGrip doesn’t save parameters for a function in PostgreSQL

Please update your version of DataGrip from Check For Updates… menu or just download a new version from our web-site. Please, keep reporting problems to us if there are any.

Your DataGrip Team
JetBrains
The Drive to Develop

 

Posted in Minor updates | 6 Comments

DataGrip 2016.2 is Out!

Hello, everybody! We are excited to release DataGrip 2016.2 and this version brings many interesting features. As usual, we thank all our early adopters who helped us make the IDE better during this release cycle.

SplashPreview

What is in DataGrip 2016.2? tl;dr: UI for importing CSV files, JSON and XML support in literals, regular expressions checking, dynamic SQL support, completion in tables, keyboard layout aware completion, recompile packages in Oracle, search path support for PostgreSQL and much more. Let’s look closer.

Database view

Some changes happened to the instrospector. We’ve replaced the way schemas are selected from the tab in Properties, so now you will find all schemas of the server by clicking “More Schemas…” in the database view. Choose the schemas you want to see here and hide any you don’t need from the context menu. Now you need to refresh your data source if you’ve updated from the previous version. Remember, that only schemas added to the database tree are available in code completion.

MoreSchemas

Import CSV

Many of you told us that the way of importing CSV files (with the help of Edit As Table) was not very convenient. You asked, we delivered! Enjoy a dedicated UI for importing CSV, TSV (well, DSV) files to the database.

Click the schema you wish to import data to, and choose Import From File… from the context menu. Then choose the CSV file where your data is.

ImportCSVBrowser

You will see the Import dialog window. The left-hand panel is for format specification: choose the delimiter, whether the first row is a header (the separate format options are available for it), and specify if you have quoted values in the file.

ImportCSVDialog

On the right-hand side, you see a frame describing the table to be created and a result data preview. Press Delete to remove a column from the result. If you want to import data to an existing table, just use the context menu of this particular table to choose Import From File…

What happens if there are errors in the file? Write error records to file option is available. The import process will not be interrupted, but all the wrong lines will be recorded to this file.

Language Injections

This feature lets you treat string literals as live code written in other languages (like XML, JSON, any SQL dialect or regular expressions), including formatting, highlighting, usage search, completion, and even refactoring.

Language is auto-injected into a literal when DataGrip understands the type of the string inside. For example, if you are working with values from JSON columns, they will be treated as such.

InjectionOnInsert

Language can also be injected when you’re specifying a column default value. In the following case it’s XML, which makes all the XML-related features available there: rename elements by Ctrl(Cmd)+F6, find usages by Alt+F7, and enjoy completion for attribute names. For more information about XML support you can have, read this IntelliJ IDEA help page. DataGrip and IntelliJ IDEA share a common platform, everything described there will work in DataGrip just as well.

DefaultInjection

By default, there are only two predefined injection types: JSON and XML. However, it’s really simple to create your own injections: just press Alt+Enter and then select Inject By Type. There are many languages you can inject. Notice that quick search is available here.

CustomDATAInject

You will be offered to create a custom type pattern that simplifies the use of injections; for instance, you can configure it to inject XML into any type ending with DATA. You can use regular expressions to define the injection patterns. There’s RegExp assistance, too: Alt+Enter invokes the Check RegExp feature.

CheckRegexp

Your pattern will be added to the list in Settings/Preferences → Editor → Language Injections.

InjectionOptions

Since it’s possible to inject languages into any string in the SQL code, we can use Check RegExp if we’re inserting, for example, a value for the Visa card pattern.

Regexp

Did you see this the ‘was temporarily injected’ tooltip? If you want to have the injection whenever you edit a particular piece of code, comment it with “language=” like on the following screenshot. In it is another important example — the use of DynamicSQL that provides coding assistance for the injected fragment.

DynamicSQL

Table Editor

Completion for values in table is available via Ctrl+Space. It looks through all the values in the column and offers you a list of possible matches.  Remember, that if you need completion by used words in the editor (all open consoles), use Alt+/.

CompletionInTableEditor

Some improvements have been made in PostgreSQL: now you can modify different range types.

RangeEditing

And types with time zones.

TimeZonesEditing

We’ve added actions for resizing columns: use Ctrl(Cmd)+Shift+Left/Right  You can resize several columns at the same time. Ctrl(Cmd)+Shift+Up stands for the default size. Notice, that selection of the whole row was invoked by Shift+Space, like in Excel.

ColumnSize

Query Console

Just like any other IntelliJ-Platform-based IDE, DataGrip editor now officially supports fonts with programming ligatures. To enable ligatures, go to the Settings → Editor → Colors & Fonts → Font, specify a font that supports ligatures, e.g. FiraCode, Hasklig, Monoid or PragmataPro (the font has to be installed) and select the Enable font ligatures option.

EnableLigatures

And here you are!

Ligatures

A small enhancement for those who use many languages, IntelliJ-based IDEs including DataGrip now understand what you mean, even if you forgot to switch the language of input.

RussianCompletion

Surround action doesn’t ruin multi-carets anymore. Also, we’ve added surround with function which means that the caret will be placed before the brackets, not after: put the name of the function here. Notice, you can just type “bion” to put get_AuthorByIdOrName function.

SurroundByFunc

DataGrip now supports search path in PostgreSQL, meaning you can add schemas one by one in the switcher of the console. The console has a list of schemas to look in. If there are two tables with the same name in different schemas, the first one will be used. Thus, the order is important: move schemas in the search path with the mouse or Alt+Arrows.

SearchPath

Connectivity

We’ve added completion for database names in the connection dialog. Make sure you’re logged in to the server, and then press Ctrl(Cmd)+Space.

DatabaseCompletion

For those who had problems connecting to SQL Serverwe published a small tutorial covering the most common issues.

Recompile objects in Oracle

We’ve fixed some bugs in recompiling packages and added a way to recompile any DB object. Well, it has to be recompilable, of course, like procedures, views, types, triggers, etc. There is a possibility to recompile only invalid objects in the group, too.

RecompilePackages

Dumping Tables

Now you can dump multiple tables and even the entire schema, which means that any data (not only result-sets), can be exported to CSV, JSON or a list of INSERT/UPDATE statements.

DumpSchemas

We are working on dumping improvements with using of external tools like mysqldump and pg_dump. If you have thoughts or demands, please tweet at us or create feature requests in our issue tracker.

Background Images

A small new feature will help you make DataGrip look different: set any image as the background of your IDE. Add the folder with the picture to the Files panel, and then choose Set Background Image from the context menu. Or just choose Set Background Image from Find Action by Ctrl(Cmd) + Shift + A.

BackgroundImages

And that’s not all! A short list of other improvements:

  • Copying SSH and SSL settings  copies the password as well.
  • *.sql files are associated with DataGrip on Windows and also can be opened from the “Open with” context menu.
  • Fixed DBE-569: important bug with timed out connection on MySQL.
  • The Database tool window now provides the option Auto-scroll from Editor.
  • Eras support in Date types for PostgreSQL
  • If you use auto-completion, in case of identical names DataGrip will qualify the name of the object automatically.
  • Go to source works from the preview in Find in path.
  • Inserting the selected keyword in completion by “;” and “,” doesn’t insert a space anymore.
  • CTE support has been improved — we parse it even not finished.
  • Aggregate functions in ORDER BY are not highlighted as errors.
  • The same for PREVIOUS VALUE in DB2.
  • Test connection UI has been improved.

Now is the moment to try all this! Get your 30-day trial of DataGrip today if you haven’t before, or just test new features if you use DataGrip. And while you are trying 2016.2 we are already working on 2016.3 expected this fall. Stay in touch!

Your DataGrip Team

JetBrains
The Drive to Develop

Posted in Releases | Tagged , , , , , , | 2 Comments

Long-awaited import improvements in the new EAP build, and a little bit more

We are rapidly approaching the 2016.2 release in July. In the meantime, for those who are impatient to try the new features, we’ve got a new EAP build.

Lots of people told us that the current way of importing CSV files (with the help of Edit As Table) was not very convenient. You asked, we delivered! Enjoy a dedicated UI for importing CSV, TSV (well, DSV) files to the database.

Click the schema you want import data to, and choose Import From File… from the context menu. Then choose the CSV file where your data is.

ImportBrowser

You will see the Import dialog window. The left-hand panel is for format specification: choose the delimiter, whether the first row is a header (the separate format options are available for it), and specify if you have quoted values in the file.

On the right-hand side, you see a frame describing the table to be created and a result data preview. Press Delete to remove a column from the result. If you wish to import data to an existing table, just use the context menu of this particular table to choose Import From File…

OK, but what happens if there are errors in the file? Write error records to file option is available. The import process will not be interrupted, but all the wrong lines will be recorded to this file.

ImportCSVWindow

What else?

A couple of small things: select rows with Shift+Space like in Excel.

SelectRow

Also, a very annoying bug has been fixed: foreign keys previously pointed to nowhere once you had renamed the table it pointed to.

ForeignKeyBug

Now all is OK. Many thanks to all who report bugs — keep up the good work!

Your DataGrip Team
JetBrains
The Drive to Develop

Posted in EAP | Tagged , | 5 Comments

DataGrip 2016.2 New EAP build: Language injections, ligatures, recompile in Oracle

Hello! We’ve prepared a new build for our early adopters. Here’s a list of the most interesting things you can find inside.

Language Injections

Quite possibly the most important feature of this build, it lets you treat string literals as live code written in other languages (like XML, JSON, any SQL dialect or even regular expressions), including formatting, highlighting, usage search, completion, and even refactoring.

Let’s have a closer look at how this feature is useful when you’re working with DataGrip.

Language is auto-injected into a literal when DataGrip is 100% positive of the nature of its contents. For example, if you are working with values from JSON columns, they will be treated as such.

InjectionInsert

Language can also be injected when you’re specifying a column default value. In the following case it’s XML, which makes all the XML-related features available there: rename elements by Ctrl/Cmd+F6, find usages by Alt+F7, and enjoy completion for attribute names. For more information about XML support you can have, read this IntelliJ IDEA help page. DataGrip and IntelliJ IDEA share a common platform, everything described there will work in DataGrip just as well.

InjectionDefault

By default, there are only two predefined injection types: JSON and XML. However, it’s really simple to create your own injections: just press Alt+Enter and then select Inject By Type.

InjectByType

There are many languages you can inject.

InjectionCustom

You will be offered to create a custom type pattern that simplifies the use of injections, for instance, you can configure it to inject XML into any field ending with DATA. You can use regular expressions to define the injection patterns. There’s RegExp assistance, too: Alt+Enter invokes the Check RegExp feature.

RegexpCheck

Your pattern will be added to the list in Settings/Preferences → Editor → Language Injections.

InjectionPrefences

Since it’s possible to inject languages into any string in the SQL code, we can use Check RegExp if we’re inserting a value for the MasterCard pattern.

ezgif-700261300

Did you see this the ‘was temporarily injected’ tooltip? If you want to have the injection whenever you edit a particular piece of code, comment it with “language=” like on the following screenshot. In it is another important example — the use of DynamicSQL that provides coding assistance for the injected fragment.

InjectionDynamicSQL

Dumping Tables

Now you can dump multiple tables and even the entire schema, which means that any data (not only result-sets), can be exported to CSV, JSON or a list of INSERT/UPDATE statements.

DumpDataMenu

Recompile objects in Oracle

We’ve fixed some bugs in recompiling packages and added a way to recompile any DB object. Well, it has to be recompilable, of course, like procedures, views, types, triggers, etc. There is a possibility to recompile only invalid objects in the group, too.

Recompile_new

Ligatures

Just like any other IntelliJ-Platform-based IDE, DataGrip editor now officially supports fonts with programming ligatures. To enable ligatures, go to the Settings → Editor → Colors & Fonts → Font, specify a font that supports ligatures, e.g. FiraCode, Hasklig, Monoid or PragmataPro (the font has to be installed) and select the Enable font ligatures option.

LigaturesOptions

And here you are!

LigaturesFont

That’s all for today. Stay tuned!

DataGrip Team

The Drive to Develop

Posted in EAP | Tagged , , , , , , | Leave a comment

Connecting DataGrip to MS SQL Server

Some specific needs of SQL developers like connecting to SQL Server from OSX and even using Windows authentication can be covered by DataGrip. Since releasing DataGrip, we’ve received lots of comments about connecting to SQL Server. It appears it’s not straightforward as with other databases, requiring a couple of extra steps beforehand. Here is a small guide describing the main problems you may face and how to solve them.

First, ensure that important options in SQL Server Configuration Manager are configured correctly. Make sure the SQL Server Browser is running:

SQLServer Browser

TCP/IP connections need to be enabled:

tcp

If you end up changing anything, restart the server. For most situations, this will resolve connection problems, your server will accept remote connections and you are ready to go. If you still have problems, it could be that TCP port needs to be adjusted or the remote connection to SQL server needs to be enabled in its settings. This tutorial will walk you through it, but we’ll also describe the process here.

Invoke Database View by pressing Alt/Cmd+1 and create a new data source with the appropriate driver. If you use a Microsoft driver, note that it supports SQL Server 2008 and later versions. Here we’ll assume it’s the jTds driver.

NewDataSource

If you have no driver, download it by clicking the link.

Download drivers

Then enter the host name, the instance name and the credentials. Remember that DataGrip offers completion for host, instance and database names (Ctrl/Cmd+Space), but the name of the database is optional. For those who are used to the SSMS interface, let’s compare the connection windows.

Connect SSMS Compare

If the port number conflicts with the instance name, in the jTds driver, the instance name will take precedence over the port number, while the opposite will happen in the Microsoft driver. To avoid confusion, simply remove the port number. If you strongly wish to specify the port number, click the Auto-set button (located to the right of the Instance field) to have the port number set automatically. But remember that the port number can be changed in case you restart the server.

PortConflict

If you need to use Windows authentication, only Microsoft driver will let you do it.

Windows auth

The other way to connect to the server with Windows authentication is to use domain authentication of jTds driver, which lets you connect from any other machine. What is notable, it works on any OS. To do this, go to the Advanced tab of data source properties, set USENTLMV2 to true and specify the server name in the DOMAIN field.

AdvancedForWindows

Then enter your Windows credentials in user/password fields and click Test Connection.

If you want to check which particular databases or schemas are shown in the database view, go to the Schemas tab in Data source properties:

SchemasTab

In case you are already using DataGrip 2016.2 EAP, use More Schemas… in the database view:

MoreSChemas

All selected databases will appear in the database view. This is how it looks in SQL Server Management Studio:

Databases

And here’s how it looks in DataGrip:

ManyDBSCurrent

That’s it! If you are experiencing any other problems, please tweet @ us or create an issue in our youtrack.

Your DataGrip Team

The Drive to Develop

Posted in Features | Tagged | 1 Comment

We Open DataGrip 2016.2 EAP

We are glad to open the EAP (Early Access Program) for DataGrip 2016.2. As usual, it means that you can try new features before the official release. Read on to find out what’s new, improved and already available.

When you install DataGrip on Windows, you will be offered to associate *.sql files with DataGrip. Also, it is possible to open *.sql files from the “Open with” context menu:

Installer

We’ve added completion for database names in the connection dialog. Make sure you’re logged in to the server, and then press Ctrl+Space (Cmd+Space for Mac):

CompletionForDatabases

Database view

Some changes happened to the instrospector. We’ve replaced the way schemas are selected from the tab in Properties, so now you will find all schemas of the server by clicking “More Schemas…” in the database view. Choose the schemas you want to see here and hide any you don’t need from the context menu. Now you need to refresh your data source if you’ve updated from the previous version. This is what we are trying to improve, and your feedback is very important. Please, tweet at us if you have ideas and suggestions on how to make it better:

ShowMore-min

Auto-scroll to source: If this is turned on, you will automatically navigate to data source from the active console and to the table/view from table editor. If you turn it off, use locate (crosshairs) icon to scroll to source:

Autoscroll_new

Query console

DataGrip now supports search path in PostgreSQL, meaning you can add schemas one by one in the switcher of the console. The console has a list of schemas to look in. If there are two tables with the same name in different schemas, the first one will be used. Thus, the order is important: move schemas in the search path with the mouse or Alt+Arrows:

SearchPath

If you use auto-completion, in case of identical names DataGrip will qualify the name of the object automatically:

QualifySchema

Auto-completion became a little bit better — we’ve removed some elements from the list according to the context. For instance, there are no functions now if we see that you mean table:

RightCompletion

A small enhancement for those who use many languages, IntelliJ-based IDEs including DataGrip now understand what you mean, even if you forgot to switch the language of input:

RussianCompletion

Surround action doesn’t ruin multi-carets anymore. Also, we’ve added surround with function which means that the caret will be placed before the brackets, not after: put the name of the function here. Notice, you can just type “bion” to put get_AuthorByIdOrName function:

Surround

Table editor

Completion for values in table is available by pressing Ctrl+Space (Cmd+Space for Mac). It looks through all the values in the column and offers you a list of possible matches:

CompletionInTables

Some improvements have been made in PostgreSQL: now you can modify different range types:

RangeInPostgres

And types with time zones:

TimeZones

We’ve added actions for resizing columns: use Ctrl+Shift+Left/Right (Cmd+Shift+Left/Right for Mac). You can resize several columns at the same time. Ctrl+Shift+Up stands for the default size:

ResizeColumns_new

IDE

A small new feature will help you make DataGrip look different: set any image as the background of your IDE. Add the folder with the picture to the Files panel, and then choose Set Background Image from the context menu:

ImageContext

In this dialog, specify the way the image should be placed and its opacity:

ImageOptions

And the image is set as your background:

ImagedIDE

Those were just the key changes. Others include:

  • Copying SSH and SSL settings  copies the password as well.
  • Go to source works from the preview in Find in path.
  • Inserting the selected keyword in completion by “;” and “,” doesn’t insert a space anymore.
  • CTE support has been improved — we parse it even not finished.
  • Aggregate functions in ORDER BY are not highlighted as errors.
  • The same for PREVIOUS VALUE in DB2.
  • Test connection UI has been improved.

Take DataGrip EAP for a spin and let us know what you think!

Your DataGrip Team

Posted in EAP, Uncategorized | Tagged , | 4 Comments

A very important security update: DataGrip 2016.1.1

Hello! This is the first bug-fix update for DataGrip 2016.1 and it’s very important.

This update contains fixes for two security issues inside IntelliJ Platform. The vulnerabilities, in various forms, are also present in DataGrip 1.0; therefore, patches for that version is also available.

Find more information about the issues, the affected versions and ways to update in this special blog post: http://blog.jetbrains.com/blog/2016/05/security-update-for-intellij-based-ides.

It is strongly recommended for all users to install the update as soon as possible.

Your DataGrip Team
JetBrains
The Drive to Develop

Posted in Minor updates | Tagged | 2 Comments