Skip to content

feat(plugin): add Dameng DM8 support - #2114

Draft
sophiathedev wants to merge 4 commits into
TableProApp:mainfrom
sophiathedev:feat/dm8-plugin
Draft

feat(plugin): add Dameng DM8 support#2114
sophiathedev wants to merge 4 commits into
TableProApp:mainfrom
sophiathedev:feat/dm8-plugin

Conversation

@sophiathedev

@sophiathedev sophiathedev commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Adds first-class Dameng DM8 support as a downloadable macOS database-driver plugin.

Preview

TablePro confirming an external Dameng DM8 connection

What you get

  • Connect with the dm:// URL scheme and browse or switch schemas without installing a local DM client.
  • Browse tables, views, columns, indexes, and foreign keys; run queries, edit rows, use transactions, and generate DDL.
  • Get DM8-specific statements, functions, data types, schemas, tables, views, and columns while typing.
  • Inspect generated table metadata and render native DM8 EXPLAIN output in TablePro's visual plan view.
  • Build and publish the plugin for both Apple Silicon and Intel Macs.

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-dameng snapshot 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.xctest against 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.
  • Rust bridge and vendored protocol/type suites: 192 tests passed; the ignored OrbStack bridge workflow also passed separately.
  • Apple Silicon and Intel plugin builds: BUILD SUCCEEDED.
  • Focused TablePro registry, database-type, auto-limit, statement-classifier, parameter-binder, and plan-parser suites: TEST SUCCEEDED.
  • 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 --ifdefindent option.

Closes #1671
Closes #2010
Related to #2003

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.

plz support DM8(dameng) Feature: Add support for Dameng (DM) Chinese database

1 participant