Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keep connection and selected database when opening new query tabs #6

Closed
anton-johansson opened this issue Nov 15, 2017 · 7 comments
Closed
Assignees
Labels
Area - Connection Area - Query Editor Enhancement Request for new features or functionality

Comments

@anton-johansson
Copy link

Before we get to the issue, I've been waiting for a tool like this for quite some time, I'm very excited! Looks very nice so far!

SQL Operations Studio version

Version 0.23.6
Commit 8a3011756318a2ded1e6e84332230a2b2bf9c544
Date 2017-11-05T22:46:14.815Z
Shell 1.7.9
Renderer 58.0.3029.110
Node 7.9.0
Architecture x64

Steps to Reproduce

  • Connect to a database server
  • Open a new query
  • Select a database
  • Open a new query (Ctrl + N)

I would very much like if the connection and selected database would still be there in the new query tab (similar to what Management Studio does)!

@kevcunnane
Copy link
Contributor

To clarify - do you mean these should be shown in the tab title rather than SQLQuery1?

@Code-DJ
Copy link

Code-DJ commented Nov 15, 2017

Click on a Server on the sidebar
Hit Ctrl+N
Type a query
Hit F5
It does not run the query, instead asks for a connection. On SSMS, it runs the query against the selected Server in step 1.
Select a connection, this will run the query as expected.
While on the query screen, hit Ctrl+N again
Now write another query and hit F5
It again asks for a connection

@kevcunnane
Copy link
Contributor

@Code-DJ excellent, that clarifies the ask. Improving context-based commands (e.g. Ctrl+N detecting the active connection in object explorer) is something we plan to do. This seems like a good place to start on that.

@anton-johansson
Copy link
Author

Thanks, @Code-DJ, that's exactly what I meant. :)

@nalexander50
Copy link

I think this is in the same vein but I can move to a new issue if not.

I would also like to see the current connection settings persist if I press Ctrl-N in a query window.

To clarify:

I'm connected to MyServer\DatabaseA and writing queries in a query editor. I press Ctrl-N and a new query editor tab appears but it has no connection. I want it to still have MyServer\DatabaseA. It would be nice if it kept the connection of the tab you were just on.

Reason being, I like to keep my queries sequestered. If I'm querying a set of related tables in one tab and I need to run some unrelated queries, I always do those in a new tab to keep my workspace pristine. In SSMS, I can just use Ctrl-N and keep on querying.


Note: I'm not sure if SSMS is actually persisting the settings from the tab or just using the default connection. I have a sneaking suspicion it's just using the default connection. Regardless, using the default connection is enough since that's the database I'll be querying 90% of the time, hence default.

@kburtram
Copy link
Member

kburtram commented Jan 8, 2018

@MattIrv could you please look at this issue? Please implement as a generic "Global Current Connection" context that can be used by any global command that is executed without an explicitly implied connection.

@MattIrv
Copy link
Contributor

MattIrv commented Feb 12, 2018

This feature has been added and will be in the February release, so I'll close this issue. It's available now in the latest February preview build for anyone who is interested.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Area - Connection Area - Query Editor Enhancement Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

9 participants