Can no longer execute statements from files
Used to be able to exec single query via a keystroke (mapped to "Execute') inside sql files. I can no longer do that after upgrading to 141.191. Note I am not talking about in the sql console, but rather from a file I have saved and re-opened via the "Files" tool window. This has severly affected my workflow as I have 20-30 files saved with various queries in them. I now have to copy/paste them into sql console, then if I modify them remember to copy them back out.
Was this regression intentional? I'd REALLY like to go back to the prior behavior.
Please sign in to leave a comment.
Can't reproduce the problem. For a try, got an .sql file, set MySQL dialect, provided several statements like "select 0; select 1; select 2", put the caret into one statement, Ctrl+Enter, select a data source. As a result, this single statement is executed.
What do you mean by "can no longer"? What effects do you see?
Regards,
Alexander.
Hi Alexander,
It just doesn't execute anything. I have two screencasts:
1) Working in previous version: http://screencast.com/t/v6hudpJJLUKq
2) Nothing happening in new version: http://screencast.com/t/wo8FpeN3
If instead of opening a file, I open a sql console the keystroke (ctrl-enter) works just fine.
I also have the log file if you would like that, but I'd rather send that in to support vs post it here on an open forum.
J.D.
Hi, Jeremy!
I still cannot reproduce your problem so I have some questions to you:
1). What keymap do you use?
2). What is your shortcut for "Execute Current Statement in Multiline Console"?
3). What dialect is chosen for your file?
4). Do you have any data sources set up?
5). What about is a yellow bulb at you second screencast?
Regards,
Maria.
Ah ha! The yellow lightbulb is the key. If I click it I get prompted for which session I want to run the query in. In the older versions it would bring that prompt up automaticallys, I could use the keyboard to select the console, and hit enter. It's not popping up like it used to.
And to make it worse, it doesn't remember, so you have to click that light EVERY TIME you want to run a query.
Jeremy,
Could you please attach a screenshot of what happens when you press on yellow
bulb? I mean, what actions are suggested by IDE.
Regards,
Maria.
"Run Query in Console ->"
then if click it, a list of my connections
And what happens if you press Alt + Enter at your statement?
Looks like shortcuts for "Execute statement" and "Show intentions" are switched.
Interesting. If I instead hit cmd-enter (I'm on OS X) then it does indeed execute the query.
So your problem is solved now?
No, I think it's a bug. The Execute keystroke should be the same in Console as it is in a File. It is not, and has regressed from previous behavior.
Also in keymap I can't seem to map ctrl-enter to both "execute statement" and "execute single statement in multi-line". Maybe that's intentional, but this all worked before and I can't now seem to bind the same keystroke no matter if i'm in console or file.