Open string from <one of IntelliJ IDE's> in DataGrip

I use PHPStorm & DataGrip.

I wonder if it's possible, to open a string from PHPStorm in external editor (DataGrip)?

This is something I have in mind:

  1. Place the cursor inside some SQL string
  2. From some context menu / keyboard shortcut invoke some activity
  3. String opens in a new document in DataGrip (connected to some database)
  4. Edit the SQL string in DataGrip (run it a couple of times while editing, see results, debug, etc.)
  5. Save in DataGrip. SQL string in PHPStorm gets updated with an edited version from DataGrip.

Writing SQL's and debugging them via web/console by invoking the whole PHP (not only PHP) thing is a hassle.

This would work very well out of the box with PDO that's using prepared statements with arguments in format like :userId, :postId.

Please sign in to leave a comment.