microsoft / microsoft/go-sqlcmd
Add support for more file types (beyond .bak) in the --using flag (sqlcmd create)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 595
- Forks
- 91
- Avg merge
- 9h 35m
- Merged PRs (30d)
- 1
Description
The initial PR for the --using flag (in sqlcmd create mssql) enables the scenario:
sqlcmd create mssql --using https://aka.ms//AdventureWorksLT.bak
i.e. create a new local T/SQL endpoint with the AdventureWorks database downloaded and restored from a URL
--using should support all normal source type that contain databases, e.g. .bacpac files, and .mdf/.ldf (in archive files, like .zip/.7z etc.).
--using should just do the right thing depending on what it finds, e.g. do a restore of a .bak file / do an attach of a .mdf/.ldf file etc.
--using should also support more protcols than just http(s)://, it should definitely support file:\, including c:\ etc.
(the idea here is the end user shouldn't need to know the mechanism required to get the database attached to the engine, they just provide the URL to the file, and sqlcmd does the rest).
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the existing sqlcmd create mssql --using flow and how it handles the .bak URL. Inventory the requested source types and protocols, then define completion as choosing the appropriate restore or attach behavior for each supported input, including local file:\ paths and archive files.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- cli, databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100