Skip to content

Add new conn-string synonyms for cross-driver alignment#4192

Merged
apoorvdeshmukh merged 2 commits intomainfrom
dev/ad/ado/44014
Apr 23, 2026
Merged

Add new conn-string synonyms for cross-driver alignment#4192
apoorvdeshmukh merged 2 commits intomainfrom
dev/ad/ado/44014

Conversation

@apoorvdeshmukh
Copy link
Copy Markdown
Contributor

@apoorvdeshmukh apoorvdeshmukh commented Apr 14, 2026

Description

Add 5 new connection string keyword synonyms for cross-driver alignment
Adds space-free and camelCase synonym mappings so that connection strings using keywords common across other SQL drivers (ODBC, OLEDB, JDBC, PHP, Python, Rust) are accepted by Microsoft.Data.SqlClient:

Canonical Keyword New Synonym
Connect Timeout ConnectTimeout
Failover Partner FailoverPartner
Packet Size PacketSize
Workstation ID WorkstationID
Column Encryption Setting columnEncryption

Issues

Fixes AB#44014

Testing

Added unit tests for the new synonyms

Guidelines

Please review the contribution guidelines before submitting a pull request:

@apoorvdeshmukh apoorvdeshmukh requested a review from a team as a code owner April 14, 2026 15:29
Copilot AI review requested due to automatic review settings April 14, 2026 15:29
@github-project-automation github-project-automation Bot moved this to To triage in SqlClient Board Apr 14, 2026
@apoorvdeshmukh apoorvdeshmukh added this to the 7.1.0 milestone Apr 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds additional connection string keyword synonyms so Microsoft.Data.SqlClient accepts space-free/camelCase keywords commonly used by other SQL drivers, improving cross-driver connection string portability.

Changes:

  • Added new synonyms (ConnectTimeout, FailoverPartner, PacketSize, WorkstationID, columnEncryption) to the synonym constants and keyword-resolution maps.
  • Updated SqlConnectionStringBuilder keyword dictionary to recognize the new synonyms.
  • Added functional tests verifying the synonyms are accepted and resolve to the expected builder properties.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/Microsoft.Data.SqlClient/src/Microsoft/Data/Common/ConnectionString/DbConnectionStringSynonyms.cs Adds constants for the 5 new synonym strings.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionStringBuilder.cs Maps the new synonym constants to the correct Keywords entries for builder parsing.
src/Microsoft.Data.SqlClient/src/Microsoft/Data/SqlClient/SqlConnectionString.cs Registers the new synonyms in the connection-string keyword map used when parsing SqlConnection connection strings.
src/Microsoft.Data.SqlClient/tests/FunctionalTests/SqlConnectionStringBuilderTest.cs Adds coverage ensuring the new synonyms are accepted and map to the expected properties/values.

@paulmedynski paulmedynski moved this from To triage to In review in SqlClient Board Apr 14, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 15, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.77%. Comparing base (f5c41ee) to head (066fa8c).
⚠️ Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4192      +/-   ##
==========================================
- Coverage   66.63%   64.77%   -1.86%     
==========================================
  Files         279      274       -5     
  Lines       42999    65825   +22826     
==========================================
+ Hits        28651    42637   +13986     
- Misses      14348    23188    +8840     
Flag Coverage Δ
CI-SqlClient ?
PR-SqlClient-Project 64.77% <100.00%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cheenamalhotra cheenamalhotra modified the milestones: 7.1.0, 7.1.0-preview1 Apr 23, 2026
@cheenamalhotra cheenamalhotra added the Public API 🆕 Issues/PRs that introduce new APIs to the driver. label Apr 23, 2026
@apoorvdeshmukh apoorvdeshmukh merged commit 876d219 into main Apr 23, 2026
303 checks passed
@apoorvdeshmukh apoorvdeshmukh deleted the dev/ad/ado/44014 branch April 23, 2026 07:10
@github-project-automation github-project-automation Bot moved this from In review to Done in SqlClient Board Apr 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Public API 🆕 Issues/PRs that introduce new APIs to the driver.

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants