Repository navigation
Description
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: truemanifest (INSERT / UPDATE / DELETE hidden in UI during the preview)- Pool built on
deadpool+ a customtiberius::Manager(src-tauri/src/drivers/sqlserver/pool.rs) - Schema discovery via
sys.*+INFORMATION_SCHEMA.*(tables / columns / FK / indexes / views / routines) execute_querywith dialect-aware pagination (PaginationDialect::OffsetFetch, added todrivers/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
- Extend
ConnectionParamswith SQL Server-specific TLS/auth fields — [Phase 2] Extend ConnectionParams with SQL Server-specific TLS/auth fields #144 - CRUD composite primary keys (trait default methods +
commands.rsdelegation) — [Phase 2] CRUD composite primary keys (trait default methods) #145 - Foreign key composite aggregation (
STRING_AGG+FOR XML PATHfallback) — [Phase 2] Foreign key composite aggregation (STRING_AGG + FOR XML PATH fallback) #146 -
IDENTITY_INSERThandling for inserts on identity tables — [Phase 2] IDENTITY_INSERT handling for inserts on identity tables #147 - Frontend: DataGrid + Editor + SchemaDiagram composite-PK support — [Phase 2] Frontend: DataGrid + Editor + SchemaDiagram composite-PK support #148
- Flip driver manifest to editing-ready (closes Phase 2) — [Phase 2] Flip driver manifest to editing-ready (closes Phase 2) #149
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)]andskip_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
- 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
- Clone Tabularis, switch to
feat/sql-server(the driver isn't onmain), 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
- Pick a sub-issue below (look for
good first issueandhelp wantedlabels) and say hi in the comments before you start. - Branch off
feat/sql-server, open a PR targetingfeat/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
saurabh500 commentedon May 8, 2026
I will contribute to this effort. I will be posting a plan shortly. Something that @debba and I discussed on Discord.
debba commentedon May 8, 2026
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 :)
saurabh500 commentedon May 8, 2026
@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.
debba commentedon May 9, 2026
@saurabh500 sure you can go ahead create a PR
saurabh500 commentedon May 9, 2026
@debba PR is here. #170
feat(sqlserver): add data type registry and get_create_table_sql (#150)…
FabioMalpezzi commentedon Jul 28, 2026
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
mainrather than the historicalfeat/sql-serverbranch 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.debba commentedon Jul 28, 2026
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.
FabioMalpezzi commentedon Jul 29, 2026
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.