Add a strategy conf option allow workspace selection#1562
Open
Donald-Lao wants to merge 1 commit intomtxr:devfrom
Open
Add a strategy conf option allow workspace selection#1562Donald-Lao wants to merge 1 commit intomtxr:devfrom
Donald-Lao wants to merge 1 commit intomtxr:devfrom
Conversation
attokurkone-design
approved these changes
Mar 16, 2026
Author
|
Hi, team. Can I get approval by reviewers with write access? Thanks. |
gjsjohnmurray
requested changes
Apr 14, 2026
Collaborator
gjsjohnmurray
left a comment
There was a problem hiding this comment.
Thanks for your contribution, and sorry for the delay. Please look at my suggested changes.
| "description": "Display connections in two groups, 'Connected' and 'Not Connected'.", | ||
| "default": false | ||
| }, | ||
| "sqltools.strategy": { |
Collaborator
There was a problem hiding this comment.
I suggest we make the setting name more descriptive:
Suggested change
| "sqltools.strategy": { | |
| "sqltools.connectionStore": { |
| return; | ||
| } | ||
| let target: ConfigurationTarget; | ||
| const strategy = Config.strategy || 'auto'; |
Collaborator
There was a problem hiding this comment.
Suggested change
| const strategy = Config.strategy || 'auto'; | |
| const connectionStore = Config.connectionStore || 'auto'; |
| let target: ConfigurationTarget; | ||
| const strategy = Config.strategy || 'auto'; | ||
| if (!writeTo) { | ||
| switch (strategy) { |
Collaborator
There was a problem hiding this comment.
Suggested change
| switch (strategy) { | |
| switch (connectionStore) { |
| 'connectionExplorer.groupConnected'?: boolean; | ||
|
|
||
| /** | ||
| * SQLTools configuration strategy. |
Collaborator
There was a problem hiding this comment.
Suggested change
| * SQLTools configuration strategy. | |
| * Where SQLTools will store connections you define. |
| "workspace" | ||
| ], | ||
| "default": "auto", | ||
| "description": "SQLTools configuration strategy. 'auto' will use workspace settings if a workspace is open, and global settings otherwise. 'global' and 'workspace' will force the usage of global or workspace settings respectively." |
Collaborator
There was a problem hiding this comment.
Suggested change
| "description": "SQLTools configuration strategy. 'auto' will use workspace settings if a workspace is open, and global settings otherwise. 'global' and 'workspace' will force the usage of global or workspace settings respectively." | |
| "description": "Where SQLTools will store connections you define. 'auto' will use workspace settings if a workspace is open, and global settings otherwise. 'global' and 'workspace' will force the usage of global or workspace settings respectively." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe here what is this PR about and what we are achieving merging this.
The
sqltoolsdefault save the db connections toworkspace/settings.jsonbased on how user open the project. But in some cases, especially for micro services, we don't want to save the db connections as shared. To solve this case, I try to add asqltools.strategyoption to allow user select to save db connections to User Settings JSON or keep the old patternThank you for your contribution!
Before submitting this PR, please make sure: