microsoft / vscode-cosmosdb

Azure Databases extension for VS Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-cosmosdb
MIT License
155 stars 69 forks source link

Support for multiple attached database accounts #2397

Closed tnaum-ms closed 2 weeks ago

tnaum-ms commented 2 weeks ago

Originally, Azure Databases supported only one attached database account in the workspace area. It’s unclear whether this was intentional or an unexpected side effect.

image

Once an account was added, the option to add another was no longer available, though the quick pick command remained accessible.

This PR updates the code path that determines whether to display the "Attach Database Account..." option.

Previously, having more than one database account attached caused an error when attempting to detach accounts. This issue has now been fixed. I assume the original author anticipated a specific sort order, which I replaced with a simpler length check:

image