Skip to content

refactor(macos): pass the caller's schema to DDL generators, drop the driver adapter downcasts and move the parts pane behind a plugin capability - #4294

Merged
datlechin merged 4 commits into
mainfrom
refactor/driver-layer-4272
Nov 15, 2026
Merged

datlechin merged 4 commits into
mainfrom
refactor/driver-layer-4272

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • SD-13: PluginKit gains schema-taking overloads of the table DDL generators (add, modify and drop column, index, foreign key, check constraint, primary key, create table). Their defaults forward to the schema-less requirements, so a kit-44 plugin keeps working. Kit 44 -> 45, minimum unchanged.
  • SD-13: PostgreSQL, SQL Server, Oracle, Snowflake, DuckDB, Dameng, Trino and BigQuery qualify with the caller's schema and use the session schema only as the fallback. PostgreSQL's and Oracle's session schema now sits behind a lock.
  • SD-13: Structure saves, Create Table, Compare & Sync and Object Copy pass their scope's schema. Compare & Sync names the target's schema, never the source snapshot's.
  • SD-13: Oracle's column reorder plan, SQL Server's check constraint read, and Oracle's and DuckDB's DROP INDEX now name the requested schema. Dameng's CREATE TABLE goes out one statement per call. SQL Server's column rename brackets each part of the name sp_rename parses.
  • AR-07: no as? PluginDriverAdapter left in TablePro/. DatabaseDriver gains plugin, sessionQueryTimeoutSeconds, truncateTableStatements, dropObjectStatement, streamRows and streamExportRows. tableOperationEligibility moves onto the protocol. The adapter's pure PluginKit forwards are gone. A SwiftLint rule refuses a new cast.
  • UI-13: the Parts pane reads a new PluginKit capability, PluginStorageParts. The ClickHouse plugin owns the system.parts read and the OPTIMIZE, DROP and DETACH PARTITION statements. The pane shows for any driver that answers it, not for a type check.
  • Not in this PR: AR-05, AR-06, IO-09, and the rest of DL-10 (the schema-less adapter overloads and the iOS DatabaseDriver).

Test plan

  • PostgreSQLDDLSchemaQualificationTests: every generator names the given schema; nil falls back to the session's.
  • MSSQLSchemaQueriesTests: a schema named [dbo] or a table with a quote stays inside its own bracketed part.
  • PluginSchemaDDLDefaultsTests: a driver with only the schema-less generators answers the new overloads.
  • SchemaSyncTargetSchemaTests: Compare & Sync and a Structure save name the target schema.
  • DatabaseDriverPluginSurfaceTests: the adapter witnesses each lifted member through the protocol; a double answers none.
  • StructureServerSupportTests, StructureAvailabilityTests, StoragePartsGridTests, ClickHousePartStatementsTests: the Parts pane follows the capability.
  • verify.sh plugins, abi (changed, kit 45, minimum 19), ios ConnectionCoordinatorCatalogTests and lint.

Refs #4272

@datlechin
datlechin merged commit ab9c814 into main Nov 15, 2026
11 checks passed
@datlechin
datlechin deleted the refactor/driver-layer-4272 branch November 17, 2026 04:12
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.

1 participant