Skip to content

Add SQL Server support#538

Draft
Copilot wants to merge 4 commits intostagingfrom
copilot/add-support-for-sqlserver
Draft

Add SQL Server support#538
Copilot wants to merge 4 commits intostagingfrom
copilot/add-support-for-sqlserver

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 14, 2026

Adds SQL Server as a supported database backend, alongside PostgreSQL, MySQL, and Snowflake.

Backend

  • api/loaders/sqlserver_loader.py — New loader using pymssql, extracting schema via sys.* catalog views. Implements full BaseLoader interface: load, extract_tables_info, extract_columns_info, extract_foreign_keys, extract_relationships, execute_sql_query, is_schema_modifying_query, refresh_graph_schema.
  • api/core/schema_loader.py, api/core/text2sql.py — Register sqlserver:// URL prefix → SQLServerLoader
  • api/sql_utils/sql_sanitizer.py — Handle SQL Server bracket quoting ([identifier]); refactored _is_already_quoted helper to support all three quote styles cleanly
  • pyproject.toml — Added pymssql~=2.3.13

Frontend

  • DatabaseModal.tsx — SQL Server option in type selector, sqlserver:// URL placeholder, port 1433 default, protocol in manual URL builder

Connection URL format

******host:1433/database

Tests

  • 11 unit tests in test_sqlserver_loader.py covering URL parsing, serialization, schema modification detection, connection error handling, and successful load flow

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 0.0.0.0.in-addr.arpa
    • Triggering command: /usr/local/bin/node node server.js (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI linked an issue Apr 14, 2026 that may be closed by this pull request
Copilot AI and others added 2 commits April 14, 2026 13:34
- Create api/loaders/sqlserver_loader.py following MySQL/Postgres pattern
- Add pymssql dependency to pyproject.toml
- Register SQL Server loader in schema_loader.py and text2sql.py
- Update DatabaseSpecificQuoter for SQL Server bracket quoting
- Update SQLIdentifierQuoter to handle bracket-quoted identifiers
- Add SQL Server option to frontend DatabaseModal.tsx
- Add unit tests in test_sqlserver_loader.py (11 tests)
- Update spellcheck wordlist

Agent-Logs-Url: https://github.com/FalkorDB/QueryWeaver/sessions/cb38384c-67c5-45c2-a553-8993ac42376b

Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
…_schema and deduplicate test assertion

Agent-Logs-Url: https://github.com/FalkorDB/QueryWeaver/sessions/cb38384c-67c5-45c2-a553-8993ac42376b

Co-authored-by: gkorland <753206+gkorland@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for SQLServer Add SQL Server support Apr 14, 2026
Copilot AI requested a review from gkorland April 14, 2026 13:39
@github-actions
Copy link
Copy Markdown

Dependency Review

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ⚠️ 1 package(s) with unknown licenses.
See the Details below.

Snapshot Warnings

⚠️: No snapshots were found for the head SHA 435686a.
Ensure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice.

License Issues

uv.lock

PackageVersionLicenseIssue Type
pymssql2.3.13NullUnknown License

OpenSSF Scorecard

PackageVersionScoreDetails
pip/pymssql 2.3.13 UnknownUnknown

Scanned Files

  • uv.lock

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for SQLServer

2 participants