refactor(editor): scope query completion by database - #2099
Draft
J2TeamNNL wants to merge 8 commits into
Draft
Conversation
# Conflicts: # TablePro/Views/Editor/SQLCompletionAdapter.swift # TablePro/Views/Main/Child/MainEditorContentView.swift
…wo unused registry lookups
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
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.
SchemaProviderRegistryis keyed byDatabaseScoperather than connection id, andQueryCompletionProfileRegistrycaches a resolved profile per scope + database type + server version, invalidating on refresh and disconnect.Architecture / ABI
PluginKit change is additive: a new non-frozen
QueryCompletionProfileplus a defaultedresolveQueryCompletionProfilerequirement onPluginDatabaseDriver. No existing initializer or signature changed, so nocurrentPluginKitVersionbump 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
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 inQueryCompletionProfileRegistryTests: the fixture builder is nownonisolated static, and the resolution counter is an actor instead of a capturedvar.SchemaProviderRegistry.invalidateColumnCache(for:)andprovider(for connectionId:). Both went unused once the refresh signal started routing throughrefresh(request:)and the scope-keyed lookup.docs/scripts/check-docs-against-source.pyanddocs/scripts/check-writing-style.shpass locally.xcodebuild test, theAllPluginsbuild, the PluginKit ABI gate andswiftlint --strictrun in CI rather than locally.