feat(plugin): add Dameng DM8 support - #2114
Draft
sophiathedev wants to merge 4 commits into
Draft
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
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.
Adds first-class Dameng DM8 support as a downloadable macOS database-driver plugin.
Preview
What you get
dm://URL scheme and browse or switch schemas without installing a local DM client.EXPLAINoutput in TablePro's visual plan view.Driver architecture and safety
The plugin uses Swift for TablePro integration, a documented C ABI for ownership boundaries, and a Rust native-wire bridge. The bridge vendors a pinned MIT-licensed
rust-damengsnapshot with compatibility fixes for multi-column results, DECIMAL values, empty result sets, bounded message reads, LOB limits, and DM8's text EXPLAIN response.Parameter substitution is SQL-state aware, escapes text values, and encodes binary values with
HEXTORAW. Native panics are contained at the C boundary, response and LOB allocations are capped, row limits stop after the requested cap plus a truncation sentinel, and unrecoverable protocol failures close the connection.Native TLS is not available yet; the documentation recommends SSH, SOCKS, or Cloudflare tunnels for untrusted networks. Native binary and off-row LOB reads remain documented limitations.
Tests
DamengDriverTests.xctestagainst DM8 in OrbStack: 6 tests passed, including schema/table/view metadata, empty foreign-key results, Unicode and binary values, row caps, EXPLAIN, transactions, invalid credentials, hostile inputs, and cleanup.swift test --package-path Packages/TableProCore: 181 tests passed.swiftlint lint --strict: clean.The aggregate TablePro test run reached unrelated existing failures and then stalled in
MCPBridgeIntegrationTests.BridgeHarness.startReader(); all DM8 and changed-area suites pass. SwiftFormat 0.62.1 cannot read the repository's existing legacy--ifdefindentoption.Closes #1671
Closes #2010
Related to #2003