Get back query text from reult tab?
Answered
Lot of times I run query, pin result, modify, pin, modify pin....
I can see the query text when I hover over the tabs. I don't have it in my editor anymore. Can I get it back?
I do know about the amazing local history feature . . . it would be cool if hovering over the tab with previous query hyperlinked back to local history, or let you create a label in local history.
I'm using Datagrip in pycharm.
Please sign in to leave a comment.
in datagrip, the query history is stored in the Local History feature, which allows you to track and manage the changes you make to your files. However, the specific functionality you mentioned, where hovering over a tab with a previous query would hyperlink back to the local history or create a label, is not a built-in feature in DataGrip.
To access the query text from previous queries, you can use the Local History feature directly. Here's how you can do it:
You can then copy the query text and use it as needed. Unfortunately, there is no direct hyperlink between the query tabs and the Local History feature in DataGrip.
If you find yourself frequently modifying and pinning queries, another option you can consider is creating separate scratch files in DataGrip. Scratch files allow you to create and modify temporary files without having to associate them with a specific project or file. You can easily access and manage scratch files from the "Scratches and Consoles" tool window.
To create a scratch file in DataGrip, you can follow these steps:
Using scratch files can provide a more flexible way to manage and modify your queries without affecting your original files or relying solely on the query history.
I hope this helps! Let me know if you have any further questions.
Yes, thank you, it helps.
Levin, also take a loot at View Query and Jump to Source actions that can restore your original query
vasily chernov -
Sorry if this is a dupe...
"View Query" from the cog dropdown shows me the text I want to edit, but it is not selectable.
The menu choice immediately below that, "Copy query to console" sounds like just what I want. DataGrip in #PY-231.9011.38, that "Copy query to console" doesn't do anything as far as I can tell.
Thanks
What DataGrip version do you work with? Since I can't reproduce with the latest one.