Skip to content

feat(kingbasees): add a registry driver - #3855

Open
J2TeamNNL wants to merge 9 commits into
TableProApp:mainfrom
J2TeamNNL:codex/kingbasees-support
Open

J2TeamNNL wants to merge 9 commits into
TableProApp:mainfrom
J2TeamNNL:codex/kingbasees-support

Conversation

@J2TeamNNL

@J2TeamNNL J2TeamNNL commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a downloadable KingbaseES driver: port 54321, kingbase:// and kingbase8:// URLs, libpq through the PostgreSQL plugin's sources.
  • Read database_mode inside the bounded connect. PostgreSQL and Oracle modes connect. MySQL and SQL Server modes are refused. A server without the setting reads as PostgreSQL mode.
  • Split SQL with the connection's session grammar on every path that runs it: Run Statement, SQL file import, MCP single statements, startup commands, Compare & Sync and copy scripts, completion, diagnostics and folding. The editor reads the session of the database its tab is bound to.
  • In Oracle mode, a PostgreSQL-style quoted routine body (AS '...', AS $$...$$) ends at its ;. A PL/SQL body stays whole.
  • List KingbaseES with PostgreSQL for type family, transaction rules, row counts, identity inserts, vocabulary, column defaults, index keys, foreign keys, the dashboard, EXPLAIN format, the NEXTVAL write check and iOS import.
  • Gate KingbaseES's sys_ admin functions like their pg_ twins: sys_read_file, sys_ls_dir, sys_terminate_backend and the rest.
  • Copy and structure sync between PostgreSQL and KingbaseES in PostgreSQL mode. An Oracle-mode server copies and syncs structure only with another Oracle-mode server.
  • PostgreSQL catalog SQL no longer depends on '' or NULL concatenation. In Oracle mode it now keeps column defaults, identity and generated flags, generation expressions and index spellings. COLLATE is evaluated once per column.
  • "is empty" and "is not empty" filters use LENGTH on Oracle and KingbaseES, where '' reads as NULL.
  • Dashboard uptime reads as a PostgreSQL interval in Oracle mode.
  • PGlite binary copies write bytea literals.
  • Curated engine lists name KingbaseES explicitly; the SqlDialect swaps are reverted, and the Swift 6.2 compile changes in unrelated files are dropped.
  • KingbaseES gets its own icon and tagline and its measured system schemas.

Test plan

  • apple/scripts/probes/check-kingbasees.sh against KingbaseES V9R1C10: 25/25 in pg mode and in oracle mode. The old catalog SQL fails 4 of the new checks in oracle mode.
  • Every changed catalog query compared on PostgreSQL 18 and both KingbaseES modes.
  • New tests: session-aware copy and sync gates, registry entry, Oracle-mode splitting (scanner, file import, MCP, editor, startup commands), quoted routine bodies, sys_ gate cases, curated-list rows, empty filters.
  • Unit plan: 26,758 of 26,759 passed. The one failure was a wrong test expectation; fixed, and the touched suites rerun green after the last main merge. iOS MacOnlyImportRowTests pass.
  • AllPlugins builds and all 43 plugins load. TableProCore grammar, vocabulary, query and PluginKit tests pass.
  • Pins updated on purpose: PostgreSQLIndexReplayTests.suffixAndCut, PostgreSQLColumnQueryTests (generation expression from pg_attrdef), PostgreSQLCatalogSQLPinTests.columnsWithMaterializedViews, PostgreSQLColumnDDLSequenceCollationTests.collateClauseWrapsTheSameCollation.
  • Docs: docs(databases): document KingbaseES connections docs#132.

Needs the maintainer

  • Publish the KingbaseES registry plugin with the next app release.

Fixes #2283

@J2TeamNNL
J2TeamNNL marked this pull request as ready for review October 27, 2026 02:51
@datlechin
datlechin enabled auto-merge (squash) October 27, 2026 11:08

This branch has not been deployed

No deployments
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.

KingbaseES driver

2 participants