Skip to content

Add Microsoft SQL Server support #3774

Open

Description

@SockworkOrange

What do you want to change?

I am one of the developers of the C# plugin. We published our plugin in the community and received a lot of feedback - mainly around the lack of support in SQL Server.
I took a look at the engines implementations and saw that in SQLite you use antlr to parse the SQL, and that antlr has the same kind of support for tsql (SQL Server's SQL dialect).

I want to propose that I will start working on an SQL Server iplementation, in the same manner as the SQLite one.
@doron050

What database engines need to be changed?

No response

What programming language backends need to be changed?

No response

Activity

  1. changed the title [-]Support SQL Server as an engine[/-] [+]Add Microsoft SQL Server support[/+] on Jan 9, 2025
  2. kyleconroy commented on Jan 9, 2025

    @kyleconroy
    Collaborator

    I updated the title and added the tag we use for all new engine requests. This one is unlikely to happen soon, mainly because I have larger plans for refactoring how we add new engines. That said it's most certainly on the roadmap.

  3. twolfvb commented on Nov 26, 2025

    @twolfvb

    What would be necessary to get some traction here? I'm doing a hard push on my org to move to more modern tooling and sqlc not being in sql server is one of the biggest detractors for a mainly microsoft shop.

  4. doron050 commented on Nov 28, 2025

    @doron050
    Contributor

    If it's possible, @SockworkOrange and I are willing to give it a try 🙏

  5. twolfvb commented on Nov 28, 2025

    @twolfvb

    @kyleconroy given that there's 2 people willing to commit their time to this, can anything about the refactor be sped up? Maybe outlining the interfaces that will be used, or have them just go ahead with it right now and deal with the refactor later?

  6. twolfvb commented on Dec 10, 2025

    @twolfvb

    @kyleconroy any inputs here?

  7. kyleconroy commented on Dec 10, 2025

    @kyleconroy
    Collaborator

    I posted a 2026 roadmap a few days ago. While this didn't make it, the Go API should make it much easier to support SQL Server.

    @twolfvb the help I need is on the research side. For SQL server support, I need to find a Go parser for T-SQL (that doesn't depend on cgo) and to document the process for extracting column and parameter information from a query using a running SQL Server.

  8. SockworkOrange commented on Dec 10, 2025

    @SockworkOrange
    ContributorAuthor

    @kyleconroy Confirming the first part regarding a GO parser for T-SQL, does using the same antlr4-grammers codegen tool done for SQLite work? Because as far as we can tell, there is no CGO dependency in that tool.

    Regarding the documentation - I am famiiar with how to do that, ex-DBA and all. That part we can definitely take

  9. kyleconroy commented on Dec 23, 2025

    @kyleconroy
    Collaborator

    I've made a first pass at a T-SQL parser here https://github.com/sqlc-dev/teesql

    Please try it out! If it can't parse something, please open an issue.

  10. kyleconroy commented on Aug 20, 2026

    @kyleconroy
    Collaborator

    Initial support for parse and analyze has landed here #4571

  11. kyleconroy commented on Oct 14, 2026

    @kyleconroy
    Collaborator

    Code generation support landed in #4621. Please build from main to try it out. Feedback needed!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions