Skip to content

refactor(ios): run Oracle on the Mac plugin's driver - #4407

Merged
datlechin merged 3 commits into
mainfrom
refactor/ios-oracle-plugin
Nov 22, 2026
Merged

datlechin merged 3 commits into
mainfrom
refactor/ios-oracle-plugin

Conversation

@datlechin

Copy link
Copy Markdown
Member

Summary

  • iOS runs Oracle on the Mac plugin's OraclePluginDriver behind PluginBackedDriver (OracleBackedDriver), compiled as a source path like DuckDB, SQLite, ClickHouse, D1 and MongoDB. The hand-written OracleDriver.swift and the iOS copy of the TLS mapping are gone; the 12 per-file plugin entries in the iOS project.yml are replaced by the folder.
  • The routine debugger and the connection diagnostics stay on the Mac: excluded from the iOS build, debugState under #if !os(iOS), and PluginDiagnosticProvider declared on the diagnostics extension.
  • Plugin: on iOS no DBMS_OUTPUT capture is enabled at connect, since nothing reads it back and ENABLE(NULL) buffers without limit.
  • Plugin: streamEachRow, one row per element. A grid read takes each row as it arrives and cuts its values for display through PluginRowEmitter, so no batch of rows is held whole; one row past the cap ends the read.
  • OracleBackedDriver keeps what iOS did: Stop closes the channel (OracleNIO has no out-of-band cancel), Verify CA is refused with the iOS message, the stored SSL mode dials as it is with the tunnel's server name, the query timeout reaches the core, edits stay on SQLBuilder's Oracle SQL.
  • Export keeps OracleMobileExportCatalog (objects under their owner, D14) over the plugin's own exportCatalog; import keeps OracleMobileWriteDialect. PluginBackedDriver.makeExportCatalog and makeWriteDialect move into the class body so Oracle overrides them.
  • On purpose, iOS now does what the Mac does: identity and virtual columns read as auto-increment and generated, the connection's connect timeout bounds the sign-in, a TLS failure shows the TLS error screen (SSLHandshakeError), an anonymous block reports no row count, execute spells bytes in hex.
  • Tests rewritten for the new driver, behavior kept: OracleSSLMappingTests (the plugin's mapping, through the factory; the Verify CA message through connect), NativeDriverQueryTimeoutTests (Oracle case), OracleTransferEngineTests (the plugin's binder). OracleDriverTransactionStateTests, which pinned the native driver before connecting, moved to PluginBackedDriverTests (idle opens its own transaction, an open one is joined).
  • New: OracleBackedDriverTests (connection fields reach the plugin, grid cut, cap and Stop let the plugin's read go, errors pass on, identity and virtual columns flagged, edits stay on SQLBuilder).

Refs #4272 (IO-09, third of seven engines).

Test plan

  • iOS job: the Oracle, plugin-backed, factory, transfer and export suites.
  • macOS job: AllPlugins builds the Oracle plugin.

@datlechin
datlechin merged commit f6e44be into main Nov 22, 2026
11 checks passed
@datlechin
datlechin deleted the refactor/ios-oracle-plugin branch November 22, 2026 00:38
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