distal-attribute
distal-attribute
distal-attribute
distal-attribute

Run Query Only Selected Text

renerlemes posted 2 years ago in Running SQL scripts
One suggestion would be the ability to execute the query if I selected the text, as is possible in other software to query the database.
kalvaro posted 2 years ago
renerlemes posted 2 years ago
I explain wrong. My suggestion is two shortcut for same function as Run Selected Query and Run (F9 and CTRL + F9)
kalvaro posted 2 years ago
Sorry: I can't understand a word.
renerlemes posted 2 years ago
My suggestion is to use the same shortcut for 2 functions. One would be selected and run with the same shortcut to run all queries query. For example, if I hit F9 and have selected text, this text will run, if you have nothing selected, will run everything.

kalvaro posted 2 years ago
So it has nothing to do with shortcuts or implementing new run modes. You'd like HeidiSQL to pick "Run Selection" automatically when there is a selection.

IMHO, it looks pretty interesting. I know nothing about HeidiSQL guts (I'm not a developer) but perhaps it could be implemented by keeping current commands internally:

- Run all
- Run selection
- Run current query

... and exposing them this way:

- Run -> chooses automatically between "Run all" or "Run selection"
- Run current -> chooses automatically between "Run current query" or "Run selection"

It's a subtle but potentially confusing change so further feedback and analysis would be required.

(If I still don't understand your request, please feel free to add more clarifications but I love the feature I've described nonetheless).
renerlemes posted 2 years ago
Really you understood my request. It's a pretty cool feature. Can we explain this feature for a developer? I'm new to the forum.
kalvaro posted 2 years ago
Anse hangs around almost daily. But, in my experience, this kind of changes really benefit from extended user feedback.
ansgar posted 2 years ago
Using different shortcuts is more explicit and less confusing I think. Using the same shortcut in conjunction with having text selected can especially confuse new users. I can't see a real benefit in having the same shortcut for both actions, is there some?
renerlemes posted 2 years ago
Most managers database like MySQL Query Browser and SQLManagement Studio there is this native function so it would not mess. Would be more convenient and fast if it had this feature in my opinion. An example, in my company has 26 programmers, all stopped using the SQLManagement Studio, however, we made giving the excellent application and the only problem we have is that shortcut. My only suggestion would be that you can use the same shortcut key and run the two functions.

ghoppermaster posted 8 months ago

Hi,

Firstly thanks for great software!

Has this been implemented as yet?

I feel it's really essential to have the same shortcut to run highlighted and non-highlighted queries. It's must more intuitive and really speeds up the development process.

Would be happy to donate for this feature as I run into it all day and it really impacts my workflow.

Thanks again! :)

scottieslg posted 8 months ago

I would like to second this feature.

Coming from SSMS, it automatically detects if there is selected SQL and runs JUST the selected portion. If nothing else, put a checkbox to allow the user to decide if it should auto-execute the selected text or force the user to press CTRL-F9.

I would also like to see if we can map the "Execute" key. SSMS uses F5 to refresh, and I find myself hitting F9 when I switch back and forth.

ansgar posted 8 months ago

Coming from SSMS, it automatically detects if there is selected SQL and runs JUST the selected portion. If nothing else, put a checkbox to allow the user to decide if it should auto-execute the selected text or force the user to press CTRL-F9.

Sorry, I see there are quite some users asking for this. Only I'm still thinking that having different shortcuts for different actions is more clear and more easy to understand in terms of usability. Having the same shortcut doing two different things dependingly on a text selection sounds non-intuitive.

I would also like to see if we can map the "Execute" key. SSMS uses F5 to refresh, and I find myself hitting F9 when I switch back and forth.

You can customize your keyboard shortcuts in HeidiSQL: Tools > Preferences > Shortcuts .

renerlemes posted 8 months ago

If multiple users are requesting this option is why it is important and also used in several other tools and works well. This could be an exception shortcuts.

scottieslg posted 8 months ago

Having the same shortcut doing two different things dependingly on a text selection sounds non-intuitive.

I disagree... it is un-intuitive that the selected portion does NOT run because that is how almost all other query tools work. You could certainly create a checkbox that is un-checked by default, but allow those of us that want this functionality to check it.

You can customize your keyboard shortcuts in HeidiSQL: Tools > Preferences > Shortcuts .

Awesome! Thanks!

renerlemes posted 8 months ago

A great ideia using the checkbox for this option

Please login to leave a reply, or register at first.