mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.44k stars 291 forks source link

Running query opens results in new tab every time now | Option to revert it back like before #632

Closed h4ckt1v1st closed 1 year ago

h4ckt1v1st commented 4 years ago

After an update running query on a connection (using postgres) opens up new tab each time.

Any setting option to disable this? I would like one editor and one output tab per connection. Or more than 1 key combination to run query. For e.g. (ctrl + e, ctrl + e) for same tab and maybe (ctrl + e, ctrl + w) to open results in new tab.

I have to close the open tab even after running an insert query. I have to keep running different queries on same connection and it is kind of frustrating to close the tabs after each run. Earlier this was not the case, I think maybe 3-4 updates back.

Note:- This is my first time to open a request on Github. Kindly, suggest if I need to do things better or in a certain way. :)

jmurty commented 4 years ago

I too would prefer the original behaviour, where the results of each new query are displayed in the same tab instead of opening a new one.

Or maybe the new results views could work like "preview" editor tabs, where the most recent results view acts as a temporary tab that gets replaced by the next query run, unless/until the user interacts with the results tab in some way.

In other words, make the results tab respect this setting or something like it:

Workbench > Editor: Enable Preview Controls whether opened editors show as preview. Preview editors are reused until they are explicitly set to be kept open (e.g. via double clicking or editing) and show up with an italic font style.

By the way, thank you for this fantastic extension! I have found it very useful.

derick-bai commented 4 years ago

Same request here. The original behavior worked better for me. Right now, every query I executed opens up a new tab with a very long tab name, which always forces me into this "execute queries > close tabs > execute more queries > close more tabs" cycle.

Or, as others above have suggested. Introducing a different shortcut key for display query results in new tab. So that users can have a choice.

But nonetheless. This is still the best SQL extension for VS Code I've used so far. Keep up the good work 👍 .

emil14 commented 3 years ago

BTW humao.rest-client extension does this right - you can fire several requests and only one tab at the right will be opened, no need to close all of them at the end

P.S - thanks you for almost perfect extension :)

Maransatto commented 3 years ago

Sure, it would be nice to have an option for this on settings. I always have to be closing a lot of tabs. It also happens with mysql connections.

bortexz commented 3 years ago

I don't know if this would be feasible, but I would do 2 different commands:

chris-larsen commented 3 years ago

So the preferred expected behavior that's in line with just about every other db management tool (run query in same tab) used to be how this behaved?

I think I've uninstalled/reinstalled SQLTools 10+ times because I always find myself annoyed at the new tabs opened each time when I execute a query.

emil14 commented 2 years ago

any updates?

AF1QUE commented 2 years ago

We are still missing this particular feature, I hope this issue gets the attention of the extension author.

bombillazo commented 1 year ago

Thanks for this feature!