Skip to content

fix(ios): keep plugin enum labels and always identities, and name an identity in a defaults row - #4494

Merged
datlechin merged 3 commits into
TableProApp:mainfrom
mvanhorn:fix/4422-ios-plugin-column-mapping
Nov 25, 2026
Merged

datlechin merged 3 commits into
TableProApp:mainfrom
mvanhorn:fix/4422-ios-plugin-column-mapping

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • iOS plugin columns (ColumnInfo(from:)) keep the plugin's enum labels and mark a GENERATED ALWAYS identity as refusing written values.
  • iOS PostgreSQL reads identity_generation, so a GENERATED ALWAYS AS IDENTITY column is server-owned in Insert Row and the row editor.
  • A row of only defaults on Oracle names the first non-computed column, an always identity included: iOS Insert Row, Copy as INSERT and import, and the Mac's Copy as INSERT ([ColumnInfo].defaultsRowColumn, SQLRowToStatementConverter.identityColumns).
  • DuckDB enum labels are parsed DuckDB's way in TableProDuckDBCore (DuckDBEnumLabels): backslashes and blanks kept, list and array types give element labels. The DuckDB plugin uses it, and the iOS completion catalog's copy is gone.
  • Value completion on both apps skips a list column's labels (SQLCompletionValueLabels), since they are its elements' (PostgreSQL ENUM[], DuckDB ENUM(...)[]).
  • Changelog fragment renamed to this PR, one per bug.

Test plan

  • Fail on main: QueryCompletionCatalogTests/clickHouseLabelsThroughThePluginDriver, PluginBackedDriverTests/columnsKeepLabelsAndIdentityKind, PostgreSQLCatalogQueryTests/identityGeneration, SQLSchemaProviderTests/listColumnOffersNoValues, SQLRowToStatementConverterTests/oracleRowOfOnlyDefaultsNamesTheIdentity.
  • Fail on the PR's first commit: RowInsertPlannerTests/allDefaultsOnOracleIdentityOnly, ClipboardExporterFidelityTests/oracleRowOfOnlyDefaults, MobileImportDataSinkTests/defaultsRowNamesTheIdentity, QueryCompletionCatalogTests/duckDBLabelsComeFromTheDriver.
  • New: DuckDBEnumLabelsTests, SQLCompletionValueLabelsTests, split QueryResultMappingTests.
  • PostgreSQLCatalogQueryTests/armsAgree now expects identity_generation in the column read.
  • The column read and the GENERATED ALWAYS insert error measured on PostgreSQL 17.

Fixes #4422

…on iOS

The mapping now copies plugin.allowedValues for query completion and
sets rejectsWrittenValues only when identityKind is .always. This lets
the forms treat always-identity columns as server-owned while keeping
by-default identities writable. The mapping test covers enum labels,
both identity modes, and virtual columns, and the Oracle driver test now
checks which columns are server-owned.

Fixes TableProApp#4422
@datlechin datlechin changed the title fix(tablepromodels): carry plugin allowed values and always-identity on iOS fix(ios): keep plugin enum labels and always identities, and name an identity in a defaults row Nov 25, 2026
@datlechin
datlechin enabled auto-merge (squash) November 25, 2026 13:44
@datlechin
datlechin merged commit f8e4ec2 into TableProApp:main Nov 25, 2026
35 of 36 checks passed
@mvanhorn

Copy link
Copy Markdown
Contributor Author

@datlechin appreciate you merging this. Enum labels from plugins stay intact on iOS now, and a GENERATED ALWAYS identity column is treated as server-owned in Insert Row and the row editor.

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.

iOS: plugin-backed engines drop allowed values and GENERATED ALWAYS identity

2 participants