Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.

Need "Run current query and step to next"

Tadas's profile image Tadas posted 5 years ago in Running SQL scripts Permalink

I miss option to run current query and step cursor to the next one. This way I'd be able to execute script by running commands one by one, stepping manually by pressing same key.

apric's profile image apric posted 5 years ago Permalink

This is a great idea. Useful for testing complex data migration scripts.

ansgar's profile image ansgar posted 5 years ago Permalink

You can execute the current query by pressing Shift+Ctrl+F9, that is the query where the text cursor is currently located.

That "run current query and step to next" feature is a unclear to me. Is that "current query" the query on which the text cursor is, or? And what would you expect precisely from the GUI? Show a dialog? A modal dialog or a dialog which can be moved to the side in order to get something different done before stepping to the next query?

apric's profile image apric posted 5 years ago Permalink

expected behavior:

precondition: HeidiSQL must know each separate query in the editor window

When pressing SHORTCUT_KEY:

  • find "nearest" query at current cursor position
  • execute this query
  • move cursor to next query in editor view

Successive SHORTCUT_KEY presses will execute each query in editor view, one after another, while the user kan visually keep track of each query being executed and control the execution manually.

I think this should also require a kind of marker for the currently focues/selected query (a query could span hundreds of lines!). This could be visualized similarly to the code bracket scope markers in modern IDEs (left or right edge of code editor windows, showing where a scope begins/ends).

Tadas's profile image Tadas posted 5 years ago Permalink

Yes, current query is query where text cursor is currently located. I expect from "run current query and step to next" to do two things: a) execute the current query b) move text cursor to the the first position of the next query

No dialog required. Just execute and move cursor lower to next "command" in script. However you can make it even smarter: perform b) part only when a) was completed successfully. When some query in my script has error, I would like to stay there without advance. When it completed normally, I would like to jump to the next.

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




Ads were blocked - no problem. But keep in mind that developing HeidiSQL, user support and hosting takes time and money. You may want to send a donation instead.