Skip to content

feat(pymssql): add sync SQL Server adapter#570

Draft
cofin wants to merge 1 commit into
mainfrom
codex/pymssql-adapter
Draft

feat(pymssql): add sync SQL Server adapter#570
cofin wants to merge 1 commit into
mainfrom
codex/pymssql-adapter

Conversation

@cofin

@cofin cofin commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • add a sync pymssql SQL Server adapter with config, driver, connection pool, migrations, and data dictionary support
  • add adapter-local Litestar, events, and ADK store integrations
  • wire docs and deferred contract metadata while leaving active SQL Server fixture coverage for a separate integration pass

Tests

  • uv run pytest tests/unit/adapters/test_pymssql -q --tb=short
  • uv run ruff check sqlspec/adapters/pymssql tests/unit/adapters/test_pymssql
  • uv run ruff format --check sqlspec/adapters/pymssql tests/unit/adapters/test_pymssql
  • uv run python3 -c "from sqlspec.adapters.pymssql import PymssqlConfig, PymssqlDriver; from sqlspec.adapters.pymssql.adk import PymssqlADKStore; from tests.integration.adapters.contracts._cases import DEFERRED_DRIVER_CASES; assert PymssqlConfig and PymssqlDriver and PymssqlADKStore; assert any(case.id == 'pymssql-sync' for case in DEFERRED_DRIVER_CASES); print('pymssql smoke ok')"

@codecov-commenter

codecov-commenter commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 47.19740% with 650 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.03%. Comparing base (b4a7d05) to head (f5fa457).

Files with missing lines Patch % Lines
sqlspec/adapters/pymssql/adk/store.py 35.47% 228 Missing and 3 partials ⚠️
sqlspec/adapters/pymssql/litestar/store.py 22.22% 112 Missing ⚠️
sqlspec/adapters/pymssql/data_dictionary.py 28.94% 81 Missing ⚠️
sqlspec/adapters/pymssql/migrations.py 35.00% 52 Missing ⚠️
sqlspec/adapters/pymssql/core.py 60.95% 28 Missing and 13 partials ⚠️
sqlspec/adapters/pymssql/driver.py 68.26% 29 Missing and 4 partials ⚠️
sqlspec/adapters/pymssql/type_converter.py 0.00% 32 Missing ⚠️
sqlspec/adapters/pymssql/pool.py 69.00% 26 Missing and 5 partials ⚠️
sqlspec/adapters/pymssql/_typing.py 57.50% 15 Missing and 2 partials ⚠️
sqlspec/adapters/pymssql/events/store.py 69.23% 12 Missing and 4 partials ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #570      +/-   ##
==========================================
- Coverage   75.68%   75.03%   -0.65%     
==========================================
  Files         449      464      +15     
  Lines       59986    61217    +1231     
  Branches     9144     9265     +121     
==========================================
+ Hits        45398    45935     +537     
- Misses      11657    12318     +661     
- Partials     2931     2964      +33     
Flag Coverage Δ
py3.10 73.54% <47.19%> (-0.55%) ⬇️
py3.13 73.55% <47.19%> (-0.55%) ⬇️
unit 61.39% <47.19%> (-0.43%) ⬇️

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

Files with missing lines Coverage Δ
sqlspec/adapters/pymssql/__init__.py 100.00% <100.00%> (ø)
sqlspec/adapters/pymssql/adk/__init__.py 100.00% <100.00%> (ø)
sqlspec/adapters/pymssql/events/__init__.py 100.00% <100.00%> (ø)
sqlspec/adapters/pymssql/litestar/__init__.py 100.00% <100.00%> (ø)
sqlspec/adapters/pymssql/config.py 95.55% <95.55%> (ø)
sqlspec/adapters/pymssql/events/store.py 69.23% <69.23%> (ø)
sqlspec/adapters/pymssql/_typing.py 57.50% <57.50%> (ø)
sqlspec/adapters/pymssql/pool.py 69.00% <69.00%> (ø)
sqlspec/adapters/pymssql/type_converter.py 0.00% <0.00%> (ø)
sqlspec/adapters/pymssql/driver.py 68.26% <68.26%> (ø)
... and 5 more

... and 8 files with indirect coverage changes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants