Repository navigation
feat(sidebar): wire routines end-to-end (#1038 PR C) - #1204
Merged
Merged
Conversation
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
Wires the routines pipeline added in PRs A and B end-to-end. After this PR, opening a Postgres or MySQL connection automatically shows actual procedures and functions in the sidebar with their own Refresh actions; other engines surface an empty (hidden) routine section until they adopt
PluginProcedureFunctionSupport.PluginDriverAdapterdowncasts toPluginProcedureFunctionSupportand mapsPluginRoutineInfoto the app'sRoutineInfo. Drivers without the protocol return an empty list, so unsupported engines no-op safely.DatabaseDrivergainsfetchProcedures(schema:)andfetchFunctions(schema:)with default[]implementations, keeping every existing driver source compiling untouched.SchemaServicecachesproceduresandfunctionsper connection.load()fetches them in parallel with tables viaasync let; routine errors are logged and leave the slot empty without blocking the table load or flipping the state to.failed.SidebarViewreads routines from the sameSchemaServiceit already uses for tables. The section header "Refresh" action dispatches to the matching coordinator method per kind.Scope is wire-up only: no plugin changes, no
PluginKitABI version bump, noTableInfo.TableTypechanges.Test plan
xcodebuild ... test -only-testing:TableProTests/SchemaServiceRoutinesTests(5 tests pass): caches procedures and functions on load, concatenates routines inroutines(for:), routine fetch failures do not block table loading,invalidate()clears all caches,reloadProcedures()refreshes only procedures.xcodebuild ... test -only-testing:TableProTests/SidebarViewModelMultiSectionTestsstill passes (existingfilteredRoutinescoverage from PR B).swiftlint --strictclean on every touched source file.