I Bet You Didn't Know This IntelliJ Feature

Neenad IngoleNeenad Ingole
2 min read

Are you an Intellij, Goland or DataGrip User? Like me, are you running the SQL statements every time you want to see the change reflected on the table?

If Yes, I found a small trick in Intellij and DataGrip that could watch your SQL query results. It was always there but I overlooked it. Once I discovered it, it changed my life for debugging or development.

Itโ€™s not a trick actually ๐Ÿ˜… but a feature built within the IntelliJ products. It could easily go ignored but letโ€™s see how to use it

When you run any query you will see the Result window below:

You would see this clock icon in the toolbar that does all the trick. It was always there but I never thought it would be so useful ๐Ÿ˜

When you click on it, the below options would be available. Each choice you select will refresh the query results after the selected delay.

A small tip to remember is to make sure you โ€œPinโ€ ๐Ÿ“Œ the result window. When you do it, you could run other queries along with the watch window.

The below video shows a small demo of this feature. In the demo, I am watching the result of a SELECT query. When I update a record it is shown in the result window without running the SELECT query again.

5s seem long? What if I want to keep the watch period lower than 5s? You could use the Custom option provided. With this, you could also monitor your query changes at a 1s rate interval

Well, that's all for this post. I hope next time this small utility will come in handy for you. Donโ€™t run the query every time to see the change. IntelliJ tools are a powerhouse of such small utilities which are very easily ignored by us.

Thanks! and Happy Coding! Donโ€™t forget to follow me, like (โค๏ธ) for motivation and comment on some IntelliJ utilities that helped you! ๐Ÿป

0
Subscribe to my newsletter

Read articles from Neenad Ingole directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Neenad Ingole
Neenad Ingole

I am a backend golang developer ๐Ÿ‘พ, currently working at ProtectAI, Berlin. I am a tech enthusiast and love to explore tech and frameworks. My Tech journey includes hands-on production application development in Golang, Java, Kotlin, Scala and Typescript. I transitioned from a variety of job roles from backend -> big data -> UI -> Full Stack -> Backend ๐Ÿ˜…. I share things that I am currently working on and the solutions to the problem that I face through my blog posts. I am trying to focus more on the problems we face that are rarely discussed than the pros and awesome things about new tech. I want to do it more often and would like more people to follow me and give me motivation ๐Ÿ˜Š so please do subscribe to the newsletter