Replies: 2 comments 1 reply
|
Yes, this is one of the most discussed topics. For now, the safest way to run all statements is to select everything in the editor ( The safest default is still to explicitly select the part you want to execute, but I agree that this can be confusing for some users. Thank you for bringing this up and starting the discussion. I’m converting this issue into a discussion so we can explore the behavior a bit more. We should aim for an experience that feels familiar to users coming from other database tools. |
|
Agree the diagnosis is right, but I am not fully sold on the proposed fix. Dynamically renaming or swapping a button based on selection state can get flaky, any edge case or timing gap in that logic could leave "RUN SEL" showing when it should not (or vice versa), which just trades one confusing state for another. Might be worth looking at how other SQL IDEs handle this before settling on an approach. Does anyone know how DBeaver, DataGrip, TablePlus, etc. solve the "run all vs run current statement" problem? A mode toggle, a separate keybinding, statement highlighting, something else? Some precedent here would help pick the right direction. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
The run button does not execute all statements. Only the last statement is executed
However, if we've highlighted (selected) any text, the
RUNbutton only executes what's selected - but at the same time, there's aRUN SELbutton that appears when we highlight parts of the query. This can be confusing.Steps to Reproduce
Use this query:
Don't select anything and click
RUN.Observe the Query Error:
Highlight the whole query with
CTRL+AObserve that a
RUN SELbutton appearsClick
RUN- now it behaves identical toRUN SELExpected Behavior
Clicking
RUNshould just execute all queries, potentially in a transaction.Actual Behavior
Only the last statement is executed, or the highlighted (selected) statements if any.
Screenshots
Environment
Possible Solution
Have
RUNexecute all statements.Perhaps introduce a confirmation dialog if there are more than one.
Also consider wrapping in a transaction.
All reactions