Datagrip language injection

Answered

HI I like Jet-brains tools ever since I started using them many year ago and one features I like is language injection now I using Datagrip to work on an Oracle Apex application and a lot of the sql I need to write depends on a condition so I need to use oracle q'~ which is a string value to sql but it contains sql code.

So each day when I open Datagrip and I start to edit my code I have to use the mouse to rightclick the qualified string and use the context menu to inject oracle sql.

 

So my question is can I setup datagrip to always inject sql when it finds  q'~ SOME CODE ~;  I tried looking at the injection setting in datagrips settings but was not able to work out what I need to do.

3 comments

@jason kristian

Have you tried to add new injection in `Editor -> Language Injections`?

1

thank I know the setting page what my question was is how it works, I tried to copy one of the injection or sql type but I could not do it.

Example, So I want the start of my inject to be q'~ and the end to be ~'; and anything in between should be sql.  But I could not find any docs on the regex that the setting pages uses.


q'~
select sysdate from dual
~';
0

Please sign in to leave a comment.