microsoft / go-sqlcmd

The new sqlcmd, CLI for SQL Server and Azure SQL (winget install sqlcmd / sqlcmd create mssql / sqlcmd open ads)
https://learn.microsoft.com/sql/tools/sqlcmd/go-sqlcmd-utility
MIT License
325 stars 57 forks source link

Add `sqlcmd open code` support #275

Open stuartpa opened 1 year ago

stuartpa commented 1 year ago

Request from @yorek. Will flesh out details of what sqlcmd open code should do in this issue

yorek commented 1 year ago

Thanks @stuartpa. Ideally it should behave similarly to that sqlcmd open ads does. Open VS Code and connect to the database defined in the active context.

shueybubbles commented 1 year ago

This will be a good chance to refactor the tool code. We can define some command line templates indexed by tool name, with placeholders for connection parameters. Eventually we hope more tools will support reading the connection info by name from the sqlcmd config file, or support the new xml-based connection file format used by SSMS 19.1+