Skip to content

refactor(editor): scope query completion by database - #2099

Draft
J2TeamNNL wants to merge 8 commits into
TableProApp:mainfrom
J2TeamNNL:codex/refactor/query-completion-foundation
Draft

refactor(editor): scope query completion by database#2099
J2TeamNNL wants to merge 8 commits into
TableProApp:mainfrom
J2TeamNNL:codex/refactor/query-completion-foundation

Conversation

@J2TeamNNL

@J2TeamNNL J2TeamNNL commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

Wave 1 foundation only for query completion by database. No SingleStore, profile catalogs, uppercase policy or docs product changes yet.

Autocomplete in a query tab now resolves against that tab's own database and schema instead of whatever the object browser is pointing at. SchemaProviderRegistry is keyed by DatabaseScope rather than connection id, and QueryCompletionProfileRegistry caches a resolved profile per scope + database type + server version, invalidating on refresh and disconnect.

Architecture / ABI

PluginKit change is additive: a new non-frozen QueryCompletionProfile plus a defaulted resolveQueryCompletionProfile requirement on PluginDatabaseDriver. No existing initializer or signature changed, so no currentPluginKitVersion bump and no plugin re-release.

The profile resolver closure is @Sendable, so catalog resolution runs off the main actor while the registry keeps its cache bookkeeping on it.

Test plan / results

  • Merged main, which brought the Swift 6 language mode (build: adopt the Swift 6 language mode across the app, plugins and packages #2311). Fixed the two resulting compile errors in QueryCompletionProfileRegistryTests: the fixture builder is now nonisolated static, and the resolution counter is an actor instead of a captured var.
  • Dropped SchemaProviderRegistry.invalidateColumnCache(for:) and provider(for connectionId:). Both went unused once the refresh signal started routing through refresh(request:) and the scope-keyed lookup.
  • docs/scripts/check-docs-against-source.py and docs/scripts/check-writing-style.sh pass locally.
  • Xcode is not available on this machine, so xcodebuild test, the AllPlugins build, the PluginKit ABI gate and swiftlint --strict run in CI rather than locally.

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