feat: add NewConnectorWithProcessQueryText for mssql driver compatibility#341
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project status has failed because the head coverage (79.80%) is below the target coverage (80.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #341 +/- ##
==========================================
- Coverage 79.84% 79.80% -0.04%
==========================================
Files 34 34
Lines 6598 6600 +2
==========================================
- Hits 5268 5267 -1
- Misses 1060 1063 +3
Partials 270 270
🚀 New features to boost your workflow:
|
…lity Co-authored-by: shueybubbles <2224906+shueybubbles@users.noreply.github.com>
|
@copilot there's a test failure Enable named pipes$uri = "ManagedComputer[@name='$serverName']/ServerInstance[@name='$instanceName']/ServerProtocol[@name='Np']" pip install codecov |
…ulate Protocols field Co-authored-by: shueybubbles <2224906+shueybubbles@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/go-mssqldb/sessions/8415cdb1-180f-4a64-94b6-0f9c6928ebe2
The panic was caused by the test using Fixed in 936c30a by replacing |
…lity (microsoft#341) * Initial plan * feat: add NewConnectorWithProcessQueryText for mssql driver compatibility Co-authored-by: shueybubbles <2224906+shueybubbles@users.noreply.github.com> * fix: parse connection URL in TestConnectorWithProcessQueryText to populate Protocols field Co-authored-by: shueybubbles <2224906+shueybubbles@users.noreply.github.com> Agent-Logs-Url: https://github.com/microsoft/go-mssqldb/sessions/8415cdb1-180f-4a64-94b6-0f9c6928ebe2 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: shueybubbles <2224906+shueybubbles@users.noreply.github.com>
NewConnectorConfigalways returns a connector backed by thesqlserverdriver (no query text preprocessing), making it impossible to use a custommsdsn.Config(e.g., with custom TLSRootCAs) with libraries likesqlxthat emit?/:Nparameter placeholders.Changes
mssql.go: AddsNewConnectorWithProcessQueryText(config msdsn.Config) *Connector— mirrorsNewConnectorConfigbut usesdriverInstance(processQueryText: true), converting?,:N, and:Nameplaceholders to@pNnames before sending to SQL Server.queries_test.go: AddsTestConnectorWithProcessQueryTextintegration test covering?,:1, and:Nameplaceholder styles.Usage
Original prompt
📍 Connect Copilot coding agent with Jira, Azure Boards or Linear to delegate work to Copilot in one click without leaving your project management tool.