Suggestion: Handle multi-statements more like pl/sql developer

guttormvik

Member²
The way I work with db scripts in development, I almost never run the whole script. I run single statements, or a set of statements, or mark part of a select, say a subselect, and run that.
In pl/sql developer I don't have to think about the differences between these. If there is a block selection that is run, else the current statement is run (since I have AutoSelect statment on). Exactly what I want.

In plyxon it doesn't work like that.
One issue is that it is not possible to mark a subselect and run it. You ignore the selection and find the surrounding statement.
This also means I can't run something if there is a syntax error before/after the statement.
I assume this has to do with the idea of marking statements in the margin? Maybe that was not a good idea after all.

I prefer the way it is handled in pl/sql developer.

Also notice that when I run a statement I lose focus, but only sometimes?
I've been losing focus constantly, but when writing this I tried to find out where it was going. I pressed tab and saw it go into the cells of the result set.
After that, when I've re-run the query, the focus has stayed on the statement, where I want it. Not sure what is going on here
 
In Plyxon you can still run a single statement or a selection of statements. Is a selection is made and you press the execute button or key, only the selected statements are executed. I have added your suggestion to extend this to sub-selections within a command as well.

We'll check out the focus issue as well.
 
Belated followup to this tread;

As you said, I can use the "Execute" button to run selection or everything if there is no selection.
And, I can use "Execute Current Command" to run the statement under the cursor.

That is a poor fit for how I work. I almost never want to run everything. If I do, it is ok to mark everything first.
I would prefer to use the same key binding for "run selected" and "run current statement"

I use PL/Sql Developer for two kinds of sql scripts; my personal temp.sql which is a history of recent ad-hoc statements, and my version_x.sql, which has a set of issues, and each issue has a set of SQL. We normally don't run the version script with pl/sql developer, but we develop the issues in it.
For both of these, it never makes sense to run all. It only makes sense to run current or selected.

One solution might be to let both these buttons/commands run selection if there is a selection.
However, I think the current "Execute" button is a bit dangerous; It is easy to run more than you think, and you might not even notice, since you don't get a set of result tabs, like in PL/SQL Developer.

I think I would prefer to have only one "Run" button, like in PL/SQL Developer.
 
Last edited:
Back
Top