Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Changelog
## Next Release

### Bug fixes

* Added "Pwd" as a recognized alias for "Password" in connection strings (#262)

## 1.7.0

### Changed
Expand Down
1 change: 1 addition & 0 deletions msdsn/conn_str.go
Original file line number Diff line number Diff line change
Expand Up @@ -628,6 +628,7 @@ var adoSynonyms = map[string]string{
"addr": Server,
"user": UserID,
"uid": UserID,
"pwd": Password,
"initial catalog": Database,
"column encryption setting": "columnencryption",
}
Expand Down
11 changes: 11 additions & 0 deletions msdsn/pwd_alias_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package msdsn

import "testing"

// TestPwdAlias verifies that "pwd" is correctly recognized as an alias for "password"
func TestPwdAlias(t *testing.T) {
// Test that pwd gets mapped to password in the adoSynonyms map
if adoSynonyms["pwd"] != Password {
t.Errorf("Expected adoSynonyms[\"pwd\"] to be %q, got %q", Password, adoSynonyms["pwd"])
}
}