Skip to content

Conversation

@kyleconroy
Copy link
Collaborator

Add MSSQL/SQL Server engine support using the sqlc-dev/teesql parser.
This implementation uses database-only mode (analyzer.database: only)
which analyzes queries against a live SQL Server database using
sp_describe_first_result_set for column metadata.

Features:

  • T-SQL parser integration using teesql
  • Database analyzer using go-mssqldb driver
  • MSSQL catalog with dbo default schema
  • Example configuration in examples/authors/sqlserver

The SQL Server engine requires a database connection and does not
support static catalog analysis.

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Add MSSQL/SQL Server engine support using the sqlc-dev/teesql parser.
This implementation uses database-only mode (analyzer.database: only)
which analyzes queries against a live SQL Server database using
sp_describe_first_result_set for column metadata.

Features:
- T-SQL parser integration using teesql
- Database analyzer using go-mssqldb driver
- MSSQL catalog with dbo default schema
- Example configuration in examples/authors/sqlserver

The SQL Server engine requires a database connection and does not
support static catalog analysis.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Change the engine identifier from "sqlserver" to "mssql" for consistency
with the package naming and industry conventions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. 🔧 golang labels Dec 23, 2025
Run go mod tidy to properly categorize direct vs indirect dependencies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Move the sqlserver configuration to its own sqlc.yaml file to prevent
test failures in CI. The MSSQL engine requires a database connection
which isn't available in the standard CI environment.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add native and Docker support for starting MSSQL Server instances
in end-to-end tests, following the same pattern as PostgreSQL and MySQL.

- Add internal/sqltest/native/mssql.go for native MSSQL service
- Add internal/sqltest/docker/mssql.go for Docker-based MSSQL
- Update endtoend_test.go to initialize and use MSSQL connections

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Consolidate the sqlserver example configuration back into the main
examples/authors/sqlc.yaml file, using an environment variable for
the database URI like the other examples.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Add MSSQL variant of the column_as test to verify basic SELECT
with column aliases works correctly with the MSSQL engine.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Update MSSQL Docker startup code to create a new connection on each
ping attempt, matching the pattern used by PostgreSQL. This ensures
the connection is properly established even if MSSQL takes time to
become ready.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@kyleconroy kyleconroy force-pushed the claude/add-mssql-support-MrXFp branch from b2c8b18 to 1764695 Compare December 24, 2025 01:04
Add PostgreSQL, MySQL, and MSSQL as GitHub Actions services so they're
ready before tests run. This avoids the timeout issues from pulling the
large MSSQL image (~1.5GB) during test execution.

Set environment variables so tests use the pre-started service databases
instead of trying to start their own containers.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove GitHub Actions services and let the tests start databases
via the sqltest/docker package, matching the existing pattern for
PostgreSQL and MySQL.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files. 🔧 golang

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants