IntelliJ IDEA not recognizing SQL dialect

566 Views Asked by At

We use IntelliJ IDEA actively and we have our wrappers for work with DB (PostgreSQL). The thing is that when we use placeholders, SQL is stopped being highlighted.

"select * from " + schema + ".users where id = " + id + ";";

This code is not recognised as SQL, so highlighting doesn't work.

enter image description here

1

There are 1 best solutions below

0
Bloody160 On

I agree with Jesper, you should try using preparedStatements, not only would your Statements get more secure, also the problem which you are currently having should be solved by it.