microsoft / microsoft/vscode-mssql
Consolidate connection comparison helpers under ConnectionMatcher
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 610
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 97
Description
## Problem
Connection comparison behavior is currently split across standalone helpers in models/utils.ts and the ConnectionMatcher class. This makes the available matching contracts harder to discover and encourages feature-specific helpers such as isSameScmpConnection.
This follow-up was identified during review of #22877.
## Proposed change
- Move the exported profile and connection equality helpers onto ConnectionMatcher.
- Give the database-independent comparison a feature-neutral name that describes its behavior.
- Preserve the existing comparison semantics for current consumers.
- Update all call sites and add focused tests documenting each comparison contract.
## Acceptance criteria
- ConnectionMatcher is the single public entry point for connection/profile comparison logic.
- No existing standalone equality helpers remain exported.
- The database-independent comparison is reusable outside Schema Compare.
- Existing callers compile and focused matcher tests pass.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in models/utils.ts and inspect the existing helpers alongside ConnectionMatcher to map each comparison contract and its current callers. Update the call sites and add focused matcher tests covering the documented contracts; done means ConnectionMatcher is the single public entry point, standalone equality helpers are no longer exported, and existing callers compile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100