denisenkom / go-mssqldb

Microsoft SQL server driver written in go language
BSD 3-Clause "New" or "Revised" License
1.82k stars 499 forks source link

msdsn package should support azuresql:// driver name #768

Open dagss opened 2 years ago

dagss commented 2 years ago

Attempting to switch to the new AD connector in azuread package instead of our in-house homegrown connector. When using msdsn.Parse with azuresql:// it parses the string the wrong way.

dagss commented 2 years ago

Sorry, pushed prematurely. Fixing.

codecov[bot] commented 2 years ago

Codecov Report

Merging #768 (3bd6584) into master (1598eaf) will decrease coverage by 0.11%. The diff coverage is n/a.

:exclamation: Current head 3bd6584 differs from pull request most recent head f49b1da. Consider uploading reports for the commit f49b1da to get more accurate results

@@            Coverage Diff             @@
##           master     #768      +/-   ##
==========================================
- Coverage   71.32%   71.21%   -0.12%     
==========================================
  Files          24       24              
  Lines        5388     5388              
==========================================
- Hits         3843     3837       -6     
- Misses       1301     1305       +4     
- Partials      244      246       +2     
Impacted Files Coverage Δ
tds.go 65.49% <0.00%> (-0.73%) :arrow_down:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

dagss commented 2 years ago

Force-pushed proper fix + test coverage

dagss commented 1 year ago

The azuresql:// prefix is not my idea and I found it inconvenient... it is part of the "azuread" subpackage that is already merged and I just followed the lead from there.

I would much prefer if the AD options were possible to pass on a standard sqlserver:// DSN

shueybubbles commented 1 year ago

@dagss the separate azuread package was designed to avoid pulling in azure dependencies for apps that didn't want to use AAD ever. If there's a better model for it, I'm happy to consider it. Also, there's been very little traffic in this original repo and we are taking PRs actively at github.com/microsoft/go-mssqldb