VISTALL / database-navigator

Automatically exported from code.google.com/p/database-navigator
1 stars 0 forks source link

Cannot execute alter/show/create statements #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. create a mysql connection
2. open sql console
3. enter 'show tables;'
4. no way to execute it (no green arrow, no execute option in alt-enter popup)
What is the expected output? What do you see instead?
I'd expect normal execute statement action available like for select statements.
If i invoke 'Execute statement' via shortcut then other statements in the same 
editor will be executed, which is also confusing and dangerous because there 
might be delete/insert/update statements in there.

What version of the product are you using? On what operating system?
dbnavigator 3.0.2462 idea 129.17

Original issue reported on code.google.com by olegl...@gmail.com on 17 Mar 2013 at 2:34

GoogleCodeExporter commented 9 years ago
Thanks for the issue report. 
The SQL language is not fully defined. This is still work in progress. 
One way to execute a statement that is reported erroneous (even though it is 
valid), is selecting the statement in the editor and clicking the run arrow in 
the editor tool bar. This command has three functions:
 - execute selected text (you can partially select a statement and the engine executes only the selection)
 - execute the statement at cursor (provided the cursor is located within a correctly parsed statement)
 - execute all statements in the console if cursor is located outside any executable code (or within a badly parsed sql block). 

Will try to enhance the parser in the upcoming releases to support more 
commonly used sql statements.

PS. thanks for the positive rating on the plugin site (given it has its 
shortcomings). 

Original comment by cioca...@googlemail.com on 17 Mar 2013 at 9:40

GoogleCodeExporter commented 9 years ago
Thanks Dan! The workaround works fine.

Original comment by olegl...@gmail.com on 18 Mar 2013 at 4:41