feat(connections): add desktop DatabaseType constants to TableProModels (Phase 1 prep)#1494
Merged
Merged
Conversation
…roModels.DatabaseType for desktop parity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 1 (R-002) step 8.1: bring the authoritative
TableProModels.DatabaseTypeto constant parity with the desktop app's duplicate, so the desktop type can be removed in a later PR without breaking call sites. Package-only and additive..cockroachdb("CockroachDB"),.scylladb("ScyllaDB"),.turso("Turso").allKnownTypeslist at 17 (mobile's type picker is unchanged); the new constants are intentionally outside it.allKnownTypes(static),pluginTypeId/iconName(hardcoded). Mobile and the TableProCore library modules depend on those as-is.Risk Addressed
DatabaseTypedefinitions (groundwork; full consolidation is the follow-up).Seam note for the follow-up (8.2)
The desktop type's
allKnownTypes,pluginTypeId, andiconNameare registry-driven; the package's are static/hardcoded. Swift extensions can't override static/instance members, so when the desktop adopts this type it must install the registry-driven behavior via a resolver hook (or distinct names), not as overrides. The desktop.bigQueryvs package.bigqueryconstant-name mismatch is reconciled there too.Verification
swift test --package-path Packages/TableProCore(61 tests pass; newDatabaseTypecases included)scripts/audit-refactor-health.sh --check(contract-drift gate clean)Notes