Questions about DataGrip code completion

I have two objects in my database, a table named tbl_policystatus_s and a view named vw_policystatuschange_s.

If I type in my query editor, SELECT * FROM policystatus_s and press Ctrl+Space I expect DataGrip to bring up the table tbl_policystatus_s first in the code completion list because it has the exact same sequence of characters in the name as I entered. However, DataGrip brings up the view vw_policystatuschange_s first in the code completion list.

How can I configure DataGrip to show the exact matches first in the code completion list?

 

 

0
3 comments

Hi Zsoumya

DataGrip code completion searches for objects in the database based on their usage frequency. By default, it shows the most frequently used ones first. This is why you see the view policystatuschange_ID_seq first instead of the table tbl_policystatus_s.

However, you can change this behavior by going to File > Settings > Editor > General > Code Completion and selecting Prefer exact match in the Matching strategy section. This will make DataGrip show the exact matches first in the code completion list.

0

Hi Aleksandr Molchanov, thanks so much for your response. However, I am not able to locate the Matching strategy section and the Prefer exact match option in the File > Settings > Editor > General > Code Completion dialog. Below is what I see.

I am using Datagrip 2022.3.3. What am I missing?

0

Sorry for the confusion; you'll need to change the Machine Learning section, as shown on the screenshot.



I was able to achieve the desired result once these options were activated.



Let me know if it works for you.

0

Please sign in to leave a comment.