-
Notifications
You must be signed in to change notification settings - Fork 978
feat(sqlserver): add Microsoft SQL Server support #4243
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
kyleconroy
wants to merge
10
commits into
main
Choose a base branch
from
claude/add-mssql-support-MrXFp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>
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>
b2c8b18 to
1764695
Compare
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
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