Skip to content

fix(plugins): bind parameters by type, carry the default mark, stream large reads, and read Oracle region zones - #4190

Merged
datlechin merged 9 commits into
mainfrom
fix/audit-wave-5-plugins
Nov 11, 2026
Merged

datlechin merged 9 commits into
mainfrom
fix/audit-wave-5-plugins

Conversation

@datlechin

@datlechin datlechin commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • DL-08: on Trino, Cloudflare R2 SQL and InfluxDB, a query parameter is written by the type chosen in the panel. Integer and Decimal go as numbers, Boolean as TRUE or FALSE, Date quoted. String keeps a plain number such as 42 as a number and quotes anything else, 1E5 included. PluginKit carries the types in PluginStatementContext.parameterKinds; Fetch All and pagination bind the same types.
  • GE-09: PluginKit carries the default mark (PluginRowChange.defaultColumns, PluginCapabilities.columnDefaultMarks), so the text __DEFAULT__ is saved as text on the Mac and in the iOS app.
    • SQL Server, Oracle, ClickHouse, Trino, Teradata, Dameng, Snowflake, BigQuery, MongoDB, Cassandra, DynamoDB, Bigtable, Spanner, Qdrant and SurrealDB write a default only where the mark is.
    • Elasticsearch leaves a defaulted field out of a new document, so a duplicated row gets its _id from the server.
    • Redis, etcd, Typesense, Memcached, Firebase and InfluxDB refuse a cell left to a default.
  • DL-06: Teradata, InfluxDB, SAP HANA and Memcached stream exports and capped reads.
    • Teradata hands each reply on before it asks for the next; a run with the row limit stops at it (it read every row).
    • InfluxDB reads the grid's pages and exports chunk by chunk; 2.x InfluxQL asks for chunked=true.
    • SAP HANA: helper protocol 2 with open, fetch and close cursor; the query timeout no longer covers row transfer.
    • Memcached reads export values on a connection of its own, declares a listing cut at 1,000,000 keys, drops listed keys a text command line cannot carry, and reports a connection a stopped request closed, so the app reconnects.
    • PluginBoundedStream.collect marks a result cut at the limit its stream declared.
  • Teradata Stop: with Transaction Mode set to ANSI, a Stop that rolled back the transaction says so on the tab (PluginStopRolledBackTransaction).
  • SD-06: an Oracle TIMESTAMP WITH TIME ZONE stored with a region shows its wall clock and the region name, from SYS.V_$TIMEZONE_NAMES read once per connection. Without access, or for a name macOS does not know, it shows the UTC instant with +00:00. Write-back takes a region name.
  • Dropped SD-04 INHERITS: a read of a parent includes its children's rows (PostgreSQL docs, Inheritance) and ONLY on a partitioned parent reads none. SQL export, Object Copy and a row-scoped export build that read in host code, so INHERITS in the DDL would restore every child row twice.
  • Dropped R2 SQL from DL-06: its API answers one JSON body of at most 10,000 rows, and the default stream already cancels the request.
  • Tests changed on purpose: OracleCellFormattingTests.testRegionNamedZoneIsAPlaceholder (now testRegionZoneIsTheWallClockAndOraclesName), TeradataStopTests.stopAbortsTheRequestAndKeepsTheSession (ANSI, expects the rollback), QdrantRowWriteTests.duplicatedRowGetsNewID, ClickHouseDMLStatementTests.insertStaysPlain and emptyInsertTakesDefaults (pass the mark), SQLParameterExtractorTests, PaginationStateTests and MainContentCoordinatorSortTests (typed values).
  • PluginKit stays kit 44, additive only.
  • Docs: docs(databases): parameter types, Oracle region zones, Teradata Stop docs#196

Needs the maintainer

  • An Oracle account that cannot read V_$TIMEZONE_NAMES sees region values as UTC with +00:00 rather than a placeholder.

Known limits

  • Kafka and Weaviate still refuse the text __DEFAULT__: their writers cannot throw. Typesense and Firebase refuse a duplicated row's defaulted id.
  • The Teradata notice needs Transaction Mode ANSI; on DEFAULT or TERA, a Stop after BT rolls back silently. Scripts, Fetch All and exports end as a plain cancel.
  • A Memcached export can miss its cut warning when listed keys expire during it.
  • SAP HANA sends no CANCEL SESSION once a cursor is open; a Stop there waits for the fetch, then severs after 30 s.
  • An Oracle region value in a repeated daylight-saving hour reads back as standard time.
  • Not run against a live server: Teradata streaming, Abort and Cancel; InfluxDB chunked reads and cancel; the HANA cursor protocol; Memcached export; Oracle region ids, view access and write-back (apple/scripts/probes/check-oracle-time-zone-regions.sh); each driver's default mark.

Test plan

  • verify.sh: build, AllPlugins, the ABI check, lint, the Unit suites for the changed types, TableProCore (PluginKit, Teradata, InfluxDB, Qdrant, Spanner, Memcached), TableProOracle, the HANA helper's go vet and go test.
  • New: PluginTypedParameterBindingTests, PluginBoundedStreamDeclaredLimitTests, PluginDriverAdapterParameterKindTests, StopRollbackNoticeTests, RedisColumnDefaultTests, TeradataStreamTests, InfluxGridStreamTests, OracleTimeZoneRegionsTests, the HANA cursor tests in Go, and cases in RowChangeStatementFactoryExpressionTests, MemcachedKeyListingTests and iOS PluginBackedDriverTests.

…by default, and fix Stop, defaults and gate cancels across drivers
# Conflicts:
#	apple/Packages/TableProCore/Sources/TableProTeradataCore/TeradataConnection.swift
#	apple/Packages/TableProCore/Tests/TableProTeradataCoreTests/TeradataStopTests.swift
#	apple/Plugins/CassandraDriverPlugin/CassandraRowWriter.swift
#	apple/TablePro/Core/DataWrite/RowChangeStatementFactory.swift
#	apple/TableProTests/Core/DataWrite/RowChangeStatementFactoryExpressionTests.swift
@datlechin
datlechin merged commit bc322d7 into main Nov 11, 2026
11 checks passed
@datlechin
datlechin deleted the fix/audit-wave-5-plugins branch November 11, 2026 16:20
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