Repository navigation
feat(ios): suggest tables, columns and keywords in the query editor - #3690
Merged
Merged
Conversation
datlechin
enabled auto-merge (squash)
October 20, 2026 03:53
…mplete # Conflicts: # apple/TableProMobile/TableProMobile/Views/Components/SQLHighlightTextView.swift # apple/TableProMobile/TableProMobile/Views/QueryEditorView.swift
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
FROM,JOIN,INTO,UPDATE; the statement's columns afterSELECT,WHERE,ON,SETandalias.; keywords elsewhere.Tabinserts the first suggestion,Escapehides the bar. Both apply only while suggestions show.TableProAutocompletemoves from TableProMacCore to TableProCore.SQLCompletionProvider(what is offered where, and the ranking) moves into it behindSQLCompletionCatalog, so both apps complete the same way. Mac adapters keep the existing calls.[a].[b]references resolveUPDATE t SETno longer readsSETas an alias"ord|"on PostgreSQL and the auto-closed[ord|]on SQL Server now complete inside the quotes.Test plan
Fail on main, pass here:
swift testTableProCore:SQLContextAnalyzerLexicalTests,SQLContextAnalyzerQuotedReferenceTests,SQLCompletionProviderCatalogTests(SELECT * FROM orleads withorders,o.afterFROM orders ogives its columns),SQLCompletionWindowTests, newSQLTokenBoundaryTestscases.SQLCompletionServiceTokenStartTests.CompletionIdentifierQuotingTests,QueryCompletionCatalogTests,QueryCompletionControllerTests,SQLEditorTextViewKeyCommandTests.Mac completes as before: the 22 Mac completion suites pass unchanged.
Tests changed on purpose:
SQLContextAnalyzerTests.unterminatedDoubleQuoteReadsAsAStringis now an ANSI identifier-prefix case. MySQL keeps the string reading.QueryCompletionControllerTests.noReadWhileRunning: a run's end no longer reads columns by itself. A read then would replace the run's row count and warnings on the session.Real build, iPhone 18 Pro simulator, Chinook sample database:
SELECT * FROM InvoffersInvoiceandInvoiceLine.SELECT * FROM Invoice i WHERE i.offers Invoice's columns, also on first focus of restored text.Not in this PR
Order Detailsat[Order Det|]replaces onlyDet.tokenStartstops at the space (SQLTokenBoundary.walkBack); changing it moves the Mac's live re-rank token.SELECT ROW_COUNT()orSHOW WARNINGSreplaces what the run left, as the Data tab'sfetchColumnsalready does (DataBrowserViewModel.swift:138).ConnectionCoordinator.swift:342).SQLBuilder.swift:357).DataBrowserViewModel.swift:145-147).SQLCompletionService.swift:67-69).Fixes #3633