Skip to content

SQL Server driver — implementation roadmap & call for contributors #150

Closed

Description

@debba

SQL Server driver — implementation roadmap & call for contributors

Status

Phase 1 is done on feat/sql-server. Clean-room tiberius + deadpool, peer to MySQL / PostgreSQL / SQLite. Not merged to main. Not in any released build. The branch squashes into main when Phase 2 closes via #149.

Phase 2 (editing + TLS + composite keys) is open for contribution. Phase 3 (DDL + EXPLAIN + Azure AD) is on the roadmap.

471 Rust tests pass, zero regressions on the existing drivers.

Contributors: branch off feat/sql-server, not main. Target your PR at feat/sql-server, not main.

Phase 1 — done on feat/sql-server

  • Driver registered in src-tauri/src/lib.rs, selectable from the Connection modal
  • readonly: true manifest (INSERT / UPDATE / DELETE hidden in UI during the preview)
  • Pool built on deadpool + a custom tiberius::Manager (src-tauri/src/drivers/sqlserver/pool.rs)
  • Schema discovery via sys.* + INFORMATION_SCHEMA.* (tables / columns / FK / indexes / views / routines)
  • execute_query with dialect-aware pagination (PaginationDialect::OffsetFetch, added to drivers/common/query.rs)
  • Type extraction for 20+ SQL Server types (bit, int family, float family, decimal / numeric / money, uniqueidentifier, temporal family, char / varchar / nvarchar / xml, binary base64, UDT / SSVariant fallback)
  • Runtime version detection (drivers/sqlserver/version.rs) with a conservative default major = 14 (SQL Server 2017) and feature gates for 2012 (OFFSET/FETCH) and 2017 (STRING_AGG)
  • ER-diagram batch helpers (get_all_columns_batch / get_all_foreign_keys_batch / get_schema_snapshot)

Phase 2 — open for contribution

Phase 3 — roadmap

  • DDL generation (sp_rename, IDENTITY(1,1), default-constraint DROP+ADD dance)
  • XML execution-plan parser (SHOWPLAN_XML)
  • Triggers / computed columns / extended properties metadata
  • Azure AD authentication (AuthMethod::AADToken)
  • Windows Integrated authentication (#[cfg(windows)])

Ground rules

  • Clean-room implementation. Do not copy GPL-licensed code from other open source database clients. Tabularis stays Apache-2.0.
  • Zero breaking changes for MySQL / Postgres / SQLite drivers or for saved connections. New model fields land as Option<T> with #[serde(default)] and skip_serializing_if.
  • Utilities ship with unit tests in the same PR. Pure functions — formatters, parsers, query builders, normalizers, SQL-string constants — get co-located #[cfg(test)] mod tests { ... } coverage. No exceptions.
  • Conservative version fallback. When runtime detection can't determine the server major version, default to 14 (SQL Server 2017) — modern enough to unlock OFFSET/FETCH + STRING_AGG, old enough to cover the bulk of real-world installations.

Architecture primer

The driver lives in src-tauri/src/drivers/sqlserver/ on feat/sql-server:

File Purpose
pool.rs Custom deadpool::managed::Manager wrapping tiberius::Client over tokio TCP via tokio-util::compat
helpers.rs bracket_quote / quote_identifier / qualify — all pure, all tested
version.rs SERVERPROPERTY parsing + feature gates (supports_offset_fetch, supports_string_agg, supports_drop_if_exists)
introspection.rs sys.* + INFORMATION_SCHEMA.* queries + pure build_table_column / build_foreign_key
extract/mod.rs ColumnType-keyed dispatcher returning serde_json::Value
extract/temporal.rs Pure chrono formatters for date / time / datetime / datetimeoffset

The pagination split lives in src-tauri/src/drivers/common/query.rs::PaginationDialect (shared with MySQL / Postgres / SQLite via a legacy passthrough).

Getting started

  1. Spin up a local server:
    docker run -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=Strong!Pass123' \
      -p 1433:1433 mcr.microsoft.com/mssql/server:2022-latest
  2. Clone Tabularis, switch to feat/sql-server (the driver isn't on main), confirm the baseline:
    git clone https://github.com/TabularisDB/tabularis.git
    cd tabularis
    git checkout feat/sql-server
    cargo test --lib          # 471 tests should pass
    npm run typecheck
  3. Pick a sub-issue below (look for good first issue and help wanted labels) and say hi in the comments before you start.
  4. Branch off feat/sql-server, open a PR targeting feat/sql-server, reference this epic. Reviewers will check the "utilities with tests" invariant during review.

Questions, design pushback, alternative approaches → comment here or open a GitHub Discussion.

Activity

  1. added
    help wantedExtra attention is needed
    roadmapPart of the product roadmap
    on Apr 23, 2026
  2. pinned this issue on Apr 23, 2026
  3. saurabh500 commented on May 8, 2026

    @saurabh500
    Contributor

    I will contribute to this effort. I will be posting a plan shortly. Something that @debba and I discussed on Discord.

  4. debba commented on May 8, 2026

    @debba
    CollaboratorAuthor

    Hi @saurabh500 !
    Well done! I assigned you for this task.
    Feel free to comments the roadmap and apply changes required.
    Who better to work on it than someone at Microsoft who actually developed the official SQL Server implementation in Rust?
    Welcome on board :)

  5. saurabh500 commented on May 8, 2026

    @saurabh500
    Contributor

    @debba i have added #171
    As phase 1.5

    The rest of the plan in this issue will be followed after I finish phase 1.5

    Should I send the PR to the sql server feature branch?

    I will then take on the other phases till we can squash and merge to main.

    Then I will pick up the follow up features.

  6. debba commented on May 9, 2026

    @debba
    CollaboratorAuthor

    @saurabh500 sure you can go ahead create a PR

  7. saurabh500 commented on May 9, 2026

    @saurabh500
    Contributor

    @debba PR is here. #170

  8. FabioMalpezzi commented on Jul 28, 2026

    @FabioMalpezzi

    I opened #560 with a selective port of the SQL Server driver onto current main, plus the Phase 2/3 SQL-auth feature set (CRUD/composite keys, TLS, DDL, triggers, routines, and SHOWPLAN XML).

    I targeted main rather than the historical feat/sql-server branch because that branch is hundreds of commits behind and no longer matches the current driver, pool, manifest, and frontend APIs. The PR includes current full-suite and live SQL Server 2022 validation.

  9. debba commented on Jul 28, 2026

    @debba
    CollaboratorAuthor

    Hi @FabioMalpezzi
    First of all, thank you for the work you've done so far.,

    At the moment, development is being handled by @saurabh500 . Although progress has slowed down a bit, the work is still active.

    One thing you could do is turn the existing work into a plugin that you maintain yourself.
    If you're interested, I'd be happy to create a dedicated repository for it.

  10. FabioMalpezzi commented on Jul 29, 2026

    @FabioMalpezzi

    Hi,

    Thank you for your reply.

    The existing GitHub repository related to SQL Server appears to be very old and has not been updated for quite some time, so I decided to implement the integration myself.

    I would be very happy to turn this work into a plugin. Please feel free to create a dedicated repository or space for it and share the relevant technical specifications, requirements, and contribution guidelines. I will gladly take care of developing and maintaining it.

    SQL Server is still very widely used in enterprise environments, so I believe that not supporting it represents a significant gap and may prevent many companies from adopting your excellent package.

    I am also available to help with other areas of the project, should you need it. I am now retired from my former corporate role and work as an AI consultant, which gives me time to contribute to open-source projects as well.

    Thank you again, and I look forward to collaborating with you.

  11. unpinned this issue on Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

help wantedExtra attention is neededroadmapPart of the product roadmapsql-serverSQL Server driver

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions